/* ==========================================================================
   Curious Kids — shared styles
   --------------------------------------------------------------------------
   HOW TO EDIT
   - Colors and fonts live in the :root block right below. Change a value
     there and it updates everywhere on the site.
   - Sections are labeled with big comment banners so you can find them.
   ========================================================================== */

/* ---------- 1. Design tokens (colors, fonts, spacing) ---------- */
:root {
  /* Brand colors */
  --red: #b3261e;          /* cinnabar red – buttons, accents (AA contrast on cream) */
  --red-dark: #8c1d17;     /* hover state for red */
  --seal: #a9432b;         /* brick red of the logo seal stamp */
  --gold: #e8b443;         /* gold – decorative touches only (not for text) */
  --gold-soft: #f7e3b0;    /* pale gold – highlights and backgrounds */
  --jade: #1f6f68;         /* jade green – secondary accent */
  --jade-soft: #dcefe9;

  /* Neutrals */
  --ink: #2a211b;          /* main text – warm near-black */
  --ink-soft: #5a4d43;     /* secondary text */
  --cream: #fff8ee;        /* page background */
  --paper: #ffffff;        /* cards */
  --line: #ecdcc4;         /* borders */

  /* Fonts */
  --font-head: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cn: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-logo: "Noto Serif SC", Georgia, "Times New Roman", serif; /* "Curious Kids" wordmark */

  /* Layout */
  --max: 1120px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 6px 24px rgba(74, 44, 20, 0.08);
  --header-h: 72px;
}

/* ---------- 2. Base / reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;                    /* smooth-scroll for nav links */
  scroll-padding-top: calc(var(--header-h) + 12px); /* don't hide headings under sticky header */
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;      /* 17px – comfortable on phones */
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }

:focus-visible {
  outline: 3px solid var(--jade);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Visible only to screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* "Skip to content" link for keyboard users */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; color: #fff; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Placeholder text you still need to fill in — highlighted so it's easy to spot.
   Once you replace a placeholder, remove the <mark class="ph"> wrapper too. */
.ph {
  background: var(--gold-soft);
  color: var(--ink);
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
}

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;                 /* big tap target */
  padding: 0.75em 1.5em;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-dark); }
.btn-primary:hover { background: var(--red-dark); color: #fff; }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 #b98a25; }
.btn-gold:hover { background: #f0c25c; color: var(--ink); }

/* ---------- 4. Header & navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 238, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
/* The logo: a brick-red "seal stamp" with 好奇 stacked vertically,
   a thin brush stroke underneath, and a serif wordmark beside it.
   Built from text (not an image) so it stays crisp at any size. */
.logo-seal {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 48px;
  background: var(--seal, #a9432b);
  color: #fff;
  font-family: var(--font-cn);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.08;
  border-radius: 9px 11px 8px 10px;      /* slightly uneven, like a hand-carved stamp */
}
/* brush-stroke line under the seal */
.logo-seal::after {
  content: "";
  position: absolute;
  left: -5px; right: -5px; bottom: -7px;
  height: 2px;
  border-radius: 50%;
  background: var(--seal, #a9432b);
  opacity: 0.85;
}
.logo-text {
  font-family: var(--font-logo);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: 0.01em;
}
.logo-text small {
  display: block;
  font-family: var(--font-cn);
  font-weight: 900;            /* heavy weight so the small characters stay crisp */
  font-size: 0.82rem;
  color: var(--ink);
  letter-spacing: 0.32em;
  margin-top: 5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 8px 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
}
.nav-links a:hover { background: var(--gold-soft); color: var(--ink); }
.nav-links .btn { margin-left: 8px; padding: 0.4em 1.1em; min-height: 42px; font-size: 1rem; color: #fff; }

/* Hamburger button – hidden on desktop */
.menu-toggle {
  display: none;
  width: 48px; height: 48px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  padding: 12px;
}
.menu-toggle span {
  display: block; height: 3px; background: var(--ink); border-radius: 3px;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle span + span { margin-top: 5px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Switch to mobile menu below 960px */
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .nav-links { flex-direction: column; align-items: stretch; padding: 8px 20px 20px; gap: 0; }
  .nav-links a { padding: 14px 8px; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin: 16px 0 0; border-bottom: 0; }
}

/* ---------- 5. Sections (shared) ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--paper); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }

/* Small Chinese word + pinyin above each heading */
.cn-label {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--red);
}
.cn-label .hanzi { font-family: var(--font-cn); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.1em; }
.cn-label .pinyin { font-size: 0.95rem; font-style: italic; color: var(--ink-soft); }

/* Thin gold divider with a diamond in the middle – subtle Chinese-inspired accent */
.divider {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 0 auto 16px; width: 140px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: var(--gold); }
.divider span { width: 10px; height: 10px; background: var(--red); transform: rotate(45deg); }

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.section-alt .card { background: var(--cream); }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 80px;
  background:
    radial-gradient(circle at 90% 10%, var(--gold-soft) 0, transparent 40%),
    radial-gradient(circle at 0% 100%, var(--jade-soft) 0, transparent 45%),
    var(--cream);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-cn {
  font-family: var(--font-cn);
  color: var(--red);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-bottom: 4px;
}
.hero-cn .pinyin {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--ink-soft);
  margin-left: 6px;
}
.hero h1 { margin-bottom: 0.3em; }
.hero h1 .accent { color: var(--red); }
.hero .tagline { font-size: clamp(1.15rem, 2.5vw, 1.35rem); color: var(--ink-soft); max-width: 34em; }

/* "Registration is open" banner */
.announce {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 28px 0 20px;
  padding: 16px 20px;
  background: var(--paper);
  border: 2px dashed var(--red);
  border-radius: var(--radius);
}
.announce-badge {
  font-family: var(--font-head);
  font-weight: 800;
  background: var(--red);
  color: #fff;
  padding: 8px 16px;            /* roomy tap target – this badge is a link */
  border-radius: 999px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease;
}
a.announce-badge:hover { background: var(--red-dark); color: #fff; }
.announce strong { font-family: var(--font-head); font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-photo {
  position: relative;
}
.hero-photo img {
  border-radius: 32px;
  border: 6px solid var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}
/* Seal-stamp decoration on the hero photo (matches the logo) */
.seal {
  position: absolute;
  right: -18px; bottom: -18px;          /* bottom-right corner, clear of the kids in the photo */
  width: 78px; height: 98px;
  background: var(--seal, #a9432b);
  color: #fff;
  border-radius: 16px 19px 14px 18px;
  display: grid;
  place-items: center;
  font-family: var(--font-cn);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.08;
  text-align: center;
  transform: rotate(6deg);
  box-shadow: 0 6px 16px rgba(169, 67, 43, .35);
}

@media (max-width: 860px) {
  .hero { padding: 40px 0 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { max-width: 460px; margin: 0 auto; }
}

/* ---------- 7. Program cards ---------- */
.program-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.program-card .card-body { padding: 24px; }
.program-card .tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--jade);
  background: var(--jade-soft);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.details { list-style: none; padding: 0; margin: 16px 0 0; border-top: 1px dashed var(--line); }
.details li { padding: 8px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 8px; }
.details li b { min-width: 72px; color: var(--ink-soft); font-weight: 700; }

/* ---------- 8. Who it's for ---------- */
.fit-card { padding: 32px; text-align: center; }
.fit-icon {
  width: 72px; height: 72px; margin: 0 auto 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold-soft);
  font-family: var(--font-cn); font-weight: 700; font-size: 2rem; color: var(--red);
}
/* two-character version (e.g. 年龄) – smaller text so both characters fit in the circle */
.fit-icon-2 { font-size: 1.45rem; letter-spacing: 0.02em; }
/* four-character version (e.g. 中文基础) – stacked 2 × 2 */
.fit-icon-4 { font-size: 1.15rem; line-height: 1.15; text-align: center; letter-spacing: 0.04em; }

/* ---------- 9. Timeline ---------- */
.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 760px;
  position: relative;
}
/* the vertical line */
.timeline::before {
  content: "";
  position: absolute;
  left: 35px; top: 10px; bottom: 10px;
  width: 4px;
  background: repeating-linear-gradient(to bottom, var(--gold) 0 10px, transparent 10px 18px);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}
.timeline .dot {
  position: relative;
  width: 74px; height: 74px;
  border-radius: 50%;
  background: var(--paper);
  border: 4px solid var(--red);
  display: grid; place-items: center;
  font-size: 1.9rem;
}
.timeline .step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}
.timeline .time {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--red);
  font-size: 1.05rem;
}
.timeline h3 { margin: 2px 0 6px; }
.timeline p { margin: 0; color: var(--ink-soft); }

/* ---------- 10. Pricing ---------- */
.pricing-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 32px;
  text-align: center;
  border: 3px solid var(--gold);
  position: relative;
}
.price {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 800;
  color: var(--red);
  line-height: 1.1;
  margin-bottom: 4px;
}
.price-unit { font-size: 0.45em; font-weight: 700; color: var(--ink-soft); }
.price-note { color: var(--ink-soft); margin-bottom: 24px; }
.price-list {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 0 auto 28px;
  max-width: 520px;
}
.price-list li {
  padding: 12px 0 12px 36px;
  border-bottom: 1px dashed var(--line);
  position: relative;
}
.price-list li::before {
  content: "✓";
  position: absolute;
  left: 4px; top: 12px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--jade);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  display: grid; place-items: center;
}

/* ---------- 11. About me ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-photo img {
  border-radius: 28px;
  border: 6px solid var(--gold-soft);
  box-shadow: var(--shadow);
}
.about h2 { margin-bottom: 0.4em; }
.about h2 .name-cn { font-family: var(--font-cn); font-weight: 900; color: var(--red); font-size: 0.85em; margin-left: 0.15em; }
.cheer {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--jade);
}
@media (max-width: 800px) {
  .about { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { max-width: 560px; margin: 0 auto; }
}

/* ---------- 12. Teachers ---------- */
.teacher-card { padding: 28px; text-align: center; }
.teacher-card img {
  width: 160px; height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 5px solid var(--gold-soft);
}
.teacher-card .role { color: var(--red); font-weight: 700; margin-bottom: 12px; }
.teacher-card p:last-child { color: var(--ink-soft); text-align: left; }

/* ---------- 13. Testimonials ---------- */
.quote {
  margin: 0;
  padding: 32px 28px 28px;
  position: relative;
}
.quote::before {
  content: "“";
  position: absolute;
  top: -6px; left: 18px;
  font-family: Georgia, serif;
  font-size: 5rem;
  line-height: 1;
  color: var(--gold);
}
.quote blockquote { margin: 0 0 16px; font-size: 1.1rem; position: relative; }
.quote figcaption { font-weight: 800; color: var(--ink-soft); }

/* ---------- 14. FAQ accordion (uses native <details>/<summary>) ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(74, 44, 20, 0.05);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 56px 18px 20px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  position: relative;
  min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--red);
  font-size: 1.4rem;
  line-height: 30px;
  text-align: center;
}
.faq details[open] summary::after { content: "−"; background: var(--red); color: #fff; }
.faq details[open] summary { border-bottom: 1px dashed var(--line); }
.faq .answer { padding: 16px 20px 6px; }

/* ---------- 15. Contact ---------- */
.contact-box {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 28px;
  background: var(--red);
  color: #fff;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}
/* faint large character in the background */
.contact-box::after {
  content: "好奇";
  position: absolute;
  right: -10px; bottom: -40px;
  font-family: var(--font-cn);
  font-weight: 700;
  font-size: 9rem;
  color: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.contact-box h2, .contact-box .cn-label { color: #fff; }
.contact-box .cn-label .pinyin { color: var(--gold-soft); }
.contact-box p { font-size: 1.15rem; }
.contact-box a:not(.btn) { color: #fff; font-weight: 800; }
.contact-box .ph { color: var(--ink); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; position: relative; z-index: 1; }
.btn-light { background: #fff; color: var(--red); }
.btn-light:hover { background: var(--gold-soft); color: var(--red-dark); }

/* ---------- 16. Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #efe6da;
  padding: 48px 0 32px;
  font-size: 0.95rem;
}
.site-footer a { color: var(--gold); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: #fff; margin-bottom: 18px; }
.footer-brand .logo-text small { color: #cfc3b5; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.disclaimer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: #cfc3b5;
  font-size: 0.875rem;
}

/* ---------- 17. Register page & 404 page ---------- */
.page-hero { padding: 56px 0 24px; text-align: center; }
.page-hero p { color: var(--ink-soft); font-size: 1.15rem; max-width: 640px; margin: 0 auto 1em; }
.back-link { display: inline-block; margin-bottom: 20px; font-weight: 700; }

/* "Want to request this at your school?" callout on the register page */
.school-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  max-width: 760px;
  margin: 28px auto 0;
  padding: 18px 24px;
  background: var(--jade-soft);
  border: 2px dashed var(--jade);
  border-radius: var(--radius);
  text-align: left;
}
.page-hero .school-cta p { margin: 0; max-width: none; font-size: 1.05rem; color: var(--ink); flex: 1 1 280px; }
.school-cta .btn { flex-shrink: 0; }
@media (max-width: 600px) { .school-cta .btn { width: 100%; } }

.form-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 12px;
}
.form-wrap iframe {
  display: block;
  width: 100%;
  height: 1600px;      /* Google Forms don't auto-resize; adjust if your form is longer/shorter */
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.form-fallback { text-align: center; margin: 24px 0 64px; color: var(--ink-soft); }

.notfound { text-align: center; padding: 80px 0 100px; }
.notfound .big-cn {
  font-family: var(--font-cn);
  font-size: clamp(4rem, 15vw, 7rem);
  color: var(--red);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 4px;
}

/* ---------- 18. Small-screen tweaks ---------- */
@media (max-width: 600px) {
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
  .hero-actions .btn, .contact-actions .btn { width: 100%; }
  .timeline::before { left: 27px; }
  .timeline li { grid-template-columns: 58px 1fr; gap: 14px; }
  .timeline .dot { width: 58px; height: 58px; font-size: 1.5rem; }
  .pricing-card { padding: 32px 20px; }
  .seal { width: 62px; height: 78px; font-size: 1.4rem; right: -6px; }
}
