/* Before Tuonela: the site speaks the game's UI - its palette (v2/pixelclient/ui.go), its carved-wood
   panels and recessed slots, and its own 5x7 pixel font. No rounding, no gradients, no smoothing. */
@font-face { font-family: "Korpi Pixel"; src: url(../fonts/korpi-pixel.woff2) format("woff2"); font-display: block; }
:root {
  --outer: #0c100e;      /* uiOuter */
  --wood-dark: #36261a;  /* uiWoodDark */
  --wood-light: #5c442c; /* uiWoodLight */
  --gold-rim: #e8ba56;   /* uiGoldRim */
  --fill: #161c18;       /* uiFill */
  --slot: #0f1411;       /* uiSlotFill */
  --bone: #e4dcc6;       /* uiTextBone */
  --gold: #eec266;       /* uiTextGold */
  --muted: #7a8478;      /* uiTextMuted */
  --bg: #0c100e; --bg-2: #0f1411; --surface: #161c18; --text: #e4dcc6; --accent: #e8ba56; --accent-2: #eec266;
  --radius: 0;
  --font-display: "Korpi Pixel", monospace;
  --font-body: "Korpi Pixel", monospace;
}
html, body { background: var(--outer); }
body { font: 16px/2 var(--font-body); color: var(--bone); text-transform: uppercase; -webkit-font-smoothing: none; }
img, video { image-rendering: pixelated; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; line-height: 1.25; color: var(--gold); }
p { max-width: 56ch; }
.section p + p { margin-top: 16px; }
a { color: var(--gold); }

/* A panel is the game's drawPixelPanel: near-black rim, dark bark border lit top-left, slate fill. */
.panel, .card, .facts div {
  background: var(--fill);
  border: 4px solid var(--wood-dark);
  border-top-color: var(--wood-light); border-left-color: var(--wood-light);
  outline: 2px solid var(--outer);
}
/* A slot is drawPixelSlot: rim, bark ring (gold when active), recessed fill. */
.gallery a, .clips video { border: 4px solid var(--wood-dark); outline: 2px solid var(--outer); background: var(--slot); }
.gallery a:hover, .gallery a:focus-visible { border-color: var(--gold-rim); }

.site-header { background: var(--fill); backdrop-filter: none; border-bottom: 4px solid var(--wood-dark); }
.brand { font-size: 16px; text-decoration: none; color: var(--gold); }
.site-header nav a { font-size: 16px; color: var(--muted); }
.site-header nav a:hover { color: var(--bone); }

.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { background: linear-gradient(to top, var(--outer) 3%, rgb(12 16 14 / .5) 50%, rgb(12 16 14 / .1)); }
.hero .wrap { gap: 20px; }
.hero h1 { font-size: clamp(64px, 12vw, 128px); color: var(--bone); text-shadow: 8px 8px 0 var(--outer); }
.hero .panel { padding: 16px 20px; max-width: 46rem; }
.word { color: var(--bone); }
.word-en { color: var(--muted); margin-top: 8px; }

.btn { font: 16px/1 var(--font-display); border-radius: 0; padding: 14px 20px; background: var(--slot); color: var(--bone);
       border: 4px solid var(--wood-dark); outline: 2px solid var(--outer); transition: none; }
.btn:hover { transform: none; background: var(--slot); color: var(--gold); border-color: var(--gold-rim); }
.btn.primary { color: var(--gold); border-color: var(--gold-rim); }
.btn-row { gap: 16px; }

.section h2 { font-size: 32px; margin-bottom: 24px; }
.section.alt { background: var(--bg-2); }

.runo { margin: 0 0 64px; padding: 24px; max-width: 46rem; }
.runo blockquote { margin: 0; }
.runo blockquote p { font-size: 24px; line-height: 1.75; color: var(--gold); max-width: none; }
.runo-en { color: var(--bone); margin-top: 16px; }
.runo-src { color: var(--muted); margin-top: 16px; }

ul.grid, .gallery, .clips { list-style: none; padding: 0; margin: 0; }
.features { margin-top: 32px; gap: 20px; }
.card { padding: 20px; border-radius: 0; }
.card h3 { font-size: 16px; margin-bottom: 8px; }
.card p { color: var(--bone); }

.clips { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }
.clips h3 { font-size: 16px; margin-bottom: 12px; }
.clips video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 0; }

.gallery { gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr)); }
.gallery a { border-radius: 0; }
.gallery img { transition: none; }
.gallery a:hover img { transform: none; }

.facts { gap: 20px; margin: 24px 0; }
.facts div { padding: 16px; border-radius: 0; }
.facts dt { font-size: 16px; color: var(--muted); letter-spacing: 0; }
.facts dd { font-weight: 400; color: var(--gold); }
.note { color: var(--muted); margin-top: 24px; }
.note code { font: inherit; color: var(--bone); }

.site-footer { color: var(--muted); border-top: 4px solid var(--wood-dark); }
.site-footer a { color: var(--gold); }

#lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
#lightbox::backdrop { background: rgb(12 16 14 / .92); }
#lightbox img { max-width: 96vw; max-height: 90vh; width: auto; height: auto; border: 4px solid var(--wood-dark); outline: 2px solid var(--outer); }
#lightbox .close { position: absolute; top: -52px; right: 0; font: 24px/1 var(--font-display); width: 40px; height: 40px; border: 4px solid var(--wood-dark); background: var(--slot); color: var(--bone); cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-rim); outline-offset: 2px; }
