:root {
  --bg: #f3f0e8;
  --surface: #ffffff;
  --ink: #1f2140;
  --muted: #5d607f;
  --brand: #3b3f87;
  --brand-dark: #2b2e66;
  --accent: #ffb703;
  --line: #e0dccf;
  --radius: 16px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14152b;
    --surface: #1d1f3d;
    --ink: #f1efe8;
    --muted: #a9abc9;
    --brand: #9aa0ff;
    --brand-dark: #c3c7ff;
    --line: #2d3058;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img, iframe { max-width: 100%; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo img { height: 40px; width: auto; border-radius: 6px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px;
  padding: 8px 14px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand); color: #fff; }

/* Hero */
.hero { padding: 72px 0 56px; text-align: center; }
.hero h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero p.lead { font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 680px; margin: 0 auto 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 700; color: var(--brand); margin-bottom: 12px; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  background: var(--brand); color: #fff; padding: 12px 22px; border-radius: 999px;
  border: 2px solid var(--brand);
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand); color: #fff; }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Sections */
section { padding: 48px 0; }
section h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 12px; letter-spacing: -0.01em; }
.section-sub { color: var(--muted); max-width: 640px; margin: 0 0 28px; }

.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; overflow: hidden;
}
.card h3 { margin: 0 0 8px; font-size: 20px; }
.card p { margin: 0; color: var(--muted); }

.game-card { padding: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.game-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(31,33,64,.12); color: inherit; }
.game-card .thumb { aspect-ratio: 16/10; width: 100%; object-fit: cover; background: var(--line); }
.game-card .body { padding: 20px 24px 24px; }
.game-card .more { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--brand); }

/* Placeholders (replace with real media) */
.ph {
  display: grid; place-items: center; text-align: center; padding: 16px;
  background: repeating-linear-gradient(45deg, var(--line), var(--line) 12px, transparent 12px, transparent 24px);
  color: var(--muted); font-size: 14px; font-weight: 600;
}
.ph.thumb { aspect-ratio: 16/10; }

/* Media */
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.gallery img, .gallery .ph { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.gallery img { height: auto; }
.gallery .ph { aspect-ratio: 9/16; }
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.ph { background: repeating-linear-gradient(45deg, var(--line), var(--line) 12px, transparent 12px, transparent 24px); }

.store-badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* Game page head */
.game-hero { display: grid; gap: 32px; align-items: center; grid-template-columns: 1.2fr 1fr; padding: 56px 0 24px; }
.game-hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.02em; }
.game-hero p { color: var(--muted); font-size: 19px; }
.game-hero .icon { width: 100%; height: auto; max-width: 340px; margin-inline: auto; aspect-ratio: 1; border-radius: 22%; object-fit: cover; box-shadow: 0 12px 40px rgba(31,33,64,.25); }
@media (max-width: 760px) { .game-hero { grid-template-columns: 1fr; text-align: center; } .game-hero .store-badges { justify-content: center; } }

.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.features strong { display: block; margin-bottom: 4px; }

/* Legal */
.legal-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.legal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); margin-bottom: 24px; }
.legal h2 { margin-bottom: 4px; }
.legal h3 { margin: 28px 0 6px; font-size: 19px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 22px; }
.legal .updated { font-size: 14px; color: var(--muted); margin-bottom: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 32px 0; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand); }
