/* Flogent website. One dark look, matching the desktop app.
   Layout: a calm top bar, wide content column (1120px), sections separated by space, not boxes. */
:root {
  --bg: #13142a;          /* page ground, a shade deeper than the app's #1B1D33 */
  --surface: #1b1d33;     /* the app's own panel colour */
  --surface-2: #24274a;
  --line: rgba(167, 139, 250, 0.16);
  --fg: #eceafb;
  --muted: #a4a6c8;
  --faint: #6f7298;
  --purple: #7c3aed;      /* Flogent purple */
  --purple-hi: #a78bfa;
  --purple-ink: #ffffff;
  --green: #22c55e;
  --amber: #f5a524;
  --red: #ef4444;

  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2.125rem;
  --step-4: clamp(2.375rem, 5.2vw, 3.75rem);

  --radius: 10px;
  --wrap: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--purple-hi); text-underline-offset: 3px; }
a:hover { color: var(--fg); }
:focus-visible { outline: 2px solid var(--purple-hi); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); font-weight: 600; }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 38em; }
.eyebrow { font-family: var(--font-data); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--purple-hi); }
.muted { color: var(--muted); }
.mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.prose { max-width: 42rem; display: grid; gap: 1rem; }
.prose h2 { font-size: var(--step-2); margin-top: 1.5rem; }
.prose h3 { margin-top: 0.75rem; }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.4rem; }

/* Top bar */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--fg); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-mark { width: 46px; height: 32px; flex: none; background: url("flogent-logo.png") center / contain no-repeat; }
.nav { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; padding: 0.45rem 0.75rem; border-radius: 8px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); background: var(--surface); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 600 var(--step-0)/1 var(--font-body);
  padding: 0.85rem 1.3rem; border-radius: 9px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--purple); color: var(--purple-ink); }
.btn-primary:hover { background: #8b4cf5; color: var(--purple-ink); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--fg); }
.btn-sm { padding: 0.55rem 0.9rem; font-size: var(--step--1); }
.nav .btn { margin-left: 0.4rem; }
.nav .btn-primary { color: var(--purple-ink); }
.nav .btn-primary:hover { background: #8b4cf5; color: var(--purple-ink); }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

/* Sections */
section { padding-block: clamp(3rem, 8vw, 5.5rem); }
section + section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 0.75rem; margin-bottom: 2.25rem; max-width: 44rem; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(3rem, 8vw, 5rem); }
.hero-grid { display: grid; gap: 2.5rem; }
.hero-copy { display: grid; gap: 1.25rem; justify-items: start; }
.hero h1 em { font-style: normal; color: var(--purple-hi); }
.fine { font-size: var(--step--1); color: var(--faint); }

/* The day strip: yesterday's timesheet, filled in */
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-width: 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sheet-head strong { font-family: var(--font-display); font-weight: 600; }
.sheet-body { padding: 1.1rem 1.25rem 1.25rem; display: grid; gap: 1rem; }
.strip-scroll { overflow-x: auto; }
.strip { position: relative; min-width: 560px; }
.hours { display: grid; grid-template-columns: repeat(10, 1fr); font-family: var(--font-data); font-size: 0.7rem; color: var(--faint); margin-bottom: 6px; }
.blocks { display: flex; height: 54px; gap: 3px; }
.blk { border-radius: 6px; display: flex; align-items: flex-end; padding: 6px 7px; font-size: 0.68rem; line-height: 1.2; font-weight: 600; overflow: hidden; color: #10111f; min-width: 0; }
.blk span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.g { background: var(--green); }
.blk.a { background: var(--amber); }
.blk.r { background: transparent; border: 2px dashed var(--red); color: var(--red); }
.blk.off { background: var(--surface-2); color: var(--faint); }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: var(--step--1); color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rows { display: grid; gap: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 0.9rem; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--line); font-size: var(--step--1); }
.row:last-child { border-bottom: 0; }
.row .dot { width: 9px; height: 9px; border-radius: 50%; }
.row .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .name b { font-family: var(--font-data); font-weight: 500; color: var(--muted); margin-right: 0.5rem; }
.row .h { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.row.total { font-weight: 600; }
.fix { color: var(--red); font-weight: 600; }

/* Three things */
.modules { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.module { background: var(--bg); padding: 1.6rem; display: grid; gap: 0.7rem; align-content: start; }
.module .tag { font-family: var(--font-data); font-size: 0.75rem; color: var(--purple-hi); }
.module ul { margin: 0.25rem 0 0; padding-left: 1.1rem; color: var(--muted); display: grid; gap: 0.35rem; }

/* FloDrive split */
.split { display: grid; gap: 2.5rem; align-items: center; }
.split > * { min-width: 0; }
.ring { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.ring svg { display: block; width: 100%; height: auto; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.85rem; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 0.6rem; }
.checks li::before { content: ""; width: 18px; height: 18px; margin-top: 3px; border-radius: 5px; background: var(--purple) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat; }

/* Setup steps (a real sequence, so numbered) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.9rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); font-family: var(--font-data); color: var(--purple-hi); font-size: 0.95rem; padding-top: 0.15rem; }
.steps li > div { display: grid; gap: 0.25rem; min-width: 0; }

/* Call to action band */
.cta { background: linear-gradient(135deg, #2a1a5e 0%, #1b1d33 70%); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.75rem, 5vw, 3rem); display: grid; gap: 1.25rem; justify-items: start; }

/* Forms */
[hidden] { display: none !important; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.25rem, 4vw, 2rem); display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: var(--step--1); }
.field .hint { font-size: 0.8rem; color: var(--faint); }
input, select {
  font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem 0.85rem; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--purple-hi); outline-offset: 0; border-color: transparent; }
.two { display: grid; gap: 1.1rem; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; font-size: var(--step--1); color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--purple); }
.form-msg { font-size: var(--step--1); padding: 0.75rem 0.9rem; border-radius: 8px; background: var(--surface-2); }
.form-msg.err { color: #fecaca; background: rgba(239, 68, 68, 0.14); }
.done { display: grid; gap: 1rem; justify-items: start; }

/* Price */
.price { display: grid; gap: 1.25rem; }
.price-card { background: var(--surface); border: 1px solid var(--purple); border-radius: 16px; padding: clamp(1.5rem, 4vw, 2.25rem); display: grid; gap: 1.1rem; align-content: start; }
.price-card .amount { font-family: var(--font-display); font-size: var(--step-4); font-weight: 700; line-height: 1; }
.price-card .amount small { font-size: var(--step-1); color: var(--muted); font-weight: 500; }
.plain-card { background: transparent; border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.5rem, 4vw, 2.25rem); display: grid; gap: 1rem; align-content: start; }

/* Download */
.dl { display: grid; gap: 2rem; }
.spec { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.25rem; font-size: var(--step--1); margin: 0; }
.spec dt { color: var(--faint); }
.spec dd { margin: 0; }

/* FAQ */
details { border-top: 1px solid var(--line); padding-block: 1rem; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--font-data); color: var(--purple-hi); }
details[open] summary::after { content: "–"; }
details p { margin-top: 0.6rem; color: var(--muted); max-width: 42rem; }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: var(--step--1); color: var(--faint); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--fg); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); padding: 0.75rem 1rem; border-radius: 10px; font-size: var(--step--1); max-width: calc(100% - 32px); }

@media (min-width: 820px) {
  .hero-grid { grid-template-columns: 0.95fr 1.05fr; align-items: center; }
  .modules { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr 1fr; }
  .price { grid-template-columns: 1.1fr 0.9fr; }
  .dl { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
  .signup-grid { grid-template-columns: 0.9fr 1.1fr; }
}
.signup-grid { display: grid; gap: 2.5rem; align-items: start; }
.signup-grid > * { min-width: 0; }

@media (max-width: 560px) {
  .nav { margin-left: 0; width: 100%; }
  .nav a { padding: 0.4rem 0.55rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .blk { animation: grow 0.6s ease-out both; transform-origin: left; }
  .blk:nth-child(2) { animation-delay: 0.05s; } .blk:nth-child(3) { animation-delay: 0.1s; }
  .blk:nth-child(4) { animation-delay: 0.15s; } .blk:nth-child(5) { animation-delay: 0.2s; }
  .blk:nth-child(6) { animation-delay: 0.25s; } .blk:nth-child(7) { animation-delay: 0.3s; }
  .blk:nth-child(8) { animation-delay: 0.35s; }
  @keyframes grow { from { transform: scaleX(0.92); opacity: 0.6; } to { transform: none; opacity: 1; } }
}
@media (min-width: 1100px) { .modules { grid-template-columns: repeat(4, 1fr); } }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
