/* arihoresh.com v7, take S2 "Leo tells the story".
   The page is one self-playing film: one fixed stage, one chapter at a time, a premium player bar. Leo, the
   promo-film rig, stands small and calm on the axis under the picture and tells the story: his words appear
   right under him like subtitles. Without JavaScript or with reduced motion the same chapters are a calm page.
   Grid: 12 columns, 1216 max (72 / 32), phone 358 (22.5 / 8). Spacing: 8 px steps. Type: 120 / 56 / 24 / 14
   (phone 56 / 32 / 18 / 14), at most four sizes per screen. The narration (24/34, phone 18/27, Inter 500) is the
   most readable text on screen in every chapter (Ari's pick of film 2, 12 Oct ~17:15). Radius 8 / 16 / full. Borders 1 px or none.
   One soft lift, only on each chapter's hero media.
   Vertical zones (set by js/scenes.js layout() as custom properties, desktop 1440 x 900):
     picture band 32-596 | Leo 620-716 | his words 740-812 | the bar 828-876 */

@font-face { font-family: "Cal Sans"; src: url("../fonts/cal-sans.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #fbfaff;
  --stage: #f1eefc;
  --ink: #16122b;
  --ink-2: #57536f;
  --ink-3: #8a87a0;
  --line: rgba(22, 18, 43, 0.12);
  --white: #ffffff;
  --violet: #4a2fa0;
  --rim: rgba(74, 47, 160, 0.28);
  --accent: var(--violet);
  --r-s: 8px;
  --r-m: 16px;
  --lift: 0 1px 2px rgba(22, 18, 43, 0.06), 0 24px 48px -24px rgba(22, 18, 43, 0.32);
  --settle: cubic-bezier(0.22, 1, 0.36, 1);
  --t-name: 120px;
  --t-display: 56px;
  --lh-display: 62px;
  --t-story: 24px;
  --lh-story: 34px;
  --w-story: 500;
  --t-small: 14px;
  --story-top: 740px;
  --story-h: 72px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, canvas, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
b { font-weight: inherit; }
::selection { background: rgba(74, 47, 160, 0.18); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.skip-link { position: absolute; left: 16px; top: -64px; z-index: 40; padding: 8px 16px; background: var(--ink); color: var(--white); border-radius: var(--r-s); text-decoration: none; font-size: 14px; }
.skip-link:focus { top: 16px; }

/* ------------------------------------------------------------------ type */
.name {
  font-family: "Cal Sans", "Inter", sans-serif;
  font-weight: 600;
  font-size: var(--t-name);
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-align: center;
}
.display {
  font-family: "Cal Sans", "Inter", sans-serif;
  font-weight: 600;
  font-size: var(--t-display);
  line-height: var(--lh-display);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.small, .meta { font-size: var(--t-small); line-height: 20px; font-weight: 500; }
.meta { color: var(--accent); }
.muted { color: var(--ink-3); }
.go {
  --u: 1;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: calc(var(--u) * 100%) 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 1px;
}
.go:hover { background-size: 100% 2px; }
.arr { font-family: "Cal Sans", "Inter", sans-serif; font-weight: 600; margin-left: 0.3em; }
.sep { margin: 0 8px; color: var(--ink-3); }

/* the slate under a centered picture: the name, then one small row */
.slate { display: flex; flex-direction: column; align-items: center; text-align: center; }
.slate .row { margin-top: 8px; font-size: var(--t-small); line-height: 20px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.slate .go { font-size: var(--t-small); line-height: 20px; }

/* ------------------------------------------------------------------ media */
.frame {
  position: relative;
  border-radius: var(--r-m);
  overflow: hidden;
  background: #ece9f6;
  isolation: isolate;
  box-shadow: 0 0 0 1px var(--line);
}
.frame.lift { box-shadow: 0 0 0 1px var(--line), var(--lift); }
.lift { box-shadow: var(--lift); }
.tag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); color: var(--ink);
  font-size: 14px; font-weight: 500; line-height: 20px;
  white-space: nowrap;
  pointer-events: none;
}
.tag-r { left: auto; right: 16px; }
/* Dor's remaster has its own card in the top-right corner: his "Remaster pilot" tag sits just under it */
.pair--dor .half--after .tag-r { top: 25%; }
.px { image-rendering: pixelated; }
.play {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: 72px; height: 72px; margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: var(--white);
  color: var(--accent);
  display: grid; place-items: center;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.28), 0 0 0 9px var(--rim), 0 12px 32px -12px rgba(22, 18, 43, 0.6);
  transition: transform 200ms var(--settle);
}
.play svg { width: 28px; height: 28px; margin-left: 3px; }
.play:hover { transform: scale(1.05); }

/* ================================================================== THE CHAPTERS (rest frames) */

/* 1. Hi */
.hi-shot { width: 800px; display: flex; flex-direction: column; align-items: center; }
.portrait {
  position: relative;
  width: 336px; height: 336px;
  margin: 57px 17px 17px;          /* 40 under the name + the 17 px rim, all inside the measured block */
  border-radius: 50%;
  overflow: hidden;
  background: #d9d4ea;
  box-shadow: 0 0 0 16px var(--bg), 0 0 0 17px var(--rim), var(--lift);
}
.portrait-cam, .portrait-cam img { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait-cam { transform-origin: 60.5% 40.6%; }
.portrait-cam img { object-fit: cover; }

/* 2 + 8. a centered hero frame with its slate (800 x 450 + 24 + 90 = 564) */
.frame-shot { width: 800px; display: flex; flex-direction: column; align-items: center; }
.frame-shot > .frame { width: 800px; height: 450px; flex: none; }
.frame-shot > .slate { margin-top: 24px; }
.ems-frame { background: var(--stage); }
.ems-frame .cover {
  position: absolute; left: 50%; top: 50%;
  width: 256px; height: 362px; margin: -181px 0 0 -128px;
  border-radius: var(--r-s);
  box-shadow: var(--lift);
  transform-origin: 50% 50%;
}
.mq-frame { background: #2b3a1f; }
.mq-key {
  position: absolute; left: -80px; top: -45px;
  width: 960px; height: 540px; max-width: none;
  image-rendering: pixelated;
}

/* the motion pieces (js/pieces.js): each fills its hero frame's slot and paints its own stage. Its still stays as
   the key frame without JavaScript (and if a piece ever fails to load). */
.piece-slot { display: none; }
html.js .piece-slot { display: block; position: absolute; inset: 0; z-index: 1; border-radius: inherit; overflow: hidden; }
html.js .piece-frame.has-piece .piece-key { visibility: hidden; }
html.no-js .js-only { display: none; }
.yt-frame { background: #222; }
.yt-key { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lion-frame { background: #2a1a10; }
.lion-frame .lion-art { position: absolute; left: 0; top: -176px; width: 800px; height: 800px; max-width: none; }
.loop-frame { background: var(--bg); }
.loop-key { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; justify-items: center; padding: 32px; text-align: center; }
.loop-key .station { width: 240px; display: flex; flex-direction: column; align-items: center; }
.loop-key .cover { width: 160px; height: 226px; }
.loop-key .station-cap { width: 240px; }
.hv-frame { background: var(--stage); }
.lion-row .credit { color: var(--ink-3); }
.free { margin-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.free-row { color: var(--ink-2); white-space: nowrap; }
.free-row a { color: var(--violet); font-weight: 600; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; white-space: nowrap; }
.free-row a:hover { background-size: 100% 2px; }
.free-row .sep { margin: 0 4px; }
.free-k { margin-right: 4px; }
.figure { font-family: "Cal Sans", "Inter", sans-serif; font-weight: 600; font-size: var(--t-display); line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); }
.cover { width: 208px; height: 294px; border-radius: var(--r-s); box-shadow: var(--lift); object-fit: cover; }
.station-cap { margin-top: 16px; color: var(--ink-2); text-wrap: balance; }

/* 3 + 10 + 11. the letterbox on Pavia's bridge: the same box as the hero frame, closed to 800 x 320 */
.lb-shot { position: relative; width: 800px; height: 564px; }
.letterbox {
  position: absolute; left: 0; top: 120px;     /* centered in the picture band; Harvey's tilt lifts it to 51 */
  width: 800px; height: 320px;
  display: block;
  border-radius: var(--r-m);
  overflow: hidden;
  background: #f4f3f8;
  box-shadow: 0 0 0 1px var(--line), var(--lift);
  isolation: isolate;
}
.letterbox .strip { position: absolute; left: -400px; top: -20px; width: 1440px; height: 340px; max-width: none; }
.letterbox .door { position: absolute; left: -640px; top: -324px; width: 1440px; height: 682px; max-width: none; opacity: 0; }
.lb-harvey .door { opacity: 1; }
.lb-harvey .strip { opacity: 0; }
.lv-shot .letterbox { top: 51px; }
.lv-slate { position: absolute; left: 0; right: 0; top: 395px; }
.hv-note { margin-top: 8px; white-space: nowrap; }
.lv-live { display: inline; }

/* 4. YouTube: a hero frame (the youtube-live piece) and its slate, as chapters 2 and 8 */

/* 5. AI builds the tools: the wipe, its stem and knob (Leo pulls it) */
.why-shot { width: 1216px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.why-h { white-space: nowrap; }
.why-h span { display: block; }
.teacher {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 352px;
  padding: 3px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  background: rgba(22, 18, 43, 0.02);
}
.teacher label {
  height: 34px;
  display: grid; place-items: center;
  border-radius: 999px;
  font-size: 14px; font-weight: 500; line-height: 20px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  transition: background-color 200ms var(--settle), color 200ms var(--settle), box-shadow 200ms var(--settle);
}
.teacher label:hover { color: var(--ink); }
#t-dor:checked ~ .teacher label[for="t-dor"],
#t-dan:checked ~ .teacher label[for="t-dan"] { background: var(--white); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(22, 18, 43, 0.08); }
#t-dor:focus-visible ~ .teacher label[for="t-dor"],
#t-dan:focus-visible ~ .teacher label[for="t-dan"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.wipe {
  position: relative;
  width: 592px; height: 333px;
  margin-top: 16px; margin-bottom: 40px;     /* the stem (16) and the knob (24) live under the frame */
  border-radius: var(--r-m);
  --split: 50%;
  --stem: 16px;
}
.pair { position: absolute; inset: 0; border-radius: var(--r-m); overflow: hidden; isolation: isolate; background: #fff; transition: opacity 240ms var(--settle), visibility 0s linear 0s; }
.half { position: absolute; inset: 0; margin: 0; }
.half video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; transform-origin: 50% 50%; }
.half--after { clip-path: inset(0 0 0 var(--split)); }
#t-dor:checked ~ .wipe .pair--dan,
#t-dan:checked ~ .wipe .pair--dor { opacity: 0; visibility: hidden; transition: opacity 240ms var(--settle), visibility 0s linear 240ms; }
.wipe-line { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; margin-left: -1px; background: var(--white); z-index: 3; pointer-events: none; box-shadow: 0 0 0 1px rgba(22, 18, 43, 0.06); }
.wipe-stem { position: absolute; left: 0; top: 100%; width: 2px; height: var(--stem); background: rgba(74, 47, 160, 0.45); }
.wipe-knob {
  position: absolute; left: 50%; top: calc(100% + var(--stem));
  width: 24px; height: 24px; margin-left: -12px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--rim), 0 2px 6px rgba(22, 18, 43, 0.16);
}
.wipe-range {
  position: absolute; left: 0; top: 0; z-index: 4;
  width: 100%; height: calc(100% + 40px);
  margin: 0; opacity: 0; cursor: ew-resize;
  -webkit-appearance: none; appearance: none;
  touch-action: none;
}
.wipe:has(.wipe-range:focus-visible) .wipe-knob { outline: 2px solid var(--accent); outline-offset: 4px; }
.why-cap { display: none; }

/* 6. Daniela's lessons: three equal frames, captions on one baseline */
.dl-shot { width: 1216px; text-align: center; }
.dl-head { display: flex; flex-direction: column; align-items: center; }
.dl-head .display { margin-top: 16px; }
.dl-row { margin-top: 32px; }
.dl-track { display: grid; grid-template-columns: repeat(3, 384px); column-gap: 32px; }
.dl-item .frame { width: 384px; height: 216px; }
.dl-item .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; }
.dl-item .small { margin-top: 16px; color: var(--ink-2); }
.dl-dots { display: none; }

/* a tapped clip plays on with its own small pill */
.clip-pill {
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  height: 32px; padding: 0 12px 0 10px;
  display: none; align-items: center; gap: 6px;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.94); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line);
  font-size: 13px; font-weight: 500; line-height: 1;
  cursor: pointer;
}
.clip.is-detached .clip-pill { display: inline-flex; }
.clip-pill svg { width: 14px; height: 14px; }
.clip-pill .ic-play { display: none; }
.clip.is-held .clip-pill .ic-play { display: block; }
.clip.is-held .clip-pill .ic-pause { display: none; }

/* 7, 8, 9, 10: hero frames with the lionbot-discord, mindquest-quiz, funding-loop and harvey-app pieces */

/* 12. say hi: the end credits on Leo's stage paper */
.scene--credits { background: var(--stage); }
.credits-shot { width: 1216px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 2; }
.mail-row { display: flex; align-items: center; justify-content: center; gap: 16px; padding-left: 0; }
.email { color: var(--violet); text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 100% 1px; background-position: 0 92%; background-repeat: no-repeat; white-space: nowrap; }
.email:hover { background-size: 100% 2px; }
.pill {
  height: 32px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--ink-2);
  font-size: 14px; font-weight: 500; line-height: 1;
  cursor: pointer;
  transition: color 160ms var(--settle), box-shadow 160ms var(--settle);
}
.pill:hover { color: var(--violet); box-shadow: 0 0 0 1px rgba(74, 47, 160, 0.4); }
.copy { display: inline-grid; place-items: center; }
.copy > span { grid-area: 1 / 1; transition: opacity 160ms var(--settle); }
.copy .copy-b { opacity: 0; }
.copy.is-copied .copy-a { opacity: 0; }
.copy.is-copied .copy-b { opacity: 1; }
.copy.is-copied { color: var(--violet); }
.leo-slot { width: 100%; height: var(--leo-h, 423px); margin-top: 24px; }
.doors { width: 1008px; margin-top: 24px; display: grid; grid-template-columns: repeat(5, 176px); column-gap: 32px; }
.doors a { display: flex; flex-direction: column; align-items: center; text-decoration: none; padding: 0; border-radius: var(--r-s); }
.door-name { font-size: 16px; font-weight: 600; line-height: 24px; color: var(--ink); }
.door-addr { font-size: 14px; font-weight: 500; line-height: 20px; color: var(--ink-2); transition: color 160ms var(--settle); }
.doors a:hover .door-addr { color: var(--violet); }
.replay { margin-top: 24px; padding: 0 16px 0 12px; }
.credits-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; display: none; }
html.js .credits-canvas { display: block; }
.credit-line { color: var(--ink-3); }

/* ================================================================== THE FILM (JavaScript + motion) */
html.player, html.player body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.player .film { position: fixed; inset: 0; overflow: hidden; overflow: clip; background: var(--bg); touch-action: pinch-zoom; }
html.player .scene { position: absolute; inset: 0; visibility: hidden; }
html.player .scene.on { visibility: visible; }
/* a scene off screen hides ALL of its descendants, even those a motion piece set visible inline (and so none of
   them can take a tap) */
html.player .scene:not(.on), html.player .scene:not(.on) * { visibility: hidden !important; }
/* chapter 9: the piece itself lists the free projects as links; the frame keeps the hero frames' top edge */
html.player .loop-shot { height: 564px; justify-content: flex-start; }
/* phone: every hero frame's shot is the same height (LionBot's slate has two rows), so every frame shares one top edge */
@media (max-width: 760px) { html.player .frame-shot { min-height: 547px; justify-content: flex-start; } html.player .loop-shot { height: 547px; } }
html.player .free { visibility: hidden !important; }
html.player .scene--credits:not(.on) { background: none; }
html.player .stage { position: absolute; inset: 0; transform-origin: 0 0; }
html.player .shot { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
html.player .story {
  position: absolute; left: 50%; top: var(--story-top);
  width: min(960px, 100% - 32px); height: var(--story-h);
  transform: translateX(-50%);
  text-align: center;
  font-size: var(--t-story); line-height: var(--lh-story); font-weight: var(--w-story); letter-spacing: -0.005em; color: var(--ink);
  pointer-events: none;
}
html.player .story .line {
  position: absolute; left: 0; right: 0; top: 0;
  text-wrap: balance;
  opacity: 0;
  pointer-events: auto;
}
html.player .story .nm { font-weight: 600; }
html.player .story .credit-line { position: absolute; left: 0; right: 0; top: calc(var(--lh-story) + 8px); opacity: 0; font-weight: 500; letter-spacing: 0; }
html.player .why-b { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html.player.dor-cap #why .why-cap { display: block; position: absolute; left: 0; right: 0; top: 0; text-wrap: balance; color: var(--ink-2); }
html.player.dor-cap #why .line { visibility: hidden !important; }
html.player .scene--credits.pulling { background: none; }
html.player:not(.story-on) .bar { display: none; }
html.player .letterbox .strip, html.player .letterbox .door { left: 0; top: 0; }
html.player .yt-frame, html.player .wipe, html.player .dl-item .frame { transform-origin: 0 0; }
html.player.op-lock .skip-link { display: none; }
@keyframes bar-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
html.player.story-on .bar { animation: bar-in 420ms var(--settle) both; }
.why-a { display: block; }

.narrator { display: none; }
html.player .narrator { display: block; position: fixed; left: 0; top: 0; width: 100%; height: 240px; z-index: 6; pointer-events: none; }
.iris-rim { display: none; }
html.player .iris-rim { display: block; position: fixed; left: 0; top: 0; width: 0; height: 0; border-radius: 50%; box-shadow: 0 0 0 1px var(--rim); opacity: 0; z-index: 7; pointer-events: none; }

/* a tap on the empty picture: a brief white disc on the axis */
.tapflash { display: none; }
html.player .tapflash {
  display: grid; place-items: center;
  position: fixed; left: 50%; top: 0; z-index: 8;
  width: 56px; height: 56px; margin-left: -28px;
  border-radius: 50%;
  background: var(--white); color: var(--ink);
  box-shadow: 0 0 0 1px var(--rim), 0 12px 32px -12px rgba(22, 18, 43, 0.45);
  opacity: 0; pointer-events: none;
}
.tapflash svg { grid-area: 1 / 1; }
.tapflash .tf-play { margin-left: 2px; }
.tapflash.is-play .tf-pause, .tapflash.is-pause .tf-play { display: none; }
@keyframes tapflash { 0% { opacity: 0; transform: scale(0.9); } 18% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
html.player .tapflash.go-flash { animation: tapflash 600ms var(--settle) both; }

/* ------------------------------------------------------------------ the player bar */
.bar { display: none; }
html.player .bar {
  position: fixed; left: 50%; bottom: 24px; z-index: 20;
  width: 648px; height: 48px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px;
  padding: 0 4px 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 1px var(--line), 0 8px 24px -16px rgba(22, 18, 43, 0.4);
}
.bar-btn {
  height: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 160ms var(--settle), color 160ms var(--settle);
}
.bar-btn:hover { background: rgba(22, 18, 43, 0.06); }
.bar-play { width: 40px; flex: none; }
.bar-play svg { display: none; }
.bar[data-state="playing"] .i-pause,
.bar[data-state="paused"] .i-play,
.bar[data-state="ended"] .i-replay { display: block; }
.bar[data-state="paused"] .bar-play { background: var(--violet); color: var(--white); }
.bar[data-state="paused"] .bar-play svg { margin-left: 2px; }
.bar-skip { flex: none; padding: 0 12px 0 16px; font-size: 14px; font-weight: 500; line-height: 20px; color: var(--ink-2); }
.bar-skip:hover { color: var(--ink); }
.bar-time { flex: none; width: 92px; font-size: 14px; font-weight: 500; line-height: 20px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bar-time .t-now { color: var(--ink); }
.bar[data-state="paused"] .bar-time .t-now { color: var(--violet); }
.bar-now { display: none; }
.scrub { position: relative; flex: 1; height: 32px; cursor: pointer; touch-action: none; outline: none; }
.scrub:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 8px; }
.segs { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; display: flex; gap: 4px; }
.seg { position: relative; height: 4px; border-radius: 2px; background: rgba(22, 18, 43, 0.12); overflow: hidden; transition: background-color 140ms var(--settle); }
.seg-fill { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.scrub:hover .seg { background: rgba(22, 18, 43, 0.16); }
.seg.is-hover { background: rgba(22, 18, 43, 0.28) !important; }
.scrub-tip {
  position: absolute; bottom: calc(100% + 14px); left: 0;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: var(--r-s);
  background: var(--ink); color: var(--white);
  font-size: 14px; font-weight: 500; line-height: 20px;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 140ms var(--settle);
}
.scrub.show-tip .scrub-tip { opacity: 1; }

/* ================================================================== READING PAGE (no JavaScript / reduced motion) */
/* poster B (the shared opening module, still) is the page's first screen, in the flow; the story follows */
html.still #opening-root { position: relative; height: 100vh; height: 100svh; }
html.still #opening-root .op-layer { position: absolute; }
html.still.op-lock, html.still.op-lock body { overflow: visible; }
/* the poster above already shows the name and the portrait: chapter 1 keeps its h1 for readers, not a second picture */
html:not(.player) .hi-shot { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html:not(.player) #ari { padding-top: 0; }
html:not(.player) .lv-name { display: none; }
html:not(.player) .film { padding: 72px 16px 96px; }
html:not(.player) .scene { padding-top: 96px; display: flex; flex-direction: column; align-items: center; }
html:not(.player) .scene:first-child { padding-top: 0; }
html:not(.player) .shot { max-width: 100%; }
html:not(.player) .story { width: min(800px, 100%); margin: 32px auto 0; text-align: center; font-size: var(--t-story); line-height: var(--lh-story); font-weight: var(--w-story); color: var(--ink); text-wrap: balance; }
html:not(.player) .story .line { display: inline; }
html:not(.player) .story .line--film { display: none; }
html:not(.player) .story .credit-line { margin-top: 16px; }
html:not(.player) .why-cap { display: block; margin-top: 16px; font-size: 16px; line-height: 24px; color: var(--ink-2); }
html:not(.player) #t-dan:checked ~ * .why-cap, html:not(.player) .why-cap { display: block; }
html:not(.player) .why-h span { display: block; }
html:not(.player) .why-h { white-space: normal; text-wrap: balance; }
html:not(.player) .narrator, html:not(.player) .iris-rim, html:not(.player) .tapflash { display: none; }
html:not(.player) .scene--credits { position: relative; margin-top: 96px; padding: 64px 0; border-radius: 0; }
html:not(.player) .lb-shot { height: 320px; }
html:not(.player) .lv-shot { height: 462px; }
html:not(.player) .letterbox { top: 0; }
html:not(.player) .lv-slate { top: 344px; }
html:not(.player) .replay { display: none; }
html.no-js .credits-shot .leo-slot { display: none; }
/* no JavaScript: the why shows the two posters as mirrored halves */
html.no-js .wipe { width: 1216px; max-width: 100%; height: auto; margin-bottom: 0; }
html.no-js .pair { position: static; display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; overflow: visible; background: none; border-radius: 0; }
html.no-js .half { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-m); overflow: hidden; box-shadow: var(--lift); }
html.no-js .half--after { clip-path: none; }
html.no-js .half--after .tag-r { left: 16px; right: auto; }
html.no-js #t-dor:checked ~ .wipe .pair--dan,
html.no-js #t-dan:checked ~ .wipe .pair--dor { display: none; }
html.no-js .wipe.lift { box-shadow: none; }
html.no-js .wipe-line, html.no-js .wipe-range { display: none; }
html.still .wipe { margin-bottom: 40px; }

/* ================================================================== PHONE: a vertical film for the thumb */
@media (max-width: 760px) {
  :root {
    --t-name: 56px; --t-display: 32px; --lh-display: 35px; --t-story: 18px; --lh-story: 27px; --t-small: 14px;
    --story-h: 81px;
  }
  .tag { top: 8px; left: 8px; padding: 2px 8px; }
  .tag-r { left: auto; right: 8px; }

  /* as poster B on the phone: the portrait on top, the name under it */
  .hi-shot { width: 358px; flex-direction: column-reverse; }
  .portrait { width: 240px; height: 240px; margin: 13px 13px 45px; box-shadow: 0 0 0 12px var(--bg), 0 0 0 13px var(--rim), var(--lift); }

  /* the phone's hero frames are 4:5 (358 x 448): a vertical film, the media as large as the thumb zone allows */
  .frame-shot { width: 358px; }
  .frame-shot > .frame { width: 358px; height: 448px; }
  .frame-shot > .slate { margin-top: 16px; }
  .ems-frame .cover { width: 200px; height: 283px; margin: -141.5px 0 0 -100px; }
  .mq-key { left: -301px; top: -46px; }
  .lion-frame .lion-art { left: -121px; top: -76px; width: 600px; height: 600px; }
  .loop-key { grid-template-columns: 1fr; padding: 16px; }
  .loop-key .station { width: 300px; }
  .loop-key .cover { width: 80px; height: 113px; }
  .loop-key .station-cap { width: 300px; }
  .lion-row .lion-a, .lion-row .lion-b { display: block; }
  .lion-row .sep-ab { display: none; }
  .lion-row .lion-b { margin-top: 0; }
  .free-row { white-space: normal; text-wrap: balance; max-width: 340px; }

  .lb-shot { width: 358px; height: 547px; }
  .letterbox { top: 64px; width: 358px; height: 320px; }        /* Pavia: centered on the 4:5 hero frame it closes from */
  .letterbox .strip { left: -470px; }
  .letterbox .door { left: -1082px; }
  .lv-shot .letterbox { top: 0; }
  .lv-slate { top: 344px; }
  .hv-note { white-space: normal; max-width: 300px; text-wrap: balance; }

  .play { width: 56px; height: 56px; margin: -28px 0 0 -28px; box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.28), 0 0 0 7px var(--rim), 0 8px 24px -8px rgba(22, 18, 43, 0.6); }
  .play svg { width: 22px; height: 22px; }

  .why-shot { width: 358px; }
  .teacher { width: 100%; }
  .wipe { width: 358px; height: 201px; }
  .why-h span { display: inline; }
  .why-h .why-a { display: inline-block; }

  .dl-shot { width: 358px; }
  .dl-head .display { margin-top: 8px; }
  .dl-row { margin-top: 24px; }
  .dl-track { grid-template-columns: 358px; row-gap: 24px; }
  .dl-item .frame { width: 358px; height: 201px; }
  .dl-dot { width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
  .dl-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(22, 18, 43, 0.18); transition: background-color 160ms var(--settle); }
  .dl-dot[aria-pressed="true"]::before { background: var(--ink); }
  html.player .dl-row { position: relative; }
  html.player .dl-track { display: block; position: relative; height: 237px; }
  html.player .dl-item { position: absolute; left: 0; top: 0; width: 358px; }
  html.player .dl-dots { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }



  .credits-shot { width: 358px; }
  .mail-row { flex-direction: column; gap: 8px; }
  .email { font-size: 28px; line-height: 35px; }
  .doors { width: 358px; grid-template-columns: 175px 175px; column-gap: 8px; row-gap: 8px; }
  .doors li:nth-child(3) { grid-column: 1 / -1; justify-self: center; width: 175px; }
  .door-name { font-size: 14px; line-height: 20px; }
  .leo-slot { margin-top: 24px; }

  html.player .bar {
    left: 16px; right: 16px; bottom: 12px;
    width: auto; height: 60px;
    transform: none;
    display: grid;
    grid-template-columns: 40px 1fr auto;
    grid-template-rows: 20px 40px;
    gap: 0;
    padding: 0;
    background: none;
    box-shadow: none;
  }
  html.player .scrub { grid-column: 1 / -1; grid-row: 1; height: 20px; }
  html.player .bar-play { grid-column: 1; grid-row: 2; margin-left: -4px; }
  html.player .bar-time { display: none; }
  html.player .bar-now { display: block; grid-column: 2; grid-row: 2; align-self: center; text-align: center; font-size: 14px; font-weight: 500; line-height: 20px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
  html.player .bar[data-state="paused"] .bar-now { color: var(--violet); }
  html.player .bar-skip { grid-column: 3; grid-row: 2; margin-right: -12px; }
  html.player .segs { gap: 3px; }
  html.player .scrub-tip { bottom: calc(100% + 10px); }

  html:not(.player) .film { padding: 48px 16px 64px; }
  html:not(.player) .scene { padding-top: 64px; }
  html:not(.player) .scene:first-child { padding-top: 0; }
  html:not(.player) .scene--credits { margin-top: 64px; padding: 48px 0; }
  html.no-js .pair { grid-template-columns: 1fr; row-gap: 16px; }
  html:not(.player) .lv-shot { height: 475px; }
  .figure { font-size: 32px; line-height: 35px; }
}

@media (prefers-reduced-motion: reduce) {
  .go, .pill, .play, .bar-btn, .copy > span, .pair, .seg, .scrub-tip { transition: none !important; }
}

/* ================================================================== RELEASE 12 Oct: the site's notice bar + legal links
   The "No cookies, no tracking" bar (/notice/notice.css, added by the site assembler) rests at the bottom of poster B,
   above the opening's layer (z-index 50), and is held (hidden) through the opening and the story (js/player.js):
   it never covers Leo's words or the player bar. --notice-room = its height + its offset (the band poster B leaves
   it when needed); notice.css: 40 px pill, 76 px two-row card at 560 px and below. */
:root {
  --notice-offset: calc(24px + env(safe-area-inset-bottom, 0px));
  --notice-room: calc(64px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 560px) {
  :root {
    --notice-offset: calc(8px + env(safe-area-inset-bottom, 0px));
    --notice-room: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}
html .ah-notice { z-index: 60; }
.notice-probe { position: fixed; left: 0; bottom: 0; width: 1px; height: var(--notice-room); visibility: hidden; pointer-events: none; }
/* Privacy and Terms stay one click away for everyone (no JavaScript, and after the bar is closed): the credit line */
.credit-line a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.credit-line a:hover { color: var(--violet); }
.credit-line .sep { margin: 0 6px; }
html.player .story .credit-line a { pointer-events: auto; }
