@font-face {
  font-family: 'Bagel Fat One';
  src: url('fonts/bagel-fat-one-latin-400-normal.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --wall: #edf1ea;
  --paper: #fbfcf8;
  --ink: #26202e;
  --ink-soft: #4e4558;
  --tile-ink: #26202e;
  --tile-paper: #fbfcf8;
  --sofa: #1e5450;
  --sofa-deep: #163f3c;
  --cushion: #f2a7a0;
  --throw: #e9b949;
  --wood: #7a5233;
  --display: 'Bagel Fat One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --wall: #12282a;
    --paper: #1b3437;
    --ink: #f3efe6;
    --ink-soft: #c9c3d0;
    --sofa: #2d7a73;
    --sofa-deep: #225f5a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
}
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--throw); outline-offset: 3px; border-radius: 4px; }

.page { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem 4rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding: 3rem 0 1.5rem;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.2vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}
.lede { max-width: 32rem; margin: 0; font-size: 1.25rem; color: var(--ink-soft); }
.hero .sofa { width: 100%; max-width: 32rem; justify-self: end; }

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  line-height: 1.1;
  margin: 3rem 0 1.5rem;
}

.games {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: 2.5rem 2rem;
}
.game > a { display: block; text-decoration: none; }
/* The thumbnail is a lit room in both colour schemes, so dark upholstery stays visible. */
.thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  border: 3px solid var(--tile-ink);
  border-radius: 18px;
  background: #edf1ea;
}
.thumb .sofa { width: 80%; height: auto; }
.game h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.1;
  margin: 0.9rem 0 0.35rem;
}
.game > a:hover h3, .game > a:focus-visible h3 { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.game p { margin: 0 0 0.3rem; }
.facts { color: var(--ink-soft); font-size: 1rem; }
.tag {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.1rem 0.7rem;
  border-radius: 999px;
  background: var(--cushion);
  color: var(--tile-ink);
  font-size: 0.9rem;
  font-weight: 700;
}
.tag-away { background: var(--throw); }

.ways-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.ways h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
.ways p { margin: 0; color: var(--ink-soft); }

.prose { max-width: 40rem; padding-top: 3rem; }
.prose h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; margin: 0 0 1.5rem; }
.prose h2 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1.15; margin: 2.25rem 0 0.5rem; }
.prose h3 { font-size: 1.1rem; font-weight: 700; margin: 1.25rem 0 0.25rem; }
.prose p, .prose li { max-width: 38rem; }
.prose li + li { margin-top: 0.35rem; }
.updated { color: var(--ink-soft); font-size: 1rem; margin: -0.75rem 0 1.5rem; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 2rem; }
  .hero .sofa { justify-self: start; max-width: 22rem; }
  .ways-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}
