:root {
  --bg: #fbfbfd;
  --bg-soft: #f2f4f9;
  --surface: #ffffff;
  --ink: #12141a;
  --ink-2: #4a5063;
  --ink-3: #6b7185;
  --line: #e2e4ec;
  --line-strong: #c8ccd9;
  --accent: #2881e7;
  --accent-ink: #1d6fd0;
  --accent-wash: #e9f2fd;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(18, 20, 26, 0.04), 0 8px 24px rgba(18, 20, 26, 0.06);
  --shadow-lg: 0 2px 4px rgba(18, 20, 26, 0.04), 0 24px 48px rgba(18, 20, 26, 0.10);
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --bg-soft: #131620;
    --surface: #161922;
    --ink: #eceef5;
    --ink-2: #b4b9c9;
    --ink-3: #8d93a6;
    --line: #272c3a;
    --line-strong: #3a4054;
    --accent: #5fa8ff;
    --accent-ink: #7db8ff;
    --accent-wash: #0f1d2c;
    --on-accent: #0b1220;
    --shadow: none;
    --shadow-lg: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); font-size: 15px; font-weight: 500; padding: 8px 10px; border-radius: 10px; }
.nav a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
@media (max-width: 420px) { .nav a { padding: 8px 6px; font-size: 14px; } .brand span { font-size: 16px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 40px;
  font-size: 16px; font-weight: 600; line-height: 1;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Hero */
.hero { padding: 56px 0 40px; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 85% 10%, var(--accent-wash), transparent 70%),
    radial-gradient(40% 40% at 0% 100%, var(--accent-wash), transparent 70%);
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) { .hero { padding: 88px 0 72px; } .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; } }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 14px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
.hero h1 { font-size: clamp(36px, 7vw, 60px); font-weight: 800; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); margin: 0 0 28px; max-width: 34em; }
.hero-art { justify-self: center; width: min(320px, 78vw); }
.hero-art img { border-radius: 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }

/* Sections */
section { padding: 56px 0; scroll-margin-top: 64px; }
@media (min-width: 880px) { section { padding: 88px 0; } }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; margin-bottom: 12px; }
.section-head p { color: var(--ink-2); margin: 0; }
.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Featured game */
.feature { display: grid; overflow: hidden; }
@media (min-width: 880px) { .feature { grid-template-columns: 1.2fr 0.8fr; } }
.feature-body { padding: 28px 22px; display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 720px) { .feature-body { padding: 44px; } }
.app-id { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.app-icon { width: 72px; height: 72px; border-radius: 18px; border: 1px solid var(--line); flex: none; }
.app-id h3 { font-size: 24px; font-weight: 750; }
.app-id .tag { font-size: 14px; color: var(--ink-3); margin: 4px 0 0; }
.feature-body p { color: var(--ink-2); margin: 0 0 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.facts li { font-size: 14px; font-weight: 600; color: var(--accent-ink); background: var(--accent-wash); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); padding: 6px 12px; border-radius: 40px; }
.feature-art { background: var(--accent-wash); display: flex; align-items: flex-end; justify-content: center; padding: 32px 24px 0; }
.feature-art img { width: min(280px, 70vw); border-radius: 24px 24px 0 0; }

/* Game grid */
.games { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 720px) { .games { grid-template-columns: 1fr 1fr; } }
.game { padding: 24px 22px; display: flex; flex-direction: column; }
.game .app-icon { width: 60px; height: 60px; border-radius: 15px; }
.game .app-id h3 { font-size: 20px; }
.game p { color: var(--ink-2); margin: 0 0 20px; flex: 1; }

/* Values */
.values { display: grid; gap: 16px; }
@media (min-width: 720px) { .values { grid-template-columns: repeat(3, 1fr); } }
.value { padding: 24px 22px; }
.value .badge { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--accent); margin-bottom: 16px; background: var(--bg); }
.value .badge svg { width: 22px; height: 22px; }
.value h3 { font-size: 19px; margin-bottom: 8px; }
.value p { color: var(--ink-2); margin: 0; font-size: 16px; }
.about-text { max-width: 720px; color: var(--ink-2); margin: 0 0 32px; font-size: 18px; }

/* Contact */
.contact { padding: 32px 22px; text-align: center; }
@media (min-width: 720px) { .contact { padding: 56px; } }
.contact h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin-bottom: 12px; }
.contact p { color: var(--ink-2); margin: 0 auto 24px; max-width: 32em; }
.contact .btn-row { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 15px; }
.foot-grid { display: grid; gap: 32px; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1.4fr; } }
.foot-grid h4 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--ink-2); }
.foot-grid a:hover { color: var(--ink); }
.foot-note { color: var(--ink-3); margin: 12px 0 0; max-width: 26em; }
.copyright { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; }

/* Legal pages */
.legal { padding: 40px 0 72px; }
.crumb { font-size: 14px; color: var(--ink-3); margin: 0 0 20px; }
.crumb a { color: var(--ink-3); }
.legal article { max-width: 760px; padding: 28px 22px; }
@media (min-width: 720px) { .legal article { padding: 48px 56px; } }
.legal .game-label { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-weight: 650; color: var(--ink-2); }
.legal .game-label img { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); }
.legal h1 { font-size: clamp(30px, 5vw, 40px); font-weight: 800; margin: 0 0 24px; }
.legal h2 { font-size: 22px; margin: 32px 0 12px; }
.legal p, .legal li { color: var(--ink-2); overflow-wrap: anywhere; }
.legal strong { color: var(--ink); }
.legal ul { padding-left: 22px; }

.notfound { padding: 96px 0; text-align: center; }
.notfound h1 { font-size: clamp(32px, 6vw, 48px); font-weight: 800; margin-bottom: 12px; }
.notfound p { color: var(--ink-2); margin: 0 0 28px; }
.notfound .btn-row { justify-content: center; }
