:root {
  --blue: #3b82f6;
  --blue-dark: #1d4ed8;
  --purple: #8b5cf6;
  --orange: #f97316;
  --yellow: #facc15;
  --green: #22c55e;
  --ink: #16213e;
  --muted: #5d6680;
  --surface: #ffffff;
  --soft: #f4f7ff;
  --line: rgba(29, 78, 216, 0.13);
  --shadow: 0 20px 55px rgba(29, 78, 216, 0.13);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 30rem),
    #fbfdff;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  z-index: 20;
}
.skip-link:focus { left: 1rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
}
.nav-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  gap: 1rem;
  align-items: center;
}
.logo { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 900; font-size: 1.25rem; }
.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}
.search-wrap input {
  width: 100%;
  min-height: 46px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--soft);
  padding: 0 1.1rem;
  outline: none;
}
.search-wrap input:focus { border-color: var(--blue); background: white; }
.assignment-btn, .primary-cta, .secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 1rem;
  font-weight: 900;
}
.assignment-btn, .primary-cta {
  color: white;
  background: linear-gradient(135deg, var(--orange), #fb923c);
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.28);
}
.secondary-cta { background: white; border: 1px solid var(--line); }

.section-pad { max-width: 1180px; margin: 0 auto; padding: 4.5rem 1rem; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 2rem;
  align-items: center;
}
.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--blue-dark);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
}
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2.4rem, 7vw, 5.8rem); line-height: 0.96; margin-bottom: 1rem; letter-spacing: -0.06em; }
.hero-copy { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--muted); max-width: 680px; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border-radius: 36px;
  padding: 2rem;
  background: linear-gradient(145deg, white, #eef5ff);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.orbit-ring {
  position: absolute;
  width: 260px;
  height: 260px;
  border: 4px dashed rgba(59, 130, 246, 0.28);
  border-radius: 50%;
  top: 36px;
  right: 34px;
  animation: spin 18s linear infinite;
}
.planet { position: relative; font-size: 5rem; margin: 4rem 0 2rem; }
.hero-card h2 { font-size: 2rem; line-height: 1; }
.hero-card p { color: var(--muted); font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }

.stats { padding-top: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stats article, .game-card, .policy-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(29, 78, 216, 0.08);
}
.stats article { border-radius: var(--radius); padding: 1.2rem; }
.stats strong { display: block; font-size: 2.1rem; color: var(--purple); }
.stats span { color: var(--muted); font-weight: 800; }
.section-heading { text-align: center; max-width: 700px; margin: 0 auto 1.5rem; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0; letter-spacing: -0.04em; }
.filters { display: flex; justify-content: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter-btn {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 900;
}
.filter-btn.active, .filter-btn:hover { background: var(--blue); color: white; }
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.game-card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  font-size: 3rem;
  background: linear-gradient(135deg, #dbeafe, #f3e8ff);
}
.game-info { padding: 1rem; }
.game-info h3 { margin: 0 0 0.35rem; font-size: 1.08rem; }
.game-info p { margin: 0 0 0.85rem; color: var(--muted); font-size: 0.94rem; }
.badge { display: inline-flex; border-radius: 999px; padding: 0.35rem 0.65rem; font-size: 0.78rem; font-weight: 900; background: #fff7ed; color: #c2410c; }
.play-btn {
  margin-top: 0.9rem;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 0.8rem;
  background: var(--ink);
  color: white;
  font-weight: 900;
  cursor: pointer;
}
.empty-state { text-align: center; color: var(--muted); font-weight: 800; }
.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 0.2rem 0 0; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; font-weight: 900; }
.policy-page { max-width: 920px; }
.policy-card { border-radius: 32px; padding: clamp(1.2rem, 4vw, 3rem); }
.policy-card h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.policy-card h2 { margin-top: 2rem; }
.policy-note { border-left: 4px solid var(--orange); padding-left: 1rem; font-weight: 800; }

@media (max-width: 900px) {
  .nav-shell { grid-template-columns: 1fr; }
  .assignment-btn { width: 100%; }
  .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .section-pad { padding: 3rem 1rem; }
  .game-grid { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .hero-actions a { width: 100%; }
  h1 { letter-spacing: -0.04em; }
}
