/* ─── Apollo 11: The Last 13 Minutes ─ film-like, letterboxed ──────────────── */
@font-face { font-family: "Big Shoulders"; src: url(assets/big-shoulders-display.woff2) format("woff2"); font-weight: 100 900; font-display: block; }
@font-face { font-family: "Plex Mono"; src: url(assets/ibm-plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Plex Mono"; src: url(assets/ibm-plex-mono-600.woff2) format("woff2"); font-weight: 600; font-display: block; }

:root {
  --black: #050505;
  --bone: #ece6d8;      /* sunlit regolith / film white */
  --dust: #8d887d;      /* lunar grey */
  --sodium: #ffb03a;    /* timecode burn-in, alarm lamp */
  --dsky: #9cf09a;      /* DSKY electroluminescent digits */
  --bar: 108px;         /* letterbox bar height */
}

html.presi { background: #000; }
.slide {
  background: var(--black); color: var(--bone);
  font: 400 34px/1.35 "Plex Mono", monospace;
  overflow: hidden;
}
h1, h2 { font-family: "Big Shoulders", sans-serif; font-weight: 800; text-transform: uppercase; margin: 0; line-height: .86; letter-spacing: -.005em; }
p { margin: 0; }
em { font-style: normal; color: var(--sodium); }

/* film grain + vignette over everything, under the bars */
.slide::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background:
    radial-gradient(ellipse 80% 75% at 50% 50%, transparent 55%, rgba(0,0,0,.65) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay; opacity: .5;
}

/* letterbox bars with slate text */
.bars { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; right: 0; height: var(--bar); background: #000; }
.bars::before { top: 0; } .bars::after { bottom: 0; }
.bars span { position: absolute; z-index: 1; top: 36px; font: 600 28px/1 "Plex Mono"; letter-spacing: .18em; color: var(--dust); }
.bars span:first-child { left: 80px; }
.bars span:last-child { right: 80px; }

/* ─── clip-path wipe transition ───────────────────────────────────────────
   The incoming slide is revealed by a vertical wipe moving right→left.
   Going back, the current slide is wiped away left→right, revealing the
   previous one underneath. Only clip-path animates: no fades. */
.slide {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1s cubic-bezier(.77,0,.18,1), visibility 0s linear 1s;
  z-index: 1;
}
.slide:not(.is-active) { opacity: 1; }
.slide.is-active { z-index: 2; transition: clip-path 1s cubic-bezier(.77,0,.18,1), visibility 0s; }
.slide.is-future { clip-path: inset(0 0 0 100%); }
html[data-presi-direction="back"] .slide.is-future { z-index: 3; }

/* timecodes */
.burn { position: absolute; right: 80px; bottom: calc(var(--bar) + 34px); z-index: 7;
  font: 600 44px/1 "Plex Mono"; color: var(--sodium); letter-spacing: .04em; }
.burn span { font-size: 28px; color: var(--dust); margin-right: 10px; }
.tc { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ─── 1 cold open ─── */
canvas.moon { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.open-title { position: absolute; left: 96px; top: 160px; z-index: 7; }
.open-title .pre { font: 600 34px/1 "Plex Mono"; letter-spacing: .5em; color: var(--sodium); margin-bottom: 22px; text-transform: uppercase; }
.open-title h1 { font-size: 220px; color: var(--bone); text-shadow: 0 0 60px rgba(0,0,0,.7); }

/* ─── 2 timeline ─── */
.s-timeline { background: radial-gradient(ellipse at 70% 30%, #1a1916, var(--black) 70%); }
.events { position: absolute; left: 96px; right: 96px; top: 190px; height: 520px; }
.ev { position: absolute; inset: 0; transition: clip-path .7s cubic-bezier(.77,0,.18,1), opacity .4s; clip-path: inset(0 0 0 0); }
.ev[data-step]:not(.is-shown) { opacity: 1; clip-path: inset(0 0 0 100%); }
.ev.is-gone { opacity: 0; clip-path: inset(0 100% 0 0); }
.ev .when { font: 600 40px/1 "Plex Mono"; color: var(--sodium); }
.ev h2 { font-size: 220px; margin: 26px 0 28px -8px; white-space: nowrap; }
.ev p:last-child { font-size: 40px; max-width: 1240px; color: #cfc9bb; }
.track { position: absolute; left: 96px; right: 96px; bottom: calc(var(--bar) + 70px); height: 130px; }
.ruler { position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background:
    repeating-linear-gradient(90deg, var(--dust) 0 3px, transparent 3px calc(100% / 13)) 0 0 / 100% 40px no-repeat,
    repeating-linear-gradient(90deg, #4d4a44 0 2px, transparent 2px calc(100% / 78)) 0 22px / 100% 18px no-repeat;
  border-bottom: 3px solid var(--dust); }
.ruler::before { /* elapsed portion */
  content: ""; position: absolute; left: 0; bottom: -3px; height: 3px; background: var(--sodium);
  width: calc(var(--p, 0) * 100%); transition: width 1.4s cubic-bezier(.6,0,.2,1); }
.mark { position: absolute; bottom: 52px; width: 16px; height: 16px; margin-left: -8px; transform: rotate(45deg); background: #4d4a44; transition: background .4s; }
.mark.on { background: var(--sodium); }
.playhead { position: absolute; bottom: 0; left: calc(var(--p, 0) * 100%); width: 3px; height: 130px; background: var(--sodium);
  transition: left 1.4s cubic-bezier(.6,0,.2,1); }
.playhead b { position: absolute; bottom: 100%; left: 0; transform: translate(-50%, -12px); padding: 6px 12px; background: var(--sodium); color: #000; font-size: 32px; white-space: nowrap; }

/* ─── 3 alarm ─── */
.s-alarm { background: #070707; }
.dsky { position: absolute; left: 96px; top: 190px; display: grid; gap: 14px; }
.dsky i { font: 600 28px/1 "Plex Mono"; font-style: normal; letter-spacing: .1em; padding: 14px 18px; width: 210px; text-align: center; background: #1b1a17; color: #3a3833; }
.dsky i:first-child { background: var(--sodium); color: #1a1000; animation: lamp 1.1s steps(2, jump-none) infinite; box-shadow: 0 0 40px rgba(255,176,58,.45); }
@keyframes lamp { 50% { background: #3a2a10; color: #6b4a14; box-shadow: none; } }
.code { position: absolute; left: 390px; top: 150px; font-size: 520px; line-height: 1; color: var(--dsky); font-weight: 600;
  text-shadow: 0 0 30px rgba(156,240,154,.45), 0 0 120px rgba(156,240,154,.18); letter-spacing: .02em; }
.why { position: absolute; left: 1230px; right: 96px; top: 220px; }
.why .label { font: 600 32px/1 "Plex Mono"; letter-spacing: .3em; text-transform: uppercase; color: var(--dust); margin-bottom: 34px; }
.why p[data-step] { font-size: 38px; transition: clip-path .8s cubic-bezier(.77,0,.18,1); clip-path: inset(0 0 0 0); }
.why p[data-step]:not(.is-shown) { opacity: 1; clip-path: inset(0 0 100% 0); }
.why .go { margin-top: 44px; font: 800 64px/1 "Big Shoulders"; text-transform: uppercase; color: var(--bone); }
.why .go span { display: block; font: 400 30px/1.3 "Plex Mono"; text-transform: none; color: var(--dust); margin-bottom: 12px; }

/* ─── 4 map ─── */
.field { position: absolute; inset: 0; width: 100%; height: 100%; }
.regolith { fill: #5f5b53; }
.field .rim { fill: #a39d8f; opacity: .55; }
.field .bowl { fill: #8a8477; }
.field .shade { fill: #141311; }
.boulders circle { fill: #cfc8b8; }
.route { fill: none; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 1;
  transition: stroke-dashoffset 1.8s cubic-bezier(.6,0,.3,1); }
.route.is-shown { stroke-dashoffset: 0; }
.route.auto { stroke: var(--bone); stroke-dasharray: .012 .012; }
.route.auto.is-shown { stroke-dashoffset: 0; }
.route.auto:not(.is-shown) { opacity: 0; }
.route.manual { stroke: var(--sodium); stroke-width: 10; filter: drop-shadow(0 0 10px rgba(255,176,58,.6)); }
.x path { stroke: var(--bone); stroke-width: 8; stroke-linecap: round; }
.x { transition: opacity .3s 1.4s; }
.base circle { fill: var(--sodium); }
.base .ring { fill: none; stroke: var(--sodium); stroke-width: 4; }
.map-label { position: absolute; font: 800 72px/1 "Big Shoulders"; text-transform: uppercase; color: var(--bone); text-shadow: 0 2px 20px #000; }
.west-l { left: 1000px; top: 690px; }
.base-l { left: 300px; top: 600px; color: var(--sodium); }
.quote { position: absolute; left: 96px; right: 820px; top: 160px; margin: 0; font-size: 36px; line-height: 1.35;
  background: rgba(5,5,5,.86); padding: 28px 34px; border-left: 6px solid var(--sodium); }
.quote cite { display: block; margin-top: 14px; font-style: normal; font-size: 28px; color: var(--dust); }

/* ─── 5 touchdown ─── */
.contact { position: absolute; left: 96px; top: 170px; z-index: 7; font-size: 210px; white-space: nowrap; color: var(--bone); }
.dialogue { position: absolute; left: 96px; bottom: calc(var(--bar) + 40px); width: 680px; z-index: 7; display: grid; gap: 28px; }
.dialogue p { font-size: 36px; background: rgba(0,0,0,.72); padding: 18px 24px; transition: clip-path .7s cubic-bezier(.77,0,.18,1); clip-path: inset(0); }
.dialogue p:not(.is-shown) { opacity: 1; clip-path: inset(0 100% 0 0); }
.dialogue .who { display: block; font: 600 28px/1 "Plex Mono"; color: var(--sodium); letter-spacing: .08em; margin-bottom: 10px; text-transform: uppercase; }
