/* ═══════════════════════════════════════════════════
   site.css — CyMMEC shared design system
   All main site pages link to this file.
   Course pages (course/) use their own dark theme.
   ═══════════════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }

/* ── DESIGN TOKENS ── */
:root {
  --white:        #FFFFFF;
  --off-white:    #F9F6F2;
  --cream:        #F2EDE6;
  --green:        #2D5016;
  --green-mid:    #4A7C2F;
  --green-light:  #EDF3E8;
  --terra:        #C4572A;
  --terra-dark:   #A64420;
  --terra-light:  #FBF1EC;
  --amber:        #D4A843;
  --amber-light:  #FDF6E3;
  --purple:       #6B3FA0;
  --purple-light: #F0EBF8;
  --red:          #B03A2E;
  --red-light:    #FBEAE9;
  --sand:         #E8D5B7;
  --text:         #1E1A16;
  --text-mid:     #4A3F35;
  --text-soft:    #7A6A5A;
  --border:       #E5DDD4;
  --shadow-sm:    0 1px 4px rgba(30,26,22,0.07);
  --shadow-md:    0 4px 20px rgba(30,26,22,0.10);
  --shadow-lg:    0 12px 48px rgba(30,26,22,0.13);
  --r:            12px;
  --r-lg:         20px;
  --font-serif:   'Lora', Georgia, serif;
  --font-sans:    'Nunito', 'Segoe UI', sans-serif;
  --ease:         0.22s ease;
}

/* ── BODY & GLOBALS ── */
body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: var(--font-sans); cursor: pointer; border: none; }
img { display: block; max-width: 100%; }

/* ── LAYOUT ── */
.container        { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.container--narrow{ width: 100%; max-width: 740px;  margin: 0 auto; padding: 0 24px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: 50px;
  font-size: 16px; font-weight: 700; font-family: var(--font-sans);
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
  cursor: pointer; white-space: nowrap; border: none;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--terra); color: var(--white);
  box-shadow: 0 4px 18px rgba(196,87,42,0.30);
}
.btn--primary:hover { background: var(--terra-dark); box-shadow: 0 6px 26px rgba(196,87,42,0.40); }
.btn--primary svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.btn--ghost { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn--ghost:hover { background: var(--green-light); }

.btn--lg { padding: 17px 38px; font-size: 17px; }

/* .btn--sand and .btn-sand are the same; both exist in the HTML */
.btn--sand, .btn-sand {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); color: var(--terra);
  box-shadow: var(--shadow-md); font-size: 16px; font-weight: 800;
  padding: 15px 36px; border-radius: 50px;
  transition: transform var(--ease), box-shadow var(--ease);
  font-family: var(--font-sans); cursor: pointer; border: none;
}
.btn--sand:hover, .btn-sand:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn--sand svg, .btn-sand svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ── HEADER ── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-serif); font-size: 24px; font-weight: 700;
  color: var(--green); letter-spacing: -0.01em;
}
.logo__mark {
  width: 34px; height: 34px; background: var(--green);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo__mark svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.logo__sub {
  font-family: var(--font-sans); font-size: 10px; color: var(--text-soft);
  font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  display: block; line-height: 1; margin-top: 2px;
}

.nav__links { display: flex; align-items: center; gap: 2px; }
.nav__links a {
  padding: 7px 13px; border-radius: 50px;
  font-size: 15px; font-weight: 600; color: var(--text-mid);
  transition: background var(--ease), color var(--ease);
  position: relative;
}
.nav__links a:hover, .nav__links a.active {
  background: var(--green-light); color: var(--green);
}

.nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px; border-radius: 50px;
  font-size: 15px; font-weight: 800; color: var(--white);
  background: var(--terra); margin-left: 6px;
  transition: background var(--ease), transform var(--ease);
}
.nav__cta:hover { background: var(--terra-dark); transform: translateY(-1px); }

#nav-cta { display: none; margin-left: 6px; }

/* ── HAMBURGER ── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; padding: 8px; border-radius: 8px; border: none; cursor: pointer;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE NAV ── */
.mobile-nav {
  display: none; flex-direction: column; gap: 2px;
  background: var(--white); border-top: 1px solid var(--border);
  padding: 12px 20px 20px; box-shadow: var(--shadow-md);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 11px 14px; border-radius: var(--r);
  font-weight: 600; font-size: 16px; color: var(--text-mid);
  transition: background var(--ease);
}
.mobile-nav a:hover { background: var(--green-light); color: var(--green); }
.mobile-nav .nav__cta { margin: 8px 0 0; justify-content: center; }
.mobile-nav .btn { margin-top: 8px; justify-content: center; }

/* ── SECTION HEADINGS (shared across index, courses, etc.) ── */
.eyebrow {
  text-align: center; font-size: 12px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 10px;
}
.sec-h2 {
  text-align: center; font-family: var(--font-serif);
  font-size: clamp(26px, 3.5vw, 40px); color: var(--text);
  letter-spacing: -0.01em; margin-bottom: 14px; line-height: 1.2;
}
.sec-sub {
  text-align: center; max-width: 540px; margin: 0 auto 36px;
  color: var(--text-soft); font-size: 17px; line-height: 1.65;
}

/* ── PAGE HERO (interior pages) ── */
.page-hero {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 48px;
}
.page-hero__inner { max-width: 680px; }
.page-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--terra); margin-bottom: 14px;
}
.page-hero__eyebrow::before {
  content: ''; display: block;
  width: 20px; height: 2px; background: var(--terra);
  border-radius: 2px; flex-shrink: 0;
}
.page-hero__h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 46px); color: var(--text);
  letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 14px;
  max-width: 600px;
}
.page-hero__sub {
  font-size: 17px; color: var(--text-soft);
  line-height: 1.65; max-width: 520px; margin-bottom: 20px;
}

/* ── TRUST BAR ── */
.trust-bar { background: var(--green); padding: 14px 0; }
.trust-bar__inner {
  display: flex; align-items: center; justify-content: center;
  gap: 36px; flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.82);
}
.trust-item svg {
  width: 15px; height: 15px; stroke: rgba(255,255,255,0.65);
  stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}

/* ── FILTER BAR (blog, resources) ── */
.filter-bar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 14px 0; position: sticky; top: 68px; z-index: 90;
}
.filter-bar__inner { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-btn {
  padding: 7px 16px; border-radius: 50px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all var(--ease); border: 1.5px solid var(--border);
  background: var(--off-white); color: var(--text-soft); font-family: var(--font-sans);
}
.filter-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }
.filter-btn.active { background: var(--green); color: var(--white); border-color: var(--green); }

/* ── CTA BAND ── */
.cta-band {
  padding: 72px 0; background: var(--green);
  position: relative; overflow: hidden;
}
.cta-band__bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cta-band__bg svg { position: absolute; width: 100%; height: 100%; }
.cta-band__inner {
  position: relative; z-index: 2;
  text-align: center; max-width: 620px; margin: 0 auto;
}
.cta-band__eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--sand); margin-bottom: 14px;
}
.cta-band__h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 44px); color: var(--white);
  line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 18px;
}
.cta-band__body {
  color: rgba(255,255,255,0.72); font-size: 17px;
  line-height: 1.65; margin-bottom: 36px;
}

/* ── BADGE ── */
.badge {
  display: inline-block; padding: 4px 12px;
  border-radius: 50px; font-size: 12px; font-weight: 800; letter-spacing: 0.05em;
}

/* ── CATEGORY COLORS (blog, resources) ── */
.cat--child   { background: var(--green-light);  color: var(--green); }
.cat--senior  { background: var(--purple-light); color: var(--purple); }
.cat--parents { background: var(--terra-light);  color: var(--terra); }
.cat--family  { background: var(--amber-light);  color: #8B6914; }
.cat--expert  { background: var(--cream);        color: var(--text-mid); }

/* ── FORM ELEMENTS (courses modal, assessment) ── */
.form-row { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 800; color: var(--text-mid); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 12px 16px; border-radius: var(--r);
  border: 1.5px solid var(--border); font-size: 16px;
  font-family: var(--font-sans); color: var(--text);
  background: var(--off-white); transition: border-color var(--ease); outline: none;
}
.form-input:focus { border-color: var(--green); background: var(--white); }
.form-submit {
  width: 100%; padding: 15px; border-radius: 50px;
  font-size: 16px; font-weight: 800; color: var(--white);
  background: var(--terra); border: none; cursor: pointer;
  font-family: var(--font-sans);
  box-shadow: 0 4px 16px rgba(196,87,42,0.28);
  transition: all var(--ease); margin-top: 6px;
}
.form-submit:hover { background: var(--terra-dark); transform: translateY(-1px); }
.form-note { font-size: 12px; color: var(--text-soft); text-align: center; margin-top: 10px; }

/* ── FOOTER ── */
.footer {
  background: #1A2E0E; color: rgba(255,255,255,0.6);
  padding: 56px 0 28px;
  border-top: 3px solid var(--terra);
}
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 44px;
}
.footer__logo {
  font-family: var(--font-serif); font-size: 22px; font-weight: 700;
  color: var(--white); display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.footer__logo-mark {
  width: 28px; height: 28px; background: var(--green-mid);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.footer__logo-mark svg { width: 14px; height: 14px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.footer__tagline { font-size: 14px; line-height: 1.65; max-width: 220px; }
.footer__verse  { margin-top: 16px; font-size: 13px; font-style: italic; color: rgba(255,255,255,0.35); line-height: 1.6; }
.footer__col h4 { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 16px; }
.footer__col li + li { margin-top: 10px; }
.footer__col a { font-size: 14px; color: rgba(255,255,255,0.6); transition: color var(--ease); }
.footer__col a:hover { color: var(--white); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; flex-wrap: wrap; gap: 10px;
}
.footer__bottom a { color: rgba(255,255,255,0.5); transition: color var(--ease); }
.footer__bottom a:hover { color: var(--white); }

/* ── SCROLL REVEAL ──
   !important is required here because inline <style> blocks in each page
   declare .reveal { opacity: 1 } which would otherwise override this.
   The reveal animation was previously broken (started visible). ── */
.reveal {
  opacity: 0 !important;
  transform: translateY(22px) !important;
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.in {
  opacity: 1 !important;
  transform: none !important;
}
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__cta   { display: none; }
  #nav-cta    { display: none !important; }
  .hamburger  { display: flex; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .trust-bar__inner { gap: 20px; }
}
@media (max-width: 600px) {
  .footer__grid   { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .trust-bar__inner { gap: 14px; }
  .page-hero { padding: 40px 0 32px; }
}
