/* ==========================================================================
   DocVault, marketing site
   One stylesheet for every page. No framework, no build step.
   Sections: tokens · base · type · layout · nav · buttons · hero · stack ·
             story (layer scenes) · mock UI · bands · cards · features page ·
             faq · forms · footer · motion · responsive
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --brand: #2563eb;
  --brand-2: #0ea5e9;
  --brand-ink: #1d4ed8;

  /* layer hues, one per layer of the story, used by the stack + scenes */
  --l1: #0ea5e9;  /* capture   */
  --l2: #6366f1;  /* understand*/
  --l3: #14b8a6;  /* organise  */
  --l4: #f59e0b;  /* protect   */
  --l5: #ec4899;  /* share     */
  --l6: #8b5cf6;  /* automate  */
  --l7: #22c55e;  /* sign      */
  --l8: #ef4444;  /* comply    */
  --l9: #2563eb;  /* operate   */

  --bg: #fbfbfd;
  --bg-2: #f2f3f7;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --line: rgba(15, 23, 42, .09);
  --line-2: rgba(15, 23, 42, .16);
  --text: #0b0d12;
  --text-2: #424754;
  --text-3: #6b7180;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px rgba(15,23,42,.06);
  --shadow-lg: 0 2px 6px rgba(15,23,42,.06), 0 30px 80px -20px rgba(15,23,42,.25);
  --glass: rgba(251, 251, 253, .72);

  /* "stage" = the feature sections. They follow the theme: soft grey in light, near-black in dark.
     Only the product mock-ups (.viewport) and code blocks stay dark in both, like a device photo. */
  --stage: #f5f6f8;
  --stage-2: #eceef3;
  --stage-text: #0b0d12;
  --stage-text-2: #4a5060;
  --stage-line: rgba(15,23,42,.10);
  --stage-line-strong: rgba(15,23,42,.22);
  --stage-surface: rgba(255,255,255,.75);
  --stage-scheme: light;
  --device-shadow: 0 40px 90px -40px rgba(15,23,42,.45);

  --radius: 22px;
  --radius-sm: 12px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 56px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07090f;
    --bg-2: #0c0f18;
    --surface: #10141f;
    --surface-2: #151a27;
    --line: rgba(255,255,255,.08);
    --line-2: rgba(255,255,255,.16);
    --text: #f3f4f7;
    --text-2: #b4b9c6;
    --text-3: #868c9b;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 30px 80px -20px rgba(0,0,0,.7);
    --glass: rgba(7, 9, 15, .72);
    --stage: #05070d;
    --stage-2: #0b0f1a;
    --stage-text: #f5f6f8;
    --stage-text-2: #a3a9b8;
    --stage-line: rgba(255,255,255,.09);
    --stage-line-strong: rgba(255,255,255,.28);
    --stage-surface: rgba(255,255,255,.035);
    --stage-scheme: dark;
    --device-shadow: 0 50px 120px -40px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --stage: #05070d;
  --stage-2: #0b0f1a;
  --stage-text: #f5f6f8;
  --stage-text-2: #a3a9b8;
  --stage-line: rgba(255,255,255,.09);
  --stage-line-strong: rgba(255,255,255,.28);
  --stage-surface: rgba(255,255,255,.035);
  --stage-scheme: dark;
  --device-shadow: 0 50px 120px -40px rgba(0,0,0,.8);
  --bg: #07090f;
  --bg-2: #0c0f18;
  --surface: #10141f;
  --surface-2: #151a27;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.16);
  --text: #f3f4f7;
  --text-2: #b4b9c6;
  --text-3: #868c9b;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 30px 80px -20px rgba(0,0,0,.7);
  --glass: rgba(7, 9, 15, .72);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -.028em; line-height: 1.04; font-weight: 700; }
.display { font-size: clamp(44px, 8.4vw, 112px); letter-spacing: -.045em; line-height: .96; font-weight: 750; }
.h1 { font-size: clamp(38px, 6vw, 80px); letter-spacing: -.04em; }
.h2 { font-size: clamp(32px, 4.6vw, 60px); letter-spacing: -.035em; }
.h3 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.02em; line-height: 1.15; }
.lede { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; color: var(--text-2); max-width: 46ch; letter-spacing: -.01em; }
.stage .lede { color: var(--stage-text-2); }
.muted { color: var(--text-3); }
.gradient-text {
  background: linear-gradient(100deg, var(--brand) 0%, var(--brand-2) 45%, #8b5cf6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mono { font-family: var(--mono); font-size: .92em; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 860px; }
.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section-sm { padding: clamp(56px, 8vw, 96px) 0; }
.stage { background: var(--stage); color: var(--stage-text); color-scheme: var(--stage-scheme); }
.stage .muted { color: var(--stage-text-2); }
.alt { background: var(--bg-2); }
.stack-v > * + * { margin-top: 20px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.head { margin-bottom: clamp(40px, 6vw, 72px); }
.head .lede { margin-top: 20px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; font-size: 17px; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; }
.nav-links a { color: var(--text-2); transition: color .2s; padding: 6px 0; position: relative; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: transparent; color: var(--text-2); transition: .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.menu-btn { display: none; }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-3); }
.stage .btn-ghost { color: var(--stage-text); border-color: var(--stage-line-strong); }
.stage .btn-ghost:hover { border-color: var(--stage-text-2); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.link-arrow { color: var(--brand); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow::after { content: "›"; font-size: 1.25em; line-height: 1; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(3px); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.center .cta-row { justify-content: center; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; display: grid; place-items: center; text-align: center;
  padding: calc(var(--nav-h) + 48px) 0 64px; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; pointer-events: none;
  background:
    radial-gradient(40% 35% at 50% 30%, color-mix(in srgb, var(--brand) 38%, transparent), transparent 70%),
    radial-gradient(30% 30% at 80% 60%, rgba(139,92,246,.22), transparent 70%),
    radial-gradient(30% 30% at 20% 70%, rgba(14,165,233,.22), transparent 70%);
  filter: blur(10px); opacity: .9;
}
.hero .wrap { position: relative; }
.hero .display { margin: 18px auto 0; max-width: 13ch; }
.hero .lede { margin: 26px auto 34px; max-width: 40ch; }
.hero .cta-row { justify-content: center; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--stage-text-2); }
.scroll-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--stage-text-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-cue span { width: 1px; height: 36px; background: linear-gradient(var(--stage-text-2), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- the stack (isometric layers) ---------- */
.stack {
  --tilt-x: 58deg; --tilt-z: -38deg; --gap: 22px;
  position: relative; width: min(440px, 78vw); aspect-ratio: 1; margin: 56px auto 0;
  perspective: 1600px;
}
.stack-inner {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x)) rotateZ(var(--tilt-z));
  transition: transform 1.2s var(--ease-out);
}
.plate {
  --i: 0; --c: var(--brand);
  position: absolute; inset: 14%;
  border-radius: 26px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff 10%), color-mix(in srgb, var(--c) 35%, #05070d)),
    var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 60%, #fff 40%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset, 0 30px 60px -10px color-mix(in srgb, var(--c) 45%, transparent);
  transform: translateZ(calc(var(--i) * var(--gap)));
  opacity: .92;
  transition: transform 1s var(--ease-out), opacity .6s, filter .6s, box-shadow .6s;
}
.plate::after {
  content: attr(data-label); position: absolute; left: 18px; bottom: 14px;
  font: 600 12px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.85);
}
.plate .grid-lines { position: absolute; inset: 0; border-radius: inherit; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 28px 28px; }
.plate.core { background: linear-gradient(135deg, #fff, #dbe4ff); border-color: #fff; }
.plate.core::after { color: #1d4ed8; }
/* assemble on load */
.stack:not(.is-built) .plate { transform: translateZ(calc(var(--i) * 70px + 240px)); opacity: 0; }
.stack.is-built .plate { transition-delay: calc(var(--i) * 90ms); }
/* explode on hover / focus */
.stack:hover { --gap: 34px; }

/* compact stack used as the scroll-story progress indicator */
.mini-stack { --gap: 9px; width: 120px; margin: 0; }
.mini-stack .plate { inset: 18%; border-radius: 10px; opacity: .14; filter: saturate(.3); }
.mini-stack .plate::after { display: none; }
.mini-stack .plate.is-on { opacity: .95; filter: none; }
.mini-stack .plate.is-current { transform: translateZ(calc(var(--i) * var(--gap) + 14px)); box-shadow: 0 0 30px var(--c); }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--stage-line); padding: 20px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 50s linear infinite; }
.marquee-track span { font-size: 15px; color: var(--stage-text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 48px; }
.marquee-track span::after { content: "◆"; font-size: 8px; color: var(--stage-line-strong); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- statement ---------- */
.statement { font-family: var(--font-display); font-size: clamp(30px, 4.8vw, 64px); line-height: 1.1; letter-spacing: -.035em; font-weight: 650; max-width: 20ch; }
.statement .w { opacity: .14; transition: opacity .5s; }
.statement .w.is-lit { opacity: 1; }

/* ---------- story (layer by layer) ---------- */
.story { position: relative; }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); }
.story-text { padding-bottom: 30vh; }
.layer {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 10vh 0; opacity: .25; transition: opacity .6s var(--ease);
}
.layer.is-active { opacity: 1; }
.layer-num { font: 600 13px/1 var(--mono); color: var(--lc, var(--brand)); letter-spacing: .1em; display: flex; align-items: center; gap: 12px; }
.layer h3 { margin-top: 18px; font-size: clamp(30px, 3.6vw, 48px); letter-spacing: -.035em; }
.layer > p { color: var(--text-2); font-size: 18px; margin: 18px 0 0; max-width: 44ch; }
.stage .layer > p { color: var(--stage-text-2); }
.layer ul.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; color: var(--text-2); }
.stage .ticks li { color: var(--stage-text-2); }
.ticks li::before {
  content: ""; flex: none; margin-top: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--lc, var(--brand)); box-shadow: 0 0 10px var(--lc, var(--brand));
}
.ticks b { color: var(--text); font-weight: 600; }
.stage .ticks b { color: var(--stage-text); }
.layer-bridge { margin-top: 28px; font-size: 14px; color: var(--text-3); font-style: italic; border-left: 2px solid var(--line-2); padding-left: 14px; }
.stage .layer-bridge { color: var(--stage-text-2); border-color: var(--stage-line); }

.story-visual { position: sticky; top: calc(var(--nav-h) + 4vh); height: calc(100vh - var(--nav-h) - 8vh); display: flex; align-items: center; }
.viewport {
  position: relative; width: 100%; aspect-ratio: 5 / 4; max-height: 100%;
  border-radius: 28px; overflow: hidden;
  background: linear-gradient(180deg, var(--stage-2), #070a12);
  border: 1px solid var(--stage-line);
  box-shadow: var(--device-shadow), 0 0 0 1px rgba(255,255,255,.03) inset;
}
.viewport::before { /* coloured aura that follows the active layer */
  content: ""; position: absolute; inset: -30%; pointer-events: none;
  background: radial-gradient(40% 40% at 70% 20%, var(--aura, var(--brand)), transparent 70%);
  opacity: .28; transition: background .8s;
}
.viewport-bar { position: absolute; inset: 0 0 auto 0; height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 16px; border-bottom: 1px solid var(--stage-line); z-index: 2; background: rgba(5,7,13,.6); }
.viewport-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.14); }
.viewport-bar .vb-title { margin-left: 10px; font: 500 12px/1 var(--font); color: var(--stage-text-2); }
.viewport-bar .vb-stack { margin-left: auto; display: flex; gap: 4px; }
.viewport-bar .vb-stack b { width: 14px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); transition: background .4s; }
.viewport-bar .vb-stack b.is-on { background: var(--c); }
.scene {
  position: absolute; inset: 40px 0 0 0; padding: clamp(16px, 3vw, 30px);
  opacity: 0; transform: translateY(24px) scale(.985); pointer-events: none;
  transition: opacity .55s var(--ease), transform .7s var(--ease-out);
  color: var(--stage-text); font-size: 13px;
}
.scene.is-active { opacity: 1; transform: none; pointer-events: auto; }

/* inline visual shown in place of the sticky viewport on small screens */
.layer .viewport.inline { display: none; margin-top: 28px; }

/* ---------- mock UI kit (used inside scenes) ---------- */
.m-card { background: rgba(255,255,255,.04); border: 1px solid var(--stage-line); border-radius: 14px; padding: 14px; }
.m-row { display: flex; align-items: center; gap: 10px; }
.m-col { display: flex; flex-direction: column; gap: 10px; }
.m-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--stage-text-2); }
.m-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(255,255,255,.07); color: var(--stage-text); border: 1px solid var(--stage-line); white-space: nowrap; }
.m-chip.c { background: color-mix(in srgb, var(--c) 18%, transparent); border-color: color-mix(in srgb, var(--c) 45%, transparent); color: color-mix(in srgb, var(--c) 60%, #fff); }
.m-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.m-bar > i { display: block; height: 100%; width: var(--w, 50%); background: linear-gradient(90deg, var(--c, var(--brand)), color-mix(in srgb, var(--c, var(--brand)) 50%, #fff)); border-radius: inherit; transition: width 1.4s var(--ease-out); }
.scene:not(.is-active) .m-bar > i { width: 0; }
.m-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--stage-line); }
.m-ico { width: 34px; height: 40px; border-radius: 7px; flex: none; position: relative; background: var(--c, #64748b); display: grid; place-items: center; font: 700 9px/1 var(--font); color: #fff; letter-spacing: .04em; }
.m-ico::before { content: ""; position: absolute; right: 0; top: 0; width: 10px; height: 10px; background: rgba(255,255,255,.35); border-bottom-left-radius: 4px; }
.m-meta { font-size: 11.5px; color: var(--stage-text-2); }
.m-name { font-weight: 600; font-size: 13px; }
.m-grow { flex: 1; min-width: 0; }
.m-ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-btn { padding: 7px 12px; border-radius: 9px; font-size: 12px; font-weight: 600; background: var(--c, var(--brand)); color: #fff; border: 0; }
.m-input { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); font-size: 14px; }
.m-caret { display: inline-block; width: 2px; height: 16px; background: var(--brand-2); animation: blink 1s steps(1) infinite; vertical-align: -3px; }
@keyframes blink { 50% { opacity: 0; } }
mark.hl { background: color-mix(in srgb, #facc15 35%, transparent); color: #fff; border-radius: 3px; padding: 0 2px; }
.m-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.m-tree { font-size: 12.5px; display: grid; gap: 6px; }
.m-tree div { display: flex; align-items: center; gap: 8px; color: var(--stage-text-2); }
.m-tree div.on { color: #fff; }
.m-tree .ind1 { padding-left: 16px; } .m-tree .ind2 { padding-left: 32px; }
.m-tree svg { width: 14px; height: 14px; flex: none; }
.m-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 10px/1 var(--font); color: #fff; background: var(--c, #475569); flex: none; border: 2px solid var(--stage-2); }
.m-avatars { display: flex; } .m-avatars .m-avatar + .m-avatar { margin-left: -8px; }
.m-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.m-table th { text-align: left; font-weight: 500; color: var(--stage-text-2); padding: 6px 8px; border-bottom: 1px solid var(--stage-line); }
.m-table td { padding: 8px; border-bottom: 1px solid var(--stage-line); }
.m-ok { color: #4ade80; } .m-warn { color: #fbbf24; } .m-bad { color: #f87171; }
.m-doc { background: #f8fafc; color: #0f172a; border-radius: 10px; padding: 16px; position: relative; box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); }
.m-doc .ln { height: 6px; border-radius: 3px; background: #cbd5e1; margin: 7px 0; }
.m-doc .ln.s { width: 60%; } .m-doc .ln.m { width: 82%; }
.m-redact { display: inline-block; height: 10px; width: 46%; background: #0f172a; border-radius: 2px; }
.m-stamp {
  position: absolute; right: 14px; bottom: 14px; border: 2px solid #16a34a; color: #16a34a; border-radius: 8px;
  padding: 6px 10px; font: 700 10px/1.3 var(--mono); transform: rotate(-4deg); background: rgba(255,255,255,.85);
}
.m-sig { font: italic 600 22px/1 "Brush Script MT", "Segoe Script", cursive; color: #1d4ed8; }
.m-chain { display: flex; flex-direction: column; gap: 8px; }
.m-block { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--stage-line); font-size: 12px; }
.m-hash { font: 500 10.5px/1 var(--mono); color: var(--stage-text-2); }
.m-link { width: 2px; height: 10px; background: var(--stage-line); margin-left: 22px; }

/* workflow graph (SVG inside scene) */
.wf { width: 100%; height: auto; }
.wf .edge { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 2; }
.wf .edge.flow { stroke: var(--l6); stroke-dasharray: 6 8; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.wf .node rect { fill: rgba(255,255,255,.05); stroke: rgba(255,255,255,.18); }
.wf .node.on rect { fill: color-mix(in srgb, var(--l6) 22%, transparent); stroke: var(--l6); }
.wf text { fill: #e5e7eb; font: 600 11px var(--font); }
.wf text.sub { fill: #9ca3af; font-weight: 500; font-size: 9.5px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px); position: relative; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.stage .card { background: var(--stage-surface); border-color: var(--stage-line); }
.card h3 { font-size: 21px; letter-spacing: -.02em; line-height: 1.2; }
.card p { color: var(--text-2); margin: 10px 0 0; font-size: 15.5px; }
.stage .card p { color: var(--stage-text-2); }
.card .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: color-mix(in srgb, var(--c, var(--brand)) 14%, transparent); color: var(--c, var(--brand));
}
.card .ico svg { width: 22px; height: 22px; }
.card.big { padding: clamp(28px, 4vw, 48px); }
.card.span2 { grid-column: span 2; }

/* bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.bento > .card { grid-column: span 2; }
.bento > .card.w3 { grid-column: span 3; }
.bento > .card.w4 { grid-column: span 4; }
.bento > .card.w6 { grid-column: span 6; }
.big-num { font-family: var(--font-display); font-size: clamp(48px, 6vw, 84px); font-weight: 750; letter-spacing: -.05em; line-height: 1; }
.big-num small { font-size: .45em; letter-spacing: -.02em; }

/* numbers band */
.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--stage-line); }
.numbers > div { padding: 32px 24px 8px 0; }
.numbers > div + div { padding-left: 24px; border-left: 1px solid var(--stage-line); }
.numbers .big-num { font-size: clamp(40px, 5vw, 68px); }
.numbers p { margin: 10px 0 0; color: var(--stage-text-2); font-size: 14.5px; max-width: 26ch; }

/* language ribbon (Indic OCR) */
.scripts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.scripts span { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--stage-line); background: var(--stage-surface); font-size: 18px; transition: .3s; }
.scripts span small { display: block; font-size: 10.5px; color: var(--stage-text-2); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; text-align: center; }
.scripts span:hover { border-color: var(--stage-line-strong); transform: translateY(-2px); }

/* deployment switchboard */
.switches { display: grid; gap: 10px; }
.switch { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.switch .t { flex: 1; min-width: 0; }
.switch .t b { display: block; font-size: 15px; }
.switch .t span { font-size: 13px; color: var(--text-3); }
.toggle { --on: 0; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); position: relative; border: 0; flex: none; transition: background .25s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .3s var(--ease-out); }
.toggle[aria-checked="true"] { background: #22c55e; }
.toggle[aria-checked="true"]::after { transform: translateX(18px); }
.code {
  font-family: var(--mono); font-size: 13px; line-height: 1.75; background: #0b0f1a; color: #cbd5e1;
  border-radius: 16px; padding: 20px 22px; border: 1px solid rgba(255,255,255,.08); overflow-x: auto; white-space: pre;
}
.code .k { color: #93c5fd; } .code .v { color: #86efac; } .code .c { color: #64748b; } .code .off { color: #fca5a5; }

/* architecture diagram */
.arch { width: 100%; height: auto; }
.arch .box { fill: var(--stage-surface); stroke: var(--stage-line-strong); }
.arch .box.core { fill: color-mix(in srgb, var(--brand) 14%, transparent); stroke: var(--brand); }
.arch .box.opt { stroke-dasharray: 5 5; }
.arch text { fill: var(--stage-text); font: 600 13px var(--font); }
.arch text.s { fill: var(--stage-text-2); font: 500 11px var(--font); }
.arch .wire { stroke: rgba(148,163,184,.4); stroke-width: 1.5; fill: none; }
.arch .pulse { stroke: #38bdf8; stroke-width: 2; fill: none; stroke-dasharray: 4 14; animation: dash 1.6s linear infinite; }

/* compare */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.compare th, .compare td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { font-size: 13px; color: var(--text-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.compare td:first-child { font-weight: 600; width: 34%; }
.compare .yes { color: #16a34a; font-weight: 600; }
.compare .part { color: #d97706; font-weight: 600; }
.compare .no { color: var(--text-3); }
.compare th.us, .compare td.us { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }

/* ---------- page hero (inner pages) ---------- */
.page-hero { padding: calc(var(--nav-h) + clamp(64px, 10vw, 120px)) 0 clamp(48px, 7vw, 80px); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 120%; pointer-events: none;
  background: radial-gradient(35% 40% at 50% 30%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%); }
.page-hero .wrap { position: relative; }
.page-hero .h1 { margin-top: 16px; max-width: 16ch; }
.page-hero.center .h1 { margin-inline: auto; }
.page-hero .lede { margin-top: 22px; }

/* ---------- features page ---------- */
.toolbar { position: sticky; top: var(--nav-h); z-index: 20; background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); padding: 14px 0; }
.toolbar .wrap { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); }
.search svg { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--text); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: .2s; }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.fgroup { padding: 56px 0 8px; }
.fgroup-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.fgroup-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.fgroup-head p { margin: 8px 0 0; color: var(--text-2); max-width: 60ch; }
.fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 8px; transition: border-color .25s, transform .25s var(--ease); }
.feat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.feat h3 { font-size: 16.5px; letter-spacing: -.015em; line-height: 1.3; }
.feat p { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.5; }
.feat .note { font-size: 12.5px; color: var(--text-3); border-top: 1px dashed var(--line-2); padding-top: 10px; margin-top: auto; }
.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.live { color: #15803d; background: rgba(34,197,94,.12); }
.badge.addon { color: #1d4ed8; background: rgba(37,99,235,.12); }
.badge.soon { color: #b45309; background: rgba(245,158,11,.14); }
:root[data-theme="dark"] .badge.live { color: #4ade80; } :root[data-theme="dark"] .badge.addon { color: #93c5fd; } :root[data-theme="dark"] .badge.soon { color: #fbbf24; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge.live { color: #4ade80; }
  :root:not([data-theme="light"]) .badge.addon { color: #93c5fd; }
  :root:not([data-theme="light"]) .badge.soon { color: #fbbf24; }
}
.empty { text-align: center; padding: 80px 0; color: var(--text-3); }
.count-pill { font: 600 13px var(--mono); color: var(--text-3); }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.faq-nav { position: sticky; top: calc(var(--nav-h) + 28px); display: grid; gap: 4px; }
.faq-nav a { padding: 9px 14px; border-radius: 10px; color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.faq-nav a:hover { background: var(--bg-2); color: var(--text); }
.faq-nav a.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.faq-group + .faq-group { margin-top: 56px; }
.faq-group h2 { font-size: 26px; margin-bottom: 14px; }
details.qa { border-bottom: 1px solid var(--line); }
details.qa summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-size: 17.5px; font-weight: 600; letter-spacing: -.01em; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform .3s var(--ease); }
details.qa[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details.qa .ans { padding: 0 0 24px; color: var(--text-2); max-width: 70ch; }
details.qa .ans p { margin: 0 0 12px; }
details.qa .ans ul { margin: 0 0 12px; padding-left: 20px; }
details.qa[open] .ans { animation: fadeUp .45s var(--ease-out); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 600; }
.field label .opt { font-weight: 400; color: var(--text-3); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.field .err { font-size: 13px; color: #dc2626; min-height: 0; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #dc2626; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; transition: .2s; }
.checks input { accent-color: var(--brand); }
.checks label:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.consent { display: flex; gap: 10px; font-size: 14px; color: var(--text-2); align-items: flex-start; }
.consent input { margin-top: 4px; accent-color: var(--brand); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 14px 16px; border-radius: 12px; font-size: 15px; display: none; }
.form-status.ok { display: block; background: rgba(34,197,94,.12); color: #15803d; }
.form-status.bad { display: block; background: rgba(220,38,38,.1); color: #b91c1c; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.info-list { display: grid; gap: 14px; }
.info-list .card { padding: 22px; }
.config-note { font-size: 13px; color: var(--text-3); border: 1px dashed var(--line-2); padding: 12px 14px; border-radius: 12px; }

/* ---------- timeline (about) ---------- */
.principles { counter-reset: p; }
.principles .card h3::before { counter-increment: p; content: "0" counter(p); display: block; font: 600 13px var(--mono); color: var(--brand); margin-bottom: 14px; letter-spacing: .08em; }

/* ---------- final CTA ---------- */
.final { text-align: center; position: relative; overflow: hidden; }
.final::before { content: ""; position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(37,99,235,.35), transparent); pointer-events: none; }
.final .wrap { position: relative; }
.final .h1 { max-width: 14ch; margin: 18px auto 0; }
.final .lede { margin: 22px auto 34px; }

/* ---------- footer ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 64px 0 32px; font-size: 14px; color: var(--text-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer h4 { font-family: var(--font); font-size: 13px; letter-spacing: 0; font-weight: 600; color: var(--text); margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a:hover { color: var(--text); }
.footer-base { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; gap: 0; position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; margin: 0;
  }
  .nav.is-open .nav-links a { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav.is-open .nav-links a[aria-current="page"]::after { display: none; }
  .nav-actions .btn { display: none; }

  .story-grid { grid-template-columns: 1fr; }
  .story-visual { display: none; }
  .layer { min-height: 0; opacity: 1; padding: 56px 0; }
  .layer .viewport.inline { display: block; aspect-ratio: auto; height: 380px; }
  .layer .viewport.inline .scene { opacity: 1; transform: none; }
  .story-text { padding-bottom: 0; }

  .g2, .g3 { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento > .card, .bento > .card.w3, .bento > .card.w4, .bento > .card.w6 { grid-column: auto; }
  .card.span2 { grid-column: auto; }
  .numbers { grid-template-columns: 1fr 1fr; }
  .numbers > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .faq-layout { grid-template-columns: 1fr; }
  .faq-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; }
  .faq-nav a { flex: none; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .fgrid { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: 1fr; }
  .form .row2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .numbers { grid-template-columns: 1fr; }
  .numbers > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--stage-line); }
  .layer .viewport.inline { height: 420px; }
  .m-split { grid-template-columns: 1fr; }
  .compare { font-size: 14px; }
}

/* ---------- how it works: flows ---------- */
.flows-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.flow { padding: 56px 0; border-top: 1px solid var(--line); }
.flow:first-child { border-top: 0; padding-top: 8px; }
.flow-head { display: flex; gap: 18px; align-items: flex-start; }
.flow-num { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font: 700 15px var(--mono); color: #fff; background: var(--c, var(--brand)); box-shadow: 0 10px 30px -10px var(--c, var(--brand)); }
.flow-head h2 { font-size: clamp(26px, 3vw, 36px); }
.flow-head p { margin: 8px 0 0; color: var(--text-2); max-width: 62ch; }
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 0; counter-reset: s; position: relative; }
.steps li { counter-increment: s; position: relative; padding: 0 0 22px 52px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 13px var(--mono); background: var(--surface); border: 1.5px solid var(--c, var(--brand)); color: var(--c, var(--brand)); z-index: 1; }
.steps li::after { content: ""; position: absolute; left: 15.5px; top: 32px; bottom: 0; width: 1.5px; background: linear-gradient(var(--c, var(--brand)), transparent); opacity: .35; }
.steps li:last-child::after { display: none; }
.steps b { display: block; font-size: 16px; letter-spacing: -.01em; margin-bottom: 3px; padding-top: 4px; }
.steps span { color: var(--text-2); font-size: 15px; }
.know { margin-top: 8px; border-radius: 16px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; color: var(--text-2); }
.know strong { color: var(--text); display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.know ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pill { font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--brand)) 12%, transparent); color: var(--c, var(--brand)); }
@media (max-width: 900px) {
  .flows-layout { grid-template-columns: 1fr; }
  .flows-layout .faq-nav { position: sticky; top: var(--nav-h); z-index: 10; background: var(--bg); padding: 8px 0; margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter); }
}

/* ---------- refinements after browser review ---------- */
.hero .display { max-width: none; }
.layer h3 { font-size: clamp(28px, 3vw, 44px); max-width: 16ch; }
@media (max-width: 900px) {
  .nav-actions { margin-left: auto; }
  .hero .stack { margin-top: 110px; width: min(300px, 72vw); }
  .hero .eyebrow { font-size: 11.5px; }
}
.field .checks input, .consent input { width: auto; padding: 0; border: 0; box-shadow: none; }
@media (max-width: 640px) { .hero .eyebrow .dot { display: none; } }


/* ---------- theme-aware accents (light-theme fix) ---------- */
/* Bright accents that read well on near-black only. */
:root[data-theme="dark"] .stage .eyebrow { color: var(--brand-2); }
:root[data-theme="dark"] .stage .gradient-text { background-image: linear-gradient(100deg, #60a5fa 0%, #38bdf8 40%, #c4b5fd 100%); }
:root[data-theme="dark"] .stage .link-arrow { color: #60a5fa; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stage .eyebrow { color: var(--brand-2); }
  :root:not([data-theme="light"]) .stage .gradient-text { background-image: linear-gradient(100deg, #60a5fa 0%, #38bdf8 40%, #c4b5fd 100%); }
  :root:not([data-theme="light"]) .stage .link-arrow { color: #60a5fa; }
}

/* Product mock-ups and code stay dark in BOTH themes: they depict the app, like a device photo. */
.viewport, .viewport-bar, .code {
  /* EVERY stage token, not just the text ones: the mock-up's own background is built from --stage-2,
     so leaving it to the theme turned it light grey under white text in light mode. */
  --stage: #05070d;
  --stage-2: #0b0f1a;
  --stage-text: #f5f6f8;
  --stage-text-2: #a3a9b8;
  --stage-line: rgba(255,255,255,.09);
  --stage-line-strong: rgba(255,255,255,.28);
  --stage-surface: rgba(255,255,255,.035);
  color-scheme: dark;
}
.viewport { color: #f5f6f8; }

/* Layer colours are bright; blending them with the TEXT colour keeps their hue and gives readable
   contrast on either background (darker on light, lighter on dark). */
.tint { color: color-mix(in srgb, var(--c) 62%, var(--text)); }
.pill { color: color-mix(in srgb, var(--c, var(--brand)) 62%, var(--text)); }
.layer-num { color: color-mix(in srgb, var(--lc, var(--brand)) 70%, var(--stage-text)); }
.flow-num { background: color-mix(in srgb, var(--c, var(--brand)) 70%, #000); }
.card .ico { color: color-mix(in srgb, var(--c, var(--brand)) 70%, var(--text)); }
.stage .card .ico { color: color-mix(in srgb, var(--c, var(--brand)) 70%, var(--stage-text)); }

/* Long side indexes (How it works has 16 flows) must never be taller than the screen: a sticky element
   taller than the viewport cannot be scrolled, so its last entries were unreachable. */
@media (min-width: 901px) {
  .faq-nav {
    max-height: calc(100vh - var(--nav-h) - 56px);
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Scrollable, but no visible scrollbar (it cluttered the index). A fade marks whichever edge has
       more entries beyond it, set by site.js as .more-above / .more-below. */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .faq-nav::-webkit-scrollbar { display: none; }
  .faq-nav.more-below { mask-image: linear-gradient(#000 calc(100% - 48px), transparent); -webkit-mask-image: linear-gradient(#000 calc(100% - 48px), transparent); }
  .faq-nav.more-above { mask-image: linear-gradient(transparent, #000 48px); -webkit-mask-image: linear-gradient(transparent, #000 48px); }
  .faq-nav.more-above.more-below { mask-image: linear-gradient(transparent, #000 48px, #000 calc(100% - 48px), transparent); -webkit-mask-image: linear-gradient(transparent, #000 48px, #000 calc(100% - 48px), transparent); }
  .flows-layout .faq-nav a { padding: 7px 12px; font-size: 14px; }
}
.final .cta-row { justify-content: center; }

/* Dark mode: the brand blue (#2563eb) measures ~3.9:1 on the near-black background, under WCAG's 4.5:1
   for small text. Eyebrows and arrow links switch to the lighter brand blue there (found by the
   masking-demo accessibility audit, 2026-10-08; applies to every page). */
:root[data-theme="dark"] .eyebrow { color: var(--brand-2); }
:root[data-theme="dark"] .link-arrow { color: #60a5fa; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .eyebrow { color: var(--brand-2); }
  :root:not([data-theme="light"]) .link-arrow { color: #60a5fa; }
}
