/* ---------- Tokens ---------- */
:root {
  --bg: #0b0d12;
  --bg-alt: #0f1218;
  --surface: #12151c;
  --surface-2: #1a1e27;
  --border: #232834;
  --border-strong: #2f3644;
  --text: #e6e8ee;
  --text-muted: #9aa3b2;
  --text-dim: #6b7383;
  --accent: #2dd4bf;
  --accent-ink: #04201c;
  --accent-soft: rgba(45, 212, 191, 0.12);

  --mc: #7cc36e;
  --valheim: #7fa8d9;
  --pz: #e5534b;
  --factorio: #f5a524;

  --t-unverified: #8b93a3;
  --t-scanned: #fbbf24;
  --t-signed: #a78bfa;
  --t-repro: #34d399;
  --t-reviewed: #60a5fa;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 40px -20px rgba(0, 0, 0, 0.6);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff;
    --bg-alt: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #f1f3f6;
    --border: #e3e6eb;
    --border-strong: #cfd4dc;
    --text: #12151c;
    --text-muted: #4b5463;
    --text-dim: #6b7383;
    --accent: #0f9e8c;
    --accent-ink: #ffffff;
    --accent-soft: rgba(15, 158, 140, 0.1);
    --mc: #3f8f33;
    --valheim: #3b6ea8;
    --pz: #c23a33;
    --factorio: #b8740a;
    --t-unverified: #6b7383;
    --t-scanned: #b8860b;
    --t-signed: #7c5cd6;
    --t-repro: #138a5e;
    --t-reviewed: #2f6fd1;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px -16px rgba(16, 24, 40, 0.16);
    color-scheme: light;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: 16px; top: -48px;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600;
  z-index: 100; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; font-size: 17px; }
.brand-mark { width: 26px; height: 26px; }
.brand-mark rect { fill: var(--surface-2); stroke: var(--border-strong); }
.brand-mark path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.brand-tld { color: var(--text-dim); font-weight: 500; }

.site-nav { display: flex; gap: 28px; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color .15s; }
.site-nav a:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text-dim); }
@media (prefers-reduced-motion: no-preference) { .btn:active { transform: translateY(1px); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 104px;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 15% 0%, var(--accent-soft), transparent 70%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 30%, transparent 75%);
  opacity: .55;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  border: 1px solid var(--border-strong); background: var(--surface);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 24px;
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--t-scanned); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t-scanned) 25%, transparent); }

.hero h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 750; letter-spacing: -0.035em; }
.accent { color: var(--accent); }
.lede { margin-top: 22px; font-size: 18px; color: var(--text-muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 28px 0 0; font-size: 14px; color: var(--text-dim); }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 10px var(--accent); }

/* Terminal */
.terminal {
  margin: 0; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: #0a0c10; box-shadow: var(--shadow); overflow: hidden; min-width: 0;
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid #1f2430; background: #10131a; }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: #2a303c; }
.terminal-bar p { margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: #6b7383; }
.terminal-body {
  margin: 0; padding: 18px 18px 20px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.85; color: #c9cfda;
}
.t-prompt { color: #2dd4bf; user-select: none; }
.t-ok { color: #34d399; }
.t-dim { color: #6b7383; }
.t-accent { color: #2dd4bf; font-weight: 600; }
.terminal figcaption { padding: 10px 18px; font-size: 12px; color: #6b7383; border-top: 1px solid #1f2430; background: #0d1015; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 700; }
.section-head > p:not(.eyebrow) { margin-top: 14px; color: var(--text-muted); font-size: 17px; }
.eyebrow { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }

/* Cards */
.cards { display: grid; gap: 20px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; transition: border-color .2s;
}
.card:hover { border-color: var(--border-strong); }
.card h3 { font-size: 18px; font-weight: 650; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 15px; }
.card-icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); margin-bottom: 20px;
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.step-num { display: inline-block; font-family: var(--font-mono); font-size: 13px; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); padding: 2px 8px; border-radius: 6px; margin-bottom: 18px; }
.step h3 { font-size: 17px; font-weight: 650; margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--text-muted); }

/* Games */
.game { padding-top: 32px; overflow: hidden; }
.game::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--border-strong); }
.game-mc::before { background: var(--mc); }
.game-valheim::before { background: var(--valheim); }
.game-pz::before { background: var(--pz); }
.game-factorio::before { background: var(--factorio); }
.cards.games { grid-template-columns: repeat(4, 1fr); }
.cards.games .card { padding: 32px 24px 24px; display: flex; flex-direction: column; }
.cards.games .badge { align-self: flex-start; }
.cards.games .specs { margin-top: auto; flex-direction: column; gap: 10px; }
.cards.games .card > p { margin-bottom: 22px; }
.games-more { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; color: var(--text-muted); font-size: 15px; }
.game .badge { margin-bottom: 16px; }
.specs { display: flex; gap: 28px; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--border); }
.specs dt { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.specs dd { margin: 2px 0 0; font-family: var(--font-mono); font-size: 14px; }

.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  background: var(--surface-2); border: 1px solid var(--border);
}
.badge-planned { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.badge-official { color: var(--t-repro); background: color-mix(in srgb, var(--t-repro) 12%, transparent); border-color: color-mix(in srgb, var(--t-repro) 30%, transparent); }

/* Trust */
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.trust-grid .section-head { margin-bottom: 0; }
.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.checklist li { position: relative; padding-left: 32px; color: var(--text-muted); font-size: 15.5px; }
.checklist li strong { color: var(--text); font-weight: 600; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%232dd4bf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.tiers { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); }
.tiers-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); padding: 14px 16px 10px; }
.tier { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); }
.tier + .tier { border-top: 1px solid var(--border); }
.tier div { display: grid; gap: 2px; }
.tier strong { font-size: 15px; font-weight: 600; }
.tier span:not(.tier-dot) { font-size: 14px; color: var(--text-muted); }
.tier-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; }
.t-unverified { background: var(--t-unverified); }
.t-scanned { background: var(--t-scanned); }
.t-signed { background: var(--t-signed); }
.t-repro { background: var(--t-repro); }
.t-reviewed { background: var(--t-reviewed); }
.tiers-note { font-size: 13px; color: var(--text-dim); padding: 12px 16px 14px; border-top: 1px solid var(--border); }

/* Platforms */
.platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.platform { background: var(--surface); padding: 24px; display: grid; gap: 12px; align-content: start; justify-items: start; }
.platform strong { font-size: 15.5px; font-weight: 600; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 20px; color: var(--text-dim); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--text-muted); font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; align-items: flex-start; }
.footer-tag { margin-top: 8px; font-size: 14px; color: var(--text-dim); }
.disclaimer { max-width: 520px; font-size: 12.5px; color: var(--text-dim); line-height: 1.6; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid, .trust-grid { grid-template-columns: 1fr; gap: 44px; }
  .cards.three, .cards.games { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .platforms { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .site-nav { display: none; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .cards.three, .cards.games, .steps, .platforms { grid-template-columns: 1fr; }
  .lede { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .terminal-body { font-size: 11.5px; }
  .footer-inner { flex-direction: column; gap: 20px; }
}
