:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0b;
  --surface: #141416;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --border: #27272a;
  --hover-border: #3f3f46;
  --hover-surface: #18181b;
  --focus: #38bdf8;
  --radius: 12px;
  --max: 640px;
  --space: clamp(1.25rem, 4vw, 2rem);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #18181b;
  --muted: #52525b;
  --border: #e4e4e7;
  --hover-border: #d4d4d8;
  --hover-surface: #f4f4f5;
  --focus: #0284c7;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--max) + 2 * var(--space));
  margin: 0 auto;
  padding: 1.5rem var(--space);
}

.logo {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

nav {
  display: flex;
  gap: 1.25rem;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--surface);
}

.theme-toggle .icon {
  display: none;
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-theme="dark"] .icon-sun,
[data-theme="light"] .icon-moon {
  display: block;
}

nav a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--text);
}

main {
  max-width: calc(var(--max) + 2 * var(--space));
  margin: 0 auto;
  padding: 0 var(--space) 4rem;
}

.hero {
  padding: 4.5rem 0 3.5rem;
}

.label {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  max-width: 18ch;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 36ch;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.95rem;
  font-weight: 600;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.button:focus-visible,
.game-card:focus-visible,
.theme-toggle:focus-visible,
nav a:focus-visible,
.logo:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.section > p {
  max-width: 42ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.game-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.game-card:hover {
  border-color: var(--hover-border);
  background: var(--hover-surface);
}

.game-meta .label {
  margin-bottom: 0.5rem;
}

.game-card h3 {
  margin-bottom: 0.4rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.game-card p {
  max-width: 32ch;
  color: var(--muted);
  font-size: 0.95rem;
}

.game-cta {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.game-card:hover .game-cta {
  color: var(--text);
}

.site-footer {
  max-width: calc(var(--max) + 2 * var(--space));
  margin: 0 auto;
  padding: 2rem var(--space) 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 520px) {
  .hero {
    padding-top: 3rem;
  }

  .game-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button:hover {
    transform: none;
  }
}
