:root {
  --night: #0e1c24;
  --night-2: #16303b;
  --chalk: #edf0eb;
  --paper: #fbfcf9;
  --ink: #14242c;
  --soft: #4c6068;
  --paua: #0c6f74;
  --paua-light: #8fd6cf;
  --gold: #f2b04a;
  --rust: #a8461f;
  --line: #cdd7d2;
  --serif: 'Young Serif', 'Iowan Old Style', Georgia, serif;
  --sans: Figtree, 'Avenir Next', 'Segoe UI', sans-serif;
  --pad: clamp(1.1rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--chalk); color: var(--ink); font: 1.075rem/1.65 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -0.012em; text-wrap: balance; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
h3 { font-size: 1.35rem; line-height: 1.22; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--paua); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.wrap { width: min(100%, 1140px); margin-inline: auto; padding-inline: var(--pad); }
.narrow { width: min(100%, 760px); }
.section { padding-block: clamp(3.5rem, 9vw, 7.5rem) 0; }
.section.top { padding-top: 8.5rem; }
.lead { font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--soft); max-width: 56ch; }
.meta { display: inline-block; font-size: 0.93rem; font-weight: 600; color: var(--paua); }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 60; background: var(--gold); color: var(--night); padding: 0.6rem 1rem; border-radius: 8px; }
.skip:focus { top: 0.6rem; }

/* ---------- header and footer ---------- */
header.site { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem var(--pad); color: var(--chalk); background: rgba(14, 28, 36, 0.92); backdrop-filter: blur(10px); transition: background 0.3s ease; }
.over-film header.site.clear { background: linear-gradient(rgba(14, 28, 36, 0.62), transparent); backdrop-filter: none; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; font: 400 1.22rem var(--serif); color: inherit; text-decoration: none; }
.mark { width: 30px; height: 30px; flex: none; }
header.site nav { display: flex; gap: 1.8rem; }
header.site nav a { color: inherit; text-decoration: none; font-weight: 600; font-size: 0.98rem; padding-block: 0.3rem; border-bottom: 2px solid transparent; }
header.site nav a:hover, header.site nav a[aria-current] { border-color: var(--gold); }
.menu { display: none; }
footer.site { background: var(--night); color: #c6d3d4; padding: 4rem var(--pad) 3rem; margin-top: clamp(4rem, 10vw, 8rem); }
footer.site .foot, footer.site .small { width: min(100%, 1040px); margin-inline: auto; }
footer.site .foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(237, 240, 235, 0.16); }
footer.site .brand { color: var(--chalk); font-size: 1.6rem; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 1.6rem; align-items: center; }
footer.site a { color: var(--chalk); }
footer.site .small { font-size: 0.9rem; padding-top: 1.4rem; margin-bottom: 0; }
footer.site .small + .small { padding-top: 0.6rem; }

/* ---------- buttons and prompts ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }
.button, .prompt button { display: inline-block; font: 700 1rem var(--sans); border-radius: 999px; padding: 0.85rem 1.5rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform 0.2s ease, background 0.2s ease; }
.button:hover, .prompt button:hover { transform: translateY(-2px); }
.button.gold, .prompt button { background: var(--gold); color: var(--night); }
.button.ghost { border-color: rgba(237, 240, 235, 0.7); color: var(--chalk); }
.button.night { background: var(--night); color: var(--chalk); }
.prompt { background: var(--paper); border: 2px dashed #b98a35; border-radius: 18px; padding: 1.3rem 1.4rem; margin: 1.5rem 0; color: var(--ink); }
.prompt pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 500 1.05rem/1.6 var(--sans); margin: 0 0 1rem; }
.prompt button { padding: 0.6rem 1.2rem; font-size: 0.95rem; }

/* ---------- scroll films ----------
   Without JS, or with reduced motion: a still with the captions listed under it.
   With .is-live: a tall section, a sticky full-screen stage, frames and captions driven by scroll. */
.film { position: relative; background: var(--night); color: var(--chalk); }
.film.studio { background: #0d2f3c; }
.film .stage { position: relative; }
.film .poster { width: 100%; max-height: 80svh; object-fit: cover; }
.film canvas { display: none; }
.captions { padding: 2rem var(--pad) 1rem; display: grid; gap: 2.2rem; }
.cap { max-width: 34rem; }
.cap > * { margin-bottom: 0.4em; }
.cap .huge { font-size: clamp(3.4rem, 10vw, 8rem); line-height: 0.95; }
.cap .big { font: 400 clamp(2.4rem, 5.6vw, 4.6rem)/1.02 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
.cap .sub { font-size: clamp(1.1rem, 1.7vw, 1.35rem); max-width: 30ch; color: #e3ecea; }
.madewith { margin: 0; padding: 0 var(--pad) 1.4rem; font-size: 0.82rem; color: #b6c7c9; }
.cue, .progress { display: none; }

.film.is-live { height: calc(var(--screens) * 100svh); }
.is-live .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.is-live .poster, .is-live canvas { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover; }
.is-live canvas { display: block; }
.is-live.painted .poster { visibility: hidden; }
.is-live .stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(8, 18, 24, 0.72), transparent 48%), linear-gradient(to right, rgba(8, 18, 24, 0.35), transparent 55%); }
.is-live .captions { position: absolute; inset: 0; z-index: 2; display: grid; padding: 6rem var(--pad) clamp(3.5rem, 9vh, 6.5rem); pointer-events: none; }
.is-live .cap { --in: 1; --out: 0; grid-area: 1 / 1; align-self: end; justify-self: start; text-shadow: 0 2px 24px rgba(5, 12, 16, 0.65); visibility: hidden; }
.is-live .cap.on { visibility: visible; }
.is-live .cap.bc { justify-self: center; text-align: center; }
.is-live .cap.bc .actions { justify-content: center; }
.is-live .cap a { pointer-events: auto; text-shadow: none; }
/* word k of n arrives as --in passes k/n: rises, sharpens and fades in */
.is-live .w { --w: clamp(0, (var(--in) * (var(--n) + 2) - var(--k)) / 2, 1); display: inline-block; white-space: pre; opacity: calc(var(--w) * (1 - var(--out))); transform: translateY(calc((1 - var(--w)) * 0.4em - var(--out) * 0.2em)); filter: blur(calc((1 - var(--w)) * 9px + var(--out) * 5px)); }
.is-live .cap .sub, .is-live .cap .actions { opacity: calc(clamp(0, var(--in) * 2 - 0.7, 1) * (1 - var(--out))); }
.is-live .madewith { position: absolute; z-index: 2; right: var(--pad); bottom: 1rem; padding: 0; }
.is-live .progress { display: block; position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(237, 240, 235, 0.18); }
.progress i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; transform: scaleX(var(--p, 0)); }
.is-live .cue { display: flex; align-items: center; gap: 0.7rem; margin-top: 1.6rem; font-weight: 600; }
.cue::after { content: ''; width: 2px; height: 2.4rem; background: linear-gradient(var(--gold), transparent); transform-origin: top; animation: drip 1.9s ease-in-out infinite; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
/* the opening title builds once on load; scrolling still fades it away */
.is-live#opening .cap:first-child .w { animation: build 0.95s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; animation-delay: calc(0.2s + var(--k) * 0.11s); }
@keyframes build { from { opacity: 0; transform: translateY(0.4em); filter: blur(10px); } }

/* the opening title and the centred closing line get more room */
#opening .cap:first-child { max-width: 62rem; }
#opening .cap:first-child .huge { font-size: clamp(3.4rem, 9vw, 8rem); max-width: 8.5em; text-wrap: balance; }
#opening .cap.bc { max-width: 62rem; }

/* ---------- home sections ---------- */
.statement { padding-top: clamp(4.5rem, 11vw, 9rem); }
.statement h2 { font-size: clamp(2.5rem, 6.6vw, 5.4rem); line-height: 1.04; max-width: 22ch; }
.rules { list-style: none; padding: 0; margin: 3.5rem 0 clamp(4rem, 9vw, 7rem); display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.rules li { position: relative; padding-top: 1.4rem; }
.rules li::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--paua) 0 38%, transparent 38%), repeating-linear-gradient(90deg, #b98a35 0 10px, transparent 10px 18px); }
.rules p { color: var(--soft); margin: 0; }

.areas { list-style: none; padding: 0; margin: 2.5rem 0 clamp(4rem, 9vw, 7rem); display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.areas li > * { display: block; color: inherit; text-decoration: none; }
.areas img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; border-radius: 160px 160px 14px 14px; margin-bottom: 1rem; transition: border-radius 0.45s ease; }
.areas a:hover img, .areas a:focus-visible img { border-radius: 14px; }
.areas h3 { font-size: 1.9rem; margin-bottom: 0.2rem; }
.areas p { margin-bottom: 0.4rem; color: var(--soft); line-height: 1.45; }

.split-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 2rem; }
.split-head a { font-weight: 700; }
.pairs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem 2rem; margin-top: 2.5rem; }
.pairs h3 { margin-bottom: 0.2rem; }
.pairs > section > p { color: var(--soft); font-size: 0.98rem; margin-bottom: 0.9rem; }
.big-pairs { grid-template-columns: repeat(2, 1fr); gap: 4rem 3rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.pair img, .pair .empty { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; }
.pair .empty { border: 3px dashed #b98a35; display: grid; place-content: center; text-align: center; padding: 0.6rem; font: 400 1.05rem/1.25 var(--serif); color: #8a5f0f; }
.pair figcaption { font-weight: 700; font-size: 0.92rem; padding-top: 0.45rem; }
.pair figcaption span { font-weight: 400; color: var(--soft); }

.miss { margin-top: clamp(4.5rem, 10vw, 8rem); background: var(--gold); color: var(--night); padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.miss .wrap { display: grid; grid-template-columns: 0.85fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.miss img { border-radius: 14px; box-shadow: 0 30px 60px -28px rgba(14, 28, 36, 0.6); transform: rotate(-2deg); }
.miss figcaption { font-size: 0.88rem; margin-top: 1rem; font-weight: 600; }
.miss h2 { margin-bottom: 0; }
.miss .count { font: 400 clamp(2rem, 4.2vw, 3.3rem)/1 var(--serif); display: flex; align-items: baseline; gap: 0.3em; flex-wrap: wrap; }
.miss .count span { font-size: clamp(8rem, 22vw, 17rem); line-height: 0.9; color: var(--night); }
.miss p { max-width: 44ch; }

.cards { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem 2rem; }
.cards a { display: block; color: inherit; text-decoration: none; }
.cards img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; margin-bottom: 1.1rem; transition: transform 0.45s ease; }
.cards a:hover img { transform: translateY(-5px); }
.cards h3 { font-size: 1.6rem; margin-bottom: 0.35rem; }
.cards a:hover h3 { color: var(--paua); }
.cards p { color: var(--soft); margin-bottom: 0.3rem; }

.challenge { margin-top: clamp(4.5rem, 10vw, 8rem); background: var(--night-2); color: var(--chalk); padding-block: clamp(3.5rem, 8vw, 6rem); margin-bottom: calc(-1 * clamp(4rem, 10vw, 8rem)); }
.challenge .wrap { width: min(100%, 820px); }
.challenge .lead { color: #cfdedd; }

/* ---------- inner pages ---------- */
.pagehead { position: relative; min-height: 74svh; display: grid; align-items: end; color: var(--chalk); background: var(--night); isolation: isolate; }
.pagehead > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.pagehead::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8, 18, 24, 0.85), rgba(8, 18, 24, 0.1) 65%, rgba(8, 18, 24, 0.45)); }
.pagehead .wrap { padding-block: 8rem 3rem; }
.pagehead p { font-size: 1.25rem; max-width: 46ch; margin-bottom: 0.4rem; }

.journey { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; margin-top: 2.5rem; background: var(--paper); border-radius: 20px; overflow: hidden; color: inherit; text-decoration: none; }
.journey img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.journey > div { padding: 1.8rem 2rem 1.8rem 0; }
.journey:hover h2 { color: var(--paua); }
.journey h2 { font-size: 2.4rem; }

.upto { list-style: none; padding: 0; margin: 2rem 0 0; max-width: 760px; }
.upto li { position: relative; display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.4rem 0 1.4rem 2.4rem; }
.upto li::before { content: ''; position: absolute; left: 0; top: 0.65rem; width: 18px; height: 18px; border-radius: 50%; border: 3px dashed #b98a35; background: var(--chalk); z-index: 1; }
.upto li::after { content: ''; position: absolute; left: 8px; top: 2rem; bottom: -0.4rem; width: 2px; background: var(--line); }
.upto li:last-child::after { display: none; }
.upto li[data-state='done']::before { border: 3px solid var(--paua); background: var(--paua); }
.upto li[data-state='under-way']::before { border: 3px solid var(--paua); background: linear-gradient(90deg, var(--paua) 50%, var(--chalk) 50%); }

.wide { margin-block: 2rem; }
.wide img { width: 100%; border-radius: 14px; }
.posts { list-style: none; padding: 0; margin: 2rem 0 0; }
.posts li { border-top: 1px solid var(--line); }
.posts a { display: grid; grid-template-columns: 160px 1fr; gap: 1.6rem; align-items: center; padding: 1.5rem 0; color: inherit; text-decoration: none; }
.posts img { width: 160px; height: 120px; object-fit: cover; border-radius: 10px; }
.posts h3 { font-size: 1.55rem; margin-bottom: 0.3rem; }
.posts a:hover h3 { color: var(--paua); }
.posts p { color: var(--soft); margin-bottom: 0.2rem; }
time { font-size: 0.92rem; color: var(--soft); }

article > header { padding-top: 8.5rem; }
.crumb { font-weight: 700; font-size: 0.95rem; }
.banner { width: min(100% - 2 * var(--pad), 1060px); margin: 2.2rem auto 3rem; }
.banner img { width: 100%; max-height: 72svh; object-fit: cover; border-radius: 18px; }
.banner figcaption { font-size: 0.85rem; color: var(--soft); padding-top: 0.5rem; }
.prose { font-size: 1.15rem; }
.prose h2 { font-size: 2rem; margin-top: 2.2em; }
.guide .prose h2 { display: flex; align-items: center; gap: 1rem; }
.guide .prose h2::after { content: ''; flex: 1; height: 4px; background: repeating-linear-gradient(90deg, #b98a35 0 10px, transparent 10px 18px); opacity: 0.6; }
.prose li { margin-bottom: 0.55em; }
.prose.section { padding-top: 3.5rem; }
.next { margin-top: 4rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.next .cards { grid-template-columns: 1fr; }
.coming { display: flex; gap: 1.5rem; align-items: center; margin-top: 3.5rem; border: 3px dashed #b98a35; border-radius: 20px; padding: 1.4rem; }
.coming img { width: 110px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; filter: saturate(0.7); }
.coming h2 { font-size: 1.7rem; margin-bottom: 0.3rem; }
.coming p { margin: 0; }

/* ---------- smaller screens ---------- */
@media (max-width: 920px) {
  .areas { grid-template-columns: repeat(2, 1fr); }
  .pairs { grid-template-columns: 1fr 1fr; }
  .rules { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 720px) {
  .menu { display: block; font: 700 0.95rem var(--sans); color: inherit; background: transparent; border: 2px solid currentColor; border-radius: 999px; padding: 0.4rem 1rem; }
  .js header.site nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--night); padding: 0.5rem var(--pad) 1.2rem; }
  .js header.site.open nav { display: flex; }
  .js header.site.open { background: var(--night); }
  header.site nav a { padding-block: 0.7rem; }
  html:not(.js) .menu { display: none; }
  html:not(.js) header.site { flex-wrap: wrap; }
  .brand span { font-size: 1.1rem; }
  .pairs, .big-pairs, .cards { grid-template-columns: 1fr; }
  .miss .wrap, .journey { grid-template-columns: 1fr; }
  .journey > div { padding: 0 1.4rem 1.4rem; }
  .journey img { aspect-ratio: 16 / 9; min-height: 0; }
  .posts a { grid-template-columns: 96px 1fr; gap: 1rem; align-items: start; }
  .posts img { width: 96px; height: 96px; }
  .upto li { grid-template-columns: 1fr; gap: 0; }
  .is-live .captions { padding-bottom: 5rem; }
  .is-live .madewith { left: var(--pad); right: auto; }
}
@media (max-width: 430px) {
  .areas { gap: 1rem; }
  .coming { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
