/* Pawnlords website. Palette and type from the game (128-color palette, Redaction 50).
   Pixel rule: every pixel-art element is drawn at a whole-number scale (--k). */

@font-face { font-family: 'Redaction 50'; font-weight: 400; font-style: normal; font-display: swap;
  src: url(/fonts/Redaction50-Regular.woff2) format('woff2'), url(/fonts/Redaction50-Regular.woff) format('woff'); }
@font-face { font-family: 'Redaction 50'; font-weight: 700; font-style: normal; font-display: swap;
  src: url(/fonts/Redaction50-Bold.woff2) format('woff2'), url(/fonts/Redaction50-Bold.woff) format('woff'); }

:root {
  --bg: #06070a;
  --ink: #f1e6c8;
  --parch: #f3e4bd;
  --gold-hi: #fcf4c5;
  --gold: #f2d365;
  --line: #1a0f06;
  --brown: #291d0a;
  --stone: #191715;
  --stone2: #3f3833;
  --dim: #b6aca0;
  --font: 'Redaction 50', Georgia, 'Times New Roman', serif;
  --book: Georgia, Cambria, 'Times New Roman', 'Noto Serif', serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 18px; line-height: 1.5; }
img { display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; }
.px, .px * { image-rendering: crisp-edges; image-rendering: pixelated; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* gold lettering with a dark outline and a drop shadow, like the game's titles */
.gold { color: var(--gold); font-weight: 700;
  text-shadow: 0 -2px 0 var(--line), 2px 0 0 var(--line), -2px 0 0 var(--line), 0 2px 0 var(--line),
    2px 2px 0 var(--line), -2px 2px 0 var(--line), 2px -2px 0 var(--line), -2px -2px 0 var(--line), 0 5px 0 rgba(0, 0, 0, .5); }
.outlined { text-shadow: 0 -2px 0 var(--line), 2px 0 0 var(--line), -2px 0 0 var(--line), 0 2px 0 var(--line),
    2px 2px 0 var(--line), -2px 2px 0 var(--line), 2px -2px 0 var(--line), -2px -2px 0 var(--line), 0 4px 0 rgba(0, 0, 0, .45); }

/* ---------- logo: img/logo.png, the game's own logo bitmap (192 x 48 art px), drawn at the --k of the art behind it.
   Below 388 px the 2x logo (384 px) no longer fits, so a <picture> swaps in img/logo_narrow.png (140 x 40 art px: the
   same pixels without the crossed swords), still at --k (2 there, 280 px) ---------- */
.brand { display: block; flex: none; }
.logo { --lw: 192; display: block; width: calc(var(--k, 2) * var(--lw) * 1px); height: auto; max-width: none; flex: none; }
@media (max-width: 387px) { .logo { --lw: 140; } }

/* ---------- integer scale per width: --k ---------- */
.stage { position: relative; overflow: hidden; --k: 2; }
@media (min-width: 961px) { .stage { --k: 3; } }
@media (min-width: 1441px) { .stage { --k: 4; } }
@media (min-width: 1921px) { .stage { --k: 5; } }
@media (min-width: 2401px) { .stage { --k: 6; } }

/* a 480 x 270 scene, scaled by --k; --cx is the art column kept in view, --focus where it lands */
.scene { position: absolute; width: calc(var(--k) * 480px); height: calc(var(--k) * 270px);
  left: clamp(calc(100% - var(--k) * 480px), calc(var(--focus, 50%) - var(--k) * var(--cx, 240) * 1px), 0px);
  background: var(--art) 0 0 / 100% 100% no-repeat; image-rendering: crisp-edges; image-rendering: pixelated; }

/* sprite strips: one row of frames, played with steps() */
.spr { position: absolute; display: block;
  left: calc((var(--x) - var(--ax)) * var(--k) * 1px); top: calc((var(--y) - var(--ay)) * var(--k) * 1px);
  width: calc(var(--w) * var(--k) * 1px); height: calc(var(--h) * var(--k) * 1px);
  background: var(--s) 0 0 / calc(var(--w) * var(--n) * var(--k) * 1px) 100% no-repeat;
  image-rendering: crisp-edges; image-rendering: pixelated;
  animation: strip calc(var(--n) / var(--fps) * 1s) steps(var(--n)) infinite; animation-delay: var(--dl, 0s); }
.spr.flip { transform: scaleX(-1); }
@keyframes strip { to { background-position: calc(var(--w) * var(--n) * var(--k) * -1px) 0; } }

/* ---------- buttons: 9-slices of game art, border = 8 art px at --k ---------- */
.btn { --b: calc(var(--k, 2) * 8px); display: inline-flex; align-items: center; justify-content: center; gap: calc(var(--k, 2) * 5px);
  min-height: calc(var(--k, 2) * 16px + 26px); padding: 0 14px; border: var(--b) solid transparent;
  border-image: url(/img/ui_boton.png) 8 fill / var(--b) stretch;
  image-rendering: crisp-edges; image-rendering: pixelated;
  color: var(--parch); font: 700 22px/1.1 var(--font); text-decoration: none; white-space: nowrap;
  text-shadow: 0 -1px 0 var(--line), 1px 0 0 var(--line), -1px 0 0 var(--line), 0 2px 0 var(--line), 1px 2px 0 var(--line), -1px 2px 0 var(--line); }
.btn img { width: calc(var(--k, 2) * 16px); height: calc(var(--k, 2) * 16px); flex: none; margin: -6px 0; }
.btn:hover { border-image-source: url(/img/ui_boton_hover.png); color: #fffbe8; }
.btn:active { border-image-source: url(/img/ui_boton_press.png); }
.btn.primary { border-image-source: url(/img/btn_gold.png); color: var(--brown); font-size: 25px; text-shadow: 0 2px 0 rgba(252, 244, 197, .55); }
.btn.primary:hover { border-image-source: url(/img/btn_gold_hover.png); color: #1a0f06; }
.btn.primary:active { border-image-source: url(/img/btn_gold_press.png); }
.btn:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 4px; }
.free { margin: 0 0 10px; font-size: 24px; line-height: 1.1; letter-spacing: .02em; }
.ctas { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: min(100%, 400px); }

/* ---------- hero: one 400 x 225 key art scene (img/hero_bg.png) with the living pieces on the same grid ----------
   --k is a whole number per width, so the scene always covers the width; the sides crop, the pieces stay centered */
.hero, .close { --k: 2; }
@media (min-width: 801px) { .hero, .close { --k: 3; } }
.hero { position: relative; overflow: hidden; background: #191c2b;
  min-height: min(88vh, calc(var(--k) * 225px)); min-height: min(88svh, calc(var(--k) * 225px));
  display: flex; flex-direction: column; align-items: center; }
@media (min-width: 1201px) { .hero, .close { --k: 4; } }
@media (min-width: 1601px) { .hero, .close { --k: 5; } .hero .ctas, .close .ctas { --k: 4; } }
@media (min-width: 2001px) { .hero, .close { --k: 6; } }
@media (min-width: 2401px) { .hero, .close { --k: 7; } }
@media (min-width: 2801px) { .hero, .close { --k: 8; } }
.key { position: absolute; bottom: 0; width: calc(var(--k) * 400px); height: calc(var(--k) * 225px);
  left: calc(50% - var(--k) * 200px); left: round(down, calc(50% - var(--k) * 200px), 1px);
  background: url(/img/hero_bg.png) 0 0 / 100% 100% no-repeat; image-rendering: crisp-edges; image-rendering: pixelated; }
.key::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--k) * 14px); background: linear-gradient(#191c2b, rgba(25, 28, 43, 0)); }
/* the cast: one row of hero_cast.png per piece (3072 x 612), frames played with steps() */
.cs { position: absolute; left: calc(var(--x) * var(--k) * 1px); top: calc(var(--y) * var(--k) * 1px);
  width: calc(var(--w) * var(--k) * 1px); height: calc(var(--h) * var(--k) * 1px);
  background: url(/img/hero_cast.png) 0 calc(var(--ry) * var(--k) * -1px) / calc(var(--k) * 3072px) calc(var(--k) * 688px) no-repeat;
  animation: cs calc(var(--n) / var(--fps) * 1s) steps(var(--n)) infinite; animation-delay: var(--dl, 0s); }
@keyframes cs { to { background-position-x: calc(var(--w) * var(--n) * var(--k) * -1px); } }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--k) * 10px); pointer-events: none;
  background: linear-gradient(rgba(6, 7, 10, 0), var(--bg)); }
/* the title column sits over the dusk at the top; the bottom padding keeps the field and the armies clear */
.hero-col { position: relative; z-index: 2; flex: 1; width: 100%; max-width: 760px; padding: 28px 16px calc(var(--k) * 96px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hero .ctas { flex-direction: row; justify-content: center; width: auto; gap: 18px; }
.hero .btn { padding: 0 22px; }
.hero h1 { margin: 0; }
.pitch { margin: 20px 0 26px; max-width: 30ch; font-size: 26px; line-height: 1.3; color: var(--parch); text-wrap: balance; }
@media (min-width: 1600px) and (min-height: 860px) {
  .pitch { font-size: 32px; }
  .free { font-size: 30px; }
  .ctas { width: 480px; }
  .btn { font-size: 28px; } .btn.primary { font-size: 32px; }
}
@media (min-width: 2401px) {
  .pitch { font-size: 40px; }
  .free { font-size: 36px; }
  .ctas { width: 600px; }
  .btn { font-size: 34px; } .btn.primary { font-size: 38px; }
}

/* ---------- gameplay window: a real match. HUD strip (375 x 26 art px) over the play area (600 x 236 art px) ---------- */
/* one pixel scale for the whole middle band (the match, the war table, the portraits and the tiles):
   2 up to 960 px, 3 up to 1919, 4 up to 2559, then 5. --hc: HUD columns shown, always ending on a box edge */
.play, .table { --k: 2; }
@media (min-width: 961px) { .play, .table { --k: 3; } }
@media (min-width: 1920px) { .play, .table { --k: 4; } }
@media (min-width: 2560px) { .play, .table { --k: 5; } }
.play { --wk: var(--k); --hc: 131; --fx: 300; --fy: 118; background: var(--bg); padding: 8px 16px 28px; }
@media (min-width: 742px) { .play { --hc: 193; } }
@media (min-width: 866px) { .play { --hc: 255; } }
@media (min-width: 958px) { .play { --hc: 301; } }
@media (min-width: 961px) { .play { --hc: 131; } }
@media (min-width: 1097px) { .play { --hc: 193; } }
@media (min-width: 1283px) { .play { --hc: 255; } }
@media (min-width: 1421px) { .play { --hc: 301; } }
@media (min-width: 1643px) { .play { --hc: 375; } }
@media (min-width: 1920px) { .play { --hc: 301; } }
@media (min-width: 2180px) { .play { --hc: 375; } }
@media (min-width: 2560px) { .play { --hc: 301; } }
@media (min-width: 2717px) { .play { --hc: 375; } }
.window { position: relative; margin: 0 auto; max-width: calc(var(--wk) * 616px);
  border: calc(var(--wk) * 8px) solid transparent; border-image: url(/img/ui_piedra.png) 8 / calc(var(--wk) * 8px) stretch;
  image-rendering: crisp-edges; image-rendering: pixelated; box-shadow: 0 10px 0 rgba(0, 0, 0, .45); }
.hud { position: relative; height: calc(var(--wk) * 26px); overflow: hidden;
  background: url(/img/play_hud_fill.png) 0 0 / calc(var(--wk) * 1px) 100% repeat-x; }
.hud .clip { position: relative; height: 100%; width: calc(var(--wk) * var(--hc) * 1px); overflow: hidden; }
.hud img { position: absolute; left: 0; top: 0; width: calc(var(--wk) * 375px); height: calc(var(--wk) * 26px); max-width: none; }
.hud .end { position: absolute; left: auto; right: 0; top: 0; width: calc(var(--wk) * 146px); height: calc(var(--wk) * 26px); max-width: none; }
@media (max-width: 617px) { .hud .end { display: none; } }
.window .view { --vh: calc(var(--wk) * 200px); position: relative; overflow: hidden; height: var(--vh); background: #21421b; }
.window .view img { position: absolute; width: calc(var(--wk) * 600px); height: calc(var(--wk) * 236px); max-width: none;
  left: clamp(calc(100% - var(--wk) * 600px), calc(50% - var(--wk) * var(--fx) * 1px), 0px);
  top: clamp(calc(var(--vh) - var(--wk) * 236px), calc(var(--vh) / 2 - var(--wk) * var(--fy) * 1px), 0px); }
.window .still { display: none; }
.window.paused .anim { display: none; }
.window.paused .still { display: block; }
.pause { position: absolute; z-index: 2; right: calc(var(--wk) * 5px); bottom: calc(var(--wk) * 5px); padding: calc(var(--wk) * 3px) calc(var(--wk) * 6px); cursor: pointer;
  background: rgba(10, 8, 6, .82); color: var(--parch); font: 700 calc(var(--wk) * 8px + 2px)/1 var(--font); box-shadow: 0 0 0 2px #60564d, 0 0 0 4px var(--line); }
.pause:hover { color: #fff; }
.pause[hidden] { display: none; }
.pause[aria-pressed="true"] { color: var(--gold); background: rgba(41, 29, 10, .9); box-shadow: 0 0 0 2px var(--gold-d, #976f19), 0 0 0 4px var(--line); }
@media (max-width: 960px) { .window .view { --vh: 440px; } }
@media (max-width: 560px) {
  .play { --fx: 372; --fy: 112; padding: 16px 0 48px; }
  .window { border-left: 0; border-right: 0; }
  .window .view { --vh: 400px; }
  .play { --hc: 193; }   /* food, wood and gold boxes, never cut mid-icon */
}
@media (max-width: 385px) { .play { --hc: 131; } }   /* food and wood */
/* ---------- war table: the cast and the features ---------- */
.table { --art: url(/img/bg_partida.png); --cx: 240; background: var(--bg); padding: 40px 20px 80px; }
.table::before { content: ''; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 48px; pointer-events: none; background: linear-gradient(var(--bg), rgba(6, 7, 10, 0)); }
.table .scene { top: calc(var(--k) * -70px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
@media (max-width: 960px) { .table .scene { -webkit-mask-image: none; mask-image: none; } }
.table .scene::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 42% 55% at 50% 58%, rgba(6, 7, 10, .62), rgba(6, 7, 10, .36) 75%),
    linear-gradient(rgba(6, 7, 10, .3), rgba(6, 7, 10, 0) 25%, rgba(6, 7, 10, 0) 60%, rgba(6, 7, 10, .75) 88%, var(--bg)); }
.glow { position: absolute; z-index: 1; width: calc(var(--k) * 90px); height: calc(var(--k) * 90px);
  left: calc((var(--x) - 45) * var(--k) * 1px); top: calc((var(--y) - 45) * var(--k) * 1px); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(248, 210, 120, .30), rgba(232, 110, 42, .12) 55%, rgba(232, 110, 42, 0));
  animation: flicker 2.6s steps(1) infinite; animation-delay: var(--dl, 0s); }
.glow.small { width: calc(var(--k) * 56px); height: calc(var(--k) * 56px); left: calc((var(--x) - 28) * var(--k) * 1px); top: calc((var(--y) - 28) * var(--k) * 1px); }
@keyframes flicker { 0% { opacity: .85; } 12% { opacity: 1; } 21% { opacity: .78; } 33% { opacity: .95; } 47% { opacity: .7; }
  58% { opacity: 1; } 71% { opacity: .82; } 84% { opacity: .96; } 92% { opacity: .74; } }
.wrap { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; }
.h2 { margin: 0 0 10px; text-align: center; font-size: 38px; line-height: 1.15; }
.orn { width: calc(var(--k) * 96px); height: calc(var(--k) * 16px); margin: 0 auto 32px; }

.cast { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px 12px; }
.cast li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.cast li::before { content: ''; position: absolute; z-index: -1; top: calc(var(--k) * -14px); left: 50%; width: calc(var(--k) * 68px); height: calc(var(--k) * 68px); margin-left: calc(var(--k) * -34px);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(248, 210, 120, .26), rgba(232, 110, 42, .10) 60%, rgba(232, 110, 42, 0)); }
.cast { position: relative; z-index: 0; }
.portrait { position: relative; width: calc(40px * var(--k)); height: calc(40px * var(--k));
  background: var(--p) 0 0 / 100% 100%; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .45)); }
.portrait::after { content: ''; position: absolute; inset: 0; background: var(--pb, none) 0 0 / 100% 100%; opacity: 0;
  animation: blink 6s steps(1) infinite; animation-delay: var(--dl, 0s); }
@keyframes blink { 0% { opacity: 0; } 94% { opacity: 1; } 96% { opacity: 0; } }
.cast h3 { margin: 14px 0 2px; font-size: 26px; line-height: 1.1; }
.cast p { margin: 0 auto; padding: 0 2px; max-width: 19ch; color: var(--parch); font-size: 18px; line-height: 1.3; text-wrap: balance;
  text-shadow: 0 -1px 0 var(--line), 1px 0 0 var(--line), -1px 0 0 var(--line), 0 2px 0 var(--line); }

/* feature tiles: 128 x 112 art px windows on real match crops, framed in the game's stone, all at --k */
.beats { list-style: none; margin: 64px auto 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 44px calc(var(--k) * 16px);
  max-width: calc(var(--k) * 304px); }
@media (min-width: 1400px) { .wrap { max-width: 1360px; } }
@media (min-width: 1920px) { .wrap { max-width: 1800px; } }
.beats li { min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tile { position: relative; width: calc(var(--k) * 128px); max-width: calc(100% - var(--k) * 16px); aspect-ratio: 128 / 112; box-sizing: content-box;
  border: calc(var(--k) * 8px) solid transparent; border-image: url(/img/ui_piedra.png) 8 / calc(var(--k) * 8px) stretch;
  overflow: hidden; background: #21421b; image-rendering: crisp-edges; image-rendering: pixelated; box-shadow: 0 8px 0 rgba(0, 0, 0, .45); }
.tile img { position: absolute; width: calc(var(--k) * 128px); height: calc(var(--k) * 112px); max-width: none; left: 0; top: 0; }
.tile .still { display: none; }
.beats h3 { margin: 18px 0 4px; font-size: 28px; line-height: 1.15; }
.beats p { margin: 0; max-width: 24ch; color: var(--parch); line-height: 1.35; text-wrap: balance; }

@media (min-width: 1441px) {
  .h2, .close h2 { font-size: 46px; }
  .cast { gap: 32px 20px; }
  .cast h3 { font-size: 30px; }
  .cast p, .beats p { font-size: 21px; }
  .beats h3 { font-size: 32px; }
  .foot { font-size: 18px; } .foot nav { font-size: 22px; }
}
@media (min-width: 1921px) {
  .h2, .close h2 { font-size: 54px; }
  .cast h3 { font-size: 34px; }
  .cast p, .beats p { font-size: 24px; }
  .beats h3 { font-size: 36px; }
}

/* ---------- closing call to action: the dusk field below the hero (img/close_bg.png, 400 x 120) with the two Kings, at the hero's --k ---------- */
.close { position: relative; overflow: hidden; background: var(--bg); padding: 48px 16px calc(var(--k) * 64px); text-align: center; }
.close .key { height: calc(var(--k) * 120px); background-image: url(/img/close_bg.png); }
.close .key::before { height: calc(var(--k) * 40px); background: linear-gradient(var(--bg), rgba(6, 7, 10, 0)); }
.close > :not(.key) { position: relative; z-index: 1; }
.close h2 { margin: 0 0 18px; font-size: 38px; line-height: 1.15; }
.close .ctas { margin: 0 auto; flex-direction: row; justify-content: center; width: auto; gap: 18px; }
.close .btn { padding: 0 22px; }
@media (min-width: 1441px) { .close .btn { font-size: 28px; } .close .btn.primary { font-size: 32px; } .close .free { font-size: 30px; } }
@media (max-width: 960px) { .close .ctas { flex-direction: column; width: min(100%, 400px); gap: 12px; } }

/* ---------- footer ---------- */
.foot { background: var(--bg); border-top: 4px solid var(--stone2); box-shadow: inset 0 4px 0 var(--stone); padding: 32px 20px 36px; text-align: center; color: var(--dim); font-size: 16px; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-bottom: 12px; font-size: 19px; font-weight: 700; }
.foot nav a { color: var(--gold); text-decoration: none; }
.foot nav a:hover { color: var(--gold-hi); text-decoration: underline; }
.foot p { margin: 0; }

/* ---------- inner pages: war table band, parchment document ---------- */
.band { --art: url(/img/bg_partida.png); --cx: 167; background: #090811; padding: 40px 16px 120px; text-align: center;
  display: flex; flex-direction: column; align-items: center; }
.band .scene { top: calc(var(--k) * -112px); }
.band::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(rgba(9, 8, 17, .45), rgba(9, 8, 17, .78) 45%, #090811 88%); }
.band .home { position: relative; z-index: 2; display: block; }
.doc-wrap { position: relative; z-index: 3; margin: -80px auto 0; padding: 0 16px 72px; max-width: 840px; }
.doc { background: #ece3cb; color: #3f271a; padding: 48px 56px 56px; font-family: var(--book); font-size: 18px; line-height: 1.65;
  box-shadow: 0 0 0 4px #b39866, 0 0 0 8px #6f5c3f, 0 0 0 12px #1a0f06, 0 18px 0 12px rgba(0, 0, 0, .45); }
.doc h1, .doc h2, .doc h3 { font-family: var(--font); }
.doc h1 { margin: 0; font-size: 42px; line-height: 1.1; color: #851c2b; }
.doc .updated { margin: 6px 0 28px; color: #6f5c3f; font-size: 16px; }
.doc h2 { margin: 36px 0 8px; font-size: 26px; line-height: 1.2; color: #623e27; }
.doc h3 { margin: 22px 0 4px; font-size: 21px; color: #3f271a; }
.doc p, .doc ul { margin: 0 0 12px; }
.doc ul { padding-left: 24px; }
.doc li { margin: 4px 0; }
.doc li::marker { color: #976f19; }
.doc a { color: #851c2b; }
.doc a:hover { color: #b1212e; }
.doc strong { color: #291d0a; }
.doc code { font-family: Consolas, 'Courier New', monospace; font-size: .9em; background: #f7f3e9; padding: 1px 4px; }
.doc .lead { padding: 16px 20px; margin: 0 0 8px; background: #f7f3e9; box-shadow: 0 0 0 3px #c6b185; }
.doc .lead p:last-child { margin: 0; }
.doc :focus-visible { outline-color: #851c2b; }

/* ---------- 404 ---------- */
.lost { --art: url(/img/bg_partida.png); --cx: 240; background: #090811; min-height: calc(100vh - 120px); min-height: calc(100svh - 120px);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: calc(var(--k) * 71px) 16px 48px; --k: 3; }
/* a step only where the logo (192 x --k px) still fits the width with 2 px to spare on each side */
@media (min-width: 1441px), (min-width: 772px) and (min-height: 1000px) { .lost { --k: 4; } }
@media (max-width: 579px) { .lost { --k: 2; } }
@media (min-width: 1921px) { .lost { --k: 5; } }
/* the wall is pinned to the top: the crest and its swords end at art row 76, the logo starts at row 80 */
.lost .scene { top: calc(var(--k) * -9px); }
.lost .scene::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(6, 7, 10, .72) 80%, #090811 97%); }
.lost > :not(.scene) { position: relative; z-index: 2; }
.lost .king { position: relative; width: calc(var(--k) * 32px); height: calc(var(--k) * 38px); margin: 16px 0 8px; }
.lost .king .spr { left: 0; top: 0; }
.lost h1 { margin: 0; font-size: 72px; line-height: 1; }
.lost p { margin: 12px 0 24px; font-size: 24px; color: var(--parch); }
.lost .ctas { width: min(100%, 420px); }

/* ---------- up to 960 px: stacked hero ---------- */
@media (max-width: 960px) {
  .hero { min-height: 0; }
  .hero-col { max-width: 520px; padding: 28px 16px calc(var(--k) * 96px); }
  .hero .ctas { flex-direction: column; width: min(100%, 400px); gap: 12px; }
  .pitch { font-size: 23px; margin: 16px 0 22px; }
  .cast { grid-template-columns: repeat(3, 1fr); gap: 28px 12px; }
  .beats { gap: 44px 16px; margin-top: 60px; }
}
@media (max-width: 640px) { .beats { grid-template-columns: 1fr; gap: 32px; } .beats h3 { margin-top: 12px; } }
@media (max-width: 560px) {
  .cast { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .cast p { font-size: 17px; }
  .h2, .close h2 { font-size: 32px; }
  .table { padding: 56px 16px 64px; }
  .doc { padding: 32px 22px 40px; font-size: 17px; }
  .doc h1 { font-size: 34px; }
  .doc h2 { font-size: 23px; }
  .lost h1 { font-size: 52px; }
  .lost p { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .window .anim { display: none; }
  .window .still { display: block; }
  .pause { display: none; }
}
