/* ==========================================================================
   CLEAR — scroll-driven narrative
   Light theme, mobile-first. All motion is driven by story.js writing
   --p (0..1) / opacity / transform onto elements it already holds refs to.
   ========================================================================== */

/* ---------- fonts (self-hosted, latin + latin-ext only) ---------- */
@font-face {
  font-family: 'Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/story/fonts/plex-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/story/fonts/plex-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/story/fonts/plex-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/story/fonts/plex-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/story/fonts/plex-mono-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/story/fonts/plex-mono-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ---------- */
:root {
  --bg: #F7F5F1;
  --bg-deep: #EFEBE3;
  --surface: #FFFFFF;
  --surface-2: #F2EFE8;
  --line: #DCD5C8;
  --line-soft: #E8E3D9;

  --ink: #14181E;
  --ink-2: #56606E;
  --ink-3: #7C8593;

  --accent: #E0570F;
  --accent-ink: #B34700;
  --accent-wash: rgba(224, 87, 15, 0.1);

  /* stage / storyboard palette */
  --figure: #262E38;
  --figure-2: #3C4653;
  --set-far: #DFD8C9;
  --set-mid: #CDC4B0;
  --set-near: #B7AB93;
  --sky-0: #EBE5D8;
  --sky-1: #F8F6F2;

  /* deliberate cut-to-dark beat */
  --cut: #171B21;
  --cut-ink: #F3F1EC;

  --header-h: 54px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 769px) {
  :root {
    --header-h: 62px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plex Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

::selection {
  background: rgba(224, 87, 15, 0.22);
}

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

.mono {
  font-family: 'Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: clamp(18px, 5vw, 32px);
}

.eyebrow {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(10px, 2.4vw, 11.5px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.eyebrow.muted {
  color: var(--ink-3);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   Chrome: scrubber, header, chapter rail
   ========================================================================== */

.scrubber {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 90;
  background: var(--line-soft);
  pointer-events: none;
}

.scrubber > i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

.masthead {
  position: fixed;
  inset: 3px 0 auto 0;
  z-index: 80;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: clamp(14px, 4vw, 26px);
  background: rgba(247, 245, 241, 0.9);
  border-bottom: 1px solid var(--line-soft);
}

@supports (backdrop-filter: blur(8px)) {
  @media (min-width: 769px) {
    .masthead {
      background: rgba(247, 245, 241, 0.72);
      backdrop-filter: blur(10px);
    }
  }
}

.wordmark {
  font-weight: 700;
  font-size: clamp(14px, 4.2vw, 16px);
  letter-spacing: 0.3em;
  white-space: nowrap;
}

.chapter-now {
  flex: 1 1 auto;
  min-width: 0;
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 1px solid var(--line);
  padding-left: 10px;
  margin-left: 2px;
}

.btn {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(9.5px, 2.4vw, 11px);
  font-weight: 600;
  letter-spacing: 0.12em;
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-ink);
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
}

.btn.solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  padding: 13px 22px;
  font-size: clamp(11px, 2.6vw, 12px);
}

.btn.solid:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

.btn.ghost {
  border-color: var(--line);
  color: var(--ink-2);
  padding: 13px 22px;
  font-size: clamp(11px, 2.6vw, 12px);
}

.btn.ghost:hover {
  border-color: var(--ink-2);
  background: transparent;
  color: var(--ink);
}

/* chapter rail — desktop only */
.rail {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 70;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 999px;
  background: rgba(247, 245, 241, 0.7);
  border: 1px solid var(--line-soft);
}

@media (min-width: 1080px) {
  .rail {
    display: flex;
  }
}

.rail button {
  position: relative;
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 7px 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--ink-3);
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* label floats outside the rail so it never widens it */
.rail button span {
  position: absolute;
  right: calc(100% + 10px);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(5px);
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
}

.rail:hover button span,
.rail button:focus-visible span {
  opacity: 1;
  transform: none;
}

.rail button i {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
  transition: background-color 0.2s, width 0.2s;
}

.rail button:hover i {
  background: var(--ink-3);
}

.rail button[aria-current='true'] {
  color: var(--accent-ink);
}

.rail button[aria-current='true'] i {
  background: var(--accent);
  width: 24px;
}

/* ==========================================================================
   Reveal (one-shot, IntersectionObserver driven — no per-frame JS)
   ========================================================================== */

.rv {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
}

.js .rv {
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
}

.rv.in {
  opacity: 1;
  transform: none;
}

.rv-d1 {
  transition-delay: 0.07s;
}

.rv-d2 {
  transition-delay: 0.14s;
}

.rv-d3 {
  transition-delay: 0.21s;
}

/* no-JS / reduced-motion: everything visible */
html:not(.js) .rv {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: calc(var(--header-h) + clamp(60px, 14vh, 110px))
    clamp(56px, 12vh, 90px);
}

.hero h1 {
  font-size: clamp(31px, 7.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 16ch;
  margin-block: clamp(20px, 5vw, 34px);
  text-wrap: balance;
}

.hero p {
  font-size: clamp(16px, 3.4vw, 22px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 52ch;
}

.blip {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
  animation: blip 2.2s infinite;
}

.scroll-cue {
  margin-top: clamp(46px, 9vh, 74px);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(10px, 2.2vw, 11px);
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

.scroll-cue i {
  font-style: normal;
  animation: cue 2s infinite;
}

.band {
  padding-block: clamp(64px, 13vh, 120px);
}

.band.tight {
  padding-block: clamp(40px, 8vh, 70px);
}

.band.deep {
  background: var(--bg-deep);
  border-block: 1px solid var(--line-soft);
}

.band h2 {
  font-size: clamp(25px, 5.6vw, 58px);
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: -0.032em;
  max-width: 20ch;
  margin-block: clamp(16px, 4vw, 26px);
  text-wrap: balance;
}

.lede {
  font-size: clamp(16px, 3.4vw, 23px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 58ch;
}

/* ==========================================================================
   Player — the cinematic scenes, driven by a play button
   ========================================================================== */

.player {
  position: relative;
}

.player--full {
  height: 100svh;
}

.player__pane {
  position: relative;
  height: 100%;
  overflow: hidden;
  contain: layout paint style;
  background: radial-gradient(125% 85% at 18% 100%, var(--sky-0) 0%, var(--sky-1) 62%);
}

.player.mini .player__pane {
  height: min(68svh, 560px);
}

.layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* wider than the viewport on both sides so the parallax slide never
   exposes an edge */
.set {
  position: absolute;
  left: -14%;
  right: -14%;
  bottom: 0;
  height: 54svh;
  pointer-events: none;
}

@media (min-width: 769px) {
  .set {
    height: 62svh;
  }
}

.set svg {
  width: 100%;
  height: 100%;
  display: block;
}

.figure {
  position: absolute;
  bottom: 12svh;
  left: 0;
  width: min(13svh, 22vw);
  pointer-events: none;
}

.figure svg {
  width: 100%;
  display: block;
}

/* separate node so the walk cycle never fights the JS transform */
.gait {
  transform-origin: 50% 100%;
}

.player.playing .walk .gait {
  animation: stride 1.05s ease-in-out infinite;
}

.flip {
  transform: scaleX(-1);
  transform-origin: 50% 50%;
}

.fill-far {
  fill: var(--set-far);
}

.fill-mid {
  fill: var(--set-mid);
}

.fill-near {
  fill: var(--set-near);
}

.fill-figure {
  fill: var(--figure);
}

.fill-figure-2 {
  fill: var(--figure-2);
}

.fill-sky {
  fill: var(--sky-1);
}

.stroke-mid {
  stroke: var(--set-mid);
}

/* the amber wash for the incident beat */
.wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(224, 87, 15, 0.22), rgba(224, 87, 15, 0) 55%);
  pointer-events: none;
}

/* deliberate cut-to-dark */
.cut {
  position: absolute;
  inset: 0;
  background: var(--cut);
  pointer-events: none;
}

/* --- beats (captions) --- */
.beats {
  position: absolute;
  inset: 0;
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(30px, 7vh, 66px)) clamp(18px, 5vw, 32px)
    clamp(70px, 12vh, 96px);
  pointer-events: none;
}

.beat {
  position: absolute;
  top: calc(var(--header-h) + clamp(30px, 7vh, 66px));
  left: clamp(18px, 5vw, 32px);
  right: clamp(18px, 5vw, 32px);
  max-width: 42ch;
  /* will-change is toggled by story.js only while the scene is on screen */
}

.beat__time {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(10px, 2.4vw, 12px);
  letter-spacing: 0.2em;
  color: var(--ink-3);
  margin-bottom: clamp(9px, 2.6vw, 13px);
}

.beat__time.hot {
  color: var(--accent-ink);
}

.beat__line {
  font-size: clamp(21px, 5.6vw, 40px);
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.beat.center {
  inset: 0;
  top: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 clamp(18px, 5vw, 32px);
}

.beat.center .beat__line {
  font-size: clamp(29px, 7.4vw, 66px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.032em;
  max-width: 16ch;
}

.beat.center .beat__sub {
  margin-top: clamp(14px, 3vw, 22px);
  font-size: clamp(15px, 3.2vw, 21px);
  color: var(--ink-2);
}

/* on the dark beat, invert the type */
.beat.on-cut .beat__line,
.beat.on-cut .beat__sub {
  color: var(--cut-ink);
}

.beat.on-cut .beat__time {
  color: #A8B0BC;
}

/* --- the kiosk readout in scene two --- */
.kiosk-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 clamp(18px, 5vw, 32px) clamp(78px, 16vh, 112px);
}

@media (min-width: 900px) {
  .kiosk-wrap {
    align-items: center;
    justify-content: flex-end;
    padding: 0 6vw;
  }
}

.kiosk {
  width: min(340px, 84vw);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(20, 24, 30, 0.14);
  overflow: hidden;
}

.kiosk__head,
.kiosk__foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.kiosk__head {
  border-bottom: 1px solid var(--line-soft);
}

.kiosk__foot {
  border-top: 1px solid var(--line-soft);
}

.kiosk__body {
  padding: clamp(20px, 5vw, 30px) clamp(18px, 4vw, 24px) clamp(18px, 4vw, 26px);
  text-align: center;
}

.kiosk__k {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.kiosk__score {
  font-size: clamp(64px, 17vw, 88px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.kiosk__tag {
  margin-top: 13px;
  display: inline-block;
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 7px 16px;
}

.kiosk__note {
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  text-align: left;
}

/* --- control bar: play/pause · timeline · time · sound --- */
.player__bar {
  position: absolute;
  left: clamp(14px, 4vw, 28px);
  right: clamp(14px, 4vw, 28px);
  bottom: calc(clamp(14px, 3vh, 26px) + env(safe-area-inset-bottom, 0px));
  /* above every overlay (poster 8, center 7, endcard 9) so the controls
     are always reachable, exactly like a video player */
  z-index: 10;
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 14px);
}

.bar__btn {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}

.bar__btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.bar__btn:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.bar__time {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  min-width: 78px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* icon states */
.bar__btn .ic-pause {
  display: none;
}

.player.playing .bar__btn .ic-pause {
  display: block;
}

.player.playing .bar__btn .ic-play {
  display: none;
}

.mute-btn .ic-slash {
  display: none;
}

html.muted .mute-btn .ic-slash {
  display: block;
}

html.muted .mute-btn .ic-wave {
  display: none;
}

/* over the dark cut, the bar inverts */
.player__bar.over-cut .bar__btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.32);
  color: #eee;
}

.player__bar.over-cut .bar__time {
  color: rgba(255, 255, 255, 0.7);
}

.player__bar.over-cut .timeline__track {
  background: rgba(255, 255, 255, 0.25);
}

.player__bar.over-cut .timeline__tick {
  background: rgba(255, 255, 255, 0.38);
}

.timeline {
  position: relative;
  flex: 1 1 auto;
  height: 30px;
  cursor: pointer;
  touch-action: pan-y;
}

.timeline__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
}

.timeline__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.timeline__tick {
  position: absolute;
  top: 8px;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--set-near);
}

.timeline__head {
  position: absolute;
  top: 9px;
  left: 0;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(224, 87, 15, 0.16);
}

/* ==========================================================================
   Cards / grids
   ========================================================================== */

.paper {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}

.paper__head,
.paper__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px clamp(16px, 4vw, 22px);
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(9px, 2vw, 10.5px);
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.paper__head {
  border-bottom: 1px solid var(--line-soft);
}

.paper__body {
  padding: clamp(26px, 6vw, 46px) clamp(20px, 5vw, 34px);
}

.paper__body h2,
.paper__body h3 {
  font-size: clamp(24px, 6vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.032em;
  max-width: 22ch;
  margin: 0;
  text-wrap: balance;
}

/* inside the two-column day-after layout the clipping reads smaller */
.duet .paper__body h3 {
  font-size: clamp(21px, 4.4vw, 36px);
}

.paper__body p {
  margin-top: clamp(14px, 3.5vw, 22px);
  font-size: clamp(14px, 3vw, 16.5px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 60ch;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line-soft);
}

@media (min-width: 620px) {
  .split {
    grid-template-columns: repeat(3, 1fr);
  }
}

.split > div {
  padding: clamp(16px, 4vw, 22px) clamp(16px, 4vw, 22px);
  border-top: 1px solid var(--line-soft);
}

.split > div:first-child {
  border-top: 0;
}

@media (min-width: 620px) {
  .split > div {
    border-top: 0;
    border-left: 1px solid var(--line-soft);
  }
  .split > div:first-child {
    border-left: 0;
  }
}

.split dt {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(9px, 2vw, 10.5px);
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.split dd {
  margin: 0;
  font-size: clamp(13.5px, 3vw, 15px);
  line-height: 1.45;
}

/* the day-after duet: news clipping beside what Clear buys */
.duet {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 4vw, 26px);
  align-items: start;
  margin-top: clamp(36px, 8vw, 56px);
}

@media (min-width: 980px) {
  .duet {
    grid-template-columns: 7fr 5fr;
  }
}

.duet__label {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(9px, 2vw, 10.5px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.duet__cells {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  overflow: hidden;
}

.duet__cells > div {
  background: var(--surface);
  padding: clamp(16px, 4vw, 22px);
}

.duet__cells dt {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(9px, 2vw, 10.5px);
  letter-spacing: 0.16em;
  color: var(--accent-ink);
  text-transform: uppercase;
  margin-bottom: 7px;
}

.duet__cells dd {
  margin: 0;
  font-size: clamp(13.5px, 3vw, 15px);
  line-height: 1.5;
  color: var(--ink);
}

.grid {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  overflow: hidden;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 940px) {
  .grid.four {
    grid-template-columns: repeat(4, 1fr);
  }
}

.grid > .cell {
  background: var(--surface);
  padding: clamp(20px, 5vw, 28px) clamp(18px, 4vw, 24px);
}

.cell__k {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(9px, 2vw, 10.5px);
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: clamp(10px, 3vw, 14px);
}

.cell__v {
  font-size: clamp(14px, 3vw, 16px);
  line-height: 1.5;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 4vw, 22px);
}

@media (min-width: 700px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card__art {
  height: clamp(150px, 34vw, 180px);
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line-soft);
}

.card__art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card__body {
  padding: clamp(18px, 4.5vw, 26px) clamp(17px, 4vw, 24px);
  flex: 1;
}

.card__body h3 {
  font-size: clamp(16px, 3.8vw, 19px);
  line-height: 1.32;
  font-weight: 600;
  margin: clamp(10px, 3vw, 14px) 0 clamp(8px, 2vw, 12px);
  text-wrap: balance;
}

.card__body p {
  font-size: clamp(13.5px, 3vw, 15px);
  line-height: 1.55;
  color: var(--ink-2);
}

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
}

@media (min-width: 700px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat {
  background: var(--bg);
  padding: clamp(24px, 6vw, 38px) clamp(18px, 5vw, 26px);
}

.stat b {
  display: block;
  font-size: clamp(38px, 9vw, 64px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.stat.hot b {
  color: var(--accent);
}

.stat span {
  display: block;
  margin-top: clamp(10px, 3vw, 16px);
  font-size: clamp(13.5px, 3vw, 15px);
  line-height: 1.5;
  color: var(--ink-2);
}

.pull {
  margin-top: clamp(32px, 7vw, 52px);
  font-size: clamp(19px, 4.4vw, 30px);
  line-height: 1.32;
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 34ch;
  text-wrap: balance;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(22px, 5vw, 34px);
  margin-block: clamp(38px, 8vw, 62px);
}

@media (min-width: 620px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.steps h3 {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(9.5px, 2.2vw, 11px);
  letter-spacing: 0.16em;
  color: var(--ink-3);
  font-weight: 400;
  text-transform: uppercase;
  margin-bottom: clamp(10px, 3vw, 14px);
}

.steps p {
  font-size: clamp(14px, 3vw, 16px);
  line-height: 1.5;
}

/* score scale */
.scale {
  display: flex;
  height: clamp(15px, 3.4vw, 20px);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.scale i:nth-child(1) {
  width: 75%;
  background: #F6D9C6;
}

.scale i:nth-child(2) {
  width: 19%;
  background: #F0A874;
}

.scale i:nth-child(3) {
  width: 6%;
  background: var(--accent);
}

.scale-marks {
  position: relative;
  height: 20px;
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(9.5px, 2.2vw, 11px);
  color: var(--accent-ink);
  margin-bottom: clamp(18px, 4vw, 26px);
}

.scale-marks span {
  position: absolute;
  transform: translateX(-50%);
}

.scale-marks span.end {
  color: var(--ink-3);
  transform: none;
}

/* closing card */
.close-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(30px, 6.5vw, 56px) clamp(24px, 6vw, 44px);
  overflow: hidden;
}

.close-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
}

.close-card h2 {
  font-size: clamp(23px, 5.6vw, 46px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 22ch;
  margin-block: clamp(14px, 4vw, 22px);
  text-wrap: balance;
}

.close-card p {
  font-size: clamp(14px, 3vw, 17px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 56ch;
}

.actions {
  margin-top: clamp(24px, 6vw, 38px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.colophon {
  margin-top: clamp(26px, 6vw, 44px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(9px, 2.2vw, 10.5px);
  letter-spacing: 0.12em;
  color: var(--ink-3);
  line-height: 1.8;
  text-transform: uppercase;
}

.fineprint {
  margin-top: clamp(16px, 4vw, 26px);
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(9.5px, 2.2vw, 10.5px);
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  max-width: 70ch;
}

/* ticker */
.ticker {
  border-block: 1px solid var(--line-soft);
  background: var(--bg-deep);
  overflow: hidden;
  padding-block: clamp(11px, 2.4vw, 14px);
}

.ticker__row {
  display: flex;
  width: max-content;
  animation: tick 46s linear infinite;
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(10.5px, 2.2vw, 12px);
  letter-spacing: 0.13em;
  color: var(--ink-3);
  white-space: nowrap;
  will-change: transform;
}

.ticker__row > span {
  padding-right: clamp(26px, 8vw, 46px);
}

.ticker__row > span.dot {
  color: var(--accent);
}

/* ==========================================================================
   Player overlays: poster, center play, end card
   ========================================================================== */

.poster,
.center-play,
.endcard {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.poster[hidden],
.center-play[hidden],
.endcard[hidden] {
  display: none;
}

.poster {
  z-index: 8;
  gap: clamp(12px, 3vh, 18px);
  background: linear-gradient(180deg, rgba(23, 27, 33, 0.28), rgba(23, 27, 33, 0.55));
  cursor: pointer;
}

.poster__play {
  width: clamp(68px, 10vw, 92px);
  height: clamp(68px, 10vw, 92px);
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(224, 87, 15, 0.45);
  transition: transform 0.18s var(--ease), background-color 0.18s;
  flex: 0 0 auto;
}

.poster:hover .poster__play,
.poster__play:hover {
  transform: scale(1.07);
  background: var(--accent-ink);
}

.poster__play svg {
  width: 32px;
  height: 32px;
  fill: #fff;
  margin-left: 4px;
}

.poster__play.small {
  width: 62px;
  height: 62px;
}

.poster__play.small svg {
  width: 24px;
  height: 24px;
}

.poster__kicker {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(9.5px, 2.2vw, 11px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.poster__title {
  font-size: clamp(24px, 5.4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  max-width: 18ch;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(23, 27, 33, 0.35);
}

.center-play {
  z-index: 7;
  background: rgba(23, 27, 33, 0.16);
  cursor: pointer;
}

.endcard {
  z-index: 9;
  gap: 10px;
  background: rgba(23, 27, 33, 0.84);
}

@supports (backdrop-filter: blur(4px)) {
  .endcard {
    background: rgba(23, 27, 33, 0.72);
    backdrop-filter: blur(5px);
  }
}

.endcard__kicker {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: clamp(9.5px, 2.2vw, 11px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.endcard__title {
  color: #F3F1EC;
  font-size: clamp(23px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  max-width: 22ch;
  text-wrap: balance;
  margin-bottom: 12px;
}

.endcard .actions {
  margin-top: 4px;
  justify-content: center;
}

.btn.light {
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.85);
}

.btn.light:hover {
  border-color: #fff;
  color: #fff;
  background: transparent;
}

/* ==========================================================================
   Watch chips + modal player
   ========================================================================== */

.card__art {
  position: relative;
}

.card__watch {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(224, 87, 15, 0.35);
  transition: background-color 0.18s, transform 0.18s;
}

.card__watch:hover {
  background: var(--accent-ink);
  transform: translateY(-1px);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0px, 2vw, 20px);
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 27, 33, 0.64);
}

@supports (backdrop-filter: blur(3px)) {
  .modal__backdrop {
    backdrop-filter: blur(3px);
  }
}

.modal__box {
  position: relative;
  width: min(1020px, 100%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.4);
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.modal__close:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

body.modal-open {
  overflow: hidden;
}

.modal [data-player][hidden] {
  display: none;
}

@media (max-width: 640px) {
  .modal {
    padding: 0;
  }

  .modal__box {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg);
  }

  .player.mini .player__pane {
    height: 86svh;
  }
}

/* mini scene internals */
.mini__set {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: 0;
  height: 74%;
  pointer-events: none;
}

.mini__set svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mini__prop {
  position: absolute;
  pointer-events: none;
}

.mini__prop svg {
  width: 100%;
  display: block;
}

.mini__jet {
  position: absolute;
  right: -4%;
  bottom: 16%;
  width: 62%;
  pointer-events: none;
}

.mini__jet svg {
  width: 100%;
  display: block;
}

.mini .figure {
  bottom: 11%;
  width: min(90px, 17%);
}

.mini .beats {
  padding: clamp(18px, 6vh, 46px) clamp(16px, 4vw, 30px) 96px;
}

.mini .beat {
  top: clamp(18px, 6vh, 46px);
  left: clamp(16px, 4vw, 30px);
  right: clamp(16px, 4vw, 30px);
}

.mini .kiosk-wrap {
  padding: 0 clamp(16px, 4vw, 40px) 96px;
}

.mini .kiosk {
  width: min(290px, 76vw);
}

@media (min-width: 900px) {
  .mini .kiosk-wrap {
    padding: 0 6% 60px;
    align-items: center;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   Keyframes
   ========================================================================== */

@keyframes tick {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes blip {
  0%,
  100% {
    opacity: 0.28;
  }
  50% {
    opacity: 1;
  }
}

@keyframes cue {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(7px);
    opacity: 1;
  }
}

@keyframes stride {
  0%,
  100% {
    transform: translateY(0) rotate(-1.1deg);
  }
  50% {
    transform: translateY(-1.5%) rotate(1.1deg);
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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

  .rv,
  .js .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ticker__row,
  .blip,
  .scroll-cue i,
  .player.playing .walk .gait {
    animation: none;
  }
}


/* ---------- site integration (clearai.info) ---------- */
a.wordmark {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.18s var(--ease);
}
a.wordmark:hover { color: var(--accent-ink); }
.wordmark__back {
  font-weight: 400;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--ink-3);
  transition: transform 0.18s var(--ease), color 0.18s var(--ease);
}
a.wordmark:hover .wordmark__back { transform: translateX(-2px); color: var(--accent-ink); }

/* Deep links and the chapter rail both scroll to a section top; keep the
   fixed masthead from covering it. */
section[id] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}
