/* =========================================================
  Kindergarten Geometry Games Website Styles
  Edit colors, spacing, and brand styles here.
========================================================= */
:root {
  --bg: #f8fbff;
  --surface: #ffffff;
  --surface-soft: #eff6ff;
  --text: #182133;
  --muted: #617087;
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #10b981;
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #16a34a;
  --border: #dbe7f5;
  --shadow: 0 22px 60px rgba(37, 99, 235, 0.12);
  --radius: 24px;
  --radius-sm: 14px;
  --max-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--max-width));
  margin-inline: auto;
}

.section-padding {
  padding: 78px 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--text);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 999;
}

.skip-link:focus {
  left: 10px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 251, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219, 231, 245, 0.85);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 22px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.brand-text {
  font-size: 1.16rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: inline-block;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--primary);
  background: var(--surface-soft);
  outline: none;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 10%, rgba(16, 185, 129, 0.18), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.18), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 54px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.045em;
  margin: 0;
}

h1 {
  font-size: clamp(2.35rem, 6vw, 4.9rem);
  max-width: 780px;
}

h2 {
  font-size: clamp(1.85rem, 4vw, 3rem);
}

h3 {
  font-size: 1.25rem;
}

.hero-description {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 650px;
  margin: 22px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 850;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.full-width {
  width: 100%;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 34px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.mini-board {
  position: relative;
  min-height: 390px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.86), rgba(236, 253, 245, 0.86)),
    radial-gradient(circle at center, #ffffff, transparent 55%);
  padding: 28px;
}

.mini-label {
  align-self: start;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.large-shape {
  width: 150px;
  height: 150px;
  margin: 10px auto;
}

.mini-question {
  margin: 10px 0;
  font-weight: 900;
  font-size: 1.2rem;
}

.mini-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.mini-options span {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-weight: 800;
}

.floating-shapes .shape-preview {
  position: absolute;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.09));
}

.shape-preview.circle {
  width: 56px;
  height: 56px;
  right: -14px;
  top: 42px;
}

.shape-preview.square {
  width: 48px;
  height: 48px;
  left: -14px;
  bottom: 80px;
}

.shape-preview.triangle {
  right: 52px;
  bottom: -18px;
}

.stats-section {
  padding-top: 28px;
  padding-bottom: 28px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.stat-card,
.info-card,
.feature-list article,
.blog-card,
.tool-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 14px 42px rgba(24, 33, 51, 0.05);
}

.stat-card {
  padding: 24px;
  text-align: center;
}

.stat-card strong {
  display: block;
  color: var(--primary);
  font-size: 2.2rem;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-weight: 800;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.06rem;
}

.tool-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  overflow: hidden;
}

.tool-sidebar {
  padding: 28px;
  background: linear-gradient(180deg, #f8fbff, #eff6ff);
  border-right: 1px solid var(--border);
}

.tool-sidebar h3 {
  margin-bottom: 18px;
}

.mode-list {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.mode-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  color: var(--text);
  font-weight: 800;
}

.mode-option input {
  accent-color: var(--primary);
}

.tool-sidebar .btn + .btn {
  margin-top: 10px;
}

.game-panel {
  padding: 32px;
}

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 850;
}

.question-text {
  color: var(--muted);
  font-size: 1.12rem;
  margin: 10px 0 22px;
}

.shape-stage {
  min-height: 210px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  border: 1px dashed #bad2f4;
  border-radius: 24px;
  margin-bottom: 24px;
}

.game-shape {
  width: 132px;
  height: 132px;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.answer-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 16px;
  min-height: 54px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 850;
  color: var(--text);
}

.answer-btn:hover,
.answer-btn:focus-visible {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.answer-btn.correct {
  border-color: rgba(22, 163, 74, 0.4);
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.answer-btn.wrong {
  border-color: rgba(239, 68, 68, 0.38);
  background: rgba(239, 68, 68, 0.09);
  color: var(--danger);
}

.feedback {
  min-height: 30px;
  margin: 18px 0 0;
  font-weight: 850;
  color: var(--muted);
}

.feedback.success {
  color: var(--success);
}

.feedback.error {
  color: var(--danger);
}

.alt-bg {
  background: #fff;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 36px;
  align-items: start;
}

.two-column p {
  color: var(--muted);
}

.text-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}

.feature-list {
  display: grid;
  gap: 16px;
}

.feature-list article,
.info-card {
  padding: 24px;
}

.feature-list p,
.info-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.blog-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}

.blog-card p:not(.eyebrow) {
  color: var(--muted);
  margin-bottom: 0;
}

.site-footer {
  background: #101827;
  color: #dbe7f5;
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #fff;
}

.footer-grid p,
.footer-links a {
  color: #aab8ca;
}

.footer-heading {
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
}

.copyright {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 34px;
  padding-top: 20px;
  color: #aab8ca;
  font-size: 0.94rem;
}

/* CSS shape objects used by the game */
.circle,
.oval,
.square,
.rectangle,
.diamond,
.hexagon,
.star,
.triangle {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.circle {
  border-radius: 50%;
}

.oval {
  width: 156px;
  height: 104px;
  border-radius: 50%;
}

.square {
  border-radius: 20px;
}

.rectangle {
  width: 170px;
  height: 105px;
  border-radius: 18px;
}

.diamond {
  transform: rotate(45deg);
  border-radius: 18px;
}

.triangle {
  width: 0;
  height: 0;
  background: transparent;
  border-left: 72px solid transparent;
  border-right: 72px solid transparent;
  border-bottom: 132px solid var(--accent);
}

.hexagon {
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
}

.star {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 35%);
}

/* Blog page */
.article-page {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.article-container {
  max-width: 900px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 30px;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 800;
}

.article-header {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: clamp(26px, 5vw, 52px);
  margin-bottom: 34px;
}

.article-header h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.article-summary {
  color: var(--muted);
  font-size: 1.16rem;
  margin: 18px 0 28px;
}

.article-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: clamp(24px, 5vw, 48px);
}

.article-content h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  margin: 34px 0 14px;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  margin: 26px 0 10px;
}

.article-content p {
  color: #3d4b60;
  margin: 0 0 18px;
}

.article-content a {
  color: var(--primary);
  font-weight: 850;
  text-decoration: none;
}

.article-content a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .hero-grid,
  .tool-shell,
  .two-column,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .tool-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .cards-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .blog-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .section-padding {
    padding: 54px 0;
  }

  .navbar {
    min-height: 66px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 10px;
    box-shadow: var(--shadow);
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-menu a {
    width: 100%;
  }

  .hero-actions,
  .trust-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .hero-card {
    padding: 18px;
  }

  .mini-board {
    min-height: 330px;
  }

  .answer-grid {
    grid-template-columns: 1fr;
  }

  .game-panel,
  .tool-sidebar {
    padding: 22px;
  }

  .score-row {
    flex-direction: column;
  }
}
