@import url("sprites.css?v=vcrdbgvk");
/* Layout: one dark column like an illuminated page; full-bleed footage in the hero,
   each section opens with a scripture reference as its marker and a small gold
   lozenge on its rule. Single dark look on purpose. */
:root {
  --night: #110d0b;      /* page: warm ash black */
  --soot: #19130f;       /* raised bands and cards */
  --char: #221a15;       /* cards on raised bands */
  --rule: #3b3029;       /* hairlines */
  --dust: #ddd1b8;       /* text: bone and dust */
  --dust-dim: #a39680;   /* secondary text */
  --gold: #d6ad4f;       /* Grace, accents */
  --ember: #c2482c;      /* Sin, the Reckoning */
  --ember-text: #e0684b; /* Sin as text: 5.1:1 on the cards */
  /* Steam's own colours, used only by the wishlist buttons */
  --steam-ink: #171a21; --steam-navy: #1b2838; --steam-blue: #2a475e; --steam-sky: #66c0f4;

  --f-display: "IM Fell English SC", "IM Fell English", Georgia, "Times New Roman", serif;
  --f-verse: "IM Fell English", Georgia, "Times New Roman", serif;
  --f-body: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --f-pixel: "Silkscreen", ui-monospace, "Courier New", monospace;

  --t-xs: .8125rem; --t-s: 1rem; --t-m: 1.1875rem; --t-l: 1.625rem; --t-xl: clamp(2rem, 4.2vw, 3rem);
  --t-title: clamp(2.75rem, 8.6vw, 7.5rem);
  --measure: 40rem;
  --bar: 3.5rem;

  /* spacing scale: every margin, padding and gap is one of these (1rem = 16 px) */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem;
  --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4rem; --sp-9: 6rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);    /* side gutter: 16 px on phones, 40 px on desktop */
  --section-y: clamp(3.5rem, 8vw, 6rem); /* vertical padding of every band */
  --stack: clamp(1.5rem, 3.5vw, 2.5rem); /* gap between the blocks of a section */
  --card-gap: var(--sp-4);               /* gap between cards in a grid */
  --card-pad: clamp(1rem, 2vw, 1.5rem);  /* inner padding of cards */
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); scroll-behavior: smooth; scroll-padding-top: var(--bar); }
body {
  margin: 0; background: var(--night); color: var(--dust);
  font: 400 var(--t-m)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; margin: 0; }
p { margin: 0; }
blockquote { margin: 0; }
::selection { background: var(--gold); color: var(--night); }

.wrap {
  max-width: 72rem; margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.eyebrow, .ref, .tag, .realm-k, time, cite, .topnav, .play-link, .foot-nav, .exile dt {
  font-family: var(--f-pixel); font-size: var(--t-xs); font-style: normal; letter-spacing: .08em; text-transform: uppercase;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: var(--sp-3) var(--sp-4);
  background: var(--gold); color: var(--night); font-family: var(--f-pixel); font-size: var(--t-xs); text-decoration: none;
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + .5rem); }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgb(17 13 11 / .92); border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(6px);
  transition: background-color .3s, border-color .3s;
}
.topbar.at-top { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
.topbar-inner { height: var(--bar); display: flex; align-items: center; gap: var(--sp-6); }
.wordmark {
  font-family: var(--f-display); font-size: 1.2rem; color: var(--dust); text-decoration: none; white-space: nowrap;
  transition: opacity .3s;
}
.topbar.at-top .wordmark { opacity: 0; pointer-events: none; }
.topbar.at-top .wordmark:focus-visible { opacity: 1; pointer-events: auto; }
.wm-short { display: none; }
.topnav { display: flex; gap: var(--sp-4); margin-left: auto; }
.topnav a { white-space: nowrap; color: var(--dust-dim); text-decoration: none; padding-block: var(--sp-2); min-height: 2.75rem; display: inline-flex; align-items: center; }
.topnav a:hover, .topnav a[aria-current="true"] { color: var(--gold); }
.mobile-nav { display: none; }
.desktop-nav { display: flex; }
.motion-toggle { position: fixed; z-index: 12; right: max(1rem, env(safe-area-inset-right, 0px)); bottom: max(1rem, env(safe-area-inset-bottom, 0px)); color: var(--dust); background: rgb(17 13 11 / .92); border: 1px solid var(--gold); min-height: 2.75rem; padding: var(--sp-2) var(--sp-3); font: .75rem var(--f-pixel); cursor: pointer; }
.motion-toggle[hidden] { display: none; }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
.motion-enabled *, .motion-enabled *::before, .motion-enabled *::after { animation-play-state: running !important; }
.motion-paused .ash { visibility: hidden; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(56rem, 100svh); display: grid; align-items: end;
  padding-top: calc(env(safe-area-inset-top, 0px) + var(--bar));
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  image-rendering: pixelated;
  /* push the game HUD (top left of the footage) out of frame */
  transform: scale(1.18); transform-origin: 70% 78%;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to right, rgb(17 13 11 / .82), rgb(17 13 11 / .55) 45%, rgb(17 13 11 / .15) 80%),
    radial-gradient(ellipse 80% 70% at 50% 45%, rgb(17 13 11 / .25), rgb(17 13 11 / .85) 80%),
    linear-gradient(to bottom, rgb(17 13 11 / .55), rgb(17 13 11 / .2) 35%, var(--night) 96%);
}
.ash { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-inner { padding-block: var(--sp-9) var(--sp-8); display: grid; gap: var(--sp-5); justify-items: start; }
.eyebrow { color: var(--dust-dim); }
.title {
  font-family: var(--f-display); font-size: var(--t-title); line-height: .88; letter-spacing: -.01em;
  color: var(--dust); text-shadow: 0 0 40px rgb(0 0 0 / .8), 0 2px 0 rgb(0 0 0 / .6);
  animation: settle 1.6s cubic-bezier(.2, .7, .2, 1) both;
}
.title span { display: block; }
.title span + span { padding-left: .55em; }
@keyframes settle { from { opacity: .7; transform: translateY(.12em); } }
.hero-verse { max-width: 34rem; display: grid; gap: var(--sp-2); }
.hero-verse p { font: italic var(--t-m)/1.5 var(--f-verse); color: var(--dust); text-shadow: 0 1px 12px rgb(0 0 0 / .9); }
cite { color: var(--gold); }
.cta-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-4) var(--sp-6); margin-top: var(--sp-2); }
/* the play link is as tall as the wishlist button, so it centres on the button, not on button + caption */
.cta-row .play-link { min-height: 3.5rem; }

/* Wishlist on Steam. Three buttons (top bar, hero, finale) in Steam's colours. The one app id is
   data-steam-app on <html>; while it is empty the buttons are not links (aria-disabled, no href) but look
   exactly like the live ones, and js/site.js turns them into links once it is set. */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.wishlist {
  display: inline-flex; flex-direction: column; align-items: center; gap: .75rem;
  text-decoration: none; color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.wishlist[aria-disabled="true"] { cursor: default; }
.wishlist:focus-visible { outline: none; }
.wishlist:focus-visible .wl-btn { outline: 2px solid #fff; outline-offset: 3px; }
.wl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .75rem;
  min-height: 3.5rem; padding: .75rem 1.5rem; white-space: nowrap;
  background: linear-gradient(180deg, var(--steam-blue), var(--steam-navy));
  border: 2px solid var(--steam-sky);
  box-shadow: 0 4px 0 var(--steam-ink), 0 0 0 1px var(--steam-ink);
  color: #fff; font-family: var(--f-pixel); font-size: 1.125rem; line-height: 1; letter-spacing: .06em; text-transform: uppercase;
  transition: background-color .15s, transform .08s, box-shadow .08s;
}
.steam-mark { width: 1.75rem; height: 1.75rem; flex: none; color: #fff; }
.wishlist:not([aria-disabled="true"]):hover .wl-btn { background: linear-gradient(180deg, var(--steam-sky), #417a9b); }
.wishlist:not([aria-disabled="true"]):active .wl-btn { transform: translateY(2px); box-shadow: 0 2px 0 var(--steam-ink), 0 0 0 1px var(--steam-ink); }
.wl-soon {
  font-family: var(--f-pixel); font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase;
  color: var(--dust); text-shadow: 0 1px 0 rgb(0 0 0 / .85);
}
.wishlist-bar .wl-btn { min-height: 2.75rem; padding: 0 .75rem; gap: .5rem; font-size: var(--t-xs); border-width: 1px; box-shadow: none; }
.wishlist-bar .steam-mark { width: 1.125rem; height: 1.125rem; }
.wishlist-bar { gap: 0; flex: none; }
.wishlist-bar:not([aria-disabled="true"]):active .wl-btn { transform: none; box-shadow: none; }
.wishlist-xl .wl-btn { min-height: 4.5rem; padding: 1rem 2.25rem; gap: 1rem; font-size: 1.5rem; }
.wishlist-xl .steam-mark { width: 2.25rem; height: 2.25rem; }

/* a pixel play triangle, used by the hero link and the trailer button */
.play-link i, .player-start i {
  display: inline-block; background: var(--gold);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.play-link { display: inline-flex; align-items: center; min-height: 2.75rem; gap: var(--sp-3); color: var(--dust); text-decoration: none; letter-spacing: .1em; }
.play-link i { width: .75rem; height: .9rem; }
.play-link span { color: var(--dust-dim); }
.play-link:hover { color: var(--gold); }
.text-link {
  font-family: var(--f-pixel); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .1em;
  color: var(--dust); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: .2rem;
}
.text-link:hover { color: var(--gold); }

/* ---------- sections ---------- */
.band { position: relative; padding-block: var(--section-y); border-top: 1px solid var(--rule); }
.band::before {
  content: ""; position: absolute; top: -5px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px;
  background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 4px var(--night);
}
.band-raised { background: var(--soot); }
.band-raised::before { box-shadow: 0 0 0 4px var(--night); }
.band > .wrap { display: grid; gap: var(--stack); }
.section-head { display: grid; gap: var(--sp-3); max-width: 48rem; }
.ref { color: var(--gold); }
.ref::before { content: ""; display: inline-block; width: 2.5rem; height: 1px; background: var(--gold); vertical-align: middle; margin-right: var(--sp-3); }
.ref-center::after { content: ""; display: inline-block; width: 2.5rem; height: 1px; background: var(--gold); vertical-align: middle; margin-left: var(--sp-3); }
h2 { font-family: var(--f-display); font-size: var(--t-xl); line-height: 1.12; }
h3 { font-family: var(--f-display); font-size: var(--t-l); line-height: 1.2; }
.lede { max-width: var(--measure); color: var(--dust); font-size: clamp(1.1875rem, 1.7vw, 1.375rem); line-height: 1.65; }
.note { font-size: var(--t-s); color: var(--dust-dim); }
/* the build note under the hero: room above the first section's rule */
main > .wrap:first-child { padding-block: var(--sp-5); }

.frame {
  margin: 0; border: 15px solid transparent;
  border-image: url(../img/frame_gold.png?v=dntjhcmq) 6 / 15px / 0 stretch; image-rendering: pixelated;
  background: #000;
}

/* trailer player */
.player { position: relative; }
.player video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.player-start {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--sp-4);
  border: 0; cursor: pointer; color: var(--dust);
  background: radial-gradient(ellipse 45% 55% at 50% 50%, rgb(17 13 11 / .78), rgb(17 13 11 / .45));
  transition: background-color .25s;
}
.player-start[hidden] { display: none; }
.player-start i {
  width: 5.5rem; height: 5.5rem; background: none; clip-path: none; position: relative;
  border: 12px solid transparent; border-image: url(../img/frame_gold.png?v=dntjhcmq) 6 fill / 12px / 0 stretch;
  image-rendering: pixelated; transition: transform .2s;
}
.player-start i::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 1.4rem; height: 1.7rem; margin: -.85rem 0 0 -.5rem;
  background: var(--gold); clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.player-start span { font: 400 var(--t-l)/1 var(--f-display); text-shadow: 0 2px 12px rgb(0 0 0 / .9); }
.player-start small { font-family: var(--f-pixel); font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--dust-dim); }
.player-start:hover i, .player-start:focus-visible i { transform: scale(1.06); }
.player.is-playing .player-start { display: none; }
.player video { position: relative; z-index: 1; }
.player-start { z-index: 2; }

/* clips */
.clips { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5) var(--card-gap); }
.clip { margin: 0; display: grid; gap: var(--sp-3); align-content: start; min-width: 0; }
.clip-wide { grid-column: 1 / -1; }
.clip video {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--char);
  image-rendering: pixelated; outline: 1px solid var(--rule);
}
.clip figcaption { color: var(--dust-dim); max-width: var(--measure); font-size: var(--t-s); }
.tag { display: block; color: var(--gold); margin-bottom: var(--sp-1); }

.status-note {
  max-width: var(--measure); padding: var(--sp-4) 1.25rem; border-left: 2px solid var(--gold);
  background: rgb(214 173 79 / .045); color: var(--dust-dim); font-size: var(--t-s); line-height: 1.6;
}
.status-note strong { color: var(--dust); font-weight: 500; }
.status-note p + p { margin-top: var(--sp-3); }
.book-feature {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: center; gap: var(--stack); padding: var(--card-pad);
  border: 1px solid var(--rule); background: linear-gradient(135deg, rgb(214 173 79 / .055), transparent 70%), var(--soot);
}
.book-feature > * { min-width: 0; }
.book-feature > div { display: grid; gap: var(--sp-4); }
.book-feature p { max-width: var(--measure); }
.book-feature img, .book-feature video { width: 100%; height: auto; image-rendering: pixelated; }
.book-feature blockquote { display: grid; gap: var(--sp-2); border-left: 1px solid var(--gold); padding-left: var(--sp-4); }
.book-feature blockquote p { font: italic var(--t-m)/1.5 var(--f-verse); }

/* sprites: horizontal strips cut from the game's pxl exports (frame count and timing in sprites.css) */
.spr {
  --f: 32px; --s: 4; --n: 4; --t: .6s; --w: calc(var(--f) * var(--s));
  display: block; width: var(--w); height: var(--w);
  background: var(--img) 0 0 / calc(var(--w) * var(--n)) var(--w) no-repeat;
  image-rendering: pixelated;
  animation: frames var(--t) steps(var(--n)) infinite;
}
.spr.lord { --f: 64px; --s: 2; --n: 8; --t: .9s; }
.spr.sm { --f: 32px; --s: 2; }
@keyframes frames { to { background-position-x: calc(var(--w) * var(--n) * -1); } }

/* exiles */
.exiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--card-gap); }
.exile {
  display: grid; grid-template-rows: auto auto auto 1fr auto; gap: var(--sp-3); justify-items: start; min-width: 0;
  padding: var(--card-pad); background: linear-gradient(160deg, rgb(214 173 79 / .035), transparent 65%), var(--char); outline: 1px solid var(--rule);
  transition: outline-color .2s;
}
.exile:hover { outline-color: rgb(214 173 79 / .5); }
.exile .spr { --s: 5; justify-self: center; margin-block: -.5rem -.75rem; }
.exile-t { font: italic var(--t-s)/1.3 var(--f-verse); color: var(--gold); }
.exile > p:not(.exile-t) { font-size: var(--t-s); color: var(--dust); }
.exile dl { margin: var(--sp-2) 0 0; display: grid; grid-template-columns: auto 1fr; gap: .35rem var(--sp-3); font-size: var(--t-s); width: 100%; border-top: 1px solid var(--rule); padding-top: var(--sp-3); }
.exile dt { color: var(--dust-dim); padding-top: .2rem; }
.exile dd { margin: 0; color: var(--dust-dim); }

/* Grace and Sin axis */
.band-axis {
  background:
    radial-gradient(ellipse 45% 60% at 0% 60%, rgb(194 72 44 / .12), transparent 70%),
    radial-gradient(ellipse 45% 60% at 100% 60%, rgb(214 173 79 / .1), transparent 70%),
    var(--night);
}
.axis { display: grid; gap: var(--sp-4); }
/* every form's sprite row is as tall as the 48 px frames at full scale (--form-s), so the labels share one baseline */
.forms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); text-align: center; --form-s: 4; }
.form { min-width: 0; display: grid; grid-template-rows: calc(48px * var(--form-s)) auto; justify-items: center; gap: .35rem; }
.form .spr { align-self: end; }
.form b { font-family: var(--f-display); font-weight: 400; font-size: var(--t-l); }
.form span { font-size: var(--t-s); color: var(--dust-dim); max-width: 14rem; }
.form.sin b { color: var(--ember-text); }
.form.grace b { color: var(--gold); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5) var(--sp-7); }
.duo > div { display: grid; gap: var(--sp-3); align-content: start; min-width: 0; }
.grace-t { color: var(--gold); }
.sin-t { color: var(--ember-text); }

/* realms */
.realms { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--card-gap); }
.realm {
  position: relative; isolation: isolate; overflow: hidden; min-width: 0;
  display: grid; gap: var(--sp-3); grid-template-rows: auto auto auto auto auto 1fr; align-content: stretch; padding: var(--card-pad);
  outline: 1px solid var(--rule); transition: outline-color .2s;
}
.realm:hover { outline-color: rgb(214 173 79 / .5); }
.realm::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--ground) 0 0 / 256px 256px repeat; image-rendering: pixelated;
}
.realm::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgb(17 13 11 / .3), rgb(17 13 11 / .93) 52%);
}
.realm-art { height: 13rem; display: grid; place-items: center; margin-bottom: var(--sp-2); }
/* the beyond has no picture: a dark fade reads as darkness, not as a missing image */
.realm-beyond .realm-art { background: linear-gradient(180deg, transparent, rgb(0 0 0 / .45)); }
.gate {
  position: relative; display: block; width: 192px; height: 192px;
  background: url(/img/sprites/gate.png?v=kvcmfcch) 0 0 / 192px 192px no-repeat; image-rendering: pixelated;
}
.spr.sword {
  --f: 16px; --s: 4; position: absolute; left: 50%; top: 56%; margin: -32px 0 0 -32px;
  transform: rotate(-90deg); filter: drop-shadow(0 0 6px rgb(255 170 60 / .7));
}
.realm-k { color: var(--gold); }
.realm blockquote { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--rule); display: grid; gap: var(--sp-2); align-self: end; }
.realm blockquote p { font: italic var(--t-s)/1.45 var(--f-verse); color: var(--dust-dim); }

/* the host: one centred row of seven, never wrapping */
.bestiary {
  display: flex; flex-wrap: nowrap; justify-content: center; align-items: end;
  gap: clamp(.5rem, 3vw, 1.75rem);
}
.bestiary .spr { flex: none; }

/* run clock */
.clock {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5);
}
.clock li { display: grid; gap: var(--sp-2); align-content: start; border-top: 1px solid var(--rule); padding-top: var(--sp-4); min-width: 0; }
.clock time { font-size: 2rem; letter-spacing: .02em; color: var(--gold); font-variant-numeric: tabular-nums; }
.clock time.up { color: var(--ember-text); }
.clock p { font-size: var(--t-s); color: var(--dust-dim); }

/* arms */
.arms-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6) var(--sp-7); }
.arms-cols > div { display: grid; gap: var(--sp-3); align-content: start; min-width: 0; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; }
.plain li { padding-block: .35rem; border-bottom: 1px solid var(--rule); }
.icons li { display: flex; align-items: center; gap: var(--sp-3); }
.icons img { width: 32px; height: 32px; flex: none; image-rendering: pixelated; }

/* the bush: a quiet hint, never an explanation */
.bush {
  background: radial-gradient(ellipse 40% 70% at 30% 50%, rgb(230 130 50 / .08), transparent 70%), #0c0908;
}
.bush > .wrap { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; gap: var(--sp-7); }
.bush-img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; }
.bush-text { display: grid; gap: var(--sp-4); }
.bush-text blockquote p { font: italic var(--t-m)/1.5 var(--f-verse); }

/* gallery: two by two on wide screens */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--card-gap); }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; overflow: hidden; outline: 1px solid var(--rule); transition: outline-color .2s; }
.gallery img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; transition: transform .4s; }
.gallery button:hover { outline-color: var(--gold); }
.gallery button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.gallery button:hover img { transform: scale(1.03); }

.lightbox { border: 0; padding: 0; background: none; color: var(--dust); max-width: min(96vw, 1600px); overflow: visible; }
.lightbox::backdrop { background: rgb(8 6 5 / .94); }
.lightbox figure { margin: 0; display: grid; gap: .75rem; }
.lightbox img { image-rendering: pixelated; max-height: 82vh; width: auto; margin-inline: auto; }
.lightbox figcaption { font-size: var(--t-s); color: var(--dust-dim); text-align: center; }
.lightbox button {
  position: absolute; font: 1.5rem/1 var(--f-pixel); color: var(--dust); background: rgb(17 13 11 / .85);
  border: 1px solid var(--rule); width: 2.75rem; height: 2.75rem; cursor: pointer;
}
.lightbox button:hover { color: var(--gold); border-color: var(--gold); }
.lb-close { top: .5rem; right: .5rem; }
.lb-prev, .lb-next { top: calc(50% - 2.5rem); }
.lb-prev { left: .5rem; }
.lb-next { right: .5rem; }

/* finale and footer */
.finale {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: calc(var(--section-y) * 1.5); text-align: center; border-top: 1px solid var(--rule);
}
.finale::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 80% at 50% 100%, rgb(194 72 44 / .22), transparent 70%),
    linear-gradient(rgb(17 13 11 / .92), rgb(17 13 11 / .86) 45%, var(--night) 85%),
    url(../media/hero.jpg?v=mnpcpbvm) 65% 75% / max(150%, 1600px) auto;
  image-rendering: pixelated;
}
.finale .wrap { display: grid; justify-items: center; gap: var(--sp-6); }
.finale h2 { font-size: clamp(2.25rem, 6vw, 4.5rem); }
/* centred here, so the note is ruled above and below rather than barred on the left */
.finale .status-note { padding: var(--sp-4) 0; border-left: 0; border-block: 1px solid var(--rule); background: none; }

.foot { border-top: 1px solid var(--rule); padding-block: var(--sp-7) calc(var(--sp-7) + env(safe-area-inset-bottom, 0px)); }
.foot .wrap { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--sp-2) var(--sp-6); }
.foot-mark { font-family: var(--f-display); font-size: 1.1rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 var(--sp-5); justify-content: end; }
.foot-nav a { color: var(--dust-dim); text-decoration: none; display: inline-flex; align-items: center; min-height: 2.75rem; }
.foot-nav a:hover { color: var(--gold); }
.foot-note { grid-column: 1 / -1; font-size: var(--t-xs); color: var(--dust-dim); }
.foot-note a { color: var(--dust); text-underline-offset: .2em; display: inline-block; padding-block: .75rem; }
.foot-note a:hover { color: var(--gold); }

/* ---------- imprint and 404 ---------- */
[hidden] { display: none !important; }
.doc-page { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.doc-page .topbar { position: sticky; }
.lang-switch { display: flex; margin-left: auto; border: 1px solid var(--rule); }
.lang-switch a {
  font-family: var(--f-pixel); font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase;
  color: var(--dust-dim); text-decoration: none; padding: var(--sp-2) var(--sp-3); min-height: 2.75rem; display: inline-flex; align-items: center;
}
.lang-switch a + a { border-left: 1px solid var(--rule); }
.lang-switch .short { display: none; }
.lang-switch a[aria-current="true"] { background: var(--gold); color: var(--night); }
.lang-switch a:not([aria-current="true"]):hover { color: var(--gold); }

.doc { width: 100%; max-width: 46rem; padding-block: var(--sp-8) 5rem; display: grid; gap: var(--sp-7); align-content: start; }
.doc-lang { display: grid; gap: var(--sp-4); }
.doc-lang + .doc-lang { padding-top: var(--sp-7); border-top: 1px solid var(--rule); }
.one-lang .doc-lang + .doc-lang { padding-top: 0; border-top: 0; }
.doc h1 { font-family: var(--f-display); font-size: var(--t-xl); line-height: 1.05; margin-bottom: var(--sp-2); }
.doc h2 { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.2; margin-top: var(--sp-5); color: var(--gold); }
.doc p, .doc address { font-size: var(--t-m); color: var(--dust); }
.doc address { font-style: normal; line-height: 1.7; }
.doc-note, .doc-hint { font-size: var(--t-s) !important; color: var(--dust-dim) !important; }
.doc-hint { font-style: italic; }
.doc-dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem var(--sp-5); margin: 0; }
.doc-dl dt { font-family: var(--f-pixel); font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--dust-dim); padding-top: .35rem; }
.doc-dl dd { margin: 0; overflow-wrap: anywhere; }
/* placeholder data: impossible to miss, must be replaced before going live */
.ph { overflow-wrap: anywhere; padding: 0 .3em; outline: 1px dashed var(--ember); background: rgb(194 72 44 / .14); color: var(--dust); }
.doc-back { margin-top: var(--sp-4); }

.lost { display: grid; justify-items: center; align-content: center; gap: 1.25rem; text-align: center; padding-block: var(--sp-8); }
.lost h1 { font-family: var(--f-display); font-size: clamp(2.5rem, 8vw, 5rem); line-height: 1; }
.lost blockquote { display: grid; gap: var(--sp-2); max-width: 30rem; }
.lost blockquote p { font: italic var(--t-m)/1.5 var(--f-verse); }
.lost .spr { margin-block: -1.5rem -1rem; }
.lost .code {
  font-family: var(--f-pixel); font-size: clamp(4rem, 14vw, 8rem); line-height: 1; letter-spacing: .04em;
  color: rgb(214 173 79 / .16); margin-bottom: -1rem;
}
.lost-why { max-width: 30rem; font-size: var(--t-s); color: var(--dust-dim); }
.lost-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--sp-4) var(--sp-6); margin-top: var(--sp-2); }
/* 5xx: the fault is ours, so the page wears the Reckoning's red */
.lost-ours .code { color: rgb(194 72 44 / .22); }
.lost-ours .ref, .lost-ours cite { color: var(--ember-text); }
.lost-ours .ref::before, .lost-ours .ref-center::after { background: var(--ember); }
.lost-ours .play-link i { background: var(--ember); }

/* ---------- consent banner ---------- */
.consent {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  width: min(44rem, calc(100% - 2 * max(16px, env(safe-area-inset-left, 0px))));
  display: grid; gap: .75rem; padding: 1.1rem 1.4rem 1.2rem;
  background: var(--soot); border: 12px solid transparent;
  border-image: url(../img/frame_gold.png?v=dntjhcmq) 6 fill / 12px / 0 stretch; image-rendering: pixelated;
  box-shadow: 0 12px 40px rgb(0 0 0 / .6);
  animation: rise .35s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes rise { from { transform: translate(-50%, .75rem); } }
.consent h2 { font-family: var(--f-display); font-size: 1.35rem; line-height: 1.15; color: var(--dust); }
.consent-body { font-size: var(--t-s); color: var(--dust); }
.consent-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; }
.consent-link { font-size: var(--t-s); color: var(--dust-dim); text-underline-offset: .2em; display: inline-block; padding-block: .75rem; }
.consent-link:hover { color: var(--gold); }
.consent-buttons { display: flex; gap: .75rem; }
/* both choices look the same: neither is nudged */
.consent button {
  min-width: 8.5rem; padding: .65rem 1rem; cursor: pointer;
  font-family: var(--f-pixel); font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase;
  color: var(--dust); background: var(--night); border: 1px solid var(--gold);
}
.consent button:hover { background: var(--gold); color: var(--night); }
.community-links { display: flex; justify-content: center; gap: var(--sp-4); flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.community-links li { display: grid; gap: .2rem; text-align: center; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--rule); color: var(--dust-dim); }
.community-links small { font-size: var(--t-xs); }

/* ---------- narrow ---------- */
@media (max-width: 64rem) {
  .topbar-inner { justify-content: space-between; gap: var(--sp-3); }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; position: relative; margin-left: auto; }
  .mobile-nav summary { list-style: none; cursor: pointer; min-height: 2.75rem; display: flex; align-items: center; padding: 0 var(--sp-3); color: var(--gold); border: 1px solid var(--rule); font-family: var(--f-pixel); font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav .topnav { display: grid; position: absolute; top: 100%; right: 0; min-width: 14rem; padding: var(--sp-2) var(--sp-4); background: var(--soot); border: 1px solid var(--rule); box-shadow: 0 8px 24px #0009; }
  .mobile-nav .topnav a { white-space: normal; }
}
@media (min-width: 64.001rem) { .mobile-nav { display: none; } .desktop-nav { display: flex; } }
@media (max-width: 60rem) {
  .clock { grid-template-columns: 1fr 1fr; }
  .book-feature, .bush > .wrap { grid-template-columns: 1fr; }
  .foot .wrap { grid-template-columns: 1fr; justify-items: start; }
  .foot-nav { justify-content: start; }
}
@media (max-width: 40rem) {
  :root { --bar: 3rem; }
  .clips, .duo, .realms, .exiles, .clock, .arms-cols { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .bestiary .spr.sm { --s: 1; }
  .hero-verse { max-width: 29rem; }
  .wl-btn { padding-inline: 1rem; font-size: 1rem; }
  .wishlist-xl .wl-btn { min-height: 4rem; padding-inline: 1.25rem; font-size: 1.125rem; gap: .75rem; }
  .wishlist-xl .steam-mark { width: 1.75rem; height: 1.75rem; }
  .wm-long, .wishlist-bar .wl-on { display: none; }
  .wm-short { display: inline; letter-spacing: .06em; }
  .wishlist-bar .wl-btn { padding: 0 .6rem; }
  .title span + span { padding-left: 0; }
  .forms { gap: var(--sp-2); --form-s: 2; }
  .form .spr { --s: 2; }
  .form b { font-size: 1.1rem; }
  .spr { --s: 3; }
  .exile .spr { --s: 4; }
  .hero-inner { padding-block: var(--sp-8) var(--sp-7); }
  .wordmark { font-size: 1rem; }
  .player-start { gap: var(--sp-2); }
  .player-start i { width: 3.75rem; height: 3.75rem; border-width: 9px; border-image-width: 9px; }
  .player-start i::after { width: 1rem; height: 1.2rem; margin: -.6rem 0 0 -.35rem; }
  .player-start span { font-size: 1.25rem; }
  .lb-prev, .lb-next { top: auto; bottom: -3.5rem; }
  .consent-buttons { width: 100%; }
  .consent button { flex: 1; min-width: 0; }
  .lang-switch .long { display: none; }
  .lang-switch .short { display: inline; }
  .doc { padding-block: 2.5rem var(--sp-8); }
  .doc-dl { grid-template-columns: 1fr; gap: .1rem; }
  .doc-dl dd + dt { margin-top: var(--sp-2); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* the title's entrance is skipped outright: paused, it would stay at its dimmed first frame */
  .title { animation: none; }
  :root:not(.motion-enabled) .spr { animation-play-state: paused; }
  :root.motion-enabled .spr { animation-play-state: running !important; }
  .wl-btn, .exile, .realm, .topbar, .wordmark { transition: none; }
  .consent { animation: none; }
  .gallery img, .player-start i { transition: none; }
}
