/* ---------- bigchippy.com ---------- */

:root {
  --ink: #1d1d1f;
  --muted: #75757c;
  --paper: #ffffff;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #ffe9a8; }

/* ---------- centered page frame ---------- */

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 32px 20px 0;
}

/* header + grid sit together in the middle of the screen;
   once there are lots of games the page just scrolls normally */
.center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---------- header ---------- */

.site-header { text-align: center; }

.wordmark {
  margin: 0;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

/* ---------- game buttons ---------- */

.game-grid {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* every row centered, even a partial last row */
  gap: 16px;
  max-width: 700px;          /* caps the grid at 4 buttons per row */
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 158px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.13);
}

.card:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.card:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.card-emoji {
  font-size: 2.4rem;
  line-height: 1;
}

.card-name {
  font-weight: 600;
  font-size: 0.95rem;
}

/* two buttons per row on small phones */
@media (max-width: 420px) {
  .card { width: calc(50% - 8px); }
}

/* card background colours — reuse on any card */
.c1 { background: #fff1cf; }
.c2 { background: #e0f0ff; }
.c3 { background: #ffe4ec; }
.c4 { background: #e2f8e9; }
.c5 { background: #efe7ff; }
.c6 { background: #ffe9d6; }
.c7 { background: #ddf4f6; }
.c8 { background: #f2f0d9; }

/* ---------- footer ---------- */

.site-footer {
  text-align: center;
  padding: 48px 0 28px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- accessibility ---------- */

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