/* phook games — the menu. No scripts; system text, pixel headings. */
@font-face {
  font-family: "Press Start 2P";
  src: url("/_/fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #1b1424;
  --panel: #2a2138;
  --panel-hi: #372b4a;
  --ink: #f4f1ec;
  --muted: #b9adc9;
  --accent: #ffd93d;
  --accent-ink: #1b1424;
  --line: #4a3d5e;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0 auto;
  max-width: 1080px;
  padding: 40px 16px 32px;
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

header { margin-bottom: 32px; }

h1 {
  margin: 0 0 12px;
  font: 28px/1.2 var(--pixel);
  letter-spacing: -1px;
}
h1 span { color: var(--accent); margin-left: 0.4em; }
header p { margin: 0; color: var(--muted); }

.games {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.game {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform 120ms ease-out, border-color 120ms ease-out;
}
.game:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--panel-hi); }
.game:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.game img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-bottom: 2px solid var(--line);
  background: #000;
}

.title {
  margin: 16px 16px 8px;
  font: 14px/1.4 var(--pixel);
  color: var(--accent);
}
.desc { margin: 0 16px 8px; }
.controls { margin: 0 16px 16px; color: var(--muted); font-size: 14px; }

.play {
  display: inline-block;
  margin: auto 16px 16px;
  align-self: flex-start;
  padding: 10px 14px 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 12px/1 var(--pixel);
  border-radius: 3px;
  text-decoration: none;
}

footer { margin-top: 48px; color: var(--muted); font-size: 14px; }
footer a, .lost a:not(.play) { color: var(--accent); }

.lost { text-align: center; padding: 48px 0; }
.lost .big { font: 64px/1 var(--pixel); color: var(--accent); margin: 0 0 16px; }
.lost .play { margin: 16px 0 0; }

@media (prefers-reduced-motion: reduce) {
  .game { transition: none; }
  .game:hover { transform: none; }
}
