/* Free Homeschool Games homepage */
:root {
  --sky-top: #7ec8ea;
  --sky-mid: #c7ecfa;
  --sky-bottom: #f3fbff;
  --navy: #16324f;
  --navy-soft: #2a4a6b;
  --ink: #1a2b3c;
  --paper: #fffdf6;
  --gold: #ffd24a;
  --orange: #ff8a3d;
  --purple: #6c63ff;
  --teal: #1faf9a;
  --shadow: 0 8px 0 rgba(22, 50, 79, 0.12);
  --font: "Trebuchet MS", "Segoe UI", "Avenir Next", "Avenir", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 40%, var(--sky-bottom) 100%);
  background-attachment: fixed;
}

body { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.tagline {
  margin: 2px 0 0;
  font-weight: 700;
  color: var(--navy-soft);
}

.nav a {
  font-weight: 800;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 3px solid var(--gold);
}

.hero {
  background: var(--paper);
  border: 3px solid var(--navy);
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 22px;
}

.hero h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: clamp(1.7rem, 4.4vw, 2.4rem);
  line-height: 1.15;
}

.hero p {
  margin: 0 auto;
  max-width: 38em;
  font-size: 1.12rem;
  line-height: 1.45;
  font-weight: 600;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.badge {
  background: #e8ffe8;
  border: 2px solid var(--navy);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  color: var(--navy);
  font-size: 0.95rem;
}

.section-label {
  margin: 0 4px 12px;
  color: var(--navy);
  font-size: 1.15rem;
}

.games {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.card {
  display: block;
  background: var(--paper);
  border: 3px solid var(--navy);
  border-radius: 24px;
  padding: 20px 20px 18px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}

.card.playable {
  background: linear-gradient(180deg, #fff7d6 0%, var(--paper) 55%);
  transition: transform 0.08s ease;
}

.card.playable:hover { transform: translateY(-2px); }
.card.playable:active { transform: translateY(2px); box-shadow: 0 4px 0 rgba(22, 50, 79, 0.12); }

.card-kicker {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  border: 2px solid var(--navy);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card.soon .card-kicker {
  background: #d9e7f2;
  color: var(--navy);
}

.card h3 {
  margin: 10px 0 6px;
  font-size: 1.55rem;
  color: var(--navy);
}

.card p { margin: 0; font-weight: 600; line-height: 1.4; }

.play-label {
  display: inline-block;
  margin-top: 14px;
  background: var(--orange);
  color: #fff;
  border: 3px solid var(--navy);
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 4px 0 rgba(22, 50, 79, 0.12);
}

.coming {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .coming { grid-template-columns: repeat(3, 1fr); }
  .card.playable { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; column-gap: 16px; align-items: center; }
  .card.playable .play-label { grid-row: 1 / span 3; grid-column: 2; align-self: center; }
}

footer {
  margin-top: auto;
  padding-top: 8px;
  text-align: center;
  color: var(--navy);
  font-weight: 700;
}

footer p { margin: 0 0 8px; }

footer a { color: var(--navy); font-weight: 800; }

.prose {
  background: var(--paper);
  border: 3px solid var(--navy);
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto 22px;
}

.prose h2 { margin: 0 0 12px; color: var(--navy); }
.prose p { margin: 0 0 12px; line-height: 1.5; font-weight: 600; }
.prose ul { margin: 0 0 12px; padding-left: 1.2em; font-weight: 600; line-height: 1.5; }
