:root {
  --night: #14212B;
  --navy: #1F3341;
  --blue: #95B3C9;
  --pale: #D8EBF8;
  --bg: #FFFFFF;
  --bg-2: #F3F5F7;
  --ink: #14212B;
  --ink-muted: #51606C;
  --rule: rgba(20, 33, 43, 0.12);
  --head: 'Lexend', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; margin: 0; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 1.5rem;
}
.eyebrow--dark { color: var(--ink-muted); }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--night);
  color: #fff;
  text-decoration: none;
  font-family: var(--head);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.8rem 1.3rem;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--navy); }
.btn--light { background: #fff; color: var(--night); }
.btn--light:hover { background: var(--pale); }
.btn:focus-visible, .link:focus-visible, .top-links a:focus-visible, .brand:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.link {
  font-weight: 500;
  font-size: 0.95rem;
  text-underline-offset: 4px;
}

/* Hero: night, with the koala large and quiet, bleeding off the corner */
.hero {
  position: relative;
  background: var(--night);
  color: #fff;
  overflow: hidden;
  min-height: min(100svh, 820px);
  display: flex;
  flex-direction: column;
}
.hero-koala {
  position: absolute;
  right: -2vw;
  bottom: -10%;
  height: 92%;
  width: auto;
  max-width: none;
  pointer-events: none;
}
.top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  width: 100%;
}
.brand img { height: 34px; width: auto; }
.top-links { display: flex; align-items: center; gap: 2rem; }
.top-links a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.top-links a:hover { color: #fff; }
.hero-copy {
  position: relative;
  width: 100%;
  margin-top: auto;
  margin-bottom: auto;
  padding-top: 4rem;
  padding-bottom: 6rem;
}
.hero h1 {
  font-size: clamp(2.8rem, 6.6vw, 5.6rem);
  max-width: 12ch;
}
.lede {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 44ch;
  margin: 1.75rem 0 2.25rem;
}

/* Games */
.games { padding: 7rem 0 3rem; }
.games h2, .about-big {
  font-family: var(--head);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
}
.games h2 { margin-bottom: 4rem; }
.game {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}
.game:nth-of-type(even) .game-art { order: 2; }
.game-art {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
}
.game-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.game-art:hover img { transform: scale(1.02); }
.game-art--bake { background: #24130C; }
.game-art--bake img { object-fit: contain; width: 70%; height: 86%; }
.game-art--isles { background: #3CC0DC; }
.game-art--halfdrawn { background: #EEF1F7 url('/img/halfdrawn-field.webp') center / cover; }
.game-art--halfdrawn img { object-fit: contain; width: 48%; height: 70%; }
.game-meta {
  display: flex;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}
.game-meta span { color: var(--ink); }
.game h3 { font-size: clamp(2rem, 3.4vw, 2.75rem); }
.game-body > p:not(.game-meta) {
  color: var(--ink-muted);
  max-width: 42ch;
  margin: 1.1rem 0 2rem;
}
.game-links { display: flex; align-items: center; gap: 1.5rem; }

/* About */
.about { background: var(--bg-2); padding: 6rem 0; }
.about-inner {
  display: grid;
  grid-template-columns: 1fr 2.4fr;
  gap: 2rem;
}
.about-big { margin: 0 0 1.25rem; max-width: 20ch; }
.about-big a { text-decoration-thickness: 2px; text-underline-offset: 6px; }
.about p:not(.eyebrow):not(.about-big) { color: var(--ink-muted); max-width: 50ch; margin: 0; }
.about p a { color: var(--ink); text-underline-offset: 3px; }

/* Footer */
.foot { background: var(--night); color: #fff; }
.foot-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 96px;
  font-size: 0.9rem;
}
.foot-logo { height: 26px; width: auto; }
.foot p { margin: 0; color: rgba(255, 255, 255, 0.6); }
.foot a { margin-left: auto; color: rgba(255, 255, 255, 0.6); text-decoration: none; }
.foot a:hover { color: #fff; }

/* Tablet */
@media (max-width: 900px) {
  .game { grid-template-columns: 1fr; gap: 2rem; }
  .game:nth-of-type(even) .game-art { order: 0; }
  .about-inner { grid-template-columns: 1fr; gap: 0; }
}

/* Phone */
@media (max-width: 640px) {
  .wrap { padding: 0 1rem; }
  .top { height: 68px; }
  .brand img { height: 28px; }
  .top-links { gap: 1.25rem; }
  .top-links a:first-child { display: none; }
  .hero { min-height: 640px; }
  .hero-koala { height: 62%; right: -22vw; bottom: -8%; }
  .hero-copy { padding-top: 3rem; padding-bottom: 12rem; }
  .lede { font-size: 1.1rem; }
  .games { padding: 4.5rem 0 1.5rem; }
  .games h2 { margin-bottom: 2.5rem; }
  .game { padding: 2.5rem 0; }
  .about { padding: 4rem 0; }
  .foot-inner { gap: 1.25rem; height: auto; padding-top: 2rem; padding-bottom: 2rem; flex-wrap: wrap; }
}
