:root {
  --bg: #0c1011;
  --ink: #f5f5f1;
  --muted: #b9c0bd;
  --dim: #7f8b8c;
  --accent: #ff7527;
  --teal: #00ced1;
  --surface: rgba(13, 32, 42, .72);
  --line: rgba(102, 220, 225, .17);
  --pad: clamp(20px, 4.2vw, 84px);
  --top: 76px;
  --tx: 0;
  --ty: 0;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 500 17px/1.55 Manrope, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* warm light off the left edge, cool off the right */
.glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vw 90vh at -12% 62%, rgba(202, 90, 38, .30), transparent 68%),
    radial-gradient(58vw 95vh at 112% 38%, rgba(28, 143, 161, .30), transparent 68%);
}
#stage3d { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1s ease; }
.has3d #stage3d { opacity: .95; }
.has3d[data-vis="0"] #stage3d { opacity: .42; }
.shade { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1s ease, background .6s ease;
  background: linear-gradient(90deg, rgba(12, 16, 17, .94) 0%, rgba(12, 16, 17, .72) 38%, rgba(12, 16, 17, 0) 70%); }
.has3d .shade { opacity: 1; }
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 40; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--teal)); transition: width .25s ease; }

/* header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--top);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 var(--pad);
  background: rgba(12, 16, 17, .78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(237, 246, 250, .07);
}
.mark { font-weight: 800; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; max-width: 22ch; line-height: 1.3; }
.switch { display: flex; padding: 4px; border-radius: 999px; background: rgba(17, 27, 33, .91); border: 1px solid rgba(237, 246, 250, .2); }
.switch button { padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #bac6c9; transition: background .2s, color .2s; }
.switch button[aria-pressed="true"] { background: rgba(220, 236, 240, .14); color: #eef3f3; }
.right { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.count { font-size: 13px; font-weight: 700; color: var(--muted); padding: 8px 10px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.count:hover { color: var(--ink); }

.btn {
  display: inline-block; padding: 15px 24px; border-radius: 3px;
  background: var(--accent); color: #140a04; font-weight: 800; font-size: 15px; text-decoration: none;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.small { padding: 11px 18px; font-size: 13px; background: var(--teal); color: #04181a; }
.link { font-weight: 700; font-size: 15px; text-underline-offset: 5px; text-decoration-color: var(--teal); }

/* scenes */
main { position: relative; z-index: 1; }
.scene {
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--top) + 28px) var(--pad) 72px;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center; gap: clamp(28px, 5vw, 96px);
  position: relative;
}
.scene:not(.has-visual) { grid-template-columns: minmax(0, 1fr); }
.copy { max-width: 760px; position: relative; }
.copy.wide { max-width: 1320px; width: 100%; margin: 0 auto; }

.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin-bottom: 18px; }
.display { font-weight: 700; font-size: clamp(44px, 6.6vw, 112px); line-height: .98; letter-spacing: -.045em; text-wrap: balance; }
.k-title .display, .k-closing .display { font-size: clamp(40px, 5.2vw, 88px); }
.headline { font-weight: 700; font-size: clamp(28px, 3.5vw, 56px); line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; max-width: 24ch; }
.copy.wide .headline { max-width: 34ch; }
.subhead { margin-top: 22px; font-size: clamp(17px, 1.45vw, 22px); line-height: 1.5; color: var(--muted); max-width: 58ch; text-wrap: pretty; }
.l-section .subhead { font-size: clamp(20px, 2vw, 30px); color: var(--ink); line-height: 1.3; letter-spacing: -.015em; max-width: 26ch; }
.numeral {
  position: absolute; left: -.04em; top: -.62em; z-index: -1;
  font-weight: 800; font-size: clamp(150px, 21vw, 340px); line-height: 1; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(102, 220, 225, .2);
}
.actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.source { margin-top: 26px; font-size: 12px; color: var(--dim); max-width: 90ch; overflow-wrap: anywhere; }

.bullets { list-style: none; margin-top: 30px; display: grid; gap: 14px; max-width: 62ch; }
.bullets li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.45; }
.bullets .n, .idx { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--teal); padding-top: .35em; font-variant-numeric: tabular-nums; }

/* tilted film panel */
.visual { position: relative; perspective: 1100px; justify-self: center; width: 100%; max-width: 640px; }
.panel { transform-style: preserve-3d; transform: rotateY(calc(-17deg + var(--tx) * 5deg)) rotateX(calc(var(--ty) * -4deg)) rotateZ(2.4deg); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.panel.tall { width: min(62%, 44vh); margin: 0 auto; }
.frame {
  position: relative; border-radius: 4px; overflow: hidden; background: #08141e;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(237, 246, 250, .12), 46px 30px 120px -40px rgba(0, 206, 209, .3), -46px 30px 120px -40px rgba(255, 117, 39, .26);
}
.frame video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.panel.tall video { aspect-ratio: 9 / 16; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: center; }
.pair .panel.tall { width: 100%; }
.pair .credit { grid-column: 1 / -1; }
.pair .panel.tall video { aspect-ratio: 3 / 4; }
.pair .panel:first-child { transform: rotateY(calc(-17deg + var(--tx) * 5deg)) rotateZ(-1.5deg) translateX(8%) scale(.9); filter: saturate(.75) brightness(.8); }
.pair .panel:last-child { transform: rotateY(calc(-17deg + var(--tx) * 5deg)) rotateZ(2.4deg) translateX(-8%); z-index: 2; }
.tag { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: rgba(8, 20, 30, .78); border: 1px solid rgba(237, 246, 250, .2); }
.credit { margin-top: 30px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* stats */
.stats { margin-top: 44px; display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 24px 24px 26px; border-radius: 4px; background: var(--surface); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stat .value { font-weight: 700; font-size: clamp(30px, 3.3vw, 56px); line-height: 1; letter-spacing: -.04em; overflow-wrap: anywhere; }
.stat.lead .value { color: var(--teal); }
.stats.n4 .stat.lead { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; padding: 28px; }
.stats.n4 .stat.lead .value { font-size: clamp(40px, 7.4vw, 124px); }
.stats.n4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat .label { font-size: 16px; line-height: 1.4; color: var(--ink); max-width: 30ch; }
.delta { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #ffb17e; }

/* cards */
.cards { margin-top: 44px; display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.n1 { grid-template-columns: minmax(0, 760px); }
.cards.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 980px; }
.cards.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards.n5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cards.n5 .card { grid-column: span 2; }
.cards.n5 .card:nth-child(4) { grid-column: 2 / span 2; }
.card { padding: 24px; border-radius: 4px; background: var(--surface); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h3 { font-size: clamp(18px, 1.5vw, 23px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.card p { font-size: 16px; color: var(--muted); line-height: 1.5; }
.cstat { font-weight: 700; font-size: clamp(28px, 2.8vw, 46px); line-height: 1; letter-spacing: -.04em; color: var(--teal); }

/* table */
.tablewrap { margin-top: 36px; overflow-x: auto; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; }
caption { text-align: left; padding: 16px 20px 0; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
th, td { text-align: left; padding: 14px 20px; vertical-align: top; line-height: 1.4; }
thead th { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
tbody tr { border-top: 1px solid var(--line); }
tbody th { font-weight: 600; color: var(--muted); width: 34%; }
td.us { color: var(--ink); font-weight: 700; background: rgba(0, 206, 209, .07); width: 26%; }
tbody td:last-child { color: var(--muted); }

/* timeline */
.timeline { list-style: none; margin-top: 56px; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 22px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: linear-gradient(90deg, var(--accent), var(--teal)); opacity: .6; }
.timeline li { position: relative; padding-top: 34px; display: flex; flex-direction: column; gap: 10px; }
.dot { position: absolute; left: 0; top: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--teal); }
.when { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #ffb17e; }
.what { font-size: clamp(16px, 1.35vw, 20px); font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }

/* reveal */
.js .scene .r { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.js .scene.in .r { opacity: 1; transform: none; }
.js .scene.in .r:nth-child(2) { transition-delay: .06s; }
.js .scene.in .r:nth-child(3) { transition-delay: .12s; }
.js .scene.in .r:nth-child(4) { transition-delay: .18s; }
.js .scene.in .r:nth-child(5) { transition-delay: .24s; }
.js .scene .visual { opacity: 0; transition: opacity .9s ease .1s; }
.js .scene.in .visual { opacity: 1; }

/* pager, notes, overview */
.pager { position: fixed; right: var(--pad); bottom: 22px; z-index: 30; display: none; gap: 8px; }
.pager button { height: 42px; min-width: 42px; padding: 0 14px; border-radius: 999px; background: rgba(17, 27, 33, .91); border: 1px solid rgba(237, 246, 250, .2); font-size: 13px; font-weight: 700; }
.pager button:hover { border-color: var(--teal); }
.keys { position: fixed; left: var(--pad); bottom: 30px; z-index: 30; display: none; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--dim); }

.drawer { position: fixed; z-index: 50; right: 0; top: 0; bottom: 0; width: min(440px, 100vw); padding: 26px 28px; overflow-y: auto; background: #0b1519; border-left: 1px solid var(--line); box-shadow: -30px 0 80px rgba(0, 0, 0, .5); }
.drawer header, .overview header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.drawer header button, .overview header button { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; }
.drawer p { font-size: 17px; line-height: 1.7; color: #dfe5e2; }

.overview { position: fixed; inset: 0; z-index: 60; overflow-y: auto; padding: 28px var(--pad) 60px; background: rgba(9, 13, 14, .97); }
.overview ol { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 4px; }
.overview li button { width: 100%; height: 100%; text-align: left; padding: 18px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.overview li button:hover, .overview li button.cur { border-color: var(--teal); }
.overview .n { font-size: 12px; font-weight: 800; color: var(--teal); letter-spacing: .1em; }
.overview .e { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.overview .t { font-size: 16px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
[hidden] { display: none !important; }

/* present: one slide per screen */
body.present { overflow: hidden; height: 100vh; }
body.present .scene { position: fixed; inset: 0; display: none; overflow-y: auto; min-height: 0; padding-bottom: 84px; }
body.present .scene.on { display: grid; }
body.present .pager { display: flex; }
body.present .keys { display: block; }
body.story .pager { display: flex; }
body.story .pager #prev, body.story .pager #next { display: none; }

@media (max-width: 900px) {
  :root { --top: 64px; }
  body { font-size: 16px; }
  .top { grid-template-columns: 1fr auto; }
  .mark { display: none; }
  .switch { justify-self: start; }
  .switch button { padding: 8px 14px; }
  .scene { grid-template-columns: minmax(0, 1fr) !important; padding-top: calc(var(--top) + 20px); padding-bottom: 96px; gap: 30px; align-content: safe center; }
  table { min-width: 0; }
  caption { padding: 16px 18px 6px; }
  thead { display: none; }
  tbody tr { display: block; padding: 14px 18px; }
  tbody th, tbody td, td.us { display: block; width: auto; padding: 0; background: none; }
  tbody th { color: var(--ink); font-weight: 700; margin-bottom: 8px; }
  tbody td, tbody td.us { padding-left: 62px; position: relative; margin-top: 4px; }
  tbody td::before { content: attr(data-l); position: absolute; left: 0; top: .25em; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
  td.us::before { color: var(--teal); }
  .has-visual .visual { order: -1; max-width: 460px; }
  .panel, .pair .panel:first-child, .pair .panel:last-child { transform: none; filter: none; }
  .pair { gap: 10px; }
  .panel.tall { width: min(54%, 34vh); }
  .numeral { display: none; }
  .stats, .stats.n3, .stats.n4 { grid-template-columns: 1fr 1fr; }
  .stats.n3 .stat.lead { grid-column: 1 / -1; }
  .cards, .cards.n2, .cards.n4, .cards.n5 { grid-template-columns: 1fr; }
  .has3d #stage3d { opacity: .5; }
  .has3d[data-vis="0"] #stage3d { opacity: .22; }
  .shade { background: rgba(12, 16, 17, .45); }
  .cards.n5 .card, .cards.n5 .card:nth-child(4) { grid-column: auto; }
  .card, .stat { padding: 18px; }
  .timeline { grid-template-columns: 1fr; gap: 0; margin-top: 36px; }
  .timeline::before { left: 6px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: linear-gradient(180deg, var(--accent), var(--teal)); }
  .timeline li { padding: 0 0 24px 34px; }
  .keys { display: none !important; }
  .pager { right: 50%; transform: translateX(50%); bottom: 14px; }
  body.story .pager { display: none; }
  body.present::after { content: ""; position: fixed; inset: auto 0 0 0; height: 96px; z-index: 20; pointer-events: none; background: linear-gradient(0deg, rgba(12, 16, 17, .98) 55%, rgba(12, 16, 17, 0)); }
  body.present .scene { padding-bottom: 110px; }
  .credit { margin-top: 14px; }
}
@media (max-width: 480px) {
  .btn.small { padding: 10px 12px; }
  .count { padding: 8px 4px; }
  .stats, .stats.n3, .stats.n4 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .scene .r, .js .scene .visual, .panel { transition: none; }
}
