/* PBS Arcade — shared site styles */
:root {
  --bg: #0c1626;
  --bg-2: #13233a;
  --navy: #1d3551;
  --gold: #ccb17a;
  --gold-hi: #e6cf9a;
  --gold-lo: #9d8350;
  --cream: #f2efe8;
  --muted: #a9b4c4;
  --radius: 16px;
  --heading: 'Russo One', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 50% -200px, #1f3a5c 0%, transparent 70%),
    var(--bg);
  color: var(--cream);
  font-family: var(--body);
  font-weight: 600;
  line-height: 1.5;
}

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

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.site-header { text-align: center; padding: 40px 0 24px; }
.site-header .logo {
  width: clamp(140px, 30vw, 220px);
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.55));
}
.site-header h1 {
  font-family: var(--heading);
  font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  letter-spacing: .04em;
  margin: 16px 0 4px;
  color: var(--gold);
}
.site-header p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* ---------- Game grid ---------- */
main { flex: 1; padding-bottom: 48px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-2), #0f1c2f);
  border: 1px solid rgba(204,177,122,.25);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 12px 28px rgba(0,0,0,.5); }

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--navy);
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Shown when a preview image is missing */
.thumb.placeholder {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 12px, transparent 12px 24px),
    radial-gradient(circle at 50% 40%, #2a4a70, var(--navy));
}
.thumb.placeholder span {
  font-family: var(--heading);
  color: var(--gold);
  font-size: 1.5rem;
  text-align: center;
  padding: 0 16px;
  text-shadow: 0 2px 0 rgba(0,0,0,.4);
}

.card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.card h2 { font-family: var(--heading); font-weight: 400; font-size: 1.3rem; margin: 0; letter-spacing: .02em; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; flex: 1; }
.made-by { font-size: .85rem; color: var(--gold); }

.play {
  align-self: flex-start;
  margin-top: 6px;
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  color: #14223a;
  font-family: var(--heading);
  font-size: 1rem;
  letter-spacing: .06em;
  text-decoration: none;
  box-shadow: 0 3px 0 #6f5c36, 0 6px 14px rgba(0,0,0,.35);
  transition: transform .1s ease, box-shadow .1s ease;
}
.play:hover { transform: translateY(-1px); }
.play:active { transform: translateY(2px); box-shadow: 0 1px 0 #6f5c36; }

.status { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(204,177,122,.2);
  padding: 20px 0 28px;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}
.site-footer a { margin: 0 8px; }

/* ---------- Text pages (privacy) ---------- */
.page { max-width: 760px; }
.page .back { display: inline-block; margin: 24px 0 8px; text-decoration: none; }
.page h1 { font-family: var(--heading); font-weight: 400; color: var(--gold); font-size: clamp(1.7rem, 5vw, 2.3rem); margin: 8px 0; }
.page h2 { font-family: var(--heading); font-weight: 400; font-size: 1.2rem; margin: 32px 0 8px; color: var(--gold-hi); }
.page p, .page li { color: var(--cream); font-weight: 600; }
.page ul { padding-left: 22px; }
.page li { margin: 6px 0; }
.kid-box {
  background: var(--bg-2);
  border: 1px solid rgba(204,177,122,.35);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
}
.kid-box p { margin: 0; }
.effective { color: var(--muted); font-size: .9rem; }

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