/* ============================================================================
   webdev.games · pages.css
   The static pages (/games/ and /games/<slug>/): the same terminal tokens as
   the front page, set as readable documents. Written for search engines and
   people arriving from one, so they are plain HTML: no JavaScript needed.
   ========================================================================== */

@font-face { font-family: "Plex Mono"; src: url(fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(fonts/plex-mono-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --bg: #080808; --bg-3: #1c1c1c; --bar: #303030; --bar-2: #444444; --border: #4e4e4e;
  --dim-2: #6c6c6c; --dim: #8a8a8a; --fg: #d0d0d0; --bright: #eeeeee;
  --accent: #87afd7; --accent-2: #afd7ff;
  --font: "Plex Mono", "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 14px/22px var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
b, strong { font-weight: 600; color: var(--bright); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }

/* the site nav (.bar) is in bar.css, shared with the terminal page */

.page { max-width: 140ch; margin: 0 auto; padding: 22px 1.5ch 88px; }
.crumbs { color: var(--dim); margin: 0 0 22px; }
.crumbs a { color: var(--dim); }
.crumbs a:hover { color: var(--fg); }

/* a pane, like the front page */
.pane { position: relative; border-top: 1px solid var(--border); padding-top: 26px; margin-top: 14px; }
.pane-title {
  position: absolute; top: 0; left: 1ch; transform: translateY(-50%);
  padding: 0 1ch; background: var(--bg); color: var(--dim); display: flex; gap: 1ch; white-space: nowrap;
}
.pane-title .idx { background: var(--fg); color: var(--bg); padding: 0 .5ch; }
.pane-title .t { color: var(--fg); }

h1 { margin: 6px 0 10px; font-size: 22px; line-height: 30px; font-weight: 600; color: var(--bright); overflow-wrap: anywhere; }
h1 .sub { display: block; font-size: 15px; line-height: 22px; font-weight: 400; color: var(--fg); }
h2.sh, h3.sh { margin: 44px 0 8px; font-size: 14px; line-height: 22px; font-weight: 600; color: var(--bright); letter-spacing: .02em; text-transform: uppercase; }
h2.sh + p, h2.sh + dl, h2.sh + ol, h2.sh + ul { margin-top: 0; }
p { margin: 0 0 12px; max-width: 74ch; }
.lead { font-size: 15px; }
.man-hdr { display: flex; justify-content: space-between; gap: 2ch; font-weight: 600; color: var(--bright); white-space: nowrap; }
.man-hdr .c { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.man-ftr { margin-top: 44px; color: var(--dim); }

/* key chips, same as the front page */
.actions { display: flex; flex-wrap: wrap; gap: 8px 1ch; margin: 14px 0 0; }
.key { display: inline-flex; align-items: baseline; gap: 1ch; padding: 6px 1.5ch; font-weight: 600; text-decoration: none; white-space: nowrap; }
.key-play { background: var(--accent); color: var(--bg); }
.key-play:hover { background: var(--accent-2); color: var(--bg); }
.key-play .key-sub { font-weight: 400; }
.key-more { color: var(--fg); box-shadow: inset 0 0 0 1px var(--border); font-weight: 400; }
.key-more:hover { background: var(--bg-3); color: var(--bright); }
.key-off { color: var(--dim); box-shadow: inset 0 0 0 1px var(--border); }

.screen { margin: 22px 0 0; }
.screen img, .thumb img { display: block; width: 100%; height: auto; border: 1px solid var(--border); background: #000; }
.screen figcaption { color: var(--dim); margin-top: 6px; }
.screen-soon { aspect-ratio: 40 / 21; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--border); background: #000; }
.screen-soon .dim { color: var(--dim); }

dl.kv { display: grid; grid-template-columns: 14ch minmax(0, 1fr); column-gap: 2ch; margin: 0; }
dl.kv dt { color: var(--dim); }
dl.kv dd { margin: 0; color: var(--bright); overflow-wrap: anywhere; }

/* the hub: a grid of cards, so a whole row of games sits above the fold */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(30ch, 1fr)); gap: 30px 3ch; }
.card { display: flex; flex-direction: column; min-width: 0; }
.card .thumb { display: block; text-decoration: none; }
.card .thumb img { display: block; width: 100%; height: auto; border: 1px solid var(--border); background: #000; }
.card .screen-soon { aspect-ratio: 40 / 21; width: 100%; }
.card h3 { margin: 10px 0 0; font-size: 16px; line-height: 22px; overflow-wrap: anywhere; }
.card h3 a { color: var(--bright); text-decoration: none; }
.card h3 a:hover { color: var(--accent-2); text-decoration: underline; }
.card .num { color: var(--dim); margin-right: 1ch; }
.card .tag { margin: 0; color: var(--fg); }
.card .meta { margin: 0; color: var(--dim); }
.card .meta b { color: var(--fg); }
.card .actions { margin-top: auto; padding-top: 12px; }
.card.is-soon .thumb { opacity: .6; }

dl.faq dt { font-weight: 600; color: var(--bright); margin-top: 14px; }
dl.faq dd { margin: 0; max-width: 74ch; }
ul.plain { padding-left: 2ch; margin: 0; }
ul.plain li { margin: 0 0 4px; }

@media (max-width: 720px) {
  .page { padding: 16px 1ch 66px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 1.5ch; }
  .card .key-play .key-sub { display: none; }
  .card .actions { gap: 6px 1ch; }
  h1 { font-size: 20px; line-height: 28px; }
  .man-hdr .c { display: none; }
  dl.kv { grid-template-columns: 11ch minmax(0, 1fr); }
}
@media (hover: none) and (pointer: coarse) {
  .key { padding: 9px 2ch; }
}
