/* =========================================================
   Riven — Landing Page (Direction A · The Drop)
   14-scene scrollytelling arc.
   ========================================================= */

@import url('./assets/riven/colors_and_type.css');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--obsidian); }
body {
  font-family: var(--font-sans);
  color: var(--fg-1);
  background: var(--obsidian);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ============== TOP NAV ============== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 32px;
  font-family: var(--font-sans);
  color: var(--white);
  transition: color var(--dur-med) var(--ease-out);
}
.nav.is-light { color: var(--obsidian); }

/* Logo: single full-lockup image. Light version for dark sections, dark version for light. */
.nav .nav-logo { display: block; }
.nav .nav-logo img { display: block; height: 30px; width: auto; }
.nav .nav-logo .logo-dark { display: none; }
.nav.is-light .nav-logo .logo-light { display: none; }
.nav.is-light .nav-logo .logo-dark { display: block; }
.nav .nav-links { display: flex; gap: 28px; justify-content: center; }
.nav .nav-links a {
  color: inherit; text-decoration: none;
  font-size: var(--fs-caption); font-weight: 500;
  letter-spacing: -0.005em;
  opacity: 0.85; transition: opacity var(--dur-fast) var(--ease-out);
}
.nav .nav-links a:hover { opacity: 1; }
.nav .nav-right { display: flex; justify-content: flex-end; }

/* ============== BUTTONS — matches design system ============== */
/* Source of truth: ui_kits/components-buttons in design system.
   Geist sans, 500 weight, sentence case, sharp-but-rounded. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-weight: 500; font-size: 15px;
  padding: 12px 20px;
  border-radius: var(--radius-3); /* 8px */
  border: 0; cursor: pointer;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(0.99); }
.btn-primary    { background: var(--obsidian); color: var(--white); }
.btn-primary:hover { background: #1A1A1F; }
.btn-accent     { background: var(--riven); color: var(--white); }
.btn-accent:hover { background: var(--riven-ember); }
.btn-secondary  { background: transparent; color: var(--fg-1); border: 1px solid var(--hairline); }
.btn-secondary:hover { background: var(--bg-3); }
.btn-ghost      { background: transparent; color: var(--fg-1); }
.btn-ghost:hover { background: var(--bg-3); }
.btn-disabled   { background: var(--bg-3); color: var(--fog); cursor: not-allowed; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 6px; }
.btn-lg { padding: 16px 28px; font-size: 17px; border-radius: 10px; }

/* On dark surfaces — secondary/ghost flip their colors */
.dark .btn-secondary {
  background: transparent; color: var(--white);
  border: 1px solid rgba(255,255,255,0.18);
}
.dark .btn-secondary:hover { background: rgba(255,255,255,0.06); }
.dark .btn-ghost { color: var(--white); }
.dark .btn-ghost:hover { background: rgba(255,255,255,0.06); }
.dark .btn-primary { background: var(--white); color: var(--obsidian); }
.dark .btn-primary:hover { background: var(--bone); }

/* Nav uses a compact secondary — kept small + sentence case */
.nav .nav-cta {
  font-family: var(--font-sans); font-weight: 500;
  font-size: 13px; letter-spacing: -0.005em;
  text-transform: none;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  opacity: 0.9;
  transition: opacity var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav .nav-cta:hover { opacity: 1; background: rgba(255,255,255,0.06); }
.nav.is-light .nav-cta:hover { background: rgba(10,10,11,0.04); }

/* ============== SECTIONS — shared ============== */
section.act { position: relative; --p: 0; }
.pin { position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden; }
.dark { background: var(--obsidian); color: var(--white); }
.light { background: var(--paper); color: var(--fg-1); }

/* Subtle film grain */
.grain::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.06; mix-blend-mode: overlay;
  z-index: 5;
}

/* Eyebrow utility */
.eyebrow {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--fg-3); display: inline-flex; align-items: center;
}
.eyebrow .dot { display: inline-block; width: 6px; height: 6px; background: var(--riven); border-radius: 99px; margin-right: 10px; }
.eyebrow-dark { color: var(--fog); }

/* ============== APP STORE BADGE ============== */
.app-store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: #fff; color: #0A0A0B;
  padding: 12px 22px 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-family: var(--font-sans);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  border: 1px solid transparent;
  white-space: nowrap;
}
.app-store-btn:hover { transform: translateY(-1px); }
.app-store-btn:active { transform: translateY(0); }
.app-store-btn svg { width: 26px; height: 26px; display: block; flex-shrink: 0; }
.app-store-btn .ascopy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.app-store-btn .ascopy .top { font-size: 10px; letter-spacing: 0.05em; opacity: 0.72; margin-bottom: 4px; white-space: nowrap; }
.app-store-btn .ascopy .bot { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.app-store-btn.lg { padding: 16px 28px 16px 24px; border-radius: 14px; }
.app-store-btn.lg svg { width: 30px; height: 30px; }
.app-store-btn.lg .ascopy .bot { font-size: 22px; }

/* Compact variant for the top nav — single line height */
.app-store-btn.nav-sm { padding: 7px 14px 7px 12px; border-radius: 10px; gap: 8px; }
.app-store-btn.nav-sm svg { width: 20px; height: 20px; }
.app-store-btn.nav-sm .ascopy .top { font-size: 8px; margin-bottom: 2px; }
.app-store-btn.nav-sm .ascopy .bot { font-size: 14px; }

/* On dark sections, badge inverts to white-on-black w/ thin border */
.dark .app-store-btn {
  background: #0A0A0B; color: #fff;
  border-color: rgba(255,255,255,0.18);
}
.dark .app-store-btn:hover { background: #15151A; }

/* ============== ACT 1 — HERO (merged with reveal) ============== */
.act-hero { height: 260vh; }
.hero-pin {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  align-items: center;
  gap: 64px;
  padding: 12vh 80px 14vh;
  position: relative;
}

/* Background video — full-bleed, darkened with a mask so text reads white over it */
.hero-video {
  position: absolute; inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: var(--hero-vid-op, 1);
  transition: none;
}
.hero-video video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.5) brightness(0.72) contrast(1.05);
}
.hero-video::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 50%, rgba(10,10,11,0.20) 0%, rgba(10,10,11,0.55) 65%, rgba(10,10,11,0.85) 100%);
  z-index: 2;
}
.hero-video .vid-edges {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(180deg, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0) 22%, rgba(10,10,11,0) 78%, rgba(10,10,11,0.85) 100%);
}
.hero-video::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.06; mix-blend-mode: overlay; z-index: 3;
}

.hero-bg-signal {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  opacity: var(--hero-signal-op, 0.18);
  z-index: 1;
}
.hero-bg-signal svg { width: 86vw; max-width: 1400px; height: auto; }

/* LEFT — hero text */
.hero-text {
  grid-column: 1; grid-row: 1;
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start; gap: 28px;
  text-align: left;
  max-width: 580px;
  opacity: var(--hero-text-op, 1);
  transform: translate(calc(var(--hero-text-x, 0) * 1px), calc(var(--hero-text-y, 0) * 1px));
}
.hero-text h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 5.6vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--white);
  text-align: left;
  text-wrap: balance;
}
.hero-text h1 em {
  font-style: normal;
  color: var(--riven);
}
.hero-text .sub {
  font-size: var(--fs-body-lg);
  color: var(--fg-on-dark-2);
  line-height: 1.55;
  max-width: 480px;
  margin: 0;
}

/* RIGHT — the watch. Transforms from right-column to viewport center as you scroll. */
.hero-watch {
  grid-column: 2; grid-row: 1;
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  /* var --watch-merge goes 0 → 1 as the user scrolls into the reveal phase */
  transform:
    translateX(calc(var(--watch-mx, 0) * -25vw))
    translateY(calc(var(--watch-my, 0) * -1 * 70px))
    scale(calc(1 + var(--watch-s, 0) * 0.35));
  transform-origin: center center;
  will-change: transform;
}
.hero-watch-glow {
  position: absolute;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(255,70,34,0.22) 0%, transparent 60%);
  filter: blur(50px);
  opacity: var(--watch-glow-op, 0);
  pointer-events: none;
  z-index: -1;
}

/* CAPTION — appears below watch once merged */
.hero-caption {
  position: absolute;
  left: 50%; bottom: 11vh;
  transform: translateX(-50%) translateY(calc((1 - var(--cap-p, 0)) * 30px));
  text-align: center;
  opacity: var(--cap-op, 0);
  z-index: 2;
  max-width: 720px;
  padding: 0 32px;
  pointer-events: none;
}
.hero-caption .eyebrow { margin-bottom: 14px; }
.hero-caption h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 3.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  margin: 0;
  color: var(--white);
  text-wrap: balance;
}
.hero-caption h2 .acc { color: var(--riven); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 22px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--steel);
  opacity: var(--scroll-hint-op, 1);
  z-index: 2;
}
.scroll-hint .line {
  width: 1px; height: 24px; background: var(--steel); position: relative; overflow: hidden;
}
.scroll-hint .line::after {
  content: ''; position: absolute; left: 0; top: -24px; width: 100%; height: 24px;
  background: var(--white);
  animation: drip 2s var(--ease-inout) infinite;
}
@keyframes drip {
  0% { transform: translateY(0); }
  60%,100% { transform: translateY(48px); }
}

/* ============== WATCH FRAME — photographic Apple Watch ============== */
/* Replaces the CSS-drawn bezel with a real photo. Same DOM structure;
   decorative divs (.crown / .sidebtn / .actionbtn / .vent / .strap-*) are
   hidden because the photo includes them. */
.watch-frame {
  position: relative;
  width: 320px;
  aspect-ratio: 1247 / 1779;
  padding: 0;
  background: transparent;
  background-image: url('assets/photos/watch-mockup.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: none;
  border-radius: 0;
  filter: drop-shadow(0 36px 56px rgba(0,0,0,0.45)) drop-shadow(0 8px 16px rgba(0,0,0,0.25));
}
.watch-frame::before, .watch-frame::after { content: none; }
.watch-frame .crown,
.watch-frame .sidebtn,
.watch-frame .actionbtn,
.watch-frame .vent,
.watch-frame .strap-top,
.watch-frame .strap-bot { display: none; }

.watch-frame.lg { width: 360px; }
.watch-frame.xl { width: 440px; }

/* The screen rectangle inside the photo. % values calibrated to the
   on-photo screen bounding box. */
.watch-screen {
  position: absolute;
  left: 10%; right: 10%; top: 22%; bottom: 22%;
  width: auto; height: auto;
  background: #000;
  border-radius: 18%;
  overflow: hidden;
}
.watch-screen .scene {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 14px 12px 10px;
  color: #fff;
  font-family: var(--font-sans);
  opacity: 0; pointer-events: none;
  transition: opacity 360ms var(--ease-out);
}
.watch-screen .scene.on { opacity: 1; pointer-events: auto; }

.w-topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 14px 0;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  color: #fff; letter-spacing: -0.01em;
  z-index: 5;
}
.w-topbar .mark { height: 9px; opacity: 0.85; }
@keyframes rpulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* (old CSS-drawn watch frame rules removed; photo-based above replaces them) */

/* === Scene overlay (sits inside .watch-screen) === */
.watch-screen .scene {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 22px 18px 14px;
  color: #fff;
  font-family: var(--font-sans);
  opacity: 0; pointer-events: none;
  transition: opacity 360ms var(--ease-out);
}
.watch-frame.xl .watch-screen .scene { padding: 28px 22px 18px; }
.watch-screen .scene.on { opacity: 1; pointer-events: auto; }

.w-topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px 0;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  color: #fff; letter-spacing: -0.01em;
  z-index: 5;
}
.w-topbar .mark { height: 12px; opacity: 0.85; }
@keyframes rpulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ============== ACT 2 — STORY DIVIDER ============== */
.act-story { height: 130vh; }
.story-stage {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 32px; padding: 0 32px; text-align: center;
}
.story-overline {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--fog);
  opacity: var(--story-1-op, 0);
  transform: translateY(calc((1 - var(--story-1-prog, 0)) * 16px));
}
.story-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 7.4vw, 120px);
  line-height: 0.96; letter-spacing: -0.04em;
  margin: 0; color: var(--white);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.story-h .line-1 {
  opacity: var(--story-1-op, 0);
  transform: translateY(calc((1 - var(--story-1-prog, 0)) * 40px));
}
.story-h .line-2 {
  opacity: var(--story-2-op, 0);
  transform: translateY(calc((1 - var(--story-2-prog, 0)) * 40px));
  color: var(--riven);
}
.story-rule {
  width: calc(var(--story-rule-w, 0) * 1px);
  height: 1px; background: var(--mist); opacity: 0.4;
  margin-top: 6px;
}

/* ============== ACT 4 — THE SET ============== */
.act-set { height: 600vh; background: var(--obsidian); color: #fff; }
.set-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 100%;
  padding: 0 0 0 80px; gap: 80px;
}
.set-narration { position: relative; max-width: 540px; min-height: 340px; }
.set-narration .chapter {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  opacity: 0; transform: translateY(40px);
  pointer-events: none;
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
}
.set-narration .chapter.on { opacity: 1; transform: translateY(0); pointer-events: auto; }
.chapter-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--fog);
}
.chapter-eyebrow .num { color: var(--riven); margin-right: 12px; }
.set-narration h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 5.2vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--white);
  text-wrap: balance;
}
.set-narration h3.big-numerals {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(96px, 11vw, 168px);
  letter-spacing: -0.04em;
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
}
.set-narration h3 .acc { color: var(--riven); }
.set-narration h3 .bloom {
  text-shadow: 0 0 60px rgba(255,70,34,0.55);
}
.set-narration .desc {
  font-size: var(--fs-body-lg);
  color: var(--fg-on-dark-2);
  line-height: 1.55;
  max-width: 460px;
}
.set-narration .desc strong { color: var(--white); font-weight: 600; }

.set-watch-stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 100%; padding-right: 80px;
}
.signal-ring {
  position: absolute; width: 560px; height: 560px;
  pointer-events: none;
  opacity: var(--ring-op, 0);
  transition: opacity 600ms var(--ease-out);
}
.signal-ring svg { width: 100%; height: 100%; }
.glow-bg {
  position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,70,34,0.30) 0%, transparent 60%);
  filter: blur(50px);
  opacity: var(--score-glow-op, 0);
  transition: opacity 600ms var(--ease-out);
}

/* Watch screen content — set scenes */
.w-recording .rec-pulse {
  width: 60px; height: 60px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.w-recording .rec-pulse span {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--riven);
  opacity: 0; animation: recpulse 2.4s var(--ease-out) infinite;
}
.w-recording .rec-pulse span:nth-child(1) { animation-delay: 0s; }
.w-recording .rec-pulse span:nth-child(2) { animation-delay: 0.8s; }
.w-recording .rec-pulse span:nth-child(3) { animation-delay: 1.6s; }
.w-recording .rec-pulse::after {
  content: ''; width: 14px; height: 14px; background: var(--riven); border-radius: 50%;
  box-shadow: 0 0 24px rgba(255,70,34,0.7);
}
@keyframes recpulse {
  0% { opacity: 0.9; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* live */
.w-live .reps {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 130px; line-height: 0.85;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.w-live .bottom { display: flex; justify-content: space-between; align-items: end; padding: 0 4px; text-align: left; margin-top: auto; }
.w-live .bottom .num { font-family: var(--font-mono); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.w-live .bottom .lbl { font-family: var(--font-mono); font-size: 8.5px; color: var(--fog); letter-spacing: 0.16em; text-transform: uppercase; margin-top: 2px; }
.w-live .bottom .right { text-align: right; }

/* score */
.w-score .num {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 150px; line-height: 0.82;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--tier-near);
  text-shadow: 0 0 60px rgba(255,149,0,0.45);
}
.w-score .pill {
  display: inline-block;
  background: var(--tier-near);
  color: #15151A;
  font-size: 13px; font-weight: 600;
  letter-spacing: -0.005em;
  padding: 4px 12px; border-radius: 99px;
  margin: 6px auto 0;
}
.w-score .stats { display: flex; justify-content: space-around; padding: 0 4px; margin-top: auto; }
.w-score .stats .v { font-family: var(--font-mono); font-size: 15px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.w-score .stats .l { font-family: var(--font-mono); font-size: 8px; color: var(--fog); letter-spacing: 0.16em; text-transform: uppercase; margin-top: 2px; }

/* ============== ACT 5 — SCIENCE ============== */
.act-science { height: 220vh; }
.science-stage {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center; gap: 64px;
  height: 100%;
  max-width: 1500px; margin: 0 auto;
  padding: 0 80px;
}
.science-copy { display: flex; flex-direction: column; gap: 22px; }
.science-copy h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 5.6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--obsidian);
  text-wrap: balance;
}
.science-copy h2 .acc { color: var(--riven); }
.science-copy .body { font-size: var(--fs-body-lg); color: var(--fg-2); line-height: 1.55; max-width: 480px; }
.science-legend {
  display: flex; flex-direction: column; gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--hairline);
  max-width: 460px;
}
.science-legend .leg {
  display: grid; grid-template-columns: 16px 1fr; align-items: start; gap: 12px;
}
.science-legend .sw {
  display: block; width: 14px; height: 14px; border-radius: 99px; margin-top: 4px;
}
.science-legend .sw-stop { background: #fff; border: 1.5px solid var(--obsidian); }
.science-legend .sw-fail { background: var(--riven); }
.science-legend .leg-l { font-family: var(--font-sans); font-weight: 600; font-size: 14px; letter-spacing: -0.005em; color: var(--obsidian); }
.science-legend .leg-s { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--fg-3); margin-top: 2px; }

.science-chart {
  width: 100%; max-width: 720px;
  background: var(--bone); border-radius: 16px; padding: 32px;
}
.science-chart svg { width: 100%; height: auto; display: block; }

/* ============== ACT 6 — AFTER (phone with body diagram) ============== */
.act-after { height: 240vh; }
.after-stage {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center; gap: 64px;
  height: 100%;
  max-width: 1500px; margin: 0 auto;
  padding: 0 80px;
}
.after-copy { display: flex; flex-direction: column; gap: 22px; }
.after-copy h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 5.2vw, 80px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--obsidian);
  text-wrap: balance;
}
.after-copy .body { font-size: var(--fs-body-lg); color: var(--fg-2); line-height: 1.55; max-width: 480px; }

.phone-stage {
  display: flex; align-items: center; justify-content: center;
}
.phone-frame {
  width: 340px; height: 700px;
  background: #0A0A0B;
  border-radius: 44px;
  padding: 8px;
  position: relative;
  box-shadow: 0 50px 120px rgba(0,0,0,0.20),
              0 0 0 1px rgba(10,10,11,0.06);
  opacity: var(--phone-op, 0);
  transform: translateY(calc((1 - var(--phone-prog, 0)) * 50px));
}
.phone-frame .phone-notch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 30px;
  background: #0A0A0B;
  border-radius: 99px;
  z-index: 5;
}
.phone-frame .phone-screen {
  width: 100%; height: 100%;
  background: var(--paper);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
}
.phone-status {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 18px 30px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  color: var(--obsidian); z-index: 10;
}
.phone-status-right { display: flex; gap: 6px; align-items: center; }
.phone-body { padding: 60px 22px 22px; }
.phone-eyebrow {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 6px;
}
.phone-h {
  font-family: var(--font-sans); font-weight: 600;
  font-size: 26px; letter-spacing: -0.02em;
  color: var(--obsidian);
  margin: 0 0 14px;
}

.body-diagram { width: 100%; }
.body-diagram svg { width: 100%; height: auto; display: block; }
.body-diagram [data-muscle="chest"] {
  fill: var(--tier-failure);
  opacity: var(--muscle-chest-op, 0);
}
.body-diagram [data-muscle="biceps"] {
  fill: var(--tier-near);
  opacity: var(--muscle-tri-op, 0);
}
.body-diagram [data-muscle="shoulders"] {
  fill: var(--tier-working);
  opacity: var(--muscle-shoulder-op, 0);
}

.phone-timeline { margin-top: 16px; }
.phone-week { display: flex; gap: 6px; margin-top: 8px; }
.phone-week .day {
  flex: 1; aspect-ratio: 1/1.3;
  border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--font-mono); background: var(--bone);
  opacity: 0;
  transform: scale(0.92);
}
.phone-week .day .d { font-size: 9px; letter-spacing: 0.14em; color: var(--fg-3); }
.phone-week .day .s { font-size: 14px; font-weight: 500; letter-spacing: -0.02em; color: var(--obsidian); font-variant-numeric: tabular-nums; }
.phone-week .day.working { background: var(--tier-working); }
.phone-week .day.working .d { color: rgba(10,10,11,0.65); }
.phone-week .day.near { background: var(--tier-near); }
.phone-week .day.near .d, .phone-week .day.near .s { color: #fff; }
.phone-week .day.failure { background: var(--tier-failure); }
.phone-week .day.failure .d, .phone-week .day.failure .s { color: #fff; }
.phone-week .day.today { box-shadow: 0 0 0 2px var(--obsidian); }
.phone-week .day.planned { background: var(--paper); border: 1.5px dashed var(--linen); }
.phone-week .day.rest .s { color: var(--fg-3); }

/* ============== ACT 7 — JUST THE WATCH ============== */
.act-justwatch { height: 200vh; }
.just-stage {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 64px;
  height: 100%;
  max-width: 1500px; margin: 0 auto;
  padding: 0 80px;
}
.just-copy h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 5.4vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--white);
  text-wrap: balance;
}
.just-copy h2 .acc { color: var(--riven); }
.just-copy .eyebrow { margin-bottom: 22px; }

.just-watch-stage {
  position: relative; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.just-watch-rotor {
  transform: rotate(calc(var(--just-rot, 0) * 1deg));
  transition: transform 1200ms var(--ease-out);
}
.cross-icon {
  position: absolute;
  width: 96px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--fog);
  opacity: var(--cross-op, 0);
  transform: translateY(calc((1 - var(--cross-prog, 0)) * 16px));
}
.cross-icon svg { width: 56px; height: 56px; opacity: 0.8; }
.cross-icon .cross-line {
  position: absolute; top: 14px; left: 14px;
  width: 56px; height: 1.5px;
  background: var(--riven);
  transform: rotate(-25deg); transform-origin: center;
  box-shadow: 0 0 8px rgba(255,70,34,0.4);
}
.cross-icon .cross-label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--steel);
  margin-top: 6px;
}

.just-watch-face {
  margin: auto;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.just-watch-face img { height: 38px; }
.just-watch-label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mist);
}

/* ============== ACT 8 — WHO ============== */
.act-who { height: 130vh; }
.who-stage {
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 32px; text-align: center;
}
.who-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 7vw, 116px);
  line-height: 1.02; letter-spacing: -0.035em;
  margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.who-h .line-bright {
  color: var(--white);
  opacity: var(--who-1-op, 0);
  transform: translateY(calc((1 - var(--who-1-prog, 0)) * 30px));
}
.who-h .line-dim {
  color: var(--steel);
  opacity: var(--who-2-op, 0);
  transform: translateY(calc((1 - var(--who-2-prog, 0)) * 30px));
}

/* ============== ACT 9 — FINAL CTA ============== */
.act-cta { height: 120vh; }
.cta-stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; padding: 0 32px 100px; gap: 36px;
  text-align: center;
  opacity: var(--cta-op, 0);
  transform: translateY(calc((1 - var(--cta-prog, 0)) * 30px));
}
.cta-stage h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(64px, 9vw, 152px);
  line-height: 0.94;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--white);
  text-wrap: balance;
}
.cta-stage h2 em {
  font-style: normal;
  color: var(--riven);
}
.cta-fineprint {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel);
}
.cta-wordmark {
  margin-top: 12px;
  opacity: var(--cta-wm-op, 0);
}
.cta-wordmark img { height: 22px; display: block; }

.footer {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px 32px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--hairline-dark);
}
.footer .col {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--steel);
}
.footer .col.mid { display: flex; gap: 24px; }
.footer a { color: inherit; text-decoration: none; opacity: 0.8; }
.footer a:hover { opacity: 1; color: #fff; }

/* ============== Reduced motion ============== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint .line::after { animation: none; }
  .w-recording .rec-pulse span { animation: none; }
}

/* ============== Smaller viewports (single column fallbacks) ============== */
@media (max-width: 1100px) {
  .set-stage, .science-stage, .after-stage, .just-stage {
    grid-template-columns: 1fr; gap: 40px; padding: 0 32px;
  }
  .set-stage { padding-left: 32px; padding-right: 32px; }
  .set-watch-stage { padding-right: 0; }
  .hero-pin { grid-template-columns: 1fr; gap: 32px; padding: 16vh 32px 14vh; }
  .hero-text { align-items: center; text-align: center; }
  .hero-text h1 { text-align: center; }
  .hero-watch { transform: scale(calc(1 + var(--watch-s, 0) * 0.25)); }
}
