/* Design tokens. Light-only by user decision 2026-07-09 (kid-education theme). */
:root {
  color-scheme: light;

  --bg: #ffffff;
  --band: #f6f8f0;
  --surface: #ffffff;
  --border: #e5e9dc;
  --text: #37342e;
  --text-muted: #6d675e;

  --heading: #689f38; /* h1/h2 only — large text, 3.18:1 on white */
  --accent: #2e7d32;  /* small green text + focus outline, 5.13:1 */

  --cta-bg: #f9c513;
  --cta-bg-hover: #edb90c;
  --cta-text: #3a3000;

  --dot-red: #d32f2f;
  --dot-gold: #f9a825;
  --dot-green: #2e7d32;
  --dot-blue: #1976d2;

  --measure: 34rem;
  --page-max: 68rem;
  --radius: 14px;
  --step: clamp(1.5rem, 4vw, 3rem);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system,
    BlinkMacSystemFont, system-ui, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--page-max);
  margin-inline: auto;
  padding: 1.25rem var(--step);
}

.brand {
  font-weight: 800;
  font-size: 1.25rem; /* 20px ≥ 18.66px bold = WCAG large text; #689f38 passes 3:1 */
  letter-spacing: -0.01em;
  color: var(--heading);
  text-decoration: none;
}

.lang-toggle {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Hero -------------------------------------------------------------------- */

.hero {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: clamp(3rem, 9vw, 7rem) var(--step) clamp(2.5rem, 7vw, 5rem);
}

.hero h1 {
  font-size: clamp(2rem, 1.35rem + 3vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  max-width: 20ch;
  color: var(--heading);
}

.hero-subtitle {
  margin-top: 1.5rem;
  max-width: var(--measure);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: var(--text-muted);
}

.hero-body {
  margin-top: 1rem;
  max-width: var(--measure);
  color: var(--text-muted);
}

.cta {
  display: inline-block;
  margin-top: 2.25rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-text);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.cta:hover {
  background: var(--cta-bg-hover);
  transform: translateY(-1px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--band);
  color: var(--dot-green);
  font-size: 0.8125rem;
  font-weight: 600;
}

.hero-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot-green);
}

/* Sections ---------------------------------------------------------------- */

.section {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--step);
  border-top: 1px solid var(--border);
}

#science {
  background: var(--band);
  border-radius: var(--radius);
}

.section h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2.25rem;
  color: var(--heading);
  text-align: center;
}

.section h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  border-radius: 2px;
  background: var(--dot-gold);
  margin: 0.75rem auto 0;
}

.section-label {
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--dot-green);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--dot-green);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card:nth-child(4n + 1) { border-top-color: var(--dot-red); }
.card:nth-child(4n + 2) { border-top-color: var(--dot-gold); }
.card:nth-child(4n + 3) { border-top-color: var(--dot-green); }
.card:nth-child(4n + 4) { border-top-color: var(--dot-blue); }

.card h3 {
  font-size: 1.125rem;
  font-weight: 650;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-muted);
}

.feat-tag {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--band);
  color: var(--dot-green);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Steps ------------------------------------------------------------------- */

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
}

.step {
  counter-increment: step;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.5rem 4.25rem;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--dot-green);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
}

.step:nth-child(1)::before { background: var(--dot-red); }
.step:nth-child(2)::before { background: var(--dot-green); }
.step:nth-child(3)::before { background: var(--dot-blue); }

.step h3 {
  font-size: 1.125rem;
  font-weight: 650;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-muted);
}

/* Research ---------------------------------------------------------------- */

.science-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.finding {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--dot-green);
}

.finding cite {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-style: normal;
}

.stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  align-content: start;
}

.stat-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat-num {
  color: var(--dot-green);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.15;
}

.stat-desc {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--step);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.copyright {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

/* Breakpoints ------------------------------------------------------------- */

@media (min-width: 40rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 60rem) {
  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .science-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
