/* nudj. — the scroll film
   Two presentations from one document:
   · html.film-mode  → cues become scroll distance; their words play over a
                        sticky stage of scroll-scrubbed clay footage.
   · default          → a calm still-and-text sequence (reduced motion, no JS).
   Brand tokens mirror the app (public/styles.css). */

:root {
  --paper:      #F4F1EA;
  --paper-deep: #ECE7DB;
  --ink:        #1A1B1F;
  --ink-muted:  #565B6D;
  --cream:      #FBF7EF;
  --night:      #0B0E14;
  --night-2:    #121722;
  --night-3:    #1A2030;
  --night-text: #F4F6FB;
  --night-mute: #9AA3B8;
  --accent:     #4650CE;
  --accent-lit: #7C8CF8;
  --dot:        #9AA6FF;
  --alarm:      #C43A2E;
  --alarm-lit:  #FF6B5B;
  --teal-lit:   #63D2C8;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Space Grotesk', ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.22,.7,.2,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--night-text);
  font-family: var(--sans); font-size: 18px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--dot); outline-offset: 3px; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--cream); color: var(--ink); padding: 12px 18px; border-radius: 0 0 12px 0; font-weight: 600; }
.skip:focus { left: 0; }

/* the dot: a true circle on the baseline, never a font glyph */
.dot { display: inline-block; width: .16em; height: .16em; margin-left: .04em; border-radius: 50%; background: var(--dot); vertical-align: baseline; }
.nm { white-space: nowrap; font-weight: 800; }
.muted { color: var(--night-mute); }
.accent { color: var(--dot); }

/* ── navigation: quiet, out of the film's way ───────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
  transition: background .5s var(--ease), opacity .5s var(--ease), transform .5s var(--ease);
}
.nav.solid { background: rgba(11,14,20,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
/* a soft shade along the top edge so the brand reads over the brightest frame */
.nav::before { content: ''; position: absolute; inset: 0 0 -28px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,9,8,.5), rgba(10,9,8,0)); transition: opacity .5s; }
.nav.solid::before { opacity: 0; }
.nav.hush { opacity: .82; }
.nav.hush:hover, .nav.hush:focus-within { opacity: 1; }
.brand { font-weight: 900; font-size: 26px; letter-spacing: -.035em; text-decoration: none; color: var(--cream); text-shadow: 0 1px 14px rgba(0,0,0,.55); }
.nav nav { display: flex; align-items: center; }
.nav .gp { --h: 44px; }

/* the official Google Play badge, with its built-in transparent margin trimmed
   (artwork untouched: 646×250 image, badge occupies 41..605 × 41..209) */
.gp { --h: 52px; position: relative; display: inline-block; height: var(--h); aspect-ratio: 564 / 168; overflow: hidden; border-radius: calc(var(--h) * .16); flex: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.gp img { position: absolute; max-width: none; width: auto; height: calc(var(--h) * 250 / 168); left: calc(var(--h) * -41 / 168); top: calc(var(--h) * -41 / 168); }
.gp:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.gp:focus-visible { outline: 3px solid var(--dot); outline-offset: 3px; }
.gp.big { --h: 68px; }
@media (max-width: 640px) {
  .nav .gp { --h: 38px; }
  .brand { font-size: 23px; }
}

.hud { position: fixed; z-index: 45; inset: auto var(--gutter) max(16px, env(safe-area-inset-bottom)) auto; display: flex; align-items: center; gap: 12px; }
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-lit), var(--dot)); }

/* ═══ type on film ═════════════════════════════════════════════ */
.t-big   { font-size: clamp(36px, 6.2vw, 92px); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
.t-mid   { font-size: clamp(28px, 4.2vw, 58px); font-weight: 700; letter-spacing: -.028em; line-height: 1.08; }
.t-sub   { font-size: clamp(18px, 1.9vw, 25px); font-weight: 500; line-height: 1.4; color: rgba(251,247,239,.86); }
.t-small { font-size: 16px; }
.whisper { font-size: clamp(18px, 2vw, 26px); font-weight: 500; letter-spacing: -.01em; color: var(--cream); }
.chapter { font-size: clamp(44px, 7.4vw, 112px); font-weight: 900; letter-spacing: -.045em; line-height: .98; color: var(--cream); }
.said    { font-size: clamp(22px, 2.8vw, 38px); font-weight: 600; letter-spacing: -.015em; line-height: 1.25; max-width: 24ch; color: var(--cream); }
.wordmark-big { font-size: clamp(76px, 15vw, 220px); font-weight: 900; letter-spacing: -.05em; line-height: 1; color: var(--cream); }
.on-film, .whisper, .chapter, .said, .t-big, .t-mid { text-shadow: 0 2px 24px rgba(10,10,14,.45), 0 1px 3px rgba(10,10,14,.35); }

/* ═══ product UI (the app's own night palette) ══════════════════ */
.ui-card {
  width: min(440px, 88vw);
  background: rgba(14,18,27,.86); color: var(--night-text);
  border: 1px solid rgba(154,166,255,.18); border-radius: 22px;
  padding: 22px 22px 20px; box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.wave { display: flex; align-items: center; gap: 4px; height: 34px; margin-bottom: 12px; }
.wave i { width: 4px; border-radius: 4px; background: var(--dot); height: 30%; animation: wv 1.1s ease-in-out infinite; }
.wave i:nth-child(3n)   { animation-delay: -.3s; }
.wave i:nth-child(3n+1) { animation-delay: -.6s; }
.wave i:nth-child(4n)   { animation-delay: -.9s; }
@keyframes wv { 0%,100% { height: 18%; } 50% { height: 95%; } }
.voice-line { font-size: 19px; line-height: 1.4; color: rgba(244,246,251,.9); }
.parsed { display: grid; gap: 10px; }
.pr { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: baseline; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.pr dt { font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dot); }
.pr dd { font-size: 19px; font-weight: 600; }
.got { margin-top: 14px; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; color: var(--teal-lit); }
.tick { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(99,210,200,.16); color: var(--teal-lit); font-size: 15px; }

/* card internals swap places (voice → parsed) inside one card */
#say-card { display: grid; }
#say-card > .voice, #say-card > .parsed { grid-area: 1 / 1; }

.talk { text-align: center; width: min(820px, 92vw); }
.nl { margin: 26px auto 24px; display: grid; gap: 10px; text-align: left; }
.nl li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 18px; border-radius: 16px; background: rgba(14,18,27,.62); border: 1px solid rgba(255,255,255,.07); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nl q { quotes: '“' '”'; font-size: clamp(16px, 1.7vw, 21px); color: var(--cream); }
.nl b { flex: none; font: 600 13px var(--mono); letter-spacing: .02em; padding: 7px 12px; border-radius: 999px; background: rgba(154,166,255,.14); color: var(--dot); }
.nl b.ask { background: rgba(255,107,91,.12); color: #FFB0A6; }
.nl s { opacity: .5; margin-right: 4px; }

.typebeat { text-align: center; display: grid; justify-items: center; gap: 22px; width: min(640px, 92vw); }
.type-card { text-align: left; display: grid; gap: 10px; }
.field { display: flex; align-items: center; min-height: 54px; padding: 0 16px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(154,166,255,.3); font-size: 19px; }
.typed { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; }
.film-mode .typed { max-width: 0; }
.film-mode .typed.on { max-width: 24ch; transition: max-width 1.4s steps(24, end) !important; }
.caret { width: 2px; height: 22px; background: var(--dot); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.flow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.flow li { font: 600 13px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 8px 12px; border-radius: 999px; background: rgba(11,14,20,.5); border: 1px solid rgba(251,247,239,.22); color: var(--cream); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.flow li + li::before { content: '→ '; opacity: .5; }
.flow li.on:last-child { background: rgba(99,210,200,.2); border-color: rgba(99,210,200,.5); }

.verify { display: grid; gap: 10px; }
.v-head { font-size: 17px; font-weight: 600; line-height: 1.35; margin-bottom: 4px; }
.v-head .muted { display: block; font-weight: 400; font-size: 15px; margin-top: 2px; }
.vc { position: relative; display: grid; gap: 3px; padding: 14px 52px 14px 16px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.vc b { font-size: 18px; }
.vc span { font-size: 14.5px; color: var(--night-mute); }
.chk { position: absolute; right: 14px; top: 50%; translate: 0 -50%; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 14px; border: 1.5px solid rgba(255,255,255,.25); color: transparent; }
.chk.on, html:not(.film-mode) .chk { background: var(--teal-lit); border-color: var(--teal-lit); color: var(--night); }
.v-note { font-size: 13.5px; color: var(--night-mute); }
.v-cta { font: 700 17px var(--sans); color: #fff; border: 0; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, var(--accent-lit), #6A58E8); margin-top: 4px; }
.v-done { font-weight: 700; color: var(--teal-lit); display: flex; gap: 10px; align-items: center; }

/* the phone: the app's alarm screen */
.phone { width: min(300px, 64vw); aspect-ratio: 9 / 19; border-radius: 42px; padding: 10px; background: #05070B; box-shadow: 0 0 0 2px #2A2F3A, 0 40px 100px rgba(0,0,0,.6), 0 0 120px rgba(255,107,91,.25); }
.ph-screen { height: 100%; border-radius: 33px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px 20px; gap: 6px;
  background: radial-gradient(120% 70% at 50% 20%, rgba(255,107,91,.38), transparent 60%), radial-gradient(90% 60% at 50% 100%, rgba(124,140,248,.28), transparent 70%), #0B0E14; }
.ph-bell { font-size: 34px; }
.phone.ringing.on .ph-bell { animation: ring 1.2s ease-in-out infinite; }
@keyframes ring { 0%,40%,100% { rotate: 0; } 10% { rotate: 14deg; } 20% { rotate: -12deg; } 30% { rotate: 8deg; } }
.ph-time { font-size: 62px; font-weight: 800; letter-spacing: -.04em; line-height: 1; background: linear-gradient(180deg, #FFE1DC, #FF8E80); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ph-time small { font-size: 20px; margin-left: 4px; }
.ph-title { font-size: 20px; font-weight: 700; margin-top: 10px; }
.ph-meta { font-size: 14px; color: var(--night-mute); }
.ph-actions { display: grid; gap: 10px; width: 100%; margin-top: 26px; }
.ph-btn { padding: 14px; border-radius: 16px; font-weight: 700; font-size: 17px; }
.ph-btn.taken { background: linear-gradient(135deg, #FF8E80, var(--alarm-lit)); color: #2A0B07; }
.ph-btn.snooze { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.ph-caption { margin-top: 16px; font-size: 15px; color: var(--cream); text-align: center; max-width: 300px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }

.streak-card { width: min(420px, 88vw); display: grid; gap: 10px; }
.sc-toast { justify-self: start; font-size: 16px; font-weight: 600; padding: 10px 16px; border-radius: 14px; background: #1B1F2B; border: 1px solid rgba(255,179,71,.35); color: #F4F6FB; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.sc-title { font-size: 20px; font-weight: 700; }
.sc-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-pill { font: 600 13px var(--sans); padding: 4px 10px; border-radius: 999px; }
.sc-pill.day { color: #FFB0A6; background: rgba(255,107,91,.12); border: 1px solid rgba(255,107,91,.3); }
.sc-pill.fire { color: #FFC877; background: rgba(255,179,71,.14); border: 1px solid rgba(255,179,71,.32); }
.sc-sum { font-size: 14.5px; font-weight: 700; color: var(--night-text); margin-top: 4px; }
.sc-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.sc-grid li { aspect-ratio: 1; border-radius: 5px; border: 1.5px solid rgba(237,240,246,.3); background: rgba(237,240,246,.06); }
.sc-grid li.f { background: #63D2C8; border-color: transparent; }
.sc-grid li.m { background: rgba(255,107,91,.6); border-color: transparent; }
.film-mode .sc-grid li.t.step { opacity: .35; translate: none; }
.film-mode .sc-grid li.t.step.on { opacity: 1; box-shadow: 0 0 0 2px #0E121B, 0 0 0 4px #7C8CF8; }
.taken-pop { display: inline-flex; align-items: center; gap: 12px; font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; padding: 14px 26px 14px 16px; border-radius: 999px; background: rgba(14,18,27,.78); border: 1px solid rgba(99,210,200,.4); color: var(--teal-lit); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.taken-pop .tick { width: 40px; height: 40px; font-size: 20px; }

.course { width: min(760px, 92vw); padding: 18px 20px; border-radius: 22px; background: rgba(14,18,27,.8); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.course-h { font-weight: 700; font-size: 17px; margin-bottom: 14px; }
.strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.strip li { display: grid; gap: 4px; justify-items: center; text-align: center; }
.strip i { width: 100%; height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; position: relative; }
.strip i::after { content: ''; position: absolute; inset: 0; transform-origin: left; scale: 0 1; border-radius: inherit; transition: scale .7s var(--ease); }
.strip .full i::after { background: var(--teal-lit); }
.strip .part i::after { background: linear-gradient(90deg, var(--teal-lit) 50%, rgba(255,107,91,.55) 50%); }
.strip li.on i::after, html:not(.film-mode) .strip i::after { scale: 1 1; }
.strip span { font: 600 12px var(--mono); letter-spacing: .06em; color: var(--night-mute); }
.strip em { font-style: normal; font-size: 13px; }
.today { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chip { font: 600 13px var(--mono); padding: 6px 12px; border-radius: 999px; }
.chip.done { background: rgba(99,210,200,.16); color: var(--teal-lit); }
.chip.due { background: rgba(154,166,255,.14); color: var(--dot); }

.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; margin: 28px auto; max-width: 900px; }
.langs li { font-size: clamp(16px, 1.8vw, 22px); padding: 10px 18px; border-radius: 999px; background: rgba(251,247,239,.08); border: 1px solid rgba(251,247,239,.16); color: var(--cream); }
.langs li:nth-child(odd) { translate: 0 6px; }

.backup { display: grid; justify-items: center; gap: 18px; text-align: center; max-width: 720px; }
.bk-scene { display: flex; align-items: center; gap: 14px; height: 90px; }
.bk-phone { width: 40px; height: 72px; border-radius: 10px; border: 2px solid var(--cream); position: relative; }
.bk-phone::after { content: ''; position: absolute; inset: 22px 7px; border-radius: 4px; background: var(--dot); }
.bk-path { width: 150px; height: 2px; background: repeating-linear-gradient(90deg, rgba(251,247,239,.4) 0 6px, transparent 6px 12px); position: relative; }
.bk-path i { position: absolute; left: 0; top: -9px; width: 30px; height: 20px; border-radius: 5px; background: var(--cream); opacity: 0; }
.bk-path i.on { opacity: 1; animation: carry 2.4s var(--ease) infinite; }
@keyframes carry { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { left: 120px; opacity: 0; } }
.bk-cloud { width: 78px; height: 44px; border-radius: 30px; border: 2px solid var(--cream); position: relative; }
.bk-cloud::before { content: ''; position: absolute; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--cream); border-bottom-color: transparent; border-right-color: transparent; left: 14px; top: -22px; rotate: 45deg; }

.pipe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 30px auto 20px; width: min(1100px, 92vw); }
.pipe li { position: relative; display: grid; gap: 6px; padding: 18px 16px; border-radius: 18px; background: rgba(14,18,27,.6); border: 1px solid rgba(154,166,255,.18); text-align: left; }
.pipe li:not(:last-child)::after { content: '→'; position: absolute; right: -12px; top: 50%; translate: 0 -50%; color: var(--dot); font-weight: 700; z-index: 1; }
.pipe b { font-size: 18px; }
.pipe span { font-size: 14.5px; color: var(--night-mute); line-height: 1.35; }
@media (max-width: 760px) {
  .pipe { grid-template-columns: 1fr; gap: 8px; max-width: 420px; }
  .pipe li { padding: 12px 14px; }
  .pipe li:not(:last-child)::after { content: '↓'; right: 16px; top: auto; bottom: -15px; translate: 0; }
}

.promises { display: grid; gap: 10px; margin: 30px auto 0; width: max-content; max-width: 92vw; text-align: left; }
.promises li { font-size: clamp(19px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.01em; display: flex; gap: 14px; align-items: baseline; }
.promises li::before { content: ''; flex: none; width: .34em; height: .34em; border-radius: 50%; background: var(--dot); translate: 0 -.12em; }

/* ═══ the thoughts: little paper tags ═══════════════════════════ */
.thought {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: clamp(14px, 1.35vw, 18px); letter-spacing: -.005em;
  color: #2A2620; background: #F7F1E3; padding: 9px 14px 10px; border-radius: 4px;
  box-shadow: 0 10px 24px rgba(40,30,15,.22), 0 1px 0 rgba(255,255,255,.7) inset;
  background-image: linear-gradient(transparent 0 0), radial-gradient(rgba(120,100,60,.08) 1px, transparent 1px);
  background-size: auto, 5px 5px;
}

/* ═══ FINAL + DETAILS ═══════════════════════════════════════════ */
.final { min-height: 100svh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 22px; padding: 120px var(--gutter) 100px; background: var(--paper); color: var(--ink); }
.final .wordmark-big { color: var(--ink); text-shadow: none; }
.final .dot { background: var(--accent); }
.final-line { font-size: clamp(24px, 3.4vw, 42px); font-weight: 700; letter-spacing: -.02em; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.btn { display: inline-flex; align-items: baseline; justify-content: center; text-decoration: none; font-weight: 700; font-size: 19px; padding: 16px 28px; border-radius: 999px; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.btn.primary { background: var(--ink); color: var(--paper); box-shadow: 0 12px 30px rgba(26,27,31,.18); }
.btn.primary .dot { background: var(--dot); }
.btn.small .dot { background: var(--accent); }
.btn.ghost { border: 1.5px solid rgba(26,27,31,.22); color: var(--ink); }
.btn:hover { transform: translateY(-2px); }
.availability { font: 500 14px var(--mono); letter-spacing: .04em; color: var(--ink-muted); }

.faq { background: var(--paper); color: var(--ink); padding: 20px var(--gutter) 70px; display: grid; justify-items: center; gap: 10px; }
.faq h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.025em; margin-bottom: 10px; }
.faq details { width: min(720px, 100%); border-radius: 16px; background: var(--paper-deep); padding: 0 20px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 700; font-size: 17.5px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 400; font-size: 24px; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--ink-muted); padding: 0 0 18px; font-size: 16.5px; }
.faq .gp { margin-top: 22px; }

.foot { background: var(--paper); color: var(--ink-muted); text-align: center; padding: 40px var(--gutter) 70px; font-size: 15px; display: grid; gap: 6px; }
.foot-brand { font-size: 30px; font-weight: 900; letter-spacing: -.04em; color: var(--ink); }
.foot .dot { background: var(--accent); }
.foot-links a { color: var(--ink-muted); }
.foot .copy { font-size: 13px; margin-top: 10px; }
.foot .tm { font-size: 12px; color: var(--ink-dim, #767B8B); margin-top: 6px; }

/* ═══════════════════════════════════════════════════════════════
   DEFAULT (reduced motion / no JS): a still-and-text sequence
   ═══════════════════════════════════════════════════════════════ */
html:not(.film-mode) .nav { position: sticky; background: var(--night); }
html:not(.film-mode) .stage, html:not(.film-mode) .hud { display: none; }
html:not(.film-mode) .film { display: grid; gap: 0; }
html:not(.film-mode) .cue { padding: 40px var(--gutter); display: grid; gap: 22px; justify-items: start; max-width: 1180px; margin: 0 auto; width: 100%; }
html:not(.film-mode) .cue-still { width: 100%; border-radius: 18px; aspect-ratio: 16/9; object-fit: cover; }
html:not(.film-mode) .beat { max-width: 100%; }
html:not(.film-mode) .thoughts { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 var(--gutter); max-width: 1180px; margin: 0 auto; }
html:not(.film-mode) .swirl { display: none; }
html:not(.film-mode) .phone { margin: 10px 0; }
html:not(.film-mode) .layers, html:not(.film-mode) .caret { display: none; }
html:not(.film-mode) .t-big, html:not(.film-mode) .chapter { font-size: clamp(34px, 6vw, 70px); }

/* ═══════════════════════════════════════════════════════════════
   FILM MODE
   ═══════════════════════════════════════════════════════════════ */
.film-mode .film { position: relative; }
.film-mode .stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; z-index: 1;
  background: #1a1612;
}
.film-mode .cue { position: relative; pointer-events: none; }
.film-mode .cue-still { display: none; }
.film-mode .cue > .beat { display: none; } /* moved into the stage by film.js */

.stage .still, .stage video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.stage video { opacity: 0; transition: opacity .35s linear; }
.stage video.live { opacity: 1; }
.stage .reels { position: absolute; inset: 0; }
.stage .veil {
  position: absolute; inset: 0; pointer-events: none;
  background: rgba(10,9,8,var(--veil, 0));
  backdrop-filter: blur(calc(var(--blur, 0) * 1px)); -webkit-backdrop-filter: blur(calc(var(--blur, 0) * 1px));
}
/* a gentle cinematic vignette + scrim so words always read */
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(8,6,4,.42) 100%),
              linear-gradient(0deg, rgba(8,6,4,.38), transparent 32%); }
.stage .layers { position: absolute; inset: 0; z-index: 4; }
.stage .flash { position: absolute; inset: 0; z-index: 5; background: #fff; opacity: 0; pointer-events: none; transition: opacity .12s linear; }
.stage .flash.on { opacity: .85; transition: opacity .02s linear; }
.stage .fadeout { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: var(--paper); opacity: 0; }

.scroll-hint { position: absolute; z-index: 6; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); translate: -50% 0; display: grid; justify-items: center; gap: 8px; color: var(--cream); font: 500 12px var(--mono); letter-spacing: .2em; text-transform: uppercase; transition: opacity .6s; }
.scroll-hint i { width: 1px; height: 38px; background: linear-gradient(var(--cream), transparent); animation: hint 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0% { scale: 1 0; } 50% { scale: 1 1; } 100% { scale: 1 1; opacity: 0; } }
.scroll-hint.gone { opacity: 0; }

/* beats: positioned layers over the stage */
.layers .beat {
  position: absolute; display: block; pointer-events: none;
  opacity: 0; translate: 0 18px;
  transition: opacity .7s var(--ease), translate .9s var(--ease);
}
.layers .beat.on { opacity: 1; translate: 0 0; }
.layers .beat a, .layers .beat.on .ui-card { pointer-events: auto; }
.layers .pos-center { inset: 0; display: grid !important; place-content: center; justify-items: center; text-align: center; padding: 80px var(--gutter); }
.layers .pos-left   { left: var(--gutter); top: 50%; translate: 0 calc(-50% + 18px) !important; max-width: min(46vw, 640px); }
.layers .pos-left.on { translate: 0 -50% !important; }
.layers .pos-right  { right: var(--gutter); top: 50%; translate: 0 calc(-50% + 18px) !important; display: grid !important; justify-items: center; }
.layers .pos-right.on { translate: 0 -50% !important; }
.layers .pos-low    { left: var(--gutter); bottom: max(72px, 12vh); max-width: min(70vw, 900px); }
.layers .pos-bottom { left: 50%; bottom: max(22px, 4vh); translate: -50% 18px !important; }
.layers .pos-bottom.on { translate: -50% 0 !important; }
.layers .pos-low.hero { bottom: max(96px, 15vh); }
.hero-kicker { font: 600 13px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cream); text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.hero-line { font-size: clamp(34px, 5vw, 68px); font-weight: 800; letter-spacing: -.035em; line-height: 1.03; color: var(--cream); max-width: 15ch; margin: 10px 0 14px; text-shadow: 0 2px 28px rgba(10,10,14,.5), 0 1px 3px rgba(10,10,14,.35); }
.hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.hero-meta { font-size: 16px; color: rgba(251,247,239,.9); text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.hero-meta a { color: var(--cream); font-weight: 700; }
.layers .pos-sky    { left: 0; right: 0; top: 14vh; text-align: center; padding: 0 var(--gutter); }
.layers .pos-sky.ink .t-big { color: var(--ink); text-shadow: none; }
.layers .pos-sky.ink .dot { background: var(--accent); }
.layers .pos-sky.ink .nm { color: var(--accent); }

/* steps inside beats light up in sequence */
.film-mode .step { opacity: .0; translate: 0 10px; transition: opacity .55s var(--ease), translate .7s var(--ease), background .4s, border-color .4s, color .4s; }
.film-mode .step.on { opacity: 1; translate: 0 0; }
.film-mode .chk.step { opacity: 1; translate: none; }
.film-mode .strip li.step { opacity: .35; translate: none; }
.film-mode .strip li.step.on { opacity: 1; }
.film-mode .bk-path i.step { translate: none; }
.film-mode #say-card .voice.step.off, .film-mode #say-card .parsed.step:not(.on) { opacity: 0; }

/* thoughts layer */
.layers .thoughts, .layers .swirl { position: absolute; inset: 0; pointer-events: none; }
.layers .thought {
  position: absolute; left: var(--x, var(--x1)); top: var(--y, var(--y1)); rotate: var(--r, 0deg);
  opacity: 0; scale: .6; translate: 0 14px;
  transition: opacity .8s var(--ease), scale .9s var(--ease), translate 1.1s var(--ease), left 1.1s var(--ease), top 1.1s var(--ease);
  animation: bob 6s ease-in-out infinite; animation-play-state: paused;
}
.layers .thought:nth-child(2n) { animation-duration: 7.4s; animation-delay: -2s; }
.layers .thought:nth-child(3n) { animation-duration: 8.2s; animation-delay: -4s; }
.layers .thought.on { opacity: 1; scale: 1; translate: 0 0; animation-play-state: running; }
.layers .thoughts .thought { transition-property: opacity, scale, translate, left, top; transition-duration: .8s, .9s, 1.1s, 1.8s, 1.8s; }
.layers .thoughts.p2 .thought { left: var(--x2); top: var(--y2); }
.layers .thoughts.p3 .thought { left: var(--x3); top: var(--y3); }
.layers .thought.gone { opacity: 0; scale: .2; translate: 0 -10px; }
.layers .thought.gone.to-card { left: calc(100% - var(--gutter) - 220px); top: 50%; }
.layers .thought.gone.to-dot  { left: 50%; top: 52%; scale: .05; }
@keyframes bob { 0%,100% { margin-top: 0; } 50% { margin-top: -10px; } }
.swirl .thought { transition-duration: .9s; }
.swirl-dot { position: absolute; left: 50%; top: 52%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 40px 10px rgba(154,166,255,.45); opacity: 0; scale: .3; transition: opacity .6s, scale .6s var(--ease); }
.swirl.on .swirl-dot { opacity: 1; scale: 1; }

/* mobile: deliberate portrait composition */
@media (max-aspect-ratio: 4/5) {
  .layers .thought { left: var(--mx, var(--x)); top: var(--my, var(--y)); font-size: 13px; padding: 7px 10px 8px; }
  .layers .thoughts.p2 .thought, .layers .thoughts.p3 .thought { left: var(--mx); top: var(--my); }
  .layers .pos-left, .layers .pos-right { left: var(--gutter); right: var(--gutter); max-width: none; justify-items: start; }
  .layers .pos-left  { top: auto; bottom: max(60px, 9vh); translate: 0 18px !important; }
  .layers .pos-left.on { translate: 0 0 !important; }
  .layers .pos-right { top: auto; bottom: max(24px, 4vh); translate: 0 18px !important; justify-items: center; }
  .layers .pos-right.on { translate: 0 0 !important; }
  /* when a cue has both a left title and a right card, the title goes up top */
  .layers .cue-layer.has-right .pos-left { top: 12vh; bottom: auto; }
  .layers .pos-low { left: var(--gutter); right: var(--gutter); max-width: none; bottom: max(60px, 10vh); }
  .ui-card { padding: 16px; border-radius: 18px; }
  .pr { grid-template-columns: 74px 1fr; padding: 10px 12px; }
  .pr dd { font-size: 17px; }
  .vc { padding: 11px 46px 11px 13px; }
  .vc b { font-size: 16px; } .vc span { font-size: 13px; }
  .phone { width: min(230px, 58vw); }
  .ph-time { font-size: 48px; }
  .ph-actions { margin-top: 16px; }
  .nl li { padding: 10px 12px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .nl { margin: 18px auto; gap: 7px; }
  .langs li:nth-child(odd) { translate: none; }
  .langs { gap: 8px; margin: 18px auto; }
  .course { padding: 14px; }
  .strip em { font-size: 11px; }
  .chapter { font-size: clamp(42px, 13vw, 64px); }
  .layers .pos-sky { top: 12vh; }
  .pos-sky .t-big { font-size: clamp(32px, 9vw, 44px); }
  .hero-line { font-size: clamp(32px, 10vw, 44px); }
}

/* On shorter phone screens the alarm mock-up (pos-right, anchored to the bottom)
   grew up into the title above it. Shrink it from the bottom edge to fit. */
@media (max-aspect-ratio: 4/5) and (max-height: 800px) { .layers .cue-layer.has-right .pos-right .phone { transform-origin: 50% 100%; scale: .88; } }
@media (max-aspect-ratio: 4/5) and (max-height: 740px) { .layers .cue-layer.has-right .pos-right .phone { scale: .8; } }
@media (max-aspect-ratio: 4/5) and (max-height: 680px) { .layers .cue-layer.has-right .pos-right .phone { scale: .72; } }
@media (max-aspect-ratio: 4/5) and (max-height: 620px) { .layers .cue-layer.has-right .pos-right .phone { scale: .64; } }
@media (max-aspect-ratio: 4/5) and (max-height: 560px) { .layers .cue-layer.has-right .pos-right .phone { scale: .56; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
