:root {
  --ink:      #2a241c;
  --ink-soft: #6a6052;
  --linen:    #cfc8b4;
  --linen-lit:#ded8c7;
  --rule:     #a79e88;
  --sea:      #a9bfc7;

  --c0: #d6b052;
  --c1: #9faf86;
  --c2: #8fa8be;
  --c3: #b9a0be;

  --page: var(--linen);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #241f19;
    --text: #e6dfcd;
    --text-soft: #a2977f;
    --rule: #4d4638;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--page);
  color: var(--text);
  font-family: "Public Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2.5rem) 2.5rem;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* ---------- title block ---------- */

.masthead {
  padding-bottom: 1.1rem;
  border-bottom: 3px double var(--rule);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.masthead h1 {
  margin: 0;
  font-family: "Zilla Slab", Rockwell, Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.3rem, 5vw + 0.8rem, 3.8rem);
  line-height: 1;
  letter-spacing: -0.015em;
}

.masthead p {
  margin: 0.6rem 0 0;
  max-width: 44ch;
  color: var(--text-soft);
  font-style: italic;
}

/* ---------- game plates ---------- */

.games {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.game { display: flex; flex-direction: column; gap: 1rem; }

.plate {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: 1rem;
  background: var(--sea);
  border: 1px solid var(--rule);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.plate:hover { transform: translateY(-2px); box-shadow: 0 6px 0 -2px var(--rule); }

.plate svg { width: 100%; height: 100%; display: block; }
.plate path {
  stroke: var(--ink);
  stroke-width: 0.7;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.plate .h0 { fill: var(--c0); }
.plate .h1 { fill: var(--c1); }
.plate .h2 { fill: var(--c2); }
.plate .h3 { fill: var(--c3); }
.plate .hx { fill: var(--linen-lit); }

.about h2 {
  margin: 0;
  font-family: "Zilla Slab", Rockwell, Georgia, serif;
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.1;
}
.about h2 a { text-decoration: none; }
.about h2 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

.about > p { margin: 0.4rem 0 0.9rem; color: var(--text-soft); max-width: 46ch; }

.leaders { margin: 0 0 1.1rem; font-size: 0.92rem; max-width: 26rem; }
.leaders > div { display: flex; align-items: baseline; gap: 0.4rem; padding: 0.1rem 0; }
.leaders dt { order: 1; color: var(--text-soft); }
.leaders dt a { text-decoration: none; }
.leaders dt a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.leaders > div::after {           /* dotted leader, as in an atlas index */
  content: "";
  order: 2;
  flex: 1 1 auto;
  align-self: center;
  border-bottom: 1px dotted var(--rule);
  transform: translateY(-0.1em);
}
.leaders dd { order: 3; margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }

.play {
  display: inline-block;
  padding: 0.5rem 1.4rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--text);
  color: var(--page);
  border: 1px solid var(--text);
}
.play:hover { background: transparent; color: var(--text); }

footer {
  margin-top: 3rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--text-soft);
}

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