@font-face { font-family: 'Press Start 2P'; src: url(fonts/press-start-2p-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'VT323'; src: url(fonts/vt323-latin-400-normal.woff2) format('woff2'); font-display: swap; }

:root {
  --bg: #0e1030; --panel: #161a40; --line: #363652; --ink: #0a0818;
  --text: #e6eee6; --dim: #a8b0d8; --gold: #ffe040; --red: #c82828;
  --grass: #3d9b3d; --grass-2: #2f852f;
  --head: 'Press Start 2P', ui-monospace, monospace;
  --body: 'VT323', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--text); font: 22px/1.35 var(--body);
  background: var(--bg) url(img/bg-tile.png) repeat; image-rendering: pixelated;
}
img { image-rendering: pixelated; display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 4px solid var(--gold); outline-offset: 4px; }
.wrap { max-width: 820px; margin: 0 auto; padding: 0 16px; }
main.wrap { background: var(--bg); padding-bottom: 32px; } /* stars stay in the margins, never behind text */
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); padding: 8px; z-index: 9; }

/* header */
header { background: var(--ink); border-bottom: 4px solid var(--line); }
header h1 { margin: 0; }
header h1 img { width: 100%; max-width: 960px; margin: 0 auto; }
nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; padding: 12px 16px; font: 10px/2 var(--head); }
nav a { color: var(--text); text-decoration: none; }
nav a:hover { color: var(--gold); }

/* type */
h2 { font: 16px/1.6 var(--head); color: var(--gold); margin: 0 0 20px; text-shadow: 4px 4px 0 var(--ink); }
h3 { font: 12px/1.6 var(--head); margin: 0 0 8px; }
p { margin: 0 0 16px; }
section { padding: 56px 0 8px; }
.big { font-size: 26px; }
.small { font-size: 20px; color: var(--dim); }

/* pixel box: an outline on each edge but not the corners, for that notched sprite look */
.box {
  background: var(--panel); padding: 16px 20px; margin: 4px;
  box-shadow: 4px 0 0 var(--line), -4px 0 0 var(--line), 0 4px 0 var(--line), 0 -4px 0 var(--line);
}

/* buttons */
.cta { display: flex; flex-wrap: wrap; gap: 20px; margin: 28px 4px 16px; }
.btn {
  display: inline-block; font: 12px/1 var(--head); padding: 18px 20px; text-decoration: none;
  color: #fff; background: var(--red); border: 4px solid var(--ink);
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.35), inset 4px 4px 0 rgba(255,255,255,.25), 4px 4px 0 var(--ink);
}
.btn.gold { background: var(--gold); color: var(--ink); }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translate(4px, 4px); box-shadow: inset 4px 4px 0 rgba(0,0,0,.35); }

/* screenshots */
.shots { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 16px; }
.shots img { width: 270px; flex: none; scroll-snap-align: start; border: 4px solid var(--ink); box-shadow: 0 0 0 4px var(--line); }

/* grids */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.grid p { margin: 0; color: var(--dim); }
.box p:last-child { margin-bottom: 0; }

/* update log */
.log { margin: 0; padding: 0; list-style: none; }
.log li { margin-bottom: 20px; }
.log time { display: block; font: 10px/1.8 var(--head); color: var(--gold); margin-bottom: 6px; }
.log ul { margin: 0; padding-left: 24px; }
.log li li { margin-bottom: 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 24px 0; }
.stats .box { text-align: center; padding: 16px 8px; }
.stats b { display: block; font: 20px/1.4 var(--head); color: var(--gold); }
.stats span { color: var(--dim); }

/* the chat log, shown as a terminal */
.term { background: var(--ink); padding: 16px 20px; margin: 4px; box-shadow: 4px 0 0 var(--line), -4px 0 0 var(--line), 0 4px 0 var(--line), 0 -4px 0 var(--line); }
.term .bar { font: 10px/1 var(--head); color: var(--dim); margin-bottom: 16px; }
.term p { margin: 0 0 14px; }
.term q { display: block; color: var(--gold); quotes: none; }
.term q::before { content: '> '; }
.term span { display: block; padding-left: 22px; }
.cursor { display: inline-block; width: 12px; height: 20px; background: var(--gold); vertical-align: middle; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

ul.list, ol.list { margin: 0; padding-left: 28px; }
ul.list li, ol.list li { margin-bottom: 10px; }
ul.list li::marker { content: '\25A0  '; color: var(--red); }

/* footer: a strip of pitch */
footer { margin-top: 64px; background: repeating-linear-gradient(90deg, var(--grass) 0 48px, var(--grass-2) 48px 96px); border-top: 4px solid #fff; padding: 28px 0 32px; text-align: center; }
footer p { margin: 0 0 8px; text-shadow: 2px 2px 0 var(--ink); }
footer a { color: #fff; }

/* "are you cool with an AI-made game?" pop-up */
dialog {
  width: calc(100% - 32px); max-width: 460px; padding: 0; border: 0; color: var(--text); background: var(--panel);
  box-shadow: 4px 0 0 var(--line), -4px 0 0 var(--line), 0 4px 0 var(--line), 0 -4px 0 var(--line), 12px 12px 0 var(--ink);
}
dialog::backdrop { background: rgba(10, 8, 24, .8); }
dialog .in { padding: 24px 20px 8px; }
dialog .cta { margin: 20px 4px 16px; }
button.btn { cursor: pointer; }
