/* FlowClone demo page. Plain CSS, no framework. One accent (the app's Interface-theme blue). */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f6f8;
  --bg-2: #eceef2;
  --surface: #fcfcfd;
  --text: #14161b;
  --muted: #545b69;
  --line: #dde1e7;
  --line-strong: #c3c9d2;
  --accent: #1660e8;
  --accent-text: #1553c7;
  --on-accent: #fbfcff;
  --accent-soft: #e4ecfd;
  --bad: #a3321f;
  --bad-soft: #fbe9e5;
  --good: #1f6b3d;
  --good-soft: #e3f3e8;
  --shadow: 0 1px 2px rgb(20 32 60 / 6%), 0 12px 32px -12px rgb(20 32 60 / 18%);
  --radius: 14px;
  --radius-sm: 8px;
  --font: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1014;
    --bg-2: #14171d;
    --surface: #171a21;
    --text: #e9ebf0;
    --muted: #a0a7b4;
    --line: #272b34;
    --line-strong: #3a404b;
    --accent: #5b93ff;
    --accent-text: #86afff;
    --on-accent: #0a0f1c;
    --accent-soft: #19233a;
    --bad: #ff9d8a;
    --bad-soft: #3a1d18;
    --good: #82d7a2;
    --good-soft: #15291e;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 16px 40px -16px rgb(0 0 0 / 70%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 620; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
kbd {
  font-family: var(--mono);
  font-size: 0.82em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  white-space: nowrap;
}
q { quotes: "“" "”"; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 30; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 640px) { .wrap { padding-inline: 16px; } body { font-size: 16px; } }

.eyebrow { font-size: 0.8rem; font-weight: 560; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px; }
.fine { font-size: 0.86rem; color: var(--muted); line-height: 1.55; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
@media (prefers-reduced-transparency: reduce) { .topbar { background: var(--bg); backdrop-filter: none; } }
.topbar__inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 640; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
.nav { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.nav a { display: inline-block; padding: 8px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.nav a:hover { color: var(--text); background: var(--bg-2); }
.nav .nav__cta { color: var(--text); border: 1px solid var(--line-strong); margin-left: 6px; }
@media (max-width: 720px) { .nav__section { display: none; } }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 560; font-size: 0.97rem; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s;
}
.button:hover { background: var(--bg-2); text-decoration: none; }
.button:active { transform: translateY(1px) scale(0.99); }
.button--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button--primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }

/* Hero */
.hero { display: grid; gap: 48px; padding-top: 72px; padding-bottom: 88px; align-items: center; }
@media (min-width: 980px) { .hero { grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: 56px; padding-top: 80px; } }
.hero h1 { font-size: clamp(2.1rem, 1.5rem + 2vw, 3rem); font-weight: 680; letter-spacing: -0.035em; line-height: 1.06; }
.lede { font-size: 1.14rem; color: var(--muted); margin-top: 20px; max-width: 34em; }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 28px; margin: 36px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.facts dt, .ledger dt { font-size: 0.8rem; color: var(--muted); }
.facts dd, .ledger dd { margin: 2px 0 0; font-weight: 560; font-size: 0.95rem; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr 1fr; } }
.hero__shot { margin: 0; }
.hero__shot img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.hero__shot figcaption { margin-top: 12px; font-size: 0.84rem; color: var(--muted); }

/* Walkthrough */
.walk { background: var(--bg-2); border-block: 1px solid var(--line); padding: 88px 0; }
.walk__head { max-width: 760px; }
.label { margin-top: 14px; display: inline-block; font-size: 0.93rem; color: var(--text); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: var(--radius-sm); padding: 10px 14px; }
.walk__body { display: grid; gap: 20px; margin-top: 36px; }
@media (min-width: 900px) { .walk__body { grid-template-columns: 232px minmax(0, 1fr); gap: 28px; align-items: start; } }
.steps { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .steps { flex-direction: column; overflow: visible; } }
.step {
  flex: none; display: flex; align-items: center; gap: 12px; text-align: left; width: auto;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  color: var(--muted); font: inherit; font-size: 0.95rem; font-weight: 520; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
@media (min-width: 900px) { .step { width: 100%; } }
.step:hover { color: var(--text); border-color: var(--line-strong); }
.step[aria-selected="true"] { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.step__n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 0.78rem; font-weight: 620; background: var(--bg-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.step[aria-selected="true"] .step__n { background: var(--accent); color: var(--on-accent); }
.stage-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.stage-wrap:focus-visible { outline-offset: 4px; }
.stage { display: grid; }
.frame { margin: 0; display: flex; flex-direction: column; gap: 18px; }
.js .stage > .frame { grid-area: 1 / 1; visibility: hidden; opacity: 0; }
.js .stage > .frame.is-active { visibility: visible; opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .js .stage > .frame { transition: opacity 0.22s ease, visibility 0.22s; } }
html:not(.js) .frame + .frame { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.frame__pill, .frame--shot > img, .frame--shot > picture {
  aspect-ratio: 3 / 2; width: 100%; border-radius: 10px; border: 1px solid var(--line);
}
.frame__pill {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 24px;
  padding: 9% 8% 6%; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-2) 55%, var(--surface)) 0%, var(--bg-2) 100%);
}
.cue { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.cue__key {
  font-family: var(--font); font-size: clamp(1.6rem, 1rem + 2vw, 2.4rem); font-weight: 560; line-height: 1;
  padding: 0.55em 0.75em 0.6em; border-radius: 14px; border-bottom-width: 5px;
  background: var(--surface); box-shadow: 0 2px 0 var(--line-strong), 0 10px 22px -12px rgb(20 32 60 / 30%);
  transform: translateY(3px);
}
.cue__key--up { transform: none; border-bottom-width: 8px; }
.cue__quote { font-size: clamp(1.05rem, 0.85rem + 0.9vw, 1.4rem); line-height: 1.45; font-weight: 520; letter-spacing: -0.01em; max-width: 30ch; }
.cue__note { font-size: 0.9rem; color: var(--muted); }
.pill { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pill img { width: 108px; height: auto; filter: drop-shadow(0 6px 14px rgb(20 32 60 / 18%)); }
.pill__tag { font-size: 0.78rem; color: var(--muted); }
.frame--shot > img, .frame--shot > picture img { object-fit: contain; background: var(--bg-2); width: 100%; height: 100%; }
.frame--shot > picture { overflow: hidden; display: block; }
.frame__cap { font-size: 1rem; line-height: 1.6; max-width: 62ch; }
.frame__cap q { font-style: italic; }
.controls { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
html:not(.js) .controls { display: none; }
.ctl {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 0.92rem; font-weight: 540; cursor: pointer;
}
.ctl:hover { background: var(--bg-2); }
.ctl[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.ctl.is-on { border-color: var(--accent); color: var(--accent-text); }
.ctl--next { margin-left: auto; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ctl--next:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.count { font-size: 0.88rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-inline: 4px; }
@media (max-width: 480px) { .ctl__text { display: none; } }
.transcript { margin-top: 24px; max-width: 820px; }
.transcript summary { cursor: pointer; font-weight: 560; color: var(--accent-text); padding: 6px 0; width: fit-content; }
.transcript ol { margin: 12px 0 0; padding-left: 1.3em; display: grid; gap: 10px; color: var(--text); }

/* Why + role */
.story { display: grid; gap: 48px; padding-block: 96px; }
@media (min-width: 900px) { .story { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; } }
.story h2 { margin-bottom: 18px; }
.story p + p { margin-top: 14px; }
.story__why p { font-size: 1.12rem; }
.story__role p { color: var(--muted); }
.ledger { margin: 28px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.ledger div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ledger dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* How it works */
.how { padding-block: 88px; border-top: 1px solid var(--line); }
.flow { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 0; counter-reset: flow; }
.flow li { counter-increment: flow; position: relative; padding: 0 0 28px 48px; }
.flow li::before {
  content: counter(flow); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.85rem; font-weight: 620; background: var(--surface);
  border: 1px solid var(--line-strong); color: var(--text);
}
.flow li::after { content: ""; position: absolute; left: 15px; top: 32px; bottom: 4px; width: 1px; background: var(--line-strong); }
.flow li:last-child::after { display: none; }
.flow li:last-child::before { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.flow h3 { margin-bottom: 6px; }
.flow p { color: var(--muted); font-size: 0.97rem; }
@media (min-width: 1000px) {
  .flow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
  .flow li { padding: 48px 0 0; }
  .flow li::after { left: 38px; right: -18px; top: 15px; bottom: auto; width: auto; height: 1px; }
}
.note { margin-top: 40px; padding: 18px 20px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; max-width: 820px; }

/* Decisions */
.decisions { padding-block: 96px; border-top: 1px solid var(--line); }
.decisions__grid { display: grid; gap: 20px; margin-top: 36px; }
@media (min-width: 900px) { .decisions__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto; } .decision--lead { grid-row: span 2; } }
.decision { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.decision p { color: var(--muted); }
.decision--lead h3 { font-size: 1.4rem; }
.compare { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 0; margin: 4px 0; border-block: 1px solid var(--line); }
.compare__item { display: grid; gap: 4px; }
.compare__num { font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); font-weight: 680; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--muted); }
.compare__item--now .compare__num { color: var(--accent-text); }
.compare__lbl { font-size: 0.84rem; color: var(--muted); }
.compare__arrow { font-size: 1.6rem; color: var(--muted); }
@media (max-width: 520px) { .compare { flex-direction: column; align-items: flex-start; } .compare__arrow { transform: rotate(90deg); } }

/* Challenge */
.challenge { background: var(--bg-2); border-block: 1px solid var(--line); padding-block: 96px; }
.challenge__grid { display: grid; gap: 40px; margin-top: 32px; }
@media (min-width: 960px) { .challenge__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; } }
.challenge__text p + p { margin-top: 16px; }
.challenge__text p { max-width: 64ch; }
.race { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.race__title { font-size: 0.82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.race__title + .race__row { margin-top: 10px; }
.race__row + .race__title { margin-top: 24px; }
.race__row { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.race__row li { position: relative; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.95rem; background: var(--bg); }
.race__row li + li::before { content: "↓"; position: absolute; left: 50%; top: -18px; transform: translateX(-50%); font-size: 0.8rem; color: var(--muted); line-height: 1; }
.race__bad { background: var(--bad-soft) !important; border-color: color-mix(in srgb, var(--bad) 35%, transparent) !important; color: var(--bad); }
.race__good { background: var(--good-soft) !important; border-color: color-mix(in srgb, var(--good) 35%, transparent) !important; color: var(--good); }

/* Numbers */
.numbers { padding-block: 96px; }
.numbers__grid { display: grid; margin-top: 36px; border-top: 1px solid var(--line); }
.metric { padding: 28px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
@media (min-width: 900px) {
  .numbers__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .metric { padding: 32px 28px 32px 0; border-bottom: 0; }
  .metric + .metric { padding-left: 28px; border-left: 1px solid var(--line); }
}
.metric__num { font-size: clamp(2.4rem, 1.8rem + 2vw, 3.2rem); font-weight: 680; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.metric__what { font-weight: 540; }
.metric__src { font-size: 0.86rem; color: var(--muted); }
.limits { margin: 32px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.limits li { font-size: 0.9rem; color: var(--muted); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 36px 0 48px; }
.footer__inner { display: grid; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* 404 page */
.notfound { padding-block: 120px; display: grid; gap: 16px; justify-items: start; }
