/* =========================================================
   COOL KIDS LEARN — stylesheet
   Theme: sunny playground / pinned-sticker corkboard
   ========================================================= */

:root {
  /* -- color tokens -- */
  --sky: #4FB6E8;
  --sky-deep: #1D7FB0;
  --sky-pale: #E6F6FE;
  --sun: #FFD23F;
  --sun-deep: #E8A800;
  --coral: #FF6B4A;
  --coral-deep: #E04F2E;
  --grass: #3FA34D;
  --grass-deep: #2C7C39;
  --ink: #1B2A4A;
  --paper: #FFFDF8;
  --paper-shade: #F3EFE3;
  --line: #E4DCC8;

  /* -- type tokens -- */
  --font-display: "Fredoka", ui-rounded, "Segoe UI", sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;

  /* -- layout tokens -- */
  --max-w: 1120px;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow-card: 0 6px 0 rgba(27, 42, 74, 0.08), 0 10px 24px rgba(27, 42, 74, 0.10);
  --shadow-pin: 0 8px 0 rgba(27, 42, 74, 0.06), 0 14px 22px rgba(27, 42, 74, 0.14);
}

/* -------------------- reset -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 18px;
}

img { max-width: 100%; display: block; }
a { color: var(--sky-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--coral-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.4rem, 5vw + 1rem, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3vw + 1rem, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* -------------------- skip link -------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* -------------------- focus states -------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.tile:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

/* -------------------- header / nav -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo:hover { color: var(--ink); }
.logo .balloon { font-size: 1.4rem; }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--sun);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  background: var(--sun);
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 3px solid var(--ink);
    flex-direction: column;
    padding: 10px 24px 18px;
    display: none;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; }
}

/* -------------------- hero -------------------- */
.hero {
  background: linear-gradient(180deg, var(--sky-pale) 0%, var(--paper) 100%);
  padding-block: 64px 40px;
  border-bottom: 3px dashed var(--line);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: 20px;
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grass-deep);
  background: #E4F5E7;
  border: 2px solid var(--grass);
  border-radius: 999px;
  padding: 4px 14px;
  width: fit-content;
}

.hero h1 .highlight {
  position: relative;
  white-space: nowrap;
}
.hero h1 .highlight::after {
  content: "";
  position: absolute;
  left: -4px; right: -4px; bottom: 0.05em;
  height: 0.34em;
  background: var(--sun);
  z-index: -1;
  border-radius: 4px;
  transform: rotate(-1deg);
}

.hero-lede { font-size: 1.15rem; max-width: 56ch; color: #3A4B6B; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 999px;
  padding: 14px 26px;
  border: 3px solid var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 5px 0 var(--sun-deep);
}
.btn-primary:hover { color: var(--ink); }
.btn-primary:active { box-shadow: 0 2px 0 var(--sun-deep); }

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 5px 0 var(--line);
}
.btn-secondary:hover { color: var(--ink); }

/* -------------------- pinned sticker tiles -------------------- */
.tile-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 48px;
}

@media (max-width: 720px) {
  .tile-row { grid-template-columns: repeat(2, 1fr); }
}

.tile {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-pin);
  position: relative;
  transition: transform 0.15s ease;
}
.tile:hover { transform: translateY(-4px) rotate(0deg) !important; color: var(--ink); }
.tile:nth-child(1) { transform: rotate(-3deg); }
.tile:nth-child(2) { transform: rotate(2deg); }
.tile:nth-child(3) { transform: rotate(-1deg); }
.tile:nth-child(4) { transform: rotate(3deg); }

.tile::before {
  content: "";
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 14px;
  background: var(--coral);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.tile .tile-icon { font-size: 2.1rem; display: block; margin-bottom: 6px; }
.tile .tile-label { font-family: var(--font-display); font-weight: 600; }

/* -------------------- generic section -------------------- */
.section { padding-block: 64px; }
.section-alt { background: var(--paper-shade); }

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}
.section-head p { color: #3A4B6B; }

/* -------------------- game / activity cards -------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.badge {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral-deep);
  background: #FFE8E1;
  border: 2px solid var(--coral);
  border-radius: 999px;
  padding: 3px 12px;
  width: fit-content;
}

.card h3 { margin-bottom: 2px; }
.card .card-desc { color: #3A4B6B; flex-grow: 1; }

.btn-play {
  font-family: var(--font-display);
  font-weight: 600;
  background: var(--grass);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  align-self: flex-start;
  box-shadow: 0 4px 0 var(--grass-deep);
}
.btn-play:hover { transform: translateY(-2px); }
.btn-play:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--grass-deep); }

.card.is-soon .btn-play {
  background: var(--paper-shade);
  color: #8a8574;
  border-color: var(--line);
  box-shadow: none;
  cursor: not-allowed;
}

/* -------------------- game play area -------------------- */
.game-area {
  border-top: 2px dashed var(--line);
  margin-top: 8px;
  padding-top: 14px;
  display: none;
}
.game-area.open { display: block; }

.game-question {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.game-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.choice-btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--sky-pale);
  border: 2px solid var(--sky-deep);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
}
.choice-btn:hover { background: var(--sky); color: #fff; }
.choice-btn.correct { background: var(--grass); border-color: var(--grass-deep); color: #fff; }
.choice-btn.wrong { background: var(--coral); border-color: var(--coral-deep); color: #fff; }

.game-status {
  margin-top: 12px;
  font-weight: 700;
  min-height: 1.4em;
}

.scramble-word {
  font-family: var(--font-display);
  font-size: 2.1rem;
  letter-spacing: 0.12em;
  color: var(--sky-deep);
  margin-bottom: 6px;
}
.scramble-form { display: flex; gap: 10px; flex-wrap: wrap; }
.scramble-form input {
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  flex: 1;
  min-width: 160px;
}

/* -------------------- tips / blog -------------------- */
.tip-card { border-left: 6px solid var(--sky); }
.tip-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sky-deep);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* -------------------- feature blocks -------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.feature {
  text-align: center;
  padding: 8px;
}
.feature .feature-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 10px;
}

/* -------------------- FAQ -------------------- */
.faq-item {
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--paper);
}
.faq-item summary {
  font-family: var(--font-display);
  font-weight: 600;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--sky-deep);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-a { padding: 0 20px 18px; color: #3A4B6B; }

/* -------------------- footer -------------------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: 40px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--sun); }
.footer-links { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }

.stamp {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid var(--grass);
  color: var(--grass);
  border-radius: 999px;
  padding: 6px 14px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  transform: rotate(-2deg);
}

.footer-fine { font-size: 0.85rem; color: #B9C3D9; margin-top: 24px; text-align: center; }

/* -------------------- 404 page -------------------- */
.notfound {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 60px;
}
.notfound .code {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--coral);
  margin-bottom: 0;
}