/* ==========================================================================
   Burnt Out Games — Site styles
   Reads only from tokens.css. Do not hard-code colour or size values here.

   Surfaces are three real brand colours: Ink, Firewood, Warm Peach. There is
   no near-white page background any more.

   Per-game theming: game components read --g-bg, --g-surface, --g-text,
   --g-muted, --g-accent, --g-button, --g-on-button, --g-border, written inline
   by the build from each game's `theme` block in content/games/*.json.
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-on-peach);
  background: var(--bg-peach);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

:root {
  --g-bg: var(--ink);
  --g-surface: var(--ash);
  --g-text: var(--warm-peach);
  --g-muted: var(--peach-dim);
  --g-accent: var(--golden-ember);
  --g-button: var(--red-deep);
  --g-on-button: var(--white);
  --g-border: var(--ash-hi);
}

/* --- Skip link ------------------------------------------------------------ */
.skip-link {
  position: absolute; left: var(--s-4); top: var(--s-4);
  z-index: var(--z-skip);
  padding: var(--s-3) var(--s-5);
  background: var(--red-deep); color: var(--white);
  font-weight: 700; border-radius: var(--r-pill);
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* --- Focus ---------------------------------------------------------------- */
:focus-visible { outline: 3px solid var(--fiery-red); outline-offset: 2px; border-radius: var(--r-sm); }
.on-ink :focus-visible, .on-firewood :focus-visible,
.game :focus-visible, .hero :focus-visible { outline-color: var(--golden-ember); }

/* --- Typography ----------------------------------------------------------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-heading);
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: 0; }
h4, h5, h6 { font-family: var(--font-body); font-weight: 700; font-size: var(--fs-body); line-height: 1.3; }

p, li { text-wrap: pretty; }
p + p { margin-top: var(--s-4); }

.lead { font-size: var(--fs-lead); line-height: 1.55; }
.small { font-size: var(--fs-small); }
.measure { max-width: var(--measure); }

.eyebrow {
  font-family: var(--font-label); font-size: var(--fs-label); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--red-900); display: block; margin-bottom: var(--s-3);
}
.on-ink .eyebrow, .on-firewood .eyebrow, .game .eyebrow, .hero .eyebrow { color: var(--golden-ember); }
.showcase .eyebrow { color: var(--g-accent); }

a { color: var(--red-900); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--firewood); }
.on-ink a:not(.btn), .on-firewood a:not(.btn) { color: var(--link-bright); }
.on-ink a:not(.btn):hover, .on-firewood a:not(.btn):hover { color: var(--light-glow); }

/* --- Surfaces ------------------------------------------------------------- */
.on-ink      { background: var(--bg-ink);      color: var(--text-on-ink); }
.on-firewood { background: var(--bg-firewood); color: var(--text-on-firewood); }
.on-peach    { background: var(--bg-peach);    color: var(--text-on-peach); }
.on-ink h1, .on-ink h2, .on-ink h3,
.on-firewood h1, .on-firewood h2, .on-firewood h3 { color: var(--light-glow); }

.muted { color: var(--firewood-dim); }
.on-ink .muted, .on-firewood .muted { color: var(--peach-dim); }

/* --- Layout --------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--max-width); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-pad); position: relative; }
.section--tight { padding-block: clamp(2.25rem, 4.5vw, 3.75rem); }
.section--flush { padding: 0; margin: 0; line-height: 0; }

.stack > * + * { margin-top: var(--s-5); }
.stack-sm > * + * { margin-top: var(--s-3); }
.stack-lg > * + * { margin-top: var(--s-7); }

.grid { display: grid; gap: var(--s-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.section-head { max-width: var(--measure); margin-bottom: var(--s-6); }
.center { text-align: center; }
.center .section-head, .center .measure { margin-inline: auto; }

.figure img { border-radius: var(--r-md); width: 100%; }
/* The team shot is a wide room photo: crop in so the people, not the ceiling
   and the carpet, fill the frame. */
.figure--crop img { aspect-ratio: 5 / 4; object-fit: cover; object-position: center 46%; }
.figure figcaption { margin-top: var(--s-3); }
.band-photo { width: 100%; height: clamp(320px, 42vw, 620px); object-fit: cover; object-position: center 44%; display: block; }

/* --- Patterns -------------------------------------------------------------
   One fixed motif height (--pattern-motif) everywhere, so a pattern reads at
   the same scale in a tall divider and a thin seam. Scaling the motif to the
   strip height was the bug: short strips rendered a tiny, noisy pattern.

   .band  a full-height divider between sections.
   .seam  a thin rule of the same pattern, used to close a surface.
   Neither ever carries text, so the vivid patterns can be fully saturated.
   -------------------------------------------------------------------------- */
.band, .seam {
  background-image: var(--pattern-url);
  background-size: auto var(--pattern-motif);
  background-repeat: repeat-x;
  background-position: center;
  background-color: var(--ink);
}
.band { height: var(--band-h); }
.seam { height: var(--seam-h); }

/* --- Buttons --------------------------------------------------------------
   Every hover does the same thing: the fill deepens (or the outline fills in)
   and the label stays legible. Contrast is checked at rest AND on hover.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: var(--s-3) var(--s-6);
  font-weight: 700; font-size: var(--fs-body); line-height: 1.2;
  text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn__icon { width: 1.2em; height: 1.2em; flex: 0 0 auto; }

/* Solid. Hover deepens the fill: white stays at 8.4:1. */
.btn--primary { background: var(--red-deep); color: var(--white); border-color: var(--red-deep); }
.btn--primary:hover { background: var(--red-800); border-color: var(--red-800); color: var(--white); }

/* Outline. Hover fills with its own border colour and inverts the label. */
.btn--ghost { background: transparent; color: var(--firewood); border-color: var(--firewood); }
.btn--ghost:hover { background: var(--firewood); color: var(--warm-peach); border-color: var(--firewood); }
.on-ink .btn--ghost, .on-firewood .btn--ghost, .hero .btn--ghost {
  color: var(--warm-peach); border-color: var(--warm-peach);
}
.on-ink .btn--ghost:hover, .on-firewood .btn--ghost:hover, .hero .btn--ghost:hover {
  background: var(--warm-peach); color: var(--ink); border-color: var(--warm-peach);
}

/* Themed, same two behaviours in the current game's colours. */
.btn--game { background: var(--g-button); color: var(--g-on-button); border-color: var(--g-button); }
.btn--game:hover { background: var(--g-bg); color: var(--g-accent); border-color: var(--g-accent); }
.btn--game-ghost { background: transparent; color: var(--g-text); border-color: var(--g-accent); }
.btn--game-ghost:hover { background: var(--g-accent); color: var(--g-bg); border-color: var(--g-accent); }

.btn--lg { min-height: 56px; padding: var(--s-4) var(--s-7); font-size: var(--fs-lead); }
.btn--sm { min-height: 44px; padding: var(--s-2) var(--s-4); font-size: var(--fs-small); }

/* --- Badges --------------------------------------------------------------- */
.badges { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.badge {
  display: inline-block;
  font-family: var(--font-label); font-size: var(--fs-label); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.3em 0.85em; border-radius: var(--r-pill); white-space: nowrap;
}
.badge--dev   { background: var(--golden-ember); color: var(--firewood); }
.badge--out   { background: var(--warm-peach);   color: var(--firewood); }
.badge--price { background: transparent; color: var(--g-text); border: 1px solid var(--g-accent); }
.badge--genre { background: transparent; color: var(--g-muted); border: 1px solid var(--g-border); }
.badges--onpeach .badge--price { color: var(--firewood); border-color: var(--red-900); }
.badges--onpeach .badge--genre { color: var(--firewood-dim); border-color: var(--firewood-dim); }

/* --- Header --------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: var(--z-header); background: var(--ink); border-bottom: 1px solid var(--ash-hi); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); min-height: 72px; }
.site-header__logo { display: flex; align-items: center; flex: 0 0 auto; }
.site-header__logo img { height: 48px; width: auto; }  /* artwork ~112px wide, above the 108px minimum */

.nav { display: flex; align-items: center; gap: var(--s-2); }
.nav a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--font-label); font-weight: 700; font-size: var(--fs-small);
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--warm-peach); text-decoration: none;
  padding: var(--s-2) var(--s-3); border-radius: var(--r-sm);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav a:not(.btn):hover { color: var(--ink); background: var(--warm-peach); }
.nav a[aria-current="page"] { color: var(--golden-ember); }

.nav-toggle { display: none; background: none; border: 0; padding: var(--s-2); cursor: pointer; }
.nav-toggle svg { width: 28px; height: 28px; stroke: var(--warm-peach); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--ash-hi);
    padding: var(--s-3) var(--gutter) var(--s-5);
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a:not(.btn) { padding: var(--s-4) var(--s-3); font-size: var(--fs-body); }
  .nav .btn { margin-top: var(--s-3); }
}

/* --- Hero ------------------------------------------------------------------
   A seamless scrolling band of all three games. hero-strip.jpg is generated to
   tile horizontally (its left and right edges differ by 3/255), so the marquee
   loops forever with no visible join.
   -------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: var(--warm-peach);
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(3rem, 6vw, 5rem);
  /* The strip is 2280x1100 and scales to the page width, so at 100vw wide it
     stands 48.24vw tall. Matching the hero to that means the art always fills
     the section — a fixed height left a dead band under the collage. */
  min-height: min(48.24vw, 720px);
  display: flex; align-items: center;
}
.hero__strip {
  position: absolute; inset: 0; z-index: -3;
  background-image: url('/assets/hero-strip.jpg');
  background-repeat: repeat-x;
  /* Width-driven: the three panels always span exactly one screen and crop
     vertically, so the framing is the same on any monitor. Height-driven
     sizing meant a wide window showed more panels than a narrow one. */
  background-size: 100vw auto;
  animation: hero-scroll var(--hero-scroll) linear infinite;
}
@keyframes hero-scroll {
  from { background-position: 0 center; }
  to   { background-position: -100vw center; }
}

/* Neutral darkening only. The previous orange tint over EXO's violet art is
   exactly what this replaces. */
/* Darkens only where the words are. The right two thirds stay open so the art
   is actually legible, which the previous flat 0.8-0.9 veil killed. */
.hero__veil {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(100deg, rgba(12,6,3,0.90) 0%, rgba(12,6,3,0.72) 34%, rgba(12,6,3,0.18) 68%, rgba(12,6,3,0.10) 100%),
    linear-gradient(to top, rgba(12,6,3,0.55) 0%, rgba(12,6,3,0) 42%);
}

/* The white flame, as in the first iteration. */
/* The mark is deliberately huge and runs off the bottom-right corner. It sits
   at z-index -1, so the headline and the buttons pass straight over it. */
.hero__mark {
  position: absolute; right: 2.5%; bottom: 0; z-index: -1;
  width: min(30vw, 380px); opacity: 0.20; pointer-events: none;
}
@media (max-width: 860px) { .hero__mark { right: -6%; bottom: 0; width: 52vw; opacity: 0.18; } }
.hero__inner { position: relative; z-index: 1; width: 100%; }
.hero__title {
  font-family: var(--font-display); font-size: var(--fs-display);
  line-height: var(--lh-display); letter-spacing: -0.015em;
  text-transform: uppercase; color: var(--light-glow);
  margin-bottom: var(--s-5);
}
.hero__title .flare { color: var(--fiery-red); display: block; }
.hero__sub { font-size: var(--fs-lead); max-width: min(var(--measure-fixed), 100%); color: var(--warm-peach); }
.hero__actions { margin-top: var(--s-7); }

@media (max-width: 1000px) {
  .hero { min-height: min(70vh, 560px); }
  .hero__strip { background-size: auto 100%; }
  @keyframes hero-scroll {
    from { background-position: 0 center; }
    to   { background-position: calc(-2280 / 1100 * 100vh) center; }
  }
}

@media (prefers-reduced-motion: reduce) { .hero__strip { animation: none; } }

/* --- Featured showcase ----------------------------------------------------- */
.showcase {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--g-bg); color: var(--g-text);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.showcase__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--g-focus, center); z-index: -2; }
.showcase__veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(95deg, var(--g-bg) 0%, var(--g-bg) 40%, transparent 105%);
}
/* One column, with the flame floated into the corner rather than taking a grid
   track. A side column squeezed the copy to 714px and forced the block taller
   than it needed to be. */
.showcase__inner { position: relative; display: block; }
.showcase__copy { max-width: min(var(--measure-fixed), 100%); }
.showcase__title { margin: 0 0 var(--s-4); }
.showcase__logo { width: auto; height: auto; max-width: min(300px, 60vw); max-height: clamp(78px, 12vw, 140px); object-fit: contain; object-position: left center; }
.showcase__logo--text { font-family: var(--font-display); font-size: var(--fs-h1); color: var(--g-text); }
.showcase__tagline { font-size: var(--fs-lead); font-weight: 700; color: var(--g-accent); margin-bottom: var(--s-4); }
/* The flame restyled for each game is iconography, not key art: it sits small
   in a corner rather than standing in for the game's own artwork. */
/* Every game flame gets the SAME square box whatever its source aspect.
   Burning Out uses the standard BOG logomark, which is taller than the two
   square PNGs, so width-only sizing rendered it noticeably larger. */
.gmark {
  position: absolute; right: var(--s-5); top: var(--s-5); z-index: 2;
  width: clamp(30px, 3.6vw, 44px); height: clamp(30px, 3.6vw, 44px);
  object-fit: contain; object-position: center;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.55));
}
.showcase__mark {
  position: absolute; right: 0; top: 0;
  width: clamp(56px, 6vw, 84px); height: clamp(56px, 6vw, 84px);
  object-fit: contain; object-position: center;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,0.5));
}
@media (max-width: 640px) { .showcase__mark { width: 48px; height: 48px; } }
@media (max-width: 899px) { .showcase__mark { display: none; } }

/* --- Game capsule ---------------------------------------------------------- */
.gcard {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--g-bg); color: var(--g-text);
  border: 1px solid var(--g-border); border-radius: var(--r-lg);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.gcard__art { position: relative; display: block; aspect-ratio: 16 / 7; overflow: hidden; background: var(--g-surface); }
.gcard__cover { width: 100%; height: 100%; object-fit: cover; object-position: var(--g-focus, center); }
.gcard__scrim { position: absolute; inset: 0; background: linear-gradient(to top, var(--g-bg) 2%, rgba(0,0,0,0.26) 55%, rgba(0,0,0,0.04) 100%); }
.gcard__logo {
  position: absolute; left: var(--s-5); bottom: var(--s-5);
  width: auto; height: auto; max-width: min(220px, 52%); max-height: 44%;
  object-fit: contain; object-position: left bottom;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.55));
}
.gcard__logo--text { font-family: var(--font-display); font-size: var(--fs-h2); color: var(--g-text); width: auto; text-transform: uppercase; }
.gcard__body { padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-4); flex: 1; }
.gcard__title { font-family: var(--font-display); font-size: var(--fs-h3); text-transform: uppercase; }
.gcard__title a { color: var(--g-text); text-decoration: none; }
.gcard__title a:hover { color: var(--g-accent); }
.gcard__blurb { color: var(--g-text); }
.gcard__foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.gcard__more { color: var(--g-accent); font-weight: 700; font-size: var(--fs-small); }
.gcard__more:hover { color: var(--g-text); }

.art-plate {
  position: relative; width: 100%; height: 100%;
  background-color: var(--g-surface); background-image: var(--pattern-url);
  background-size: auto var(--pattern-motif);
  display: grid; place-items: center;
}
.art-plate img { width: 26%; max-width: 110px; opacity: 0.9; }

/* --- Game page ------------------------------------------------------------- */
.game { background: var(--g-bg); color: var(--g-text); }
.game a:not(.btn) { color: var(--g-accent); }
.game a:not(.btn):hover { color: var(--g-text); }
.game h1, .game h2, .game h3 { color: var(--g-text); }

.ghero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(3rem, 7vw, 6rem);
  min-height: min(56vh, 540px); display: flex; align-items: flex-end;
}
.ghero__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--g-focus, center); z-index: -2; }
.ghero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--g-bg) 4%, rgba(0,0,0,0.52) 54%, rgba(0,0,0,0.16) 100%),
    linear-gradient(95deg, rgba(0,0,0,0.5), rgba(0,0,0,0) 72%);
}
.ghero__inner { position: relative; width: 100%; }
.ghero__title { margin: var(--s-5) 0 var(--s-4); }
.ghero__logo {
  width: auto; height: auto; max-width: min(380px, 70vw);
  max-height: clamp(88px, 14vw, 160px); object-fit: contain; object-position: left bottom;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.6));
}
.ghero__logo--text { font-family: var(--font-display); font-size: var(--fs-h1); }
.ghero__tagline { font-size: var(--fs-lead); font-weight: 700; color: var(--g-accent); max-width: 44ch; }
.ghero__pitch { max-width: var(--measure); margin-top: var(--s-4); }

.gbody { padding-block: var(--section-pad); }
.game-layout { display: grid; gap: var(--s-7); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .game-layout { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--s-8); } }
.game-layout .prose { max-width: none; }

.gpanel {
  background: var(--g-surface); border: 1px solid var(--g-border);
  border-radius: var(--r-md); padding: var(--s-6);
  position: sticky; top: calc(72px + var(--s-5));
}
@media (max-width: 959px) { .gpanel { position: static; } }
.gpanel__head { font-family: var(--font-display); font-size: var(--fs-h3); text-transform: uppercase; margin-bottom: var(--s-5); }
.gpanel__links { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--g-border); }
.gpanel__links h3 { font-family: var(--font-label); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.14em; color: var(--g-accent); margin-bottom: var(--s-3); }
.gpanel__links ul, .link-list { list-style: none; padding: 0; }
.gpanel__links li + li, .link-list li + li { margin-top: var(--s-3); }

.game-facts { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
.game-facts dt { font-family: var(--font-label); font-size: var(--fs-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--g-accent); margin-bottom: var(--s-1); }
.game-facts dd { margin: 0; font-weight: 500; }

.gshots { padding-block: 0 var(--section-pad); }
.gshots__head { font-family: var(--font-display); font-size: var(--fs-h2); margin-bottom: var(--s-6); }
.shot-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.shot-grid img { border-radius: var(--r-md); width: 100%; aspect-ratio: 16/10; object-fit: cover; }

/* --- Cards (devlog) -------------------------------------------------------- */
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--firewood); color: var(--warm-peach);
  border-radius: var(--r-md); box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.card .eyebrow { color: var(--golden-ember); }
.card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.card__title { font-family: var(--font-display); font-size: var(--fs-h3); text-transform: uppercase; }
.card__title a { color: var(--light-glow); text-decoration: none; }
.card__title a:hover { color: var(--golden-ember); }
.card__foot { margin-top: auto; padding-top: var(--s-3); }
.card__foot a { color: var(--golden-ember); font-weight: 700; }

/* --- Prose ----------------------------------------------------------------- */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { font-size: var(--fs-h2); margin-top: var(--s-7); }
.prose h3 { font-size: var(--fs-h3); margin-top: var(--s-6); }
.prose ul, .prose ol { padding-left: var(--s-5); }
.prose li + li { margin-top: var(--s-2); }
.prose img { border-radius: var(--r-md); }
.prose blockquote { border-left: 4px solid var(--fiery-red); padding-left: var(--s-5); font-size: var(--fs-lead); font-style: italic; }
.game .prose blockquote { border-left-color: var(--g-accent); }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: rgba(83,33,17,0.14); padding: 0.15em 0.4em; border-radius: var(--r-sm); }
.on-ink .prose code, .on-firewood .prose code, .game .prose code { background: rgba(255,255,255,0.10); }
.prose pre { background: var(--ink); color: var(--warm-peach); padding: var(--s-5); border-radius: var(--r-md); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 2px solid var(--peach-line); margin-block: var(--s-7); }

/* --- Tables & blocks ------------------------------------------------------- */
.fact-table { width: 100%; border-collapse: collapse; }
.fact-table th, .fact-table td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--peach-line); vertical-align: top; }
.on-ink .fact-table th, .on-ink .fact-table td,
.on-firewood .fact-table th, .on-firewood .fact-table td { border-bottom-color: var(--ash-hi); }
.fact-table th { font-family: var(--font-label); font-size: var(--fs-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; white-space: nowrap; width: 1%; }
.table-scroll { overflow-x: auto; }

.copy-block { background: var(--light-glow); border: 1px solid var(--peach-line); border-radius: var(--r-md); padding: var(--s-5); }
.on-ink .copy-block, .on-firewood .copy-block { background: var(--ash); border-color: var(--ash-hi); }
.fact-title { font-family: var(--font-display); font-size: var(--fs-h3); text-transform: uppercase; }

/* --- Contact form ---------------------------------------------------------- */
.form { display: grid; gap: var(--s-4); max-width: 34rem; }
.field { display: grid; gap: var(--s-2); }
.field label { font-family: var(--font-label); font-size: var(--fs-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; }
.field input, .field textarea, .field select {
  width: 100%; padding: var(--s-3) var(--s-4);
  background: var(--light-glow); color: var(--firewood);
  border: 2px solid var(--peach-line); border-radius: var(--r-sm);
  transition: border-color var(--dur) var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--red-deep); }
.field textarea { min-height: 9rem; resize: vertical; }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__note { font-size: var(--fs-small); color: var(--firewood-dim); }
.form__status { font-weight: 700; }
.form__status[data-state="error"] { color: var(--red-900); }

/* --- Team ------------------------------------------------------------------ */
.team-grid {
  list-style: none; padding: 0; display: grid;
  gap: var(--s-5) var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr));
}

/* --- Team card ---------------------------------------------------------------
   Modelled on the old site's team page: the portrait fills the card, fades to
   black at the bottom, and the name sits ON the photo, set on a slight angle.
   Links are icon buttons bottom-left, the role reads bottom-right.
   -------------------------------------------------------------------------- */
.person {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: 18px; background: #0E0906;
  border: 2px solid var(--golden-ember);
  box-shadow: var(--shadow-card);
}
.person__photo { aspect-ratio: 4 / 5; margin: 0; }
.person__photo img,
.person__photo .art-plate { width: 100%; height: 100%; object-fit: cover; display: block; }

/* The falloff over the bottom of the portrait. Transparent across the face,
   solid black by the bottom edge, so white type never sits on skin. */
.person__fade {
  position: absolute; left: 0; right: 0; top: 0;
  aspect-ratio: 4 / 5; pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(14, 9, 6, 0) 55%,
    rgba(14, 9, 6, 0.45) 70%,
    rgba(14, 9, 6, 0.93) 84%,
    #0E0906 96%);
}

/* Text sits in normal flow BELOW the photo, with the name pulled up so it
   overlaps the fade. A long role makes the card taller instead of colliding
   with the name — which is what happened when everything was absolute. */
.person__body {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 0 0.75rem 0.85rem;
}
.person__name {
  margin: -2.1em 0 0; /* rides up over the photo */
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 0.95rem + 0.85vw, 1.6rem);
  line-height: 0.98; letter-spacing: 0.005em;
  text-transform: uppercase; color: #fff;
  transform: rotate(-3.4deg); transform-origin: left center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.person__name span { display: block; }
.person__name span + span { padding-left: 0.45em; }

/* Two fixed bands so every card lines up: the icons sit on one baseline, the
   role's last line on another. A flex row sized by its content gave three
   different baselines depending on role length and whether links existed. */
/* Role on its own line, icons under it. Side by side, the role column was only
   ~68px wide on a five-across grid, so longer titles ran to three lines on some
   cards and two on others — which is what threw the baselines out. */
.person__meta { display: grid; row-gap: 0.5rem; }
.person__meta .person__links { order: 2; }   /* icons sit at the bottom, as in the reference */
.person__links { display: flex; gap: 0.5rem; margin: 0; height: 1.75rem; }
.team-grid .person .person__links a {
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem;
  color: #fff; border-radius: 6px;
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.team-grid .person .person__links a:hover,
.team-grid .person .person__links a:focus-visible {
  color: var(--golden-ember); transform: translateY(-2px);
}
.person__links .imark { width: 100%; height: 100%; display: block; }
.person__links:empty { display: block; }   /* keep the band, hide nothing */

.person__role {
  margin: 0;
  display: flex; align-items: flex-end; justify-content: flex-end;
  text-align: right; min-height: 2.5em;      /* always two lines' worth */
  font-family: var(--font-body); font-weight: 500;
  font-size: clamp(0.74rem, 0.70rem + 0.18vw, 0.85rem);
  line-height: 1.25; color: #fff; text-transform: none; letter-spacing: 0;
}

@media (max-width: 520px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Footer ---------------------------------------------------------------- */
/* --- Footer -----------------------------------------------------------------
   One type size for every link, one colour, one accent (the small gold column
   headings), and a single call to action. The previous version stacked three
   full-width buttons and mixed four text sizes, which read as noise at tablet
   width and worse on a phone.
   -------------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--peach-dim); padding-block: var(--s-8) var(--s-6); }

.site-footer__grid {
  display: grid; gap: var(--s-7) var(--s-6);
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  align-items: start;
}
.site-footer__logo img { width: 150px; height: auto; }
.site-footer__tagline {
  margin: var(--s-4) 0 var(--s-5);
  font-size: var(--fs-small); color: var(--peach-dim); max-width: 24ch;
}

.site-footer h2 {
  font-family: var(--font-label); font-size: var(--fs-label); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--golden-ember); margin-bottom: var(--s-3);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: var(--s-2); }
.site-footer a:not(.btn) {
  font-size: var(--fs-small); color: var(--warm-peach); text-decoration: none;
}
.site-footer a:not(.btn):hover { color: var(--golden-ember); text-decoration: underline; }

.site-footer__base {
  margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--ash-hi);
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  justify-content: space-between; align-items: baseline;
  font-size: var(--fs-small); color: var(--peach-dim);
}
.site-footer__base p { margin: 0; }

/* Tablet: the four columns become two, with the brand block across the top. */
@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
  .site-footer__grid > :first-child,
  .site-footer__follow { grid-column: 1 / -1; }
  .site-footer__tagline { max-width: 34ch; }
  /* Seven platforms stacked is a ladder down an empty column. Run them inline. */
  .site-footer__follow ul { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }
  .site-footer__follow li + li { margin-top: 0; }
}

/* Phone: one column, and the social list runs inline so it doesn't become a
   twelve-row ladder. */
@media (max-width: 560px) {
  .site-footer { padding-block: var(--s-7) var(--s-5); }
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .site-footer__base { justify-content: flex-start; }
}

/* --- Nav menus --------------------------------------------------------------
   Hover, and focus-within so it opens on keyboard too. The parent link still
   navigates on click; the menu is a shortcut, never the only way in.
   -------------------------------------------------------------------------- */
.nav__item { position: relative; display: flex; align-items: center; }
.nav__menu {
  position: absolute; top: 100%; left: 50%; transform: translate(-50%, 6px);
  min-width: 12rem; padding: var(--s-2);
  background: var(--ash); border: 1px solid var(--ash-hi);
  border-radius: var(--r-md); box-shadow: var(--shadow-card);
  display: grid; gap: 2px; z-index: var(--z-menu);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
@media (min-width: 861px) {
  .nav__item--has-menu:hover .nav__menu,
  .nav__item--has-menu:focus-within .nav__menu {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
  }
}
.site-header .nav__menu a:not(.btn) {
  display: block; padding: 0.5rem 0.7rem; border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: var(--fs-small);
  font-weight: 500; letter-spacing: 0; text-transform: none;
  color: var(--warm-peach); white-space: nowrap;
}
.site-header .nav__menu a:not(.btn):hover,
.site-header .nav__menu a:not(.btn):focus-visible {
  background: var(--red-800); color: #fff;
}
@media (max-width: 860px) {
  .nav__item { display: block; }
  .nav__menu,
  .nav__item--has-menu:hover .nav__menu,
  .nav__item--has-menu:focus-within .nav__menu {
    position: static; transform: none; opacity: 1; visibility: visible;
    background: none; border: 0; box-shadow: none; padding: 0 0 0 var(--s-4);
    min-width: 0;
  }
}

/* --- Studio block: copy beside a smaller team photo ------------------------- */
.studio-split { display: grid; gap: var(--s-7); align-items: start; }
@media (min-width: 900px) { .studio-split { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: var(--s-8); } }
.studio-photo { margin: 0; }
.studio-photo img { width: 100%; border-radius: var(--r-md); display: block; }
.studio-photo figcaption {
  margin-top: var(--s-3);
  font-family: var(--font-label); font-size: var(--fs-small); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--peach-dim);
}

/* --- What we've shipped, as cards rather than a table ---------------------- */
.shipped { list-style: none; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.shipped__link {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  border-radius: var(--r-md);
  background: var(--g-bg, var(--ink)); color: var(--g-text, var(--warm-peach));
  border: 2px solid var(--g-accent, var(--red-deep));
  text-decoration: none; box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.shipped__link:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); text-decoration: none; }
.shipped__art { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--g-surface, var(--ash)); }
.shipped__art > img:not(.shipped__mark) { width: 100%; height: 100%; object-fit: cover; object-position: var(--g-focus, center); display: block; }
.shipped__text { display: grid; gap: var(--s-2); padding: var(--s-5); }
.shipped__mark {
  position: absolute; right: var(--s-3); top: var(--s-3);
  width: 34px; height: 34px; object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.55));
}
.shipped__title { font-family: var(--font-display); font-size: var(--fs-h3); text-transform: uppercase; line-height: 1.1; }
.shipped__genre { font-size: var(--fs-small); color: var(--g-muted, var(--peach-dim)); }
.shipped__status {
  margin-top: var(--s-2); font-family: var(--font-label); font-size: var(--fs-label);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--g-accent, var(--golden-ember));
}

/* A game capsule carries its own palette wherever it sits. The surface link
   colour (.on-ink a) out-specified it once the games index moved to a dark
   background, so EXO's card rendered in site orange instead of EXO violet. */
.on-ink .gcard a:not(.btn),
.on-firewood .gcard a:not(.btn),
.on-peach .gcard a:not(.btn) { color: var(--g-accent); }
.on-ink .gcard__title a:not(.btn),
.on-firewood .gcard__title a:not(.btn),
.on-peach .gcard__title a:not(.btn) { color: var(--g-text); }
.on-ink .gcard__title a:not(.btn):hover,
.on-firewood .gcard__title a:not(.btn):hover,
.on-peach .gcard__title a:not(.btn):hover { color: var(--g-accent); }
.gcard .badge--dev { background: var(--g-accent); color: var(--g-bg); }
.gcard .badge--out { background: var(--g-text); color: var(--g-bg); }

/* Games index: a short header so the second capsule peeks above the fold. */
.section--flush-top { padding-block: var(--s-5) var(--section-pad); }
.games-title { margin: var(--s-1) 0 var(--s-5); }
/* A slightly shorter art box on the index so the next game's capsule breaks
   the fold and it's obvious there is more below. */
.game-rows .gcard__art { aspect-ratio: 16 / 6; }

/* --- Games index: full-width rows, matching the home page ------------------ */
.game-rows { display: grid; gap: var(--s-6); }

/* --- Devlog cards: framed, and clickable across the whole card ------------- */
.post-card {
  position: relative;
  background: var(--light-glow); color: var(--firewood);
  border: 1px solid var(--peach-line);
}
.post-card .eyebrow { color: var(--red-900); }
.post-card .card__title a { color: var(--firewood); }
.on-peach .post-card .card__title a:not(.btn),
.post-card .card__title a:not(.btn) { color: var(--firewood); }
.post-card:hover .card__title a { color: var(--red-deep); }
.post-card__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.post-card:hover { border-color: var(--red-deep); }
.post-card__cue {
  font-family: var(--font-label); font-size: var(--fs-label); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--red-900);
}
.post-card:hover .post-card__cue { text-decoration: underline; }

/* --- Utilities ------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --- Scroll reveal --------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover, .gcard:hover { transform: none; }
}

@media print {
  .site-header, .site-footer, .nav-toggle, .hero__strip, .hero__veil,
  .showcase__art, .ghero__art, .band, .seam { display: none !important; }
  body, .game, .gcard, .showcase { background: #fff !important; color: #000 !important; }
}

/* --- Team photo as a page header -------------------------------------------
   Caption sits BELOW the photo on a solid surface. Over the image it was
   1.4:1 against the bright part of the picture. */
.team-hero { margin: 0; background: var(--ink); }
/* The caption gets its own quiet bar under the photo — centred, with real room
   around it, so it reads as a credit line and not as text jammed on the edge. */
.team-hero__cap {
  padding-block: var(--s-5) var(--s-6);
  font-family: var(--font-label); font-size: var(--fs-small); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--peach-dim); line-height: 1.4; text-align: center;
}
