/* === Reset & Base === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0b0b0f;
  --bg-card: #14141a;
  --text: #d4d4d8;
  --text-dim: #8b8b94;
  --heading: #f0f0f2;
  --accent: #5b8def;
  --accent-hover: #7ba4f7;
  --border: #23232b;
  --radius: 6px;
  --max-w: 52rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* === Skip link === */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* === Typography === */
h1, h2, h3, h4 {
  color: var(--heading);
  line-height: 1.3;
}
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 600; margin-bottom: 0.75rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover,
a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* === Focus styles === */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* === Layout === */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main {
  flex: 1;
  padding: 2.5rem 0;
}

/* === Header === */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
  white-space: nowrap;
}
.site-logo:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Nav */
.site-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text-dim);
  font-size: 0.875rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--heading);
  background: var(--bg-card);
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  font-size: 0.8125rem;
  color: var(--text-dim);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-inner a {
  color: var(--text-dim);
}
.footer-inner a:hover {
  color: var(--accent);
}
.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* === Cards === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
}

/* === Hero === */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}
.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.hero p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 36rem;
  margin: 0 auto 1.5rem;
}

/* === Game card === */
.game-card {
  display: block;
  color: inherit;
  transition: border-color 0.15s;
}
.game-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.game-card h3 {
  color: var(--heading);
}
.game-card .badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--border);
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

/* === Product page === */
.product-header {
  margin-bottom: 2rem;
}
.product-header h1 {
  margin-bottom: 0.5rem;
}
.product-meta {
  color: var(--text-dim);
  font-size: 0.875rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.product-section {
  margin-bottom: 2rem;
}

/* === Support info box === */
.info-box {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.5rem;
}

/* === Legal pages === */
.legal h2 {
  margin-top: 2rem;
}
.legal h2:first-child {
  margin-top: 0;
}
.legal ul,
.legal ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal li {
  margin-bottom: 0.35rem;
}

/* Disclosure table */
.disclosure-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.disclosure-table th,
.disclosure-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.disclosure-table th {
  color: var(--heading);
  font-weight: 600;
  white-space: nowrap;
}
.disclosure-table td {
  color: var(--text-dim);
}

/* === 404 === */
.not-found {
  text-align: center;
  padding: 4rem 0;
}
.not-found h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

/* === Utility === */
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.text-dim { color: var(--text-dim); }
.text-small { font-size: 0.875rem; }

/* === Button === */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s;
}
.btn:hover,
.btn:focus-visible {
  background: var(--accent-hover);
  text-decoration: none;
  color: #fff;
}

/* === Responsive === */
@media (min-width: 640px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.5rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  main { padding: 3.5rem 0; }
}
