/* Responsive Design Studios — site styles. Static, no framework. Dark by default, light when the OS asks. */
:root {
  color-scheme: dark light;
  --bg: #0b0f17;
  --surface: #121a27;
  --surface-2: #172234;
  --line: #26344b;
  --text: #e8eef7;
  --muted: #a9b8cc;
  --link: #67e3f2;
  --link-hover: #a5f0f8;
  --accent: #22d3ee;
  --accent-ink: #032a33;
  --live-bg: #0f3d2a; --live-ink: #7ef0b5; --live-line: #1f6b4a;
  --soon-bg: #3d2f0c; --soon-ink: #fcd27a; --soon-line: #6e5418;
  --focus: #fbbf24;
  --control-line: #6b7d9e; /* ≥3:1 on surface/surface-2 (WCAG 1.4.11 non-text contrast for button boundaries) */
  --radius: 14px;
  --max: 1080px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-2: #eef3f8;
    --line: #d5dfeb;
    --text: #0f1a2a;
    --muted: #46566c;
    --link: #0b6577;
    --link-hover: #074b58;
    --accent: #0e7490;
    --accent-ink: #ffffff;
    --live-bg: #dff7ea; --live-ink: #0d5c37; --live-line: #9ed9bb;
    --soon-bg: #fdf1d6; --soon-ink: #7a4b00; --soon-line: #ecc978;
    --focus: #b45309;
    --control-line: #64748b;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); color: var(--text); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 16px; top: 8px; }
/* visually hidden, still read by assistive tech (game-card link suffixes, table names) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.table-wrap:focus-visible { outline-offset: 0; }
/* Windows High Contrast / forced colours: states that rely on box-shadow or background still read */
@media (forced-colors: active) {
  .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
  .btn, .badge, .card, .game, .feature, .toc { border: 1px solid CanvasText; }
  .btn.primary { border-width: 2px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; letter-spacing: .1px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand:hover { color: var(--text); }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 4px; }
.site-nav a { display: inline-block; padding: 10px 10px; color: var(--muted); text-decoration: none; font-size: 16px; border-radius: 8px; }
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
@media (max-width: 559px) {
  .site-nav { margin-left: 0; width: 100%; }
  .site-nav ul { justify-content: space-between; }
  .site-nav a { padding: 10px 6px; }
}

/* content */
main { padding: 28px 0 56px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.2px; }
h1 { font-size: clamp(28px, 6vw, 42px); margin: 0 0 12px; }
h2 { font-size: clamp(22px, 4.2vw, 28px); margin: 44px 0 12px; }
h3 { font-size: 19px; margin: 0 0 6px; }
h2 .count { color: var(--muted); font-weight: 500; font-size: 0.72em; }
h3.sub { margin: 32px 0 0; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(17px, 2.6vw, 20px); color: var(--muted); max-width: 46em; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
section:first-child > h2:first-child { margin-top: 0; }

/* hero */
.hero { padding: 12px 0 8px; }
.hero h1 { max-width: 16em; }

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 11px;
  font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid var(--control-line); color: var(--text); background: var(--surface-2); }
.btn:hover { color: var(--text); border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { color: var(--accent-ink); filter: brightness(1.08); }

/* badges */
.badge { display: inline-block; font-size: 13px; font-weight: 700; line-height: 1; padding: 5px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; vertical-align: middle; }
.badge.live { background: var(--live-bg); color: var(--live-ink); border-color: var(--live-line); }
.badge.soon { background: var(--soon-bg); color: var(--soon-ink); border-color: var(--soon-line); }

/* feature */
.feature { display: grid; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.feature img { border-radius: 10px; width: 100%; aspect-ratio: 630 / 500; object-fit: cover; }
.feature h3 { font-size: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.facts { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 4px; color: var(--muted); font-size: 15.5px; }
.facts strong { color: var(--text); font-weight: 650; }
@media (min-width: 760px) { .feature { grid-template-columns: 340px 1fr; align-items: center; padding: 22px; gap: 28px; } }

/* card grids */
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 14px; padding: 0; list-style: none; }
@media (min-width: 620px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card p:last-child { margin-bottom: 0; }

.games { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin: 14px 0 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .games { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .games { grid-template-columns: repeat(4, 1fr); } }
.game { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.game img { width: 100%; aspect-ratio: 630 / 500; object-fit: cover; background: var(--surface-2); }
.game .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.game h3 { font-size: 17px; margin: 0; overflow-wrap: anywhere; }
.game .genre { color: var(--muted); font-size: 14.5px; margin: 0; }
.game .tag { font-size: 14.5px; margin: 2px 0 0; }
.game .meta { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14.5px; }
.game .meta a { padding: 4px 0; }

.strip { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin: 14px 0 6px; padding: 0; list-style: none; }
@media (min-width: 420px) { .strip { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 700px) { .strip { grid-template-columns: repeat(6, 1fr); } }
.strip img { border-radius: 8px; aspect-ratio: 630 / 500; object-fit: cover; width: 100%; }
.strip span { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }

/* prose (legal + text pages) */
.prose { max-width: 46em; }
.prose h1 { margin-bottom: 16px; }
.prose h2 { font-size: 23px; margin: 36px 0 10px; }
.prose h3 { margin-top: 24px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 16px; }
.prose li { margin: 4px 0; }
.prose li > ul, .prose li > ol { margin: 4px 0 0; }
.prose code { font-size: .92em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) { .table-wrap table { min-width: 560px; } }
.prose a { overflow-wrap: anywhere; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 0 0 20px; font-size: 15.5px; }
.toc ul { margin: 6px 0 0; padding-left: 1.1em; }
.applist { columns: 2 14em; column-gap: 24px; padding-left: 1.2em; }
.applist li { break-inside: avoid; }
.facts-table th { width: 34%; }
.dl { list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dl img { border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 15px; padding: 22px 0 30px; }
.site-footer ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.site-footer li + li::before { content: "·"; margin-right: 6px; color: var(--muted); }
.site-footer a { color: var(--text); display: inline-block; padding: 6px 0; }
.site-footer p { margin: 4px 0; }
