/* ============================================================================
   fAI — landing (fai.prodifylabs.io)
   Visual authority: DESIGN.md. Navy canvas, restrained pink actions, cool blue
   information, mint only as a status colour. The primary action reuses the
   recipe of src/styles/accent-button.css (translucent pink gradient + inset
   reflection) — never a flat pink fill.
   Layout language: one fixed header that condenses into a floating glass pill,
   a light-weight display headline anchored bottom-left, hairlines instead of
   boxes, and a single easing curve for every movement.
   ========================================================================== */

:root {
  /* canvas + surfaces */
  --navy-base:     #061427;
  --navy-card:     #061b35;
  --navy-surface:  #06203f;
  --navy-elevated: #072549;
  --navy-hover:    #072850;
  --seal-blue:     #072D59;
  /* cool foreground ramp */
  --fg-primary:    #dbf2fc;
  --fg-body:       #cae0eb;
  --fg-soft:       #b5cad6;
  --fg-muted:      #90a4b1;
  --fg-ghost:      #7f93a0;
  /* borders */
  --bd-subtle:     #202f41;
  --bd-strong:     #354556;
  --bd-light:      #516272;
  /* brand + semantic */
  --fai-accent:    #f04468;
  --info:          #82bbeb;
  --mint:          #6ED6A3;
  --amber:         #fbbf24;

  /* derived tints: always mixed from the token, never new hex values */
  --accent-soft:   color-mix(in srgb, var(--fai-accent) 7%, transparent);
  --accent-border: color-mix(in srgb, var(--fai-accent) 33%, transparent);
  --rim:           color-mix(in srgb, var(--fg-primary) 9%, transparent);
  --rim-strong:    color-mix(in srgb, var(--fg-primary) 16%, transparent);
  --hair:          color-mix(in srgb, var(--fg-primary) 14%, transparent);

  /* the shared accent action (src/styles/accent-button.css) */
  --fai-button-fill: linear-gradient(135deg,
      color-mix(in srgb, var(--fai-accent) 18%, transparent),
      color-mix(in srgb, var(--fai-accent) 10%, transparent) 50%,
      color-mix(in srgb, var(--fai-accent) 13%, transparent));
  --fai-button-shadow:
      inset 0 1px 1px color-mix(in srgb, var(--fai-accent) 28%, transparent),
      inset 0 -1px 2px color-mix(in srgb, var(--fai-accent) 15%, transparent),
      0 3px 8px #0003,
      0 0 12px color-mix(in srgb, var(--fai-accent) 5%, transparent);

  /* glass: tonal navy + hairline rim + one inset reflection */
  --glass-fill:   color-mix(in srgb, var(--navy-card) 62%, transparent);
  --glass-shadow: inset 0 1px 0 color-mix(in srgb, var(--fg-primary) 7%, transparent),
                  0 18px 48px -24px #000c;

  /* type */
  --font-sans:    'DM Sans', 'Outfit', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', 'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* motion */
  --ease:      cubic-bezier(.22, 1, .36, 1);
  --dur-fast:  .18s;
  --dur-base:  .32s;

  /* layout */
  --gutter:    clamp(1.5rem, 4.5vw, 5rem);
  --maxw:      1200px;
  --head-h:    84px;
}

*, *::before, *::after { box-sizing: border-box; }

/* no smooth scroll-behavior here: it fights the stage snapping in story.js */
html { -webkit-text-size-adjust: 100%; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }

body {
  margin: 0;
  background: var(--navy-base);
  color: var(--fg-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--fg-primary);
  letter-spacing: -.035em;
  line-height: 1.08;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, canvas, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }

::selection { background: color-mix(in srgb, var(--fai-accent) 38%, transparent); color: #fff; }

:focus-visible { outline: 2px solid var(--fai-accent); outline-offset: 3px; border-radius: 6px; }

/* ── The Earth behind the whole page (earth.js) ─────────────────────────── */

.space { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--navy-base); }
.space canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Shown until the first WebGL frame, and for good when WebGL is unavailable. */
.space-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 12% 118%, color-mix(in srgb, var(--info) 22%, transparent), transparent 58%),
    radial-gradient(70% 60% at 86% -10%, color-mix(in srgb, var(--fai-accent) 10%, transparent), transparent 62%),
    linear-gradient(180deg, #030b17, var(--navy-base) 60%);
}
.space-fallback > div {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 41% 63%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 47%, #cfe6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 81%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 57% 36%, #ffd9c2 50%, transparent 51%);
  background-size: 620px 480px, 540px 520px, 700px 610px, 820px 560px, 480px 640px, 760px 700px;
}

main, .site-foot { position: relative; z-index: 1; }

/* ── Header: bare at rest, a floating glass pill once the page scrolls ──── */

.site-head {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--head-h);
  padding: 20px max(32px, calc((100vw - 1376px) / 2));
  transition: padding .48s var(--ease);
  animation: head-enter .65s var(--ease) both;
}
/* legibility scrim while the bar has no surface */
.site-head::before {
  content: ''; position: absolute; inset: 0 0 -28px; z-index: -2; pointer-events: none;
  background: linear-gradient(var(--navy-base), transparent);
  opacity: .55; transition: opacity .28s var(--ease);
}
/* the pill backplate */
.site-head::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  inset: 14px max(18px, calc((100vw - 1376px) / 2 - 14px));
  border-radius: 100px;
  border: 1px solid var(--rim);
  background: color-mix(in srgb, var(--navy-base) 88%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  box-shadow: var(--glass-shadow);
  opacity: 0;
  transition: opacity .28s var(--ease), inset .48s var(--ease);
}
.site-head.is-scrolled { padding-inline: max(32px, calc((100vw - 620px) / 2)); }
.site-head.is-scrolled::before { opacity: 0; }
.site-head.is-scrolled::after {
  opacity: 1;
  inset: 14px max(14px, calc((100vw - 620px) / 2 - 18px));
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-head::after { background: color-mix(in srgb, var(--navy-base) 96%, transparent); }
}
@keyframes head-enter { from { opacity: 0; transform: translateY(-14px); } }

.wordmark { display: flex; align-items: center; gap: 9px; }
.wordmark-approved { flex: 0 0 auto; }
.wordmark-approved img {
  display: block; width: 56px; height: auto;
}
/* The icon sits on its own navy; a soft radial edge melts it into the page. */
.live-icon {
  object-fit: cover;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 71%);
  mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 71%);
}
.live-icon-wrap { display: inline-block; position: relative; background: center / cover no-repeat; }
/* The video only feeds the canvas; the canvas is what shows. */
.live-icon-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.live-icon-canvas { position: absolute; inset: 0; width: 100%; height: 100%; visibility: hidden; }
/* At header size the full scene is too busy: show only the helmet. The video
   is zoomed onto it and the still behind it is the same crop, so the loop
   crossfade still lands on the matching frame. */
.live-icon-helmet { -webkit-mask-image: none; mask-image: none; border-radius: 50%; overflow: hidden; }

.wordmark .live-icon { width: 36px; height: 36px; }
.wordmark span {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  letter-spacing: -.035em; color: var(--fg-primary);
}

.head-nav { display: flex; align-items: center; gap: 24px; }
.head-nav a {
  font-size: 13px; font-weight: 550; color: var(--fg-primary); white-space: nowrap;
  padding: 12px 0; opacity: .86;
  text-shadow: 0 1px 5px color-mix(in srgb, var(--navy-base) 65%, transparent);
  transition: opacity var(--dur-fast) ease, max-width .48s var(--ease), margin .48s var(--ease);
}
.head-nav a:hover { opacity: 1; }
.head-nav .umbrella {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fg-muted); opacity: 1;
  padding-left: 24px; border-left: 1px solid var(--hair);
}
.head-nav .umbrella:hover { color: var(--info); }
/* condensed: the section links leave, the brand and the actions stay */
.site-head.is-scrolled .head-nav a[href^="#"]:not([href="#pricing"]):not(.nav-demo),
.site-head.is-scrolled .head-nav .nav-sec,
.site-head.is-scrolled .head-nav .umbrella {
  opacity: 0; pointer-events: none; max-width: 0; overflow: hidden;
  margin-left: -24px; padding-left: 0; border: 0;
}
.head-nav a[href^="#"], .head-nav .nav-sec, .head-nav .umbrella { max-width: 12em; }

/* ── Primitives ─────────────────────────────────────────────────────────── */

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--fg-soft);
}
.eyebrow::before {
  content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--fai-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--fai-accent) 70%, transparent);
}

.mono-tag {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--fg-ghost);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 12px 22px;
  border: 1px solid transparent; border-radius: 100px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; line-height: 1.2;
  color: var(--fg-primary); white-space: nowrap; cursor: pointer;
  transition: transform .25s var(--ease), background var(--dur-fast) ease,
              border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease,
              color var(--dur-fast) ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* the shared accent action */
.btn-primary {
  background: var(--fai-button-fill);
  color: color-mix(in srgb, var(--fai-accent) 10%, white);
  border-color: color-mix(in srgb, var(--fai-accent) 22%, transparent);
  box-shadow: var(--fai-button-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn-primary:hover {
  border-color: color-mix(in srgb, var(--fai-accent) 40%, transparent);
  box-shadow:
    inset 0 1px 1px color-mix(in srgb, var(--fai-accent) 35%, transparent),
    0 4px 12px #0004,
    0 0 14px color-mix(in srgb, var(--fai-accent) 9%, transparent);
}

.btn-ghost { background: transparent; color: var(--fg-soft); border-color: var(--rim-strong); }
.btn-ghost:hover { color: var(--fg-primary); border-color: var(--bd-light); background: color-mix(in srgb, var(--fg-primary) 4%, transparent); }

.btn-sm { min-height: 36px; padding: 8px 16px; font-size: 12.5px; }

/* the header's sign-in stays on screen the whole way down: it is the page's
   standing call to action, so it wears the accent treatment */
.head-nav .btn {
  background: var(--fai-button-fill);
  color: color-mix(in srgb, var(--fai-accent) 10%, white);
  border-color: color-mix(in srgb, var(--fai-accent) 26%, transparent);
  box-shadow: var(--fai-button-shadow);
}
.head-nav .btn:hover { border-color: color-mix(in srgb, var(--fai-accent) 44%, transparent); color: #fff; }

.btn.is-checking, .btn-dl.is-loading { pointer-events: none; opacity: .7; }

.g { flex: none; }


/* ── HERO: the first moment of the story (see .beat-hero below) ─────────── */

.lead { max-width: 30em; font-size: clamp(14.5px, 1.05vw, 16px); line-height: 1.6; color: var(--fg-body); }

.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }

/* ── THE STORY: one pinned scene scrubbed by scroll (story.js) ──────────── */

.story { position: relative; }
.stage { position: relative; height: 100svh; overflow: hidden; }

/* The generated footage is rendered on pure black; story.js keys that black
   out, so the Earth shows through wherever the scene is empty. */
.scene { position: absolute; inset: 0; pointer-events: none; }
.scene canvas, .scene .scene-still {
  position: absolute; top: 50%; right: 0;
  width: min(118vh, 74vw); aspect-ratio: 16 / 9; height: auto;
  transform: translateY(-50%);
  /* feather all four edges: a panel flying out of frame must not show the cut */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  mask-composite: intersect;
}
.scene .scene-still { object-fit: contain; }
/* the still is the reduced-motion picture; the canvas plays everywhere else */
.story:not(.is-static) .scene-still { display: none; }

.stage-fade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--navy-base) 78%, transparent), transparent 58%),
    linear-gradient(0deg, color-mix(in srgb, var(--navy-base) 60%, transparent), transparent 30%);
}

.story-copy {
  position: absolute; left: var(--gutter); bottom: clamp(4.5rem, 12svh, 7rem);
  width: min(640px, 54vw); min-height: 15rem;
}
.beat { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; visibility: hidden; }
.act {
  margin-bottom: 18px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--fai-accent);
}
.beat h2 { font-size: clamp(30px, 3.1vw, 50px); font-weight: 400; letter-spacing: -.042em; line-height: 1.05; }
.beat p:not(.act) { margin-top: 16px; max-width: 28em; font-size: clamp(14.5px, 1.05vw, 16px); color: var(--fg-soft); }

/* the opening moment carries the page's only h1 and the sign-in button */
.beat-hero h1 { max-width: 760px; margin-bottom: 20px; font-weight: 400; }
.beat-hero h1 .l1 { display: block; font-size: clamp(40px, 4.6vw, 76px); line-height: 1.02; letter-spacing: -.048em; }
.beat-hero h1 .l2 { display: block; margin-top: 14px; font-size: clamp(19px, 1.75vw, 27px); line-height: 1.2; letter-spacing: -.025em; color: var(--fg-soft); }
.beat.beat-hero p.eyebrow { margin: 0 0 22px; max-width: none; font-size: 11px; color: var(--fg-soft); }
.beat.beat-hero p.lead { margin-top: 0; color: var(--fg-body); }
.beat.beat-hero p.price-note {
  margin-top: 18px; max-width: none;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted);
}

.hint {
  position: absolute; right: calc(var(--gutter) + 200px); bottom: clamp(2rem, 5svh, 3rem);
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted);
}
.hint i { display: block; width: 34px; height: 1px; background: linear-gradient(90deg, var(--fai-accent), transparent); transform-origin: left; animation: hint 2.2s var(--ease) infinite; }
@keyframes hint {
  0%   { transform: scaleX(0); opacity: 0; }
  45%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

/* the engines: names, not pills. Each lights up as the stage names it */
.beat .engines { display: flex; flex-wrap: wrap; align-items: center; margin-top: 26px; }
.engines span {
  position: relative; display: inline-flex; align-items: center; gap: 9px;
  padding: 0 20px; font-family: var(--font-display); font-size: clamp(17px, 1.35vw, 21px); font-weight: 400;
  letter-spacing: -.02em; color: var(--fg-ghost);
  transition: color .5s var(--ease);
}
.engines span:first-child { padding-left: 0; }
.engines span + span { border-left: 1px solid var(--hair); }
.engines span::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--fai-accent); box-shadow: 0 0 10px color-mix(in srgb, var(--fai-accent) 70%, transparent);
  transform: scale(0); transition: transform .45s var(--ease);
}
.engines span.is-lit { color: var(--fg-primary); }
.engines span.is-lit::before { transform: scale(1); }

/* the inventory: three figures, set like a spec sheet */
.beat .stat { margin-top: 28px; }
.beat .stat p.stat-tag {
  margin: 0 0 12px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--fg-ghost);
}
.stat-row { display: flex; flex-wrap: wrap; }
.stat-item {
  display: flex; flex-direction: column; gap: 6px; padding: 2px 26px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted);
}
.stat-item:first-child { padding-left: 0; }
.stat-item + .stat-item { border-left: 1px solid var(--hair); }
.stat-item b {
  font-family: var(--font-display); font-size: clamp(28px, 2.4vw, 38px); font-weight: 300;
  letter-spacing: -.04em; line-height: 1; text-transform: none; color: var(--fg-primary);
}

/* the thread: one hairline for the whole take, a knot where each act begins.
   story.js scales the fill with the same timeline that moves the camera. */
.rail {
  position: absolute; left: var(--gutter); bottom: clamp(2rem, 5svh, 3rem);
  width: min(360px, 38vw); height: 1px; background: var(--rim-strong);
}
.rail-fill {
  position: absolute; inset: 0; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, color-mix(in srgb, var(--fai-accent) 55%, transparent), var(--fai-accent));
}
.rail ol { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.rail li {
  position: absolute; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: var(--navy-base); border: 1px solid var(--bd-light);
  transition: background var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
/* one knot per act; the hero is the start of the line */
.rail li:nth-child(1) { left: 20%; }
.rail li:nth-child(2) { left: 40%; }
.rail li:nth-child(3) { left: 60%; }
.rail li:nth-child(4) { left: 80%; }
.rail li:nth-child(5) { left: 100%; }
.rail li.is-on { background: var(--fai-accent); border-color: var(--fai-accent); }
.rail li.is-now { transform: scale(1.35); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fai-accent) 18%, transparent), 0 0 14px color-mix(in srgb, var(--fai-accent) 60%, transparent); }

/* reduced motion: no pin, the finished scene beside the five acts as a list */
.story.is-static .stage { height: auto; overflow: visible; padding: clamp(4rem, 9vw, 7rem) var(--gutter); }
.story.is-static .scene { position: relative; inset: auto; }
.story.is-static .scene #story-canvas { display: none; }
.story.is-static .scene .scene-still { position: relative; top: auto; right: auto; transform: none; width: min(100%, 880px); margin: 0 auto; }
.story.is-static .stage-fade, .story.is-static .rail, .story.is-static .hint { display: none; }
.story.is-static .story-copy {
  position: relative; left: auto; bottom: auto; width: auto; min-height: 0; max-width: var(--maxw);
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(1.75rem, 3vw, 2.75rem);
}
.story.is-static .beat { position: relative; opacity: 1; visibility: visible; }
.story.is-static .beat-hero { grid-column: 1 / -1; }
.story.is-static .beat h2 { font-size: clamp(22px, 2vw, 28px); }

/* ── The licence key slab (account.html) ─────────────────────────────── */

.key-slab {
  position: relative; overflow: hidden;
  margin: 32px 0 26px; padding: 20px 24px 22px;
  border: 1px solid var(--rim-strong); border-radius: 14px;
  background: color-mix(in srgb, var(--navy-base) 70%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--fg-primary) 6%, transparent);
}
.key-slab::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, var(--fai-accent), var(--info) 55%, transparent);
  opacity: .8;
}
.key-slab-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

.copy {
  padding: 5px 12px; border: 1px solid var(--rim-strong); border-radius: 100px; background: none;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg-muted); cursor: pointer;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.copy:hover { color: var(--fg-primary); border-color: var(--accent-border); }

.key-value {
  display: block; overflow-wrap: anywhere;
  font-family: var(--font-mono); font-weight: 600; font-size: clamp(20px, 3vw, 32px);
  letter-spacing: .1em; color: var(--fg-primary);
}

.dl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.btn-dl { flex-direction: column; gap: 3px; min-height: 0; padding: 14px 30px; border-radius: 16px; font-size: 15px; }
.dl-meta { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .08em; opacity: .66; }

/* ── BELOW THE STORY: an almost-opaque navy sheet over the Earth ────────── */

.below {
  position: relative;
  background: linear-gradient(180deg,
      transparent,
      color-mix(in srgb, var(--navy-base) 86%, transparent) 9rem,
      color-mix(in srgb, var(--navy-base) 93%, transparent) 60%,
      color-mix(in srgb, var(--navy-base) 88%, transparent));
  padding-top: 6rem;
}

.below > section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 8.5vw, 7.5rem) var(--gutter); }
.below > section + section { position: relative; }
/* dividers are a centred fading hairline, not a full-width rule */
.below > section + section::before {
  content: ''; position: absolute; top: 0; left: 50%; width: min(820px, 80%); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--rim-strong), transparent);
}

.sec-head { max-width: 680px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-head h2 { font-size: clamp(32px, 3.9vw, 56px); font-weight: 400; letter-spacing: -.045em; line-height: 1.04; }
.sec-lead { margin-top: 20px; max-width: 34em; font-size: clamp(15px, 1.1vw, 16.5px); color: var(--fg-soft); }

/* ── See it work: green-screen scenes with fAI on the monitor (demo.js) ──
   The player leads; the chapters sit beside it as a reading list whose active
   line fills while its scene plays. */

.reel { display: flex; flex-direction: column; gap: 22px; }
.reel-stage {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  border: 1px solid var(--rim-strong); border-radius: 20px;
  background: var(--navy-card);
  box-shadow: 0 50px 110px -50px #000, 0 0 0 8px color-mix(in srgb, var(--navy-base) 70%, transparent);
}
.reel-canvas, .reel-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-scene { visibility: hidden; }
.reel.is-plain .reel-canvas { display: none; }
.reel.is-plain .reel-scene { visibility: visible; }
/* a soft vignette so the frame sits in the page rather than on it */
.reel-stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 120px color-mix(in srgb, var(--navy-base) 50%, transparent);
}
.reel-toggle {
  position: absolute; z-index: 1; right: 18px; bottom: 18px;
  display: grid; place-items: center; width: 46px; height: 46px;
  border: 1px solid var(--rim-strong); border-radius: 50%; cursor: pointer;
  background: color-mix(in srgb, var(--navy-base) 70%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--fg-primary); transition: border-color var(--dur-fast) ease, transform .25s var(--ease);
}
.reel-toggle:hover { border-color: var(--accent-border); transform: scale(1.06); }
.reel-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.reel-icon-play, .reel.is-paused .reel-icon-pause { display: none; }
.reel.is-paused .reel-icon-play { display: block; }

/* the chapters: one row under the film, the active one fills its top line */
.reel-chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.reel-chapters button {
  position: relative; display: block; width: 100%; height: 100%; padding: 18px 2px 4px;
  border: 0; border-top: 1px solid var(--rim-strong); background: none; text-align: left; cursor: pointer;
  font-family: var(--font-sans);
}
.reel-chapters b {
  display: block; font-family: var(--font-display); font-size: 17px; font-weight: 500; letter-spacing: -.02em; line-height: 1.25;
  color: var(--fg-muted); transition: color .35s var(--ease);
}
.reel-chapters span { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--fg-ghost); transition: color .35s var(--ease); }
.reel-chapters button:hover b, .reel-chapters button.is-on b { color: var(--fg-primary); }
.reel-chapters button.is-on span { color: var(--fg-muted); }
.reel-progress {
  position: absolute; left: 0; right: 0; top: -1px; height: 2px; transform-origin: left;
  background: var(--fai-accent); transform: scaleX(var(--p, 0)); opacity: 0;
}
.reel-chapters button.is-on .reel-progress { opacity: 1; }

/* ── Play demo: the header link and the chip that rides the story ──────── */

.head-nav a.nav-demo {
  position: relative; margin-left: 25px;
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 10px; opacity: 1;
  border: 1px solid var(--accent-border); border-radius: 100px;
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--fai-accent) 12%, white);
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.head-nav a.nav-demo:hover { border-color: color-mix(in srgb, var(--fai-accent) 55%, transparent); background: color-mix(in srgb, var(--fai-accent) 14%, transparent); }
.head-nav a.nav-demo svg { width: 12px; height: 12px; fill: currentColor; }
/* the hairline that separates the page links from the action */
.head-nav a.nav-demo::before { content: ''; position: absolute; left: -25px; top: -6px; bottom: -6px; width: 1px; background: var(--hair); }
.site-head.is-scrolled .head-nav a.nav-demo { margin-left: 0; }
.site-head.is-scrolled .head-nav a.nav-demo::before { display: none; }

.demo-chip {
  position: absolute; z-index: 3; bottom: clamp(1.4rem, 4svh, 2.4rem); right: var(--gutter);
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px;
  border: 1px solid var(--accent-border); border-radius: 100px;
  background: color-mix(in srgb, var(--navy-base) 72%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px -18px #000;
  font-size: 14px; font-weight: 600; color: var(--fg-primary);
  transition: border-color var(--dur-fast) ease, transform .3s var(--ease);
}
.demo-chip:hover { border-color: color-mix(in srgb, var(--fai-accent) 60%, transparent); transform: translateY(-2px); }
.demo-chip svg {
  box-sizing: content-box; width: 12px; height: 12px; padding: 8px; border-radius: 50%;
  fill: #fff; background: var(--fai-accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--fai-accent) 50%, transparent);
  animation: chip-ring 2.4s var(--ease) infinite;
}
@keyframes chip-ring {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fai-accent) 45%, transparent); }
  70%  { box-shadow: 0 0 0 10px color-mix(in srgb, var(--fai-accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.story.is-static .demo-chip { position: static; margin: 0 0 1.5rem auto; display: flex; width: max-content; }

/* ── Demo: one long recording on a frontal monitor (demo.js) ───────────── */

.demo-player { display: flex; flex-direction: column; gap: 14px; }
.demo-stage {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  border: 1px solid var(--rim-strong); border-radius: 20px; background: var(--navy-card);
  box-shadow: 0 50px 110px -50px #000, 0 0 0 8px color-mix(in srgb, var(--navy-base) 70%, transparent);
}
.demo-canvas, .demo-scene, .demo-full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.demo-scene { visibility: hidden; }
.demo-player.is-plain .demo-canvas { display: none; }
.demo-player.is-plain .demo-scene { visibility: visible; }
/* App view: the recording alone, letterboxed on navy */
.demo-full { object-fit: contain; background: #040b17; opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility .45s; }
.demo-player.is-focus .demo-full { opacity: 1; visibility: visible; }

.demo-play {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: none; place-items: center; width: 84px; height: 84px; border-radius: 50%; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--fai-accent) 55%, transparent);
  background: var(--fai-button-fill), color-mix(in srgb, var(--navy-base) 55%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--fai-button-shadow), 0 20px 40px -18px #000;
  color: #fff; transition: transform .3s var(--ease), opacity .35s var(--ease);
}
.demo-play svg { width: 28px; height: 28px; fill: currentColor; }
.demo-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.demo-icon-pause, .demo-player.is-playing .demo-icon-play { display: none; }
.demo-player.is-playing .demo-icon-pause { display: block; }
.demo-player.has-recording .demo-play { display: grid; }
/* while it plays the button steps back until the visitor reaches for it */
.demo-player.is-playing .demo-play { opacity: 0; }
.demo-player.is-playing .demo-stage:hover .demo-play, .demo-player.is-playing .demo-play:focus-visible { opacity: 1; }
.demo-player.is-focus .demo-play { display: none; }

.demo-controls { display: none; align-items: center; gap: 16px; }
.demo-player.has-recording .demo-controls { display: flex; }
.demo-bar { position: relative; flex: 1; height: 18px; cursor: pointer; }
.demo-bar::before, .demo-bar i { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 2px; border-radius: 2px; }
.demo-bar::before { background: var(--rim-strong); }
.demo-bar i { background: var(--fai-accent); transform: scaleX(0); transform-origin: left; }
.demo-time { min-width: 6.5em; font-size: 13px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.demo-focus {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--rim-strong); border-radius: 100px; background: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--fg-soft);
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.demo-focus svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-focus:hover, .demo-focus[aria-pressed="true"] { color: var(--fg-primary); border-color: var(--accent-border); }

/* ── The method: an editorial ledger ────────────────────────────────────── */

.ledger { list-style: none; margin: 0; padding: 0; }
.ledger > li {
  position: relative;
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.75rem);
  padding: clamp(1.6rem, 3vw, 2.25rem) 0;
  border-top: 1px solid var(--hair);
}
.ledger > li:last-child { border-bottom: 1px solid var(--hair); }
.ledger > li::before {
  content: ''; position: absolute; top: -1px; left: 0; width: 96px; height: 1px;
  background: var(--fai-accent); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.ledger > li:hover::before { transform: scaleX(1); }
.num {
  padding-top: 6px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; color: var(--fg-ghost);
  transition: color var(--dur-base) var(--ease);
}
.ledger > li:hover .num { color: var(--fai-accent); }
.ledger h3 { margin-bottom: 12px; font-size: clamp(21px, 2vw, 28px); font-weight: 500; letter-spacing: -.032em; }
.ledger p { max-width: 44em; font-size: 15px; color: var(--fg-soft); }

.m-list { list-style: none; margin: 14px 0 0; padding: 0; max-width: 44em; font-size: 15px; color: var(--fg-soft); }
.m-list li { position: relative; margin-top: 9px; padding-left: 22px; }
.m-list li::before { content: ''; position: absolute; left: 0; top: .78em; width: 10px; height: 1px; background: var(--fai-accent); opacity: .8; }
.m-list i { font-style: normal; color: var(--info); }

/* ── Requirements ───────────────────────────────────────────────────────── */

.req-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.req {
  padding: 26px 26px 28px;
  border: 1px solid var(--rim); border-radius: 16px;
  background: color-mix(in srgb, var(--navy-card) 44%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--fg-primary) 6%, transparent);
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.req:hover { transform: translateY(-4px); border-color: var(--rim-strong); }
.req .mono-tag { color: var(--info); }
.req h4 { margin: 16px 0 8px; font-size: 19px; font-weight: 500; letter-spacing: -.025em; }
.req p { font-size: 14px; color: var(--fg-muted); }

/* ── Pricing ────────────────────────────────────────────────────────────────
   Four plan cards over a lit field. Rows (name, pitch, price, action, key
   features, contents) line up across the cards through subgrid; the chosen
   plan wears an accent ring; prices roll digit by digit when the cadence
   changes (checkout.js). checkout.js keys on .billing-toggle[data-cadence],
   .billing-choice, .tier, .tier-price, .tier-buy[data-tier] button[data-cadence],
   #site-discount and the code fields. Shared by index.html and pricing.html. */

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.plans { position: relative; isolation: isolate; }
/* the field the cards stand on: a cool light from below, a warm one from the chosen plan */
.plans::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 34%; width: min(1100px, 100%); height: 62%; transform: translateX(-50%);
  background:
    radial-gradient(45% 55% at 38% 52%, color-mix(in srgb, var(--fai-accent) 13%, transparent), transparent 70%),
    radial-gradient(60% 70% at 55% 60%, color-mix(in srgb, var(--info) 16%, transparent), transparent 72%);
  filter: blur(20px);
}

.plans-head { max-width: 900px; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.plans-head .eyebrow { justify-content: center; }
.plans-head h1, .plans-head h2 { font-size: clamp(34px, 4.4vw, 62px); font-weight: 400; letter-spacing: -.04em; line-height: 1.06; }
/* the claim, set off the way an editor marks a phrase */
.plans-mark {
  display: inline-block; margin-top: 6px; padding: 0 .28em .06em;
  border: 1.5px dashed color-mix(in srgb, var(--fai-accent) 60%, transparent); border-radius: 14px;
  background: color-mix(in srgb, var(--fai-accent) 10%, transparent);
  color: color-mix(in srgb, var(--fai-accent) 12%, white);
}
.plans-head .sec-lead { margin: 20px auto 0; }

/* the toggle: one lit pill that springs between the two options */
.billing-toggle {
  position: relative; display: inline-grid; grid-template-columns: auto auto; margin-top: 32px;
  padding: 5px; border: 1px solid var(--rim-strong); border-radius: 100px;
  background: color-mix(in srgb, var(--navy-base) 78%, transparent);
  box-shadow: 0 10px 30px -18px #000;
}
.billing-toggle::before {
  content: ''; position: absolute; top: 5px; bottom: 5px; left: var(--pill-x, 5px); width: var(--pill-w, 50%);
  border: 1px solid color-mix(in srgb, var(--fai-accent) 34%, transparent); border-radius: 100px;
  background: var(--fai-button-fill); box-shadow: var(--fai-button-shadow);
  transition: left .55s cubic-bezier(.34, 1.4, .5, 1), width .55s cubic-bezier(.34, 1.4, .5, 1);
}
.billing-choice {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 10px 24px;
  border: 0; border-radius: 100px; background: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 15px; font-weight: 500; color: var(--fg-muted);
  transition: color .35s var(--ease);
}
.billing-choice:hover { color: var(--fg-primary); }
.billing-choice.is-active { color: color-mix(in srgb, var(--fai-accent) 8%, white); }
.billing-save {
  padding: 3px 9px; border-radius: 100px;
  background: color-mix(in srgb, var(--info) 16%, transparent);
  font-size: 12px; font-weight: 600; color: color-mix(in srgb, var(--info) 55%, white);
}

.site-discount {
  max-width: 760px; margin: 0 auto 24px; padding: 14px 18px; text-align: center;
  border: 1px solid var(--accent-border); border-radius: 12px;
  background: var(--accent-soft);
  font-size: 14px; color: var(--fg-primary);
}

.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(6, auto); gap: 0 16px; }
.tier {
  position: relative;
  grid-row: span 6; display: grid; grid-template-rows: subgrid; row-gap: 0;
  padding: 28px 24px 26px;
  border: 1px solid var(--rim-strong); border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--navy-elevated) 78%, transparent), color-mix(in srgb, var(--navy-card) 86%, transparent));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--fg-primary) 7%, transparent), 0 24px 48px -32px #000;
  transition: border-color .4s var(--ease), transform .5s var(--ease);
}
.tier:hover { border-color: var(--bd-light); transform: translateY(-4px); }
.tier.is-featured {
  border-color: transparent;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--fai-accent) 13%, var(--navy-elevated)), color-mix(in srgb, var(--fai-accent) 4%, var(--navy-card)) 55%) padding-box,
    linear-gradient(160deg, var(--fai-accent), color-mix(in srgb, var(--fai-accent) 35%, transparent) 45%, color-mix(in srgb, var(--info) 45%, transparent)) border-box;
  border: 2px solid transparent; padding: 27px 23px 25px;
  box-shadow: 0 28px 60px -30px color-mix(in srgb, var(--fai-accent) 55%, #000);
}

.tier-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tier-name { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -.03em; color: var(--fg-primary); }
.tier-badge {
  padding: 5px 12px; border-radius: 100px;
  background: var(--fai-accent);
  font-size: 12px; font-weight: 600; white-space: nowrap; color: #fff;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--fai-accent) 80%, transparent);
}
.tier-for { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--fg-soft); }

.tier-price {
  display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 6px; margin-top: 24px;
  font-family: var(--font-display); font-size: clamp(44px, 3.8vw, 56px); font-weight: 600;
  letter-spacing: -.035em; line-height: 1; color: var(--fg-primary);
  font-variant-numeric: lining-nums tabular-nums;
}
.tier-price small { font-family: var(--font-sans); font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--fg-muted); white-space: nowrap; }
.tier-price .price-was { font-size: .45em; font-weight: 400; color: var(--fg-ghost); text-decoration-thickness: 1px; }
/* rolling digits: each digit is a 0–9 strip clipped to one cell (checkout.js) */
.roll { display: inline-flex; }
.roll-d { display: inline-block; height: 1em; overflow: hidden; line-height: 1; }
.roll-s { display: flex; flex-direction: column; transition: transform .7s cubic-bezier(.22, 1.2, .36, 1); }
.roll-s > span { height: 1em; }

.tier-buy { margin-top: 22px; }
.tier-buy button, .tier-buy a {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 52px; padding: 14px 20px;
  border: 1px solid var(--bd-strong); border-radius: 12px;
  background: linear-gradient(0deg, color-mix(in srgb, var(--navy-base) 90%, transparent), color-mix(in srgb, var(--seal-blue) 90%, transparent));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--fg-primary) 10%, transparent), 0 10px 22px -12px #000;
  font-family: var(--font-sans); font-size: 16px; font-weight: 600; color: var(--fg-primary); cursor: pointer;
  transition: transform .25s var(--ease), border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, filter var(--dur-fast) ease;
}
.tier-buy button:hover:not(:disabled), .tier-buy a:hover { transform: translateY(-2px); border-color: var(--bd-light); filter: brightness(1.12); }
.tier.is-featured .tier-buy button {
  background: var(--fai-button-fill), color-mix(in srgb, var(--fai-accent) 22%, var(--navy-card));
  border-color: color-mix(in srgb, var(--fai-accent) 55%, transparent);
  box-shadow: var(--fai-button-shadow), 0 14px 28px -14px color-mix(in srgb, var(--fai-accent) 75%, transparent);
  color: #fff;
}
.tier-buy button:disabled { cursor: default; opacity: .55; transform: none; filter: none; }
.tier-buy button.is-busy { opacity: .7; }

/* key features: the three things the plan is for, each with its icon */
.tier-keys { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tier-keys li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--fg-primary); }
.tier-keys svg {
  flex: none; width: 20px; height: 20px; margin-top: 1px;
  fill: none; stroke: var(--info); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.tier.is-featured .tier-keys svg { stroke: color-mix(in srgb, var(--fai-accent) 55%, white); }

.tier-body { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hair); }
.tier-plus { font-size: 14px; font-weight: 600; color: var(--fg-primary); }
.tier-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tier-list li { position: relative; padding-left: 32px; font-size: 13.5px; line-height: 1.5; color: var(--fg-muted); }
/* a ringed check, drawn in CSS */
.tier-list li::before {
  content: ''; position: absolute; left: 0; top: -1px; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--info) 55%, transparent);
  background: color-mix(in srgb, var(--info) 10%, transparent);
}
.tier-list li::after {
  content: ''; position: absolute; left: 7.5px; top: 5px; width: 7px; height: 4px;
  border-left: 1.5px solid var(--info); border-bottom: 1.5px solid var(--info); transform: rotate(-45deg);
}
.tier.is-featured .tier-list li::before { border-color: color-mix(in srgb, var(--fai-accent) 60%, transparent); background: var(--accent-soft); }
.tier.is-featured .tier-list li::after { border-color: color-mix(in srgb, var(--fai-accent) 50%, white); }

.checkout-note {
  margin-top: 16px; padding: 12px 16px;
  border: 1px solid var(--rim-strong); border-radius: 12px;
  background: color-mix(in srgb, var(--navy-card) 82%, transparent);
  font-size: 14px; color: var(--fg-body);
}

/* the terms, set like the story's stat row: short facts between hairlines */
.plans-terms {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none; margin: 44px 0 0; padding: 0;
}
.plans-terms li { padding: 2px 24px; font-size: 13.5px; line-height: 1.5; color: var(--fg-muted); }
.plans-terms li:first-child { padding-left: 0; }
.plans-terms li + li { border-left: 1px solid var(--hair); }
.plans-terms b { display: block; margin-bottom: 4px; font-family: var(--font-display); font-size: 17px; font-weight: 500; letter-spacing: -.02em; color: var(--fg-primary); }

.plans-foot {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 32px;
  margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--hair);
}
.plans-foot .plans-link { margin-left: auto; }
.plans-fine { font-size: 13px; color: var(--fg-ghost); }
.plans-codes summary {
  display: inline-flex; list-style: none; cursor: pointer;
  font-size: 14px; color: var(--fg-soft);
  text-decoration: underline; text-decoration-color: var(--bd-light); text-underline-offset: 4px;
  transition: color var(--dur-fast) ease, text-decoration-color var(--dur-fast) ease;
}
.plans-codes summary::-webkit-details-marker { display: none; }
.plans-codes summary:hover, .plans-codes[open] summary { color: var(--fg-primary); text-decoration-color: var(--accent-border); }
.plans-codes-fields { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 18px; }
.code-field label { display: block; margin-bottom: 7px; font-size: 12.5px; color: var(--fg-muted); }
.code-field > div {
  display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 16px;
  border: 1px solid var(--rim-strong); border-radius: 100px;
  background: color-mix(in srgb, var(--navy-base) 60%, transparent);
  transition: border-color var(--dur-fast) ease;
}
.code-field > div:focus-within { border-color: var(--accent-border); }
.code-field input {
  width: 12em; min-width: 0; border: 0; background: none; outline: none;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em; color: var(--fg-primary);
  caret-color: var(--fai-accent);
}
.code-field input::placeholder { color: var(--fg-ghost); }
.code-field button {
  min-height: 32px; padding: 5px 14px; border: 1px solid var(--rim-strong); border-radius: 100px; background: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 500; color: var(--fg-soft);
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.code-field button:hover { color: var(--fg-primary); border-color: var(--accent-border); }
.code-field p:not(:empty) { margin-top: 7px; font-size: 12.5px; color: var(--info); }

.plans-link { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; color: var(--fg-primary); }
.plans-link svg { width: 16px; height: 16px; fill: none; stroke: var(--fai-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.plans-link:hover svg { transform: translateX(4px); }

/* ── pricing.html: the comparison table and the fine print ──────────────── */

.page-plans { padding-top: var(--head-h); }
.page-plans .below { padding-top: 0; background: color-mix(in srgb, var(--navy-base) 55%, transparent); }
.page-plans .sec-head h1 { font-size: clamp(38px, 4.6vw, 64px); font-weight: 400; letter-spacing: -.048em; line-height: 1.02; }

.matrix-wrap {
  /* a window onto the table: its own scroll, the plan names pinned on top */
  max-height: min(640px, 72vh); overflow: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--bd-strong) transparent;
  border: 1px solid var(--rim); border-radius: 18px;
  background: color-mix(in srgb, var(--navy-card) 52%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--glass-shadow);
}
.matrix { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.matrix-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.matrix-wrap::-webkit-scrollbar-thumb { background: var(--bd-strong); border-radius: 8px; }
.matrix caption { caption-side: bottom; padding: 16px 20px; text-align: left; font-size: 12.5px; color: var(--fg-ghost); }
.matrix th, .matrix td { padding: 13px 16px; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
.matrix thead th {
  position: sticky; top: 0; z-index: 1;
  background: color-mix(in srgb, var(--navy-card) 96%, transparent);
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-soft);
}
.matrix thead th + th, .matrix td { width: 11%; text-align: center; }
.matrix tbody th { font-weight: 400; line-height: 1.5; color: var(--fg-muted); }
.matrix tbody th strong { font-weight: 600; color: var(--fg-primary); }
.matrix-area { display: block; margin-bottom: 3px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-ghost); }
.matrix td { color: var(--fg-ghost); }
/* a dot, not a word: the column says which plan */
.matrix td.yes { font-size: 0; }
.matrix td.yes::before {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--fai-accent);
}
.matrix .matrix-group th {
  padding-top: 26px; border-bottom-color: var(--rim-strong);
  font-family: var(--font-display); font-size: 16px; font-weight: 500; letter-spacing: -.02em; color: var(--fg-primary);
}
.matrix tbody tr:not(.matrix-group):hover { background: color-mix(in srgb, var(--fg-primary) 3%, transparent); }

.fine { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fine article {
  padding: 26px 26px 28px;
  border: 1px solid var(--rim); border-radius: 16px;
  background: color-mix(in srgb, var(--navy-card) 44%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--fg-primary) 6%, transparent);
}
.fine .mono-tag { color: var(--info); }
.fine h3 { margin: 16px 0 10px; font-size: 19px; font-weight: 500; letter-spacing: -.025em; }
.fine p { font-size: 14px; color: var(--fg-muted); }
.fine a { color: var(--info); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--info) 45%, transparent); text-underline-offset: 3px; }
.manage { margin-top: 28px; }

/* ── Closer ─────────────────────────────────────────────────────────────── */

.below > .closer { text-align: center; padding-bottom: clamp(5rem, 10vw, 9rem); }
.closer-inner { max-width: 620px; margin: 0 auto; }
.closer-wordmark {
  display: block; width: min(76%, 340px); height: auto; margin: 0 auto 28px;
}
.closer .live-icon, .closer canvas { width: 200px; height: 200px; margin: 0 auto 14px; display: block; }
.closer h2 { font-size: clamp(34px, 4.4vw, 62px); font-weight: 400; letter-spacing: -.048em; margin-bottom: 18px; }
.closer p { max-width: 32em; margin: 0 auto 30px; font-size: 16px; color: var(--fg-soft); }
.closer p a { color: var(--info); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--info) 45%, transparent); text-underline-offset: 3px; }
.closer p a:hover { text-decoration-color: currentColor; }
.closer-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-foot {
  position: relative;
  padding: clamp(3rem, 6vw, 4.5rem) var(--gutter) clamp(2.5rem, 5vw, 3.5rem);
  background: linear-gradient(180deg, color-mix(in srgb, var(--navy-base) 90%, transparent), var(--navy-base) 40%);
}
/* the same fading hairline that separates the sections above */
.site-foot::before {
  content: ''; position: absolute; top: 0; left: 50%; width: min(1200px, 100%); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--rim-strong) 18%, var(--rim-strong) 82%, transparent);
}
.foot-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem);
}
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.foot-brand .wordmark img { width: 56px; height: auto; }
.foot-brand .wordmark span { font-size: 22px; }
.foot-brand p { max-width: 22em; font-size: 14px; color: var(--fg-muted); }
.foot-brand .btn { margin-top: 6px; }

.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.foot-col .mono-tag { margin-bottom: 6px; color: var(--fg-ghost); }
.foot-col a {
  position: relative; font-size: 14px; color: var(--fg-soft);
  transition: color var(--dur-fast) ease;
}
.foot-col a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: var(--fai-accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.foot-col a:hover { color: var(--fg-primary); }
.foot-col a:hover::after { transform: scaleX(1); }

/* the company line sits with the brand: no separate legal strip */
.foot-legal {
  display: flex; flex-direction: column; gap: 2px; margin-top: 10px;
  font-style: normal; font-size: 12px; line-height: 1.5; color: var(--fg-ghost);
}
.foot-legal .mono-tag { margin-bottom: 4px; color: var(--fg-muted); }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .site-head { padding-inline: 24px; }
  .head-nav { gap: 18px; }
  .head-nav .umbrella { padding-left: 18px; }
}

/* below this width the copy would sit on top of the scene: stack them */
@media (max-width: 1100px) {
  /* story: scene in the upper half, copy in the lower */
  .scene canvas, .scene .scene-still { top: calc(var(--head-h) + 1svh); right: auto; left: 50%; width: min(128vw, 96svh); transform: translateX(-50%); }
  .stage-fade { background: linear-gradient(0deg, color-mix(in srgb, var(--navy-base) 88%, transparent) 36%, transparent 66%); }
  .story-copy { left: var(--gutter); right: var(--gutter); width: auto; bottom: 4.25rem; min-height: 0; }
  .beat h2 { font-size: clamp(26px, 7.2vw, 38px); }
  .rail { bottom: 1.75rem; width: min(360px, 62vw); }
}

@media (max-width: 900px) {
  :root { --head-h: 68px; }
  .site-head { padding: 14px 18px; }
  .site-head::after { inset: 8px 8px; }
  .site-head.is-scrolled { padding-inline: 22px; }
  .site-head.is-scrolled::after { inset: 8px 8px; }
  .head-nav a[href="#method"], .head-nav a[href="#see-it"], .head-nav a[href="#requirements"], .head-nav .nav-sec, .head-nav .umbrella { display: none; }

  .ledger > li { grid-template-columns: 48px minmax(0, 1fr); }
  .foot-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .ledger > li::before { width: 48px; }
  .fine { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 980px) {
  .demo-stage { border-radius: 14px; box-shadow: 0 30px 70px -40px #000; }
  .reel-stage { border-radius: 14px; box-shadow: 0 30px 70px -40px #000; }
  /* the chapters become a strip you swipe; descriptions stay with the active one */
  .reel-chapters { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .reel-chapters::-webkit-scrollbar { display: none; }
  .reel-chapters li { flex: 0 0 min(72%, 260px); scroll-snap-align: start; }
}

/* four cards need room: two by two, then one column */
@media (max-width: 1180px) {
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(12, auto); gap: 16px; }
  .plans-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .plans-terms li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 640px) {
  .tiers { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .tier { grid-row: auto; display: flex; flex-direction: column; }
  .plans-terms { grid-template-columns: minmax(0, 1fr); }
  .plans-terms li { padding: 0; border-left: 0 !important; }
  .billing-choice { padding-inline: 16px; }
  .plans-foot .plans-link { margin-left: 0; }
  .plans-codes, .plans-codes-fields, .code-field { width: 100%; }
  .code-field input { width: 100%; flex: 1; }
}

@media (max-width: 600px) {
  .beat-hero h1 .l1 { font-size: clamp(34px, 9.6vw, 46px); }
  .beat-hero h1 .l2 { font-size: 17px; margin-top: 10px; }
  .beat-hero h1 { margin-bottom: 14px; }
  .beat.beat-hero p.eyebrow { margin-bottom: 14px; }
  .hero-cta { margin-top: 18px; }
  .hint { display: none; }
  .demo-chip { right: 16px; bottom: 1.1rem; padding: 6px 14px 6px 6px; font-size: 13px; }
  /* the story line ends where the chip begins */
  .rail { width: calc(100% - var(--gutter) - 170px); }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .head-nav { gap: 14px; }
  .req { padding: 22px 20px; }
  .foot-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  .wordmark span { display: none; }
}

/* short windows: the opening moment must still fit under the header */
@media (max-height: 640px) {
  .beat.beat-hero p.lead, .beat.beat-hero p.eyebrow { display: none; }
  .beat-hero h1 .l1 { font-size: clamp(30px, 6.4vh, 44px); }
  .beat-hero h1 .l2 { font-size: 16px; margin-top: 8px; }
  .beat-hero h1 { margin-bottom: 0; }
  .hero-cta { margin-top: 16px; }
  .story-copy { bottom: 3.5rem; }
  .beat h2 { font-size: clamp(22px, 5vh, 34px); }
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hint i { animation: none; opacity: 1; }
  .btn:hover, .req:hover, .tier-buy button:hover:not(:disabled), .tier-buy a:hover { transform: none; }
  .billing-toggle::before, .roll-s { transition: none; }
  .tier:hover { transform: none; }
}
