:root {
  --bg: #edeff2;
  --surface: #ffffff;
  --ink: #1f2328;
  --muted: #6b7280;
  --accent: #da1717;
  --line: #d7bd1c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.6;
}

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

main {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  flex: 1;
}

.bits {
  display: grid;
  grid-template-columns: repeat(32, 1fr);
  gap: 4px;
  margin-bottom: 2.5rem;
}
.bits span {
  aspect-ratio: 1;
  background: var(--line);
  border-radius: 2px;
}
.bits span.on { background: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .bits span.on { animation: settle 0.6s ease-out backwards; }
  .bits span.on:nth-child(odd) { animation-delay: 0.15s; }
  .bits span.on:nth-child(3n) { animation-delay: 0.3s; }
  @keyframes settle {
    from { background: var(--line); }
    to { background: var(--accent); }
  }
}

h1 {
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

@media (min-width: 621px) {
  .policy-content h2 {
    font-size: 2.4rem;
    white-space: nowrap;
  }
}

.updated,
.tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.updated { margin-bottom: 2rem; }

section { margin-top: 3rem; }
section h3,
.policy-content h3 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.policy-content h3 { margin-top: 2.5rem; }

section p,
.policy-content p { max-width: 62ch; }
section p + p,
.policy-content p + p { margin-top: 0.75rem; }

.policy-content ul {
  padding-left: 1.4rem;
  margin: 0.75rem 0;
}
.policy-content li { margin-bottom: 0.4rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

.button-link {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  margin-top: 0.5rem;
}
.button-link:hover { background: var(--accent); color: #fff; }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

.footer-links {
  margin-top: 0.4rem;
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent); }

@media (max-width: 620px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }
  .site-nav { gap: 0.85rem; flex-wrap: wrap; }
  main { padding-top: 2.5rem; }
}

/* Free games directory */
.free-games {
  margin-top: 3rem;
}

.section-heading {
  margin-bottom: 1.35rem;
}

.eyebrow,
.game-type {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.eyebrow {
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
}

.free-games h2 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.section-intro {
  margin-top: 0.75rem;
  color: var(--muted);
}

.game-list {
  display: grid;
  gap: 0.8rem;
}

.game-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid #dfe2e6;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 1.15rem 1.2rem;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.game-item + .game-item {
  margin-top: 2rem;
}

.game-item + .game-item {
  margin-top: 1.5rem;
}

.game-item:hover {
  transform: translateY(-2px);
  border-color: var(--line);
  box-shadow: 0 8px 22px rgba(31, 35, 40, 0.08);
}

.game-item {
  border-left: 4px solid var(--accent);
}

.game-item-archive {
  border-left-color: var(--line);
}

.game-type {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.game-copy h3 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
}

.game-copy p {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.game-link {
  white-space: nowrap;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
}

.game-link span {
  display: inline-block;
  margin-left: 0.2rem;
  transition: transform 150ms ease;
}

.game-item:hover .game-link span {
  transform: translateX(3px);
}

.archive-note {
  margin-top: 1rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  line-height: 1.5;
}

@media (max-width: 620px) {
  .game-item {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .game-link {
    justify-self: start;
  }
}
