/* Layout: one narrow column of "cartridge" cards under a keycap-lit header; privacy pages reuse the same column. */
:root {
  --paper: #eef1f5;
  --card: #ffffff;
  --ink: #141c28;
  --muted: #5b6677;
  --line: #d6dce5;
  --accent: #f2b705;      /* arcade coin gold */
  --accent-ink: #141c28;
  --cap: #e9e2cf;         /* vintage keycap beige */
  --cap-edge: #b9b09a;
  --cap-text: #2a2a2a;
  --ok: #1f8a4c;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e131b; --card: #161d29; --ink: #e9edf3; --muted: #9aa6b8; --line: #263142;
    --accent: #f5c230; --accent-ink: #141c28; --cap: #d9d1bb; --cap-edge: #8d8572; --cap-text: #1d1d1d; --ok: #4cc283;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e131b; --card: #161d29; --ink: #e9edf3; --muted: #9aa6b8; --line: #263142;
  --accent: #f5c230; --accent-ink: #141c28; --cap: #d9d1bb; --cap-edge: #8d8572; --cap-text: #1d1d1d; --ok: #4cc283;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.25rem/1 var(--display); letter-spacing: -0.01em; }
.brand-keys { display: flex; gap: 3px; }
.brand-keys span {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px;
  background: var(--cap); color: var(--cap-text); font: 700 0.85rem/1 var(--mono);
  box-shadow: inset 0 -4px 0 var(--cap-edge);
}
.nav { display: flex; gap: 18px; align-items: center; font-size: 0.95rem; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.lang { font: 600 0.8rem/1 var(--mono); letter-spacing: 0.06em; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; }

/* Hero */
.hero .wrap { padding-block: 64px 40px; display: grid; gap: 28px; }
.eyebrow { font: 600 0.78rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
h1 { font: 800 clamp(2.4rem, 6vw, 4.4rem)/1.02 var(--display); letter-spacing: -0.03em; margin: 0; text-wrap: balance; max-width: 16ch; }
h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--accent) 62%); padding: 0 0.08em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 58ch; margin: 0; }
.keys { display: flex; gap: 10px; flex-wrap: wrap; }

/* Vintage keycap buttons */
.key {
  --d: 6px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px calc(12px + var(--d)); border-radius: 10px;
  background: var(--cap); color: var(--cap-text); text-decoration: none;
  font: 700 0.95rem/1 var(--mono); letter-spacing: 0.02em;
  box-shadow: inset 0 calc(-1 * var(--d)) 0 var(--cap-edge), 0 2px 0 rgba(0,0,0,.12);
  transition: transform .08s ease, box-shadow .08s ease, padding .08s ease;
  border: 0; cursor: pointer;
}
.key:hover { filter: brightness(1.03); }
.key:active { transform: translateY(4px); padding-bottom: calc(12px + var(--d) - 4px); box-shadow: inset 0 calc(-1 * var(--d) + 4px) 0 var(--cap-edge); }
.key.gold { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 calc(-1 * var(--d)) 0 #b78a00, 0 2px 0 rgba(0,0,0,.12); }
.key.gold:active { box-shadow: inset 0 calc(-1 * var(--d) + 4px) 0 #b78a00; }
.key small { font-weight: 500; opacity: .7; }
.key[aria-disabled="true"] { cursor: default; opacity: .65; }
.key[aria-disabled="true"]:active { transform: none; padding-bottom: calc(12px + var(--d)); box-shadow: inset 0 calc(-1 * var(--d)) 0 var(--cap-edge); }
@media (prefers-reduced-motion: reduce) { .key { transition: none; } }

/* Sections */
section { padding-block: 24px 48px; }
h2 { font: 800 clamp(1.6rem, 3.5vw, 2.2rem)/1.1 var(--display); letter-spacing: -0.02em; margin: 0 0 6px; text-wrap: balance; }
.section-sub { color: var(--muted); margin: 0 0 24px; max-width: 60ch; }

/* Game cards */
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .games { grid-template-columns: 1fr; } }
.game { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.game-art { aspect-ratio: 1024 / 500; background: var(--line); overflow: hidden; }
.game-art img { width: 100%; height: 100%; object-fit: cover; }
.game-art.typo { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #ffcf33 0 22px, #f2b705 22px 44px); }
.game-art.typo span { font: 800 clamp(1.8rem, 5vw, 2.6rem)/1 var(--display); color: #141c28; letter-spacing: -0.02em; background: #fff; padding: 10px 16px; border-radius: 10px; transform: rotate(-2deg); }
.game-body { padding: 18px 20px 20px; display: grid; gap: 12px; flex: 1; align-content: start; }
.game-head { display: flex; gap: 14px; align-items: center; }
.game-icon { width: 56px; height: 56px; border-radius: 14px; flex: none; border: 1px solid var(--line); object-fit: cover; }
.game h3 { font: 800 1.3rem/1.15 var(--display); margin: 0; letter-spacing: -0.01em; }
.genre { font: 500 0.78rem/1.2 var(--mono); color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 4px; }
.game p { margin: 0; color: var(--muted); }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { font: 600 0.74rem/1 var(--mono); padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.live { border-color: var(--ok); color: var(--ok); }
.pkg { font: 400 0.74rem/1 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.game .keys { margin-top: auto; padding-top: 4px; }

/* Studio strip */
.studio { border-top: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }
.fact { min-width: 0; }
.fact b { display: block; font: 800 1.15rem/1.2 var(--display); margin-bottom: 4px; }
.fact span { color: var(--muted); }

/* Footer */
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
footer .wrap { padding-block: 28px 40px; display: flex; gap: 16px 28px; flex-wrap: wrap; justify-content: space-between; }
footer nav { display: flex; gap: 8px 18px; flex-wrap: wrap; }
footer a { color: var(--muted); }
.mail { font-family: var(--mono); user-select: all; }

/* Privacy pages */
.doc .wrap { max-width: 760px; padding-block: 40px 56px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); max-width: none; }
.doc h2 { font-size: 1.2rem; margin-top: 30px; }
.doc .date { font: 500 0.85rem/1.4 var(--mono); color: var(--muted); margin: 10px 0 24px; }
.doc p, .doc li { max-width: 68ch; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0 32px; }
.toc { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.plist { display: grid; gap: 12px; padding: 0; list-style: none; }
.plist a { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; }
.plist img { width: 40px; height: 40px; border-radius: 10px; }

/* v2: sober hero + classic game tiles */
.hero .wrap { padding-block: 40px 8px; gap: 10px; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 22ch; }
.lead { font-size: 1.1rem; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .tiles { grid-template-columns: 1fr; } }
.tile { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "g n k" "g s k"; align-items: center; gap: 2px 14px;
  padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-decoration: none; min-width: 0; }
a.tile:hover { border-color: var(--ink); }
.tile-glyph { grid-area: g; width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center;
  background: var(--cap); color: var(--cap-text); font: 700 1.6rem/1 var(--mono); box-shadow: inset 0 -5px 0 var(--cap-edge); }
.tile-name { grid-area: n; font: 800 1.15rem/1.2 var(--display); }
.tile-sub { grid-area: s; color: var(--muted); font-size: 0.9rem; }
.tile-key, .tile .chip { grid-area: k; }
.tile-key { padding: 9px 14px calc(9px + var(--d)); }
.tile.soon { opacity: .7; }
.tile.soon .tile-glyph { background: var(--line); color: var(--muted); box-shadow: none; }

[hidden] { display: none !important; }

.brand-mark { height: 22px; width: auto; }
:root[data-theme="dark"] .brand picture source { display: none; }
