@font-face {
  font-family: 'Pixelify Sans';
  src: url('fonts/pixelify-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --sky: #61c9ed;
  --sky-deep: #4bb6dc;
  --cream: #fff9ea;
  --cream-deep: #efe6cf;
  --navy: #12355b;
  --muted: #3d5a78;
  --coral: #e5533f;
  --coral-deep: #c53d2b;
  --gold: #ffdc5a;
  --px: 3px;
  --display: 'Pixelify Sans', ui-rounded, system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --edge: 0 calc(var(--px) * -1) 0 0 var(--navy), 0 var(--px) 0 0 var(--navy), calc(var(--px) * -1) 0 0 0 var(--navy), var(--px) 0 0 0 var(--navy);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--sky);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--sky);
  color: var(--navy);
  font: 16px/1.5 var(--body);
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
}

/* Header */
.hero {
  padding: 48px 0 28px;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(44px, 9vw, 76px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 1px;
  text-shadow: 4px 4px 0 var(--coral);
}

.brand-icon {
  width: clamp(40px, 7vw, 60px);
  height: auto;
  image-rendering: pixelated;
}

.lede {
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 18px;
}

.lede strong {
  font-weight: 700;
}

/* Game cards */
.games {
  display: grid;
  /* auto-fit drops empty columns, so one or two games sit in the middle rather than at the left. */
  grid-template-columns: repeat(auto-fit, minmax(300px, 380px));
  justify-content: center;
  gap: 28px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  margin: var(--px);
  background: var(--cream);
  box-shadow: var(--edge), 8px 8px 0 rgba(18, 53, 91, 0.22);
}

.thumb {
  display: block;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  border-bottom: var(--px) solid var(--navy);
  background: var(--cream-deep);
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 160ms ease;
}

.thumb:hover img {
  transform: scale(1.03);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
}

.card h2 a {
  text-decoration: none;
}

.tagline {
  margin: 4px 0 8px;
  font-weight: 700;
}

.desc {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 1px 8px;
  border: 2px solid var(--navy);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.play {
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 20px;
  background: var(--coral);
  box-shadow: var(--edge), inset 0 -4px 0 var(--coral-deep);
  color: #fff;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
}

.play:hover {
  background: var(--coral-deep);
}

/* Lower sections */
.note {
  margin: 44px auto 0;
  padding: 22px 24px;
  max-width: 720px;
  background: var(--cream);
  box-shadow: var(--edge);
  text-align: center;
}

.note h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
}

.note p {
  margin: 0;
}

footer {
  margin: 40px 0 0;
  padding: 18px 0 32px;
  font-size: 13px;
  text-align: center;
}

footer p {
  margin: 4px 0;
}

@media (max-width: 520px) {
  .hero {
    padding-top: 32px;
  }

  .lede {
    font-size: 16px;
  }

  .games {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thumb img {
    transition: none;
  }
}
