/* ============================================================
   Sunday — promo site
   Mobile-first. Pure black, matching the app.

   No webfonts, deliberately. A page selling an assistant that never
   talks to a server should not open a connection to Google before it
   paints — and a font @import is the slowest way to load one anyway:
   the browser has to fetch this file, parse it, discover the import,
   fetch that CSS, then fetch the faces. The system stacks below cost
   nothing and, on the iPhone this app ships for, are the real thing
   rather than an imitation of it.
   ============================================================ */

:root {
  --bg:          #000;
  --surface:     #0b0b0c;
  --surface-2:   #121214;
  --line:        rgba(255, 255, 255, .11);
  --line-strong: rgba(255, 255, 255, .22);
  --fg:          #fff;
  --fg-2:        rgba(255, 255, 255, .58);
  /* .40 on black is 3.66:1, and every one of the eleven things wearing this
     is body-sized text — the App Store line under the hero button, the
     footer byline, the Gemma fineprint — so all of them failed WCAG AA's
     4.5:1. .56 is 5.3:1 and still reads as the quietest tier on the page. */
  --fg-3:        rgba(255, 255, 255, .56);

  /* SF Pro on Apple platforms, each platform's own UI face elsewhere. */
  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  /* SF Pro Rounded, which the app uses for its display type.
     `ui-rounded` is the standard generic family and the only way to reach
     it from the web — "SF Pro Rounded" is not resolvable by name, and
     `-apple-system-rounded` is not a keyword in any engine, so a stack
     built on those two silently falls through to whatever comes next.
     `ui-rounded` first, then the ordinary UI face, which is the closest
     thing available where no rounded system font exists. */
  --sans-rounded: ui-rounded, -apple-system, BlinkMacSystemFont, system-ui,
                  "Segoe UI Variable Display", "Segoe UI", Roboto,
                  "Helvetica Neue", Arial, sans-serif;

  --wrap: 1140px;
  --gut: 22px;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 26px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The walkthrough slides frames in from off-stage, so something is
     always sticking out sideways. `overflow-x: hidden` on the body alone
     does not contain it: with html visible the body's overflow propagates
     to the viewport, which left window.innerWidth reporting 432 on a
     393px screen. Anything positioned against the viewport inherited that
     error — the fixed download bar resolved left:0/right:0 to 432 and ran
     its button 17px off the right edge of the phone.

     `clip` on the root contains it without creating a scroll container,
     so position: sticky keeps working. `hidden` below is the fallback for
     anything too old to know `clip`. */
  overflow-x: hidden;
  overflow-x: clip;
}

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

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--sans-rounded);
  font-weight: 800;
  letter-spacing: -.032em;
  line-height: 1.06;
  /* The rounded face is wider than the one these breaks were set against,
     which left single words stranded on their own line. Balance evens the
     lines out per viewport instead of trusting a hard-coded break. */
  text-wrap: balance;
}

p { margin: 0; }

ul, ol, dl { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: #fff;
  color: #000;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 600;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── shared type ───────────────────────────────────────────── */

.eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 18px;
}

/* The hero's eyebrow is the only one that sits over footage rather than
   flat black, and 40% white over a moving mid-grey plate is not legible.
   Everywhere else the section grounds are black and --fg-3 is correct. */
.hero .eyebrow {
  color: rgba(255, 255, 255, .74);
  text-shadow: 0 1px 14px rgba(0, 0, 0, .95);
}

.section-head { max-width: 44ch; margin-bottom: 44px; }

.section-head h2 {
  font-size: clamp(1.85rem, 7.4vw, 2.9rem);
}

.section-sub {
  margin-top: 18px;
  color: var(--fg-2);
  font-size: 1.02rem;
  line-height: 1.62;
  max-width: 46ch;
}

.section {
  padding-block: clamp(72px, 15vw, 132px);
  border-top: 1px solid var(--line);
  /* clear the sticky header when jumped to via an anchor link */
  scroll-margin-top: 64px;
}

.section-tight { padding-bottom: clamp(48px, 9vw, 80px); }

/* ── buttons ───────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #000;
  border-radius: 999px;
  font-family: var(--sans-rounded);
  font-weight: 700;
  letter-spacing: -.01em;
  padding: 14px 24px;
  transition: transform .18s var(--ease), opacity .18s var(--ease), box-shadow .18s var(--ease);
  will-change: transform;
}
.btn:active { transform: scale(.972); }

@media (hover: hover) {
  .btn:hover {
    opacity: .95;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.16);
  }
}

.btn-sm { padding: 9px 17px; font-size: .89rem; }
.btn-lg { padding: 15px 27px; font-size: 1.02rem; }
.btn-block { width: 100%; padding-block: 16px; font-size: 1.03rem; }

.appstore { padding-block: 12px; }
.appstore .apple { width: 26px; height: 26px; flex: none; margin-top: -2px; }
.appstore-txt { display: flex; flex-direction: column; line-height: 1.12; text-align: left; }
.appstore-sm { font-size: .66rem; font-weight: 500; letter-spacing: .01em; opacity: .72; }
.appstore-lg { font-size: 1.14rem; font-weight: 600; letter-spacing: -.02em; }

/* ── header ────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-block: 12px;
  padding-top: max(12px, env(safe-area-inset-top));
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--line);
}

/* Each walkthrough step is a full screen of its own, and the bar sat over
   the top edge of every frame in it. Off for the duration, like the CTA. */
.site-header.is-away {
  transform: translateY(-102%);
  opacity: 0;
  pointer-events: none;
  transition: transform .34s var(--ease), opacity .24s var(--ease);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-name { font-weight: 700; font-size: 1.06rem; letter-spacing: -.02em; }

.header-cta {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.site-header.is-stuck .header-cta {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ── hero ──────────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  padding-top: clamp(36px, 9vw, 76px);
}

.hero::before {
  content: "";
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(255, 179, 71, 0.07) 0%, rgba(139, 92, 246, 0.03) 60%, transparent 100%);
  filter: blur(80px);
  z-index: -2;
  pointer-events: none;
}

/* ── hero video ────────────────────────────────────────────── */

.hero-video {
  position: absolute;
  /* Run up behind the (transparent) header, or the top of the video cuts
     against the black band above it as a hard horizontal seam. */
  inset: -160px 0 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Keeps the headline legible over footage and fades the clip out into
   the black page rather than ending on a hard edge. */
/* Tuned to this clip: it averages ~59/255 luma, so the copy side needs
   roughly .78 effective cover while the rest can stay light enough for the
   footage to actually read. The two gradients multiply — allow for that. */
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0,0,0,.88) 0%, rgba(0,0,0,.66) 45%, rgba(0,0,0,.38) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.28) 0%, transparent 22%, rgba(0,0,0,.8) 86%, #000 100%);
}

@media (prefers-reduced-motion: reduce) {
  /* Poster only — the video element still paints its poster frame. */
  .hero-video video { display: none; }
  .hero-video {
    background: #000 center / cover no-repeat url("../assets/video/hero-poster.webp");
  }
}

.hero h1 {
  font-size: clamp(2.35rem, 10.4vw, 4.35rem);
  letter-spacing: -.042em;
  line-height: 1.02;
  text-wrap: balance;
}

.lede {
  margin-top: 22px;
  font-size: clamp(1.03rem, 3.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--fg-2);
  max-width: 40ch;
}

.hero-cta { margin-top: 34px; }

.cta-meta {
  margin-top: 15px;
  font-size: .84rem;
  color: var(--fg-3);
  letter-spacing: -.005em;
}

/* ── page-wide dot field ───────────────────────────────────── */

/* Fixed behind the whole document. z-index:-1 puts it above the page's own
   background and below every piece of content, so nothing needs raising to
   sit in front of it. */
.pagedots {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.pagedots.is-live { opacity: 1; }

/* ── hero 3D object ────────────────────────────────────────── */

/* Sits above the footage and its scrim (both at z-index -1) and below the
   copy. .hero already sets isolation:isolate, so this whole arrangement is
   sealed inside the hero's own stacking context. */
.hero3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s var(--ease);
}
.hero3d.is-live { opacity: 1; }

/* Without this the copy would paint under a positioned canvas. */
.hero-grid,
.hero .proof { position: relative; z-index: 1; }

/* With the object live the original screenshot keeps its exact layout box —
   which is what places the object — and keeps its alt text in the
   accessibility tree, and simply stops painting. The unfold animation goes
   with it: hero3d measures that box, and an animation that rotates it through
   62 degrees would be handing over a foreshortened target. */
html.hero3d-on .hero-shot .phone {
  opacity: 0;
  transition: opacity .5s var(--ease);
  animation: none !important;
  transform: none !important;
}
html.hero3d-on .hero-shot .phone-glow { opacity: .55; }

/* phone */

.hero-shot {
  position: relative;
  margin-top: 62px;
  display: flex;
  justify-content: center;
  perspective: 1400px;
}

/* Hinged at the top edge so it swings open like a folded panel rather
   than just tilting.

   This runs once on load rather than being scrubbed by scroll. Tied to
   scroll depth, its resting state at the top of the page was folded —
   28% opacity, leaning back 62 degrees — so the first thing anyone saw
   was a dim skewed rectangle that reads as a rendering fault. As an
   entrance it lands open and stays open, and `both` holds the folded
   state through the delay so there is no flash of the end state first.
   A keyframe animation also means it still plays with JS disabled. */
@keyframes hero-unfold {
  from { transform: rotateX(-62deg) translateY(26px); opacity: .28; }
  to   { transform: none;                             opacity: 1; }
}
.hero-shot .phone {
  transform-origin: 50% 0%;
  animation: hero-unfold .95s var(--ease) .2s both;
  will-change: transform, opacity;
}

.phone {
  position: relative;
  width: 100%;
  max-width: 290px;
  aspect-ratio: 640 / 1391;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  background: #000;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .8),
    0 34px 70px -22px rgba(0, 0, 0, .95);
}

.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Hero phone container maintains full iPhone aspect ratio 640 / 1391 */
.phone-hero { aspect-ratio: 640 / 1391; }

.phone-glow {
  position: absolute;
  inset: auto 0 4%;
  height: 62%;
  margin-inline: auto;
  max-width: 420px;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, .12), transparent 68%);
  filter: blur(28px);
  z-index: -1;
  pointer-events: none;
}

/* proof strip */

.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: clamp(56px, 12vw, 92px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: .93rem;
  color: var(--fg-2);
  letter-spacing: -.01em;
}
.proof span { color: var(--fg); font-weight: 600; }

.features {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.feature {
  background: rgba(11, 11, 12, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 26px 22px 28px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.feature:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.feature svg {
  width: 25px;
  height: 25px;
  margin-bottom: 15px;
  fill: none;
  stroke: var(--fg);
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .92;
}

.feature h3 { font-size: 1.04rem; letter-spacing: -.022em; }

.feature p {
  margin-top: 8px;
  font-size: .94rem;
  line-height: 1.55;
  color: var(--fg-2);
}
/* ── privacy ───────────────────────────────────────────────── */

.claims { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }

.claim { background: var(--bg); padding: 30px 0; }

@supports (grid-template-columns: subgrid) {
  .claim { padding-inline: 0; }
}

.claim h3 { font-size: 1.14rem; letter-spacing: -.026em; }

.claim p {
  margin-top: 10px;
  color: var(--fg-2);
  font-size: .97rem;
  line-height: 1.6;
  max-width: 58ch;
}

/* ── clips ─────────────────────────────────────────────────────
   A slot holds a still and, once a rendered clip is registered for it in
   main.js, a video laid over that still. The still stays in the DOM as
   the poster and as the reduced-motion and no-JS state. */

.clip { position: relative; overflow: hidden; }

.clip video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transition: opacity .4s var(--ease);
}
/* Only once a clip is actually mounted — otherwise the still is the
   whole content and must stay visible. */
.clip.has-clip video { opacity: 1; }

/* ── live demo ─────────────────────────────────────────────── */

.demo-shot { margin-top: 44px; display: flex; justify-content: center; }
.demo-shot .phone { max-width: 300px; }

.demo-note {
  margin-top: 24px;
  color: var(--fg-3);
  font-size: .88rem;
  letter-spacing: .01em;
  padding-left: 14px;
  border-left: 2px solid var(--line-strong);
}

/* ── tech ──────────────────────────────────────────────────── */

.tech {
  position: relative;
  isolation: isolate;
}

.tech::before {
  content: "";
  position: absolute;
  bottom: 0;
  right: -10vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.04) 0%, rgba(59, 130, 246, 0.01) 60%, transparent 100%);
  filter: blur(80px);
  z-index: -2;
  pointer-events: none;
}

.specs {
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

.specs > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-block: 15px;
  border-bottom: 1px solid var(--line);
}

.specs dt {
  color: var(--fg-3);
  font-size: .87rem;
  letter-spacing: .01em;
}

.specs dd {
  margin: 0;
  font-family: var(--sans-rounded);
  font-weight: 700;
  font-size: .97rem;
  letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.fineprint {
  margin-top: 26px;
  font-size: .84rem;
  line-height: 1.6;
  color: var(--fg-3);
  max-width: 52ch;
}

/* Nothing sits beside the copy any more, so cap the measure — full-bleed
   across a 1200px wrap gives lines nobody wants to read. */
.tech-copy { max-width: 68ch; }

/* ── finale ────────────────────────────────────────────────── */

.finale { text-align: center; }

.finale-inner { display: flex; flex-direction: column; align-items: center; }

.finale h2 {
  font-size: clamp(2rem, 8.4vw, 3.4rem);
  letter-spacing: -.04em;
}

.finale p {
  margin-top: 18px;
  color: var(--fg-2);
  font-size: 1.04rem;
  max-width: 34ch;
}

.finale .btn { margin-top: 36px; }

/* ── footer ────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 40px;
  padding-bottom: calc(40px + var(--sticky-h, 0px));
}

.footer-inner { display: flex; flex-direction: column; gap: 20px; }

.footer-meta { font-size: .87rem; color: var(--fg-3); }

/* min-height, because at .87rem these came out 22px tall and WCAG 2.2's
   target-size minimum is 24. inline-flex so the block sizing actually takes
   on what are otherwise inline elements. */
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: .87rem; color: var(--fg-2); }
.footer-links a { display: inline-flex; align-items: center; min-height: 30px; }

@media (hover: hover) {
  .footer-links a:hover { color: var(--fg); }
}

/* ── sticky mobile CTA ─────────────────────────────────────── */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 12px var(--gut);
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, .78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
  transform: translateY(105%);
  transition: transform .34s var(--ease);
}

.sticky-cta.is-visible { transform: none; }

/* ── reveal ────────────────────────────────────────────────── */

/* Gated on html.js, which an inline script in <head> sets before first
   paint. Ungated, this hid all twenty-six of them at opacity 0 and only
   main.js ever added .is-in — so with JavaScript off, or merely slow to
   arrive, or failed, the page had 463 words in its markup and showed none
   of them. A reveal is an enhancement; it must not be the thing standing
   between a reader and the text. */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .62s var(--ease), transform .62s var(--ease);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   larger screens
   ============================================================ */

@media (min-width: 620px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .slide { width: 264px; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer-meta { order: 3; }
}

@media (min-width: 900px) {
  :root { --gut: 40px; }

  body { font-size: 18px; }

  .hero { padding-top: 58px; }

  .hero-grid {
    display: grid;
    grid-template-columns: 1.06fr .94fr;
    align-items: center;
    gap: 56px;
  }

  .hero-shot { margin-top: 0; }
  .phone { max-width: 320px; }

  .lede { font-size: 1.19rem; }

  .features { grid-template-columns: repeat(3, 1fr); }
  .feature { padding: 30px 26px 32px; }

  .slide { width: 288px; }
  .track { gap: 26px; padding-inline: max(var(--gut), calc((100vw - var(--wrap)) / 2 + var(--gut))); }

  .claims {
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
  }
  .claim { padding: 34px 30px; }

  /* Tech is a single column now — its frame is gone, and left in the shared
     two-column rule the copy would sit in a 1.1fr track with an empty .9fr
     beside it. */
  .demo-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 64px;
  }
  .demo-shot { margin-top: 0; }
  /* Frame on the left, copy on the right — the opposite hand to Tech, so
     the two full-width bands do not read as the same slide twice. */
  .demo-grid { grid-template-columns: .9fr 1.1fr; }
  .demo-shot { order: -1; }

  .section-head { margin-bottom: 56px; }

  /* the sticky bar is a mobile pattern — desktop has the header CTA */
  .sticky-cta { display: none; }
}

@media (min-width: 1100px) {
  /* The headline shares the row with the frame, so it has about 530px to
     work in. The rounded face is wider than the one this was set against:
     at 4.5rem, and still at 3.9, "A private AI that" overran by a few
     pixels and pushed a fourth line carrying one word. 3.6 fits it to
     three at every wrap mode, with room to spare. */
  .hero h1 { font-size: 3.6rem; }
}

/* ============================================================
   preferences
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   walkthrough — the eleven actions, scroll-scrubbed
   Everything here is scoped to #walk: the page already defines
   .phone, and its rules must keep winning outside this section.
   ============================================================ */

/* No background of its own. It used to repeat the body's #000, which was
   harmless while the background was the only thing behind it — and opaque
   over the dot field once that sits between the two. */
#walk { border-top: 1px solid var(--line); }

.walk-lead {
  padding-top: clamp(72px, 15vw, 132px);
  padding-bottom: clamp(28px, 6vw, 44px);
  max-width: 44ch;
}
.walk-lead h2 { font-size: clamp(1.85rem, 7.4vw, 2.9rem); }
.walk-cue {
  margin-top: 20px;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

#walk .step {
  position: relative;
  height: 250vh;
  /* One stage hands straight over to the next instead of sliding past it. */
  margin-bottom: -100vh;
}

/* The finale gets a longer runway than the other ten. It has to carry both
   a fold slow enough to watch and, after it lands, long enough on screen
   to actually read the line — and at 250vh the fold left about a fifth of
   a second of hold, which is no time to read anything. Every step's
   offsets are measured individually, so one being taller costs nothing. */
#walk #know.step { height: 340vh; }

/* Five hundred copies go past in this one, and at a rate that reads as
   speed rather than as a list. That needs road: on the standard runway the
   whole column was gone in a flick. */
#walk #remember.step { height: 620vh; }
#walk .step:last-of-type { margin-bottom: 0; }

/* Tall runway, sticky viewport: progress through the runway drives every
   transform, so the motion is scrubbed rather than triggered. */
#walk .stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  place-content: center;
  /* Deliberately not black. Two stages share the screen for the whole
     trip between them, so a plate on each one would hide the other; the
     black behind them is the page. */
  background-color: transparent;
  /* Nothing is reserved at the top any more — the header steps aside for
     the walkthrough, so the frames get that band back. The bottom still
     holds a clear band for the caption, wide enough that the text sits
     well below the frame rather than tucked under its edge.
     Kept as variables because absolutely-positioned decoration inside a
     stage resolves against the padding box, which is not where anything
     laid out in the grid actually sits. */
  --pad-t: 22px;
  --pad-b: 158px;
  padding: var(--pad-t) var(--gut) var(--pad-b);
}

/* The active stage is pinned out of the scroll entirely. Sticky only holds
   while the real scroll is inside the step's own section, so a fast flick
   pulls the step off screen mid-transition; fixed keeps it there until the
   transition has actually finished. Sticky above stays as the no-JS and
   reduced-motion fallback. */
#walk .stage.is-pinned {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  will-change: transform, opacity;
}

/* Sits with its description at the foot of the step. Pinning it in the
   corner crowded the frame once the frames filled the screen. */
#walk .verb {
  font-family: var(--sans-rounded);
  font-size: .68rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--fg-3);
  margin-bottom: 7px;
}

#walk .phone {
  position: relative;
  width: min(80vw, 308px);
  max-width: none;
  aspect-ratio: 640 / 1391;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.22);
  overflow: hidden;
  background: #000;
  box-shadow: 0 28px 56px -20px rgba(0,0,0,.95);
}
#walk .phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

#walk .caption {
  position: absolute;
  left: var(--gut); right: var(--gut);
  bottom: max(34px, calc(env(safe-area-inset-bottom) + 26px));
  text-align: center; z-index: 6;
}
#walk .caption p { color: var(--fg-2); font-size: .92rem; line-height: 1.5; }

#walk .big {
  padding-inline: var(--gut); text-align: center;
  font-size: clamp(1.9rem, 8.5vw, 3rem); font-weight: 700;
  letter-spacing: -.04em; line-height: 1.14;
}
#walk .big .kicker {
  display: block; font-size: .34em; letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg-3); margin-bottom: 16px; font-weight: 600;
}

/* 1 · Chat — drive through the counter of a letter.
   Scaling text by transform rasterises it once and stretches the result,
   so it turns to mush a few multiples in. Driving the viewBox instead is
   a geometry change: the browser re-renders the outline as paths at every
   magnification, so the letter stays sharp all the way through — and
   since the real glyph carries the whole move, there is no stand-in shape
   that can disagree with it about where the "o" is or how big it is. */
#walk #chat .zoomtype {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
#walk #chat .zt-line {
  fill: #fff;
  font-family: var(--sans-rounded);
  font-size: 34px;              /* placeholder; measure() fits it to the stage */
  font-weight: 800;
  letter-spacing: -.04em;
}
#walk #chat .zt-kicker {
  fill: var(--fg-3);
  font-family: var(--sans-rounded);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
}

/* Floating chat bubbles — positioned at the bottom of the stage, above the SVG */
#walk #chat .chat-bubbles {
  position: absolute;
  bottom: 95px;
  left: 50%;
  transform: translateX(-50%);
  width: min(86vw, 380px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 8;
  pointer-events: none;
}

#walk #chat .cbub {
  font-family: var(--sans);
  font-size: .88rem;
  line-height: 1.4;
  border-radius: 18px;
  padding: 10px 16px;
  will-change: transform, opacity;
}

#walk #chat .cbub-user {
  align-self: flex-end;
  background: #fff;
  color: #000;
  font-weight: 500;
  border-bottom-right-radius: 4px;
  max-width: 82%;
  box-shadow: 0 4px 20px rgba(0,0,0,.45);
  opacity: var(--u-op, 0);
  transform: translateY(calc((1 - var(--u-op, 0)) * 16px));
}

#walk #chat .cbub-ai {
  align-self: flex-start;
  background: #1c1c1e;
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  border-bottom-left-radius: 4px;
  max-width: 94%;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  opacity: var(--a-op, 0);
  transform: translateY(calc((1 - var(--a-op, 0)) * 16px));
}

#walk #chat .cbub-ai-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .68rem;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  margin-bottom: 3px;
}
#walk #chat .cbub-ai-label img { border-radius: 50%; flex: none; }
#walk #chat .cbub-ai-label em { font-style: normal; color: rgba(255,255,255,.35); }

#walk #chat .cbub-ai-body {
  display: block;
  font-size: .84rem;
  color: rgba(255,255,255,.9);
}

/* 2 · See — an aperture opens */
#walk #see .lens { clip-path: inset(var(--slit,50%) 0 var(--slit,50%) 0); will-change: clip-path; }

/* 3 · Hear — a ripple spreads from a point */
#walk #hear .ripple {
  position: absolute; inset: 0; display: grid; place-items: center; place-content: center; background: #000;
  padding: var(--pad-t) var(--gut) var(--pad-b);   /* reproduces the stage's own box */
  clip-path: circle(var(--r,0%) at 50% 50%); will-change: clip-path;
}
#walk #hear .rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
#walk #hear .ring {
  position: absolute; border: 1px solid rgba(255,255,255,.5); border-radius: 50%;
  width: 40vmin; height: 40vmin;
  transform: scale(var(--rs,0)); opacity: var(--ro,0); will-change: transform, opacity;
}

/* 4 · Watch — a projector ratcheting frames past a fixed playhead.
   Every card carries its own opacity and scale rather than the strip
   carrying one for all of them: what makes this read as sampling and not
   as a pan is that each frame brightens as it reaches the playhead and
   falls back as it leaves. */
/* One frame width for the strip and the playhead both, so the marks cannot
   drift off the thing they are measuring. Smaller than a walkthrough phone
   on purpose: every notch throws the strip exactly this far plus the gap,
   and at full size that was a 322px lurch eight times over. It also puts
   more of the film on screen, which is the point of a filmstrip. */
#walk #watch .stage { --frame: min(56vw, 212px); }

#walk #watch .strip {
  display: flex; gap: 14px; align-items: center;
  transform: translateX(var(--sx,0px)); will-change: transform;
}
#walk #watch .strip .phone {
  flex: none;
  width: var(--frame);
  opacity: var(--co,.14);
  transform: scale(var(--cs,.9));
  will-change: transform, opacity;
}

/* Two ticks marking where a frame is read. Sized off the card so it
   tracks the frame it is measuring, and centred on the content box the
   way the reticle is — the stage reserves a band for the caption, so
   50% of the padding box is not where anything actually sits. */
#walk #watch .playhead {
  position: absolute;
  left: 50%;
  top: calc(var(--pad-t) + (100% - var(--pad-t) - var(--pad-b)) / 2);
  translate: -50% -50%;
  width: var(--frame);
  aspect-ratio: 640 / 1391;
  pointer-events: none;
  opacity: var(--phO, 0);
  z-index: 6;
}
#walk #watch .playhead i {
  position: absolute; left: 50%; translate: -50% 0;
  width: 1px; height: 16px;
  background: rgba(255, 255, 255, .6);
  box-shadow: 0 0 6px rgba(255, 255, 255, .45);
}
#walk #watch .playhead i:first-child { bottom: 100%; margin-bottom: 12px; }
#walk #watch .playhead i:last-child  { top: 100%;    margin-top: 12px; }

/* 5 · Read — lines reveal down the page */
#walk #read .sheet { position: relative; }
#walk #read .sheet .phone { clip-path: inset(0 0 var(--unread,100%) 0); will-change: clip-path; }
#walk #read .rule {
  position: absolute; left: -8%; right: -8%; height: 2px;
  background: #fff;
  box-shadow: 0 0 8px 1px rgba(255, 255, 255, 0.7);
  top: var(--ruleY,0%); opacity: var(--ruleO,0);
}

/* 6 · Search — a lens sweeps across, then opens out */
#walk #search .scan {
  -webkit-mask-image: radial-gradient(circle var(--lens,0px) at var(--lx,50%) 50%, #000 98%, transparent 100%);
  mask-image: radial-gradient(circle var(--lens,0px) at var(--lx,50%) 50%, #000 98%, transparent 100%);
}
/* Left and top come from main.js in pixels, measured off the line the mask
   is actually cutting into. They cannot be percentages here: the mask's
   `--lx` is a percentage of .scan, which is a shrink-to-fit grid item, and
   these would be percentages of the stage — a different box, and a
   different origin, so the ring sat 128px to the side of the hole it was
   supposed to be drawing around. The vertical had the same fault twice
   over, since the stage reserves a caption band at the bottom and its
   middle is not where the copy is centred. */
#walk #search .halo {
  position: absolute; width: calc(var(--lens,0px) * 2); height: calc(var(--lens,0px) * 2);
  translate: -50% -50%;
  border: 1px solid rgba(255,255,255,.35); border-radius: 50%;
  opacity: var(--haloO,0); pointer-events: none;
}

/* 7 · Locate — a viewfinder closing on a fix.
   The old version dropped a dot and pulsed a ring behind the copy, which
   put a grey disc straight through the middle of the words. The brackets
   sit outside the text instead, and converging keeps this step distinct
   from the ripple, the aperture and the lens. */
#walk #locate .reticle {
  position: absolute; left: 50%; translate: -50% -50%;
  /* Centre on the content box, where the copy is, not on the padding box. */
  top: calc(var(--pad-t) + (100% - var(--pad-t) - var(--pad-b)) / 2);
  /* The box closes by its own width and height rather than by pushing the
     corners out on transforms. Sliding them in from off-screen looked like
     nothing at all for most of the runway — a frame around a line of this
     copy is nearly screen-wide on a phone, so the corners spend the whole
     travel outside the viewport and only appear at the end. Starting at
     the edges and closing inward keeps them on screen throughout, and the
     borders repaint crisp at every size. */
  width: var(--rw, 346px); height: var(--rh, 208px);
  pointer-events: none; opacity: var(--ro, 0);
  will-change: width, height, opacity;
}
#walk #locate .reticle i {
  position: absolute; width: 24px; height: 24px;
  border: 1.5px solid rgba(255,255,255,.95);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}
#walk #locate .reticle i:nth-child(1) { top: 0;    left: 0;  border-right: 0; border-bottom: 0; }
#walk #locate .reticle i:nth-child(2) { top: 0;    right: 0; border-left: 0;  border-bottom: 0; }
#walk #locate .reticle i:nth-child(3) { bottom: 0; right: 0; border-left: 0;  border-top: 0; }
#walk #locate .reticle i:nth-child(4) { bottom: 0; left: 0;  border-right: 0; border-top: 0; }

#walk #locate .fix { opacity: var(--fxo, 0); }

/* 8 · Calculate — counts up and lands on the answer */
#walk #calc .readout {
  font-family: var(--sans-rounded);
  font-variant-numeric: tabular-nums; font-size: clamp(3rem, 17vw, 6rem);
  font-weight: 800; letter-spacing: -.05em;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}
#walk #calc .unit { font-size: .3em; color: var(--fg-3); letter-spacing: .04em; margin-left: .18em; }

/* 9 · Remember — an endless column of the one screen, travelled down.

   The step opens on a single conversation and pulls back to find the same
   screen repeated behind it a hundred and fifty deep, running away to a
   vanishing point. Scrolling drives the whole column past you — copies
   sliding down and out by the bottom of the frame while new ones surface
   at the vanishing point — and the last one clears just as the step ends,
   which is what hands over to the next.

   Real perspective rather than a flat scale, because the point is that
   they are further away — a scale alone reads as smaller copies sitting
   in front. Offsets are percentages of the card's own height, so the
   column holds its proportions at any viewport.

   The vanishing point is the top edge, not the middle, and that is what
   makes the column legible.

   A copy going back shrinks by the perspective projection, and that
   projection pivots about `perspective-origin` — not about anything set
   on the card, since a pure translate has no origin to scale about.
   Centred, it drags each top edge DOWN by half the height the card loses,
   which cancels most of the lift meant to clear it: an early cut of this
   stepped three tops by 36px and then 15px, and chasing it with
   transform-origin put the ones behind BELOW the front card entirely.
   Pinned to the top edge, a copy's peek above the one in front is just
   its own offset times its depth scale — so the peeks close up as the
   copies recede and the column converges on a vanishing point instead of
   marching off the top of the screen. */
/* Deliberately NOT `transform-style: preserve-3d`. Perspective scales the
   children either way; preserve-3d only buys depth sorting, and nesting a
   3D context inside the stage — which is itself perspective-transformed,
   promoted by will-change and clipped by overflow — composited to a blank
   layer once the column grew past a few copies: correct layout, correct
   hit-testing, nothing on screen. The copies never intersect, so the
   sorting is a painting order, and main.js sets it as z-index per copy. */
/* z-index, not a transform, for the stacking context: the copies carry
   depth-derived z-indexes in the thousands and would otherwise paint over
   the caption. Nudged down the frame so the column has room to converge
   above the near copy rather than running off the top. */
#walk #remember .deck {
  position: relative; z-index: 0;
  width: min(80vw,308px); aspect-ratio: 640/1391;
  perspective: 1100px;
  /* The viewpoint: looking down the column from the top, so it runs away
     upward and the copies come toward you and leave by the bottom. Must
     agree with TUNNEL_DIR in main.js — the two are one decision. */
  perspective-origin: 50% 0%;
  transform: translateY(6%);
}
#walk #remember .deck .phone {
  /* Height explicitly, not left to `inset`: .phone carries its own
     aspect-ratio, and with height auto that wins and the card sizes itself
     rather than filling the deck. */
  position: absolute; inset: 0; width: 100%; height: 100%;
  aspect-ratio: auto;
  transform: translate3d(0, var(--ty,0%), var(--tz,0px));
  opacity: var(--op,1);
  /* Two dozen of these composite at once and the ground behind them is
     black, so the drop shadow costs a blur per copy and shows nothing. */
  box-shadow: none;
}

/* The copies overlap by design, so the only part of any of them anyone ever
   sees is a band across the top. Left at the screenshot's own top edge that
   band is the status bar and the nav header — which is why the column read
   as the same piece of chrome repeated thirty times into the dark, rather
   than as a conversation held in context.

   Shifting the artwork up puts the answer itself in that band. The bottom
   this exposes is never visible: every copy but the nearest is covered by
   the one in front, and the nearest extends well below the frame. Scoped to
   .is-tunnel so the single card that ships in the markup — what no-JS and
   Reduce Motion show — still reads as a whole screenshot. */
#walk #remember .deck.is-tunnel .phone img { transform: translateY(-30%); }

/* Remember's label has five hundred screens travelling through where it
   sits, so unlike the other ten it cannot just be type on black. */

/* Desktop: out of the column's way entirely, up in the corner. */
@media (min-width: 769px) {
  #walk #remember .caption {
    top: calc(var(--pad-t) + 26px);
    left: var(--gut);
    right: auto;
    bottom: auto;
    max-width: 34ch;
    text-align: left;
  }
}

/* Mobile: stays where it is, over the column, so it needs a ground. Soft
   edged and blurred so it reads as the dark falling away behind the type
   rather than as a panel laid on top of the design. */
@media (max-width: 768px) {
  #walk #remember .caption::before {
    content: "";
    position: absolute;
    inset: -20px -14px -24px;
    background: radial-gradient(ellipse at 50% 50%,
                rgba(0, 0, 0, .95) 40%, rgba(0, 0, 0, .8) 68%, transparent 100%);
    filter: blur(7px);
    z-index: -1;
    pointer-events: none;
  }
}

/* 10 · Think — unfolds outward from a vertical seam */
#walk #think .fold { clip-path: inset(0 var(--seam,50%) 0 var(--seam,50%)); will-change: clip-path; }
#walk #think .seamline {
  position: absolute; top: 12%; bottom: 12%; left: 50%; width: 1px;
  background: #fff; opacity: var(--seamO,0);
  box-shadow: 0 0 10px 1px rgba(255, 255, 255, 0.8);
}

/* 11 · Know — the closing line folds shut and lies flat */
/* Deep enough to foreshorten clearly, shallow enough that the keystone
   does not shear glyphs near the left and right edges. Creasing the block
   across its middle was tried first and does not work: the fold lands
   inside a line of type, so words come apart mid-letter and it reads as a
   rendering fault rather than a crease. */
#walk #know .foldin { position: relative; perspective: 760px; }

#walk #know .final {
  margin: 0;
  transform-origin: 50% 100%;          /* hinge along the lower edge */
  transform: rotateX(var(--fold, 74deg));
  opacity: var(--fo, 0);
  /* Comes up out of shadow as it flattens, the way a sheet takes the
     light when it turns to face you. */
  filter: brightness(var(--lit, 1));
  will-change: transform, opacity;
}

/* ── Mobile & Touch Pacing Adjustments ───────────────────── */
@media (max-width: 768px) {
  /* Hide the hero phone screenshot mockup on mobile screens for clean typography hero */
  .hero-shot {
    display: none !important;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero .lede {
    margin-inline: auto;
  }

  /* Extend walkthrough runway height on mobile so touch swipe momentum is comfortably paced */
  #walk .step {
    height: 480vh;
  }
  #walk #know.step {
    height: 600vh;
  }
  #walk #remember.step {
    height: 1150vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* No scroll driver runs, so the frame must not stay folded shut. */
  .hero-shot .phone { animation: none !important; transform: none !important; opacity: 1 !important; }
  /* No scroll driver, so the viewBox keeps its authored value and the SVG
     just lays the question out and sits still. A definite width — not a
     percentage — or the auto grid track sizes to the viewBox's own 400px
     and pushes the line off the side of a narrow screen. */
  #walk #chat .zoomtype { position: static; width: 86vw; height: auto; }
  /* The steps deliberately overlap by a viewport so a pinned stage hands
     straight over to the next one. Nothing is pinned here, so that margin
     would just pile all eleven sections on top of each other. */
  #walk .step { height: auto !important; margin-bottom: 0 !important; }
  #walk .stage { position: static; height: auto; padding-block: 60px; gap: 24px; }
  #walk .stage > * { transform: none !important; clip-path: none !important; opacity: 1 !important;
                     -webkit-mask-image: none !important; mask-image: none !important; }
  #walk .ring, #walk .reticle,
  #walk .halo, #walk .seamline, #walk .rule { display: none !important; }
  /* A grandchild of the stage, so the blanket reset above does not reach
     it: lay the line flat and light it. */
  #walk #know .final {
    transform: none !important; opacity: 1 !important; filter: none !important;
  }
  #walk .verb, #walk .caption { position: static; }
  #walk #watch .strip { flex-direction: column; }
  #walk #remember .deck { height: auto; aspect-ratio: auto; }
  /* Give the card its own box back: the tunnel sizes it to the deck, and
     with the deck's height auto here there would be nothing to fill. */
  #walk #remember .deck .phone {
    position: static; margin-inline: auto;
    height: auto; aspect-ratio: 640 / 1391;
  }
}
