:root {
  --bg: #f6f3ea;
  --surface: #fffdf7;
  --border: #e2dccd;
  --ink: #1f2328;
  --ink-muted: #59616b;
  --accent: #2f6bd8;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 6%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181b;
    --surface: #222327;
    --border: #34363b;
    --ink: #ece8de;
    --ink-muted: #a7a196;
    --accent: #7aa6f5;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
  }
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0 16px;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

header,
main,
footer {
  max-width: 64rem;
  margin: 0 auto;
}
header {
  padding: 3.5rem 0 2rem;
}
h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.01em;
}
.lede {
  margin: 0.4rem 0 0;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.5rem;
}
.tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow:
    var(--shadow),
    0 8px 24px rgb(0 0 0 / 8%);
}
.tile:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.text {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.1rem 1.25rem 1.25rem;
}
h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}
.text p {
  margin: 0 0 1rem;
  color: var(--ink-muted);
}
.play {
  margin-top: auto;
  color: var(--accent);
  font-weight: 600;
}

footer {
  padding: 3rem 0 2rem;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .tile {
    transition: none;
  }
  .tile:hover {
    transform: none;
  }
}
