/* Landing page. The game's own UI at page scale: cream dialog boxes with an ink border and a hard
   offset shadow, Pixelify Sans for headings and labels, Nunito for reading text. Fonts are the game's
   bundled copies (SIL OFL); tools/build-site.js rewrites these paths to the shipped game folder. */
@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../play/assets/fonts/pixelify-sans-latin.woff2?v=244b6a82a7') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../play/assets/fonts/nunito-latin.woff2?v=244b6a82a7') format('woff2');
}

:root {
  --night: #121a23;
  --stage: #1b2633;
  --stage-2: #24323f;
  --line: #34495e;
  --deep: #0b1118;
  --cream: #fdf8e8;
  --ink: #1d2b3a;
  --ink-soft: #3e4c5c;
  --on-night: #e8edf4;
  --on-night-muted: #a9b6c6;
  --on-night-faint: #7d8ca0;
  --play: #ffb000;
  --play-hover: #ffc640;
  --duck: #ffd400;
  --key: #e6dcc0;
  --pixel: 'Pixelify Sans', monospace;
  --text: 'Nunito', system-ui, sans-serif;
  --gutter: 16px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--on-night); font: 17px/1.6 var(--text); }
a { color: inherit; }
canvas { display: block; image-rendering: pixelated; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cream); color: var(--ink); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--duck); outline-offset: 3px; }

/* Pixel UI primitives */
.box { background: var(--cream); color: var(--ink); border: 4px solid var(--line); border-radius: 6px; box-shadow: 6px 6px 0 rgba(0, 0, 0, .35); }
.label { font: 600 13px/1.2 var(--pixel); letter-spacing: .08em; text-transform: uppercase; }
kbd { font: 500 14px/1 var(--pixel); background: var(--key); color: var(--ink); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 4px; padding: 3px 7px; }

.btn { display: inline-flex; align-items: center; gap: 10px; font: 600 20px/1 var(--pixel); letter-spacing: .03em; text-decoration: none;
  padding: 16px 24px; border: 4px solid var(--line); border-radius: 6px; box-shadow: 5px 5px 0 var(--deep); cursor: pointer;
  transition: transform .08s, box-shadow .08s, background-color .12s; color: var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--deep); }
.btn-play { background: var(--play); }
.btn-play:hover { background: var(--play-hover); }
.btn-ghost { background: var(--cream); }
.btn-ghost:hover { background: #fff; }
.arrow { display: inline-block; width: 0; height: 0; border-left: 10px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; background: rgba(18, 26, 35, .92); backdrop-filter: blur(6px); border-bottom: 2px solid var(--deep); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.wordmark { font: 700 22px/1 var(--pixel); letter-spacing: .02em; text-decoration: none; color: var(--on-night); white-space: nowrap; }
.links { display: flex; gap: 20px; margin-left: auto; font: 500 15px/1 var(--pixel); }
.links a { text-decoration: none; color: var(--on-night-muted); }
.links a:hover { color: var(--on-night); }
.top .btn { padding: 10px 16px; font-size: 16px; box-shadow: 3px 3px 0 var(--deep); border-width: 3px; }

/* Hero: the valley, drawn live with the game's tiles. */
.hero { position: relative; min-height: 600px; overflow: hidden; border-bottom: 4px solid var(--deep); background: #2e5a2e; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(18, 26, 35, .94) 0%, rgba(18, 26, 35, .82) 38%, rgba(18, 26, 35, 0) 70%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 88px; padding-bottom: 72px; }
.hero h1 { margin: 0; font: 700 clamp(48px, 8vw, 96px)/.95 var(--pixel); letter-spacing: .01em; color: #fff;
  text-shadow: 5px 5px 0 var(--line), 8px 8px 0 var(--deep); max-width: 9ch; }
.hero .kicker { color: var(--duck); margin-bottom: 18px; font-size: 15px; }
.pitch { max-width: 30em; margin: 24px 0 32px; font-size: 19px; }
.ctas { display: flex; flex-wrap: wrap; gap: 16px; }
.platform { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; font: 500 15px/1.3 var(--pixel); color: var(--on-night-muted); }
.chip { background: var(--stage-2); color: var(--on-night); border: 2px solid var(--line); border-radius: 4px; padding: 4px 8px; }

/* Sections */
section { padding: 96px 0; }
.alt { background: var(--stage); border-top: 4px solid var(--deep); border-bottom: 4px solid var(--deep); }
h2 { margin: 0 0 8px; font: 700 clamp(32px, 4.4vw, 46px)/1.05 var(--pixel); color: #fff; }
.kicker { color: var(--duck); margin-bottom: 14px; }
.lede { max-width: 38em; color: var(--on-night-muted); margin: 0 0 40px; }

/* Trailer */
/* The heading's own gap when no lede sits between it and the player. */
h2 + .screen { margin-top: 32px; }
.screen { position: relative; aspect-ratio: 16 / 9; background: var(--deep); border: 6px solid var(--line); border-radius: 10px; box-shadow: 10px 10px 0 var(--deep); overflow: hidden; }
.screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Story */
.story { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.story p { margin: 0 0 18px; }
.story .big { font-size: 21px; color: #fff; }
.invite { overflow: hidden; transform: rotate(1.5deg); }
.invite .head { display: flex; gap: 14px; align-items: center; background: #3a4f66; color: #fff; padding: 16px 20px; }
.invite .cal { width: 34px; height: 34px; background: #fff; border-top: 9px solid #c0392b; border-radius: 3px; flex: none; }
.invite .head .label { color: var(--duck); }
.invite .head strong { display: block; margin-top: 6px; font: 600 22px/1 var(--pixel); }
.invite dl { display: grid; grid-template-columns: 80px 1fr; gap: 10px 14px; margin: 0; padding: 20px; font: 500 16px/1.2 var(--pixel); background: #fff; }
.invite dt { color: var(--ink-soft); }
.invite dd { margin: 0; }
.invite .reply { margin: 0 20px 20px; padding: 12px 16px; background: var(--cream); border-left: 4px solid var(--play); }
.invite .reply b { display: block; font-size: 19px; }
.invite .reply small { color: var(--ink-soft); font-size: 14px; }

/* How to play */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 0 0 20px; overflow: hidden; }
.step canvas { width: 100%; aspect-ratio: 5 / 3; border-bottom: 4px solid var(--line); }
.step h3 { margin: 18px 18px 8px; font: 700 21px/1.1 var(--pixel); }
.step h3::before { counter-increment: step; content: counter(step) '. '; color: #b06e00; }
.step p { margin: 0 18px; font-size: 16px; color: var(--ink-soft); }

/* Puzzles and the panel: stills drawn with the game's art */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery canvas { display: block; width: 100%; aspect-ratio: 16 / 9; }
/* One interviewer per row, so the board is drawn large enough to read. */
.boards { display: grid; gap: 20px; }
.seat { display: grid; grid-template-columns: 260px 1fr; overflow: hidden; }
.seat-text { padding: 18px; border-right: 4px solid var(--line); }
.seat .who { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.seat .who canvas { width: 64px; height: 64px; flex: none; background: var(--stage-2); border: 3px solid var(--line); border-radius: 6px; }
.seat h3 { margin: 0; font: 700 22px/1.1 var(--pixel); }
.seat .role { margin: 6px 0 0; font: 500 15px/1.2 var(--pixel); color: #b06e00; }
.seat-text > p { margin: 0; font-size: 16px; color: var(--ink-soft); }
.seat > canvas { display: block; width: 100%; align-self: center; background: #f6f1df; }

/* Who's asking */
.cast { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.cast li { text-align: center; }
.cast canvas { width: 100%; aspect-ratio: 1; background: var(--stage-2); border: 3px solid var(--line); border-radius: 6px; }
.cast .who { display: block; margin-top: 8px; font: 600 15px/1.2 var(--pixel); }
.cast .topic { display: block; font: 400 13px/1.3 var(--pixel); color: var(--on-night-muted); }
.incidents { margin-top: 48px; }
.incidents p { margin: 0 0 12px; color: var(--on-night-muted); }
.monsters { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.monsters canvas { width: 96px; height: 96px; }

/* FAQ */
.faq { display: grid; gap: 14px; max-width: 820px; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font: 600 19px/1.3 var(--pixel); display: flex; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: ''; flex: none; align-self: flex-start; width: 0; height: 0; margin-top: 6px; border-left: 9px solid var(--ink); border-top: 6px solid transparent; border-bottom: 6px solid transparent; transition: transform .15s; }
.faq details[open] summary::before { transform: rotate(90deg); }
.faq details p { margin: 0; padding: 0 22px 20px 45px; color: var(--ink-soft); }

/* Footer */
footer { padding: 80px 0 48px; text-align: center; }
footer .btn { margin: 8px 0 28px; }
.maker { max-width: 36em; margin: 0 auto 28px; color: var(--on-night); }
.maker a { color: var(--duck); }
.legal { max-width: 40em; margin: 0 auto 10px; color: var(--on-night-muted); font-size: 15px; }
.fine { color: var(--on-night-faint); font-size: 14px; margin: 0; }
.noscript { text-align: center; padding: 0 var(--gutter) 32px; }

@media (max-width: 900px) {
  .links { display: none; }
  .top .btn { margin-left: auto; }
  .story { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .seat { grid-template-columns: 1fr; }
  .seat-text { border-right: 0; border-bottom: 4px solid var(--line); }
  .cast { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
  section { padding: 64px 0; }
  .hero { min-height: 580px; }
  .hero::after { background: linear-gradient(180deg, rgba(18, 26, 35, .55) 0%, rgba(18, 26, 35, .92) 50%); }
  .hero .wrap { padding-top: 64px; }
  .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .cast { grid-template-columns: repeat(3, 1fr); }
  .btn { font-size: 18px; padding: 14px 18px; }
  .monsters canvas { width: 72px; height: 72px; }
  .invite { transform: none; }
}
/* Touch screens: the game cannot be played here, so the platform note stands out. */
@media (pointer: coarse) { .platform { color: var(--duck); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* Trailer player (site-assets/trailer.js): the 16:9 screen, and the control bar under it so the
   controls never cover the picture. Fullscreen takes the whole player. */
.screen:focus-visible { outline: 3px solid var(--duck); outline-offset: 4px; }
.trailer-ui { position: absolute; inset: 0; pointer-events: none; }
.trailer-ui > * { pointer-events: auto; }
.trailer-start { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.trailer-start:active { transform: translate(calc(-50% + 3px), calc(-50% + 3px)); }
.trailer-bar { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px; background: var(--stage-2); border: 2px solid var(--line); border-radius: 6px; }
.trailer-bar[hidden], .trailer-end[hidden], .trailer-start[hidden] { display: none; }
.trailer-bar.is-clean { display: none; }
.tb { width: 40px; height: 34px; font: 600 16px/1 var(--pixel); color: var(--ink); background: var(--cream); border: 2px solid var(--line); border-radius: 4px; cursor: pointer; }
.tb.is-off { background: var(--key); text-decoration: line-through; }
.trailer-progress { flex: 1; height: 14px; background: var(--night); border: 2px solid var(--line); border-radius: 3px; cursor: pointer; }
.trailer-fill { height: 100%; width: 0; background: var(--duck); }
.trailer-end { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8%; }
.trailer-end-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.player:fullscreen { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 16px; background: #000; }
.player:fullscreen .screen { width: min(100%, (100vh - 90px) * 16 / 9); border: 0; border-radius: 0; box-shadow: none; }
.player:fullscreen .trailer-bar { width: min(100%, (100vh - 90px) * 16 / 9); }
@media (max-width: 560px) {
  .trailer-start { font-size: 15px; padding: 10px 14px; }
  .trailer-end { padding-bottom: 4%; }
  .trailer-end .btn { font-size: 14px; padding: 8px 12px; }
  .tb { width: 32px; height: 28px; font-size: 13px; }
}

/* 404 page (site/404.html) */
.not-found .wrap { padding-block: 96px; display: grid; gap: 16px; }
.not-found h1 { margin: 0; font: 700 clamp(64px, 12vw, 128px)/1 var(--pixel); color: #fff; }
.not-found p { margin: 0; }
.not-found a { color: var(--cream); }
