/* Content pages: the game's landscape behind editorial type. The camera moves per section
   (js/pages.js); the text is plain HTML and reads fine with no script, font or WebGL. */

body.page { background: var(--night); color: var(--ink); overflow-x: hidden; }
body.page #world { z-index: 0; }

/* Legibility: a wash down the reading column (left on desktop, full width on phones). */
body.page::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--veil), .86) 0%, rgba(var(--veil), .62) 38%, rgba(var(--veil), .12) 70%, rgba(var(--veil), 0) 100%);
}
@media (max-width: 860px) {
  body.page::after { background: linear-gradient(180deg, rgba(var(--veil), .25) 0%, rgba(var(--veil), .72) 45%, rgba(var(--veil), .82) 100%); }
}

.page__wrap { position: relative; z-index: 2; padding: 0 var(--margin); }
.page__col { max-width: 44rem; }

/* Bar */
.page__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0 10px; position: relative; z-index: 3; }
.page__bar .brand { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.page__bar .brand svg { width: 26px; height: 26px; }
.page__bar .brand__word { font-family: var(--font-display); font-style: italic; font-size: 1.35rem; }
.page__bar nav { display: flex; gap: 20px; align-items: center; font-size: .9375rem; }
.page__bar nav a { color: var(--ink); text-decoration: none; opacity: .78; }
.page__bar nav a:hover, .page__bar nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--ember); }
@media (max-width: 560px) { .page__bar nav a:not(.page__play) { display: none; } }

/* Hero: a title sequence over the landscape. */
.page__hero { min-height: calc(100svh - 70px); display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(40px, 10vh, 120px); }
.page__kicker { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-bottom: 18px; }
.page h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.9rem, 8vw, 7rem); line-height: .92; letter-spacing: -.025em; max-width: 17ch; text-wrap: balance; }
.page h1 em, .page h2 em { font-style: italic; }
.page .lede { margin-top: 26px; font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.5; max-width: 34rem; color: var(--ink); }
.page__scroll { margin-top: 38px; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); display: inline-flex; align-items: center; gap: 10px; }
.page__scroll::before { content: ""; width: 38px; height: 1px; background: currentColor; }

/* Sections: each one is a shot. */
.page section.scene { padding: clamp(80px, 18vh, 200px) 0; }
.page section.scene--tall { min-height: 90svh; display: flex; flex-direction: column; justify-content: center; }
.page h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: .95; letter-spacing: -.02em; max-width: 16ch; margin-bottom: 26px; text-wrap: balance; }
.page h3 { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.5rem; margin: 30px 0 8px; }
.page p, .page li, .page dd { font-size: 1.0625rem; line-height: 1.7; color: color-mix(in srgb, var(--ink) 88%, transparent); max-width: 38rem; }
.page p + p { margin-top: 14px; }
.page ul, .page ol { margin: 12px 0 0 1.2em; }
.page li + li { margin-top: 8px; }
.page a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.page a:hover { text-decoration-color: var(--ember); }
.page strong { color: var(--ink); font-weight: 600; }
.page .mono { font-family: var(--font-mono); font-size: .92em; }
.page .num { font-family: var(--font-display); font-variation-settings: "opsz" 20; }
.page table { width: 100%; max-width: 38rem; border-collapse: collapse; margin-top: 16px; font-size: 1rem; }
.page th, .page td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.page th { font-weight: 600; color: var(--ink); }
.page dl { max-width: 40rem; }
.page dt { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; color: var(--ink); margin-top: 26px; }
.page dd { margin: 6px 0 0; }

/* A pull figure: one big number with a caption. */
.figure { display: flex; align-items: baseline; gap: 18px; margin: 34px 0 6px; }
.figure__n { font-family: var(--font-display); font-variation-settings: "opsz" 20; font-size: clamp(4.5rem, 12vw, 9rem); line-height: .8; color: var(--ink); }
.figure__c { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .04em; color: var(--mute); max-width: 16rem; line-height: 1.45; }
.figures { display: flex; flex-wrap: wrap; gap: 8px 56px; }

/* Credits: set like the end of a film. Role right-aligned to a centre line, name left. */
.credits-roll { margin-top: 34px; display: grid; gap: 0; max-width: 46rem; }
.credits-roll .c { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); column-gap: 28px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.credits-roll .c__role { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; text-align: right; color: var(--mute); }
.credits-roll .c__name { font-size: 1.0625rem; color: var(--ink); }
.credits-roll .c__name a { text-decoration-color: var(--line-strong); }
.credits-roll .c--lead .c__name { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1; }
@media (max-width: 560px) {
  .credits-roll .c { grid-template-columns: 1fr; row-gap: 2px; }
  .credits-roll .c__role { text-align: left; font-size: 1rem; }
  .credits-roll .c--lead { row-gap: 10px; }
}

/* "Also by the maker": two cards, type-led, the ember only on hover. */
.alsoby { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 18px; margin-top: 30px; max-width: 52rem; }
.card {
  display: block; padding: 26px 24px 24px; text-decoration: none !important; color: var(--ink);
  border: 1px solid var(--line-strong); background: rgba(var(--veil), .55);
  transition: border-color .4s, transform .6s cubic-bezier(.16, 1, .3, 1), background .4s;
}
.card:hover, .card:focus-visible { border-color: var(--ember); transform: translateY(-4px); background: rgba(var(--veil), .75); }
.card__k { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.card__t { display: block; font-family: var(--font-display); font-size: 2.1rem; line-height: 1; margin: 12px 0 10px; }
.card__d { display: block; font-size: .975rem; line-height: 1.55; color: color-mix(in srgb, var(--ink) 82%, transparent); }
.card__go { display: inline-block; margin-top: 16px; font-size: .9375rem; color: var(--ink); border-bottom: 1px solid var(--ember); }

.page .cta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.page .cta .btn { text-decoration: none; }

.page__foot { position: relative; z-index: 2; margin: 40px 0 0; padding: 22px 0 max(26px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: .875rem; color: var(--mute); }
.page__foot p { font-size: .875rem; color: var(--mute); }
.page__foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 8px; }

/* Motion: headings rise through a mask, blocks ease up. Only when JS is running (html.js). */
.page .mask { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.page .ln { display: block; }
html.js .page h1 .ln, html.js .page h2 .ln { transform: translateY(105%); transition: transform 1.25s cubic-bezier(.16, 1, .3, 1); }
html.js .page h1.in .ln, html.js .page h2.in .ln { transform: none; }
html.js .page .rise { opacity: 0; transform: translateY(26px); transition: opacity 1.1s cubic-bezier(.16, 1, .3, 1), transform 1.1s cubic-bezier(.16, 1, .3, 1); }
html.js .page .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .page h1 .ln, html.js .page h2 .ln, html.js .page .rise { transform: none !important; transition: opacity .4s !important; }
}
