/* ============================================================
   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);
  --fg-3:        rgba(255, 255, 255, .40);

  /* 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;
}

/* 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;
}

.tech-shot { margin-top: 56px; display: flex; justify-content: center; }

/* ── 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); }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .87rem; color: var(--fg-2); }

@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 ────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .62s var(--ease), transform .62s var(--ease);
}
.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-grid,
  .demo-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 64px;
  }
  .tech-shot, .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.
   ============================================================ */

#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; }
#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;
  background-color: #000;
  /* 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;
}

/* 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 .blackout { position: absolute; inset: 0; background: #000; pointer-events: none; z-index: 7; }

#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 — frames flick past, one settles */
#walk #watch .strip {
  display: flex; gap: 14px; align-items: center;
  transform: translateX(var(--sx,0px)); will-change: transform;
}
#walk #watch .strip .phone { flex: none; opacity: var(--so,.35); }
#walk #watch .strip .phone.is-hero { opacity: 1; }

/* 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%);
}
#walk #search .halo {
  position: absolute; width: calc(var(--lens,0px) * 2); height: calc(var(--lens,0px) * 2);
  left: var(--lx,50%); top: 50%; 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 — earlier screens recede behind the current one.

   The front card is the last child, so it paints over the other two. That
   means the two behind it have to end up somewhere it isn't, or the step
   shows a single still picture — which is what it did: they scaled about
   their own centres, so they shrank inward and finished wholly inside the
   front card's rectangle, invisible the entire way.

   Scaling from the top edge instead makes the geometry answerable. With
   transform-origin at 50% 0%, a scale leaves the top where it is and a
   translateY moves it by exactly that much, so each card's peek above the
   one in front is just the difference between their offsets. The deck
   shifts down as it spreads to keep the fan on screen. */
#walk #remember .deck {
  position: relative; width: min(80vw,308px); aspect-ratio: 640/1391;
  transform: translateY(calc(var(--spread,0) * 6.6%));
}
#walk #remember .deck .phone {
  position: absolute; inset: 0; width: 100%;
  transform-origin: 50% 0%;
  will-change: transform, opacity;
}
/* Percentages of the card's own height, so the fan holds its proportions
   at any viewport rather than being tuned for one phone width. */
#walk #remember .deck .phone:nth-child(1) {   /* furthest back */
  transform: translateY(calc(var(--spread,0) * -7.8%)) scale(calc(1 - var(--spread,0) * .32));
  opacity: calc(1 - var(--spread,0) * .66);
}
#walk #remember .deck .phone:nth-child(2) {
  transform: translateY(calc(var(--spread,0) * -0.9%)) scale(calc(1 - var(--spread,0) * .22));
  opacity: calc(1 - var(--spread,0) * .42);
}
#walk #remember .deck .phone:nth-child(3) {   /* the current screen */
  transform: translateY(calc(var(--spread,0) * 4.2%)) scale(calc(1 - var(--spread,0) * .12));
}

/* 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;
  }
}

@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 .blackout, #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; }
  #walk #remember .deck .phone { position: static; margin-inline: auto; }
}
