/* =========================================================
   Growing Minds Science
   Stylesheet — warm, academic, parent-friendly.
   Palette: warm off-white, dark ink, teal CTAs, muted gold/brown.
   Type: Instrument Serif (display) + Work Sans (body).
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Color — lightened palette */
  --bg: #F7F3EE;             /* warm background */
  --bg-alt: #FCFAF7;          /* alternate (lighter) section */
  --surface: #FFFFFF;         /* card surface */
  --surface-2: #F1ECE3;       /* secondary surface / chips */
  --border: #E4DDD0;          /* warm border */
  --border-soft: #ECE5D7;
  --ink: #23211D;             /* primary text */
  --ink-soft: #3F3D38;
  --ink-muted: #5F5A52;       /* muted text */
  --primary: #6F8F7B;         /* sage accent */
  --primary-hover: #587765;
  --primary-ink: #FFFFFF;
  --accent: #A7C4BC;          /* accent light */
  --accent-soft: #C4D8D1;
  --accent-brown: #8A6E48;    /* legacy alias */
  --warm: #D8C3A5;            /* warm highlight */
  --leaf: #6F8F7B;

  /* Type */
  --font-display: "Instrument Serif", "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --text-xs: 0.8125rem;   /* 13px */
  --text-sm: 0.9375rem;   /* 15px */
  --text-base: 1.0625rem; /* 17px */
  --text-md: 1.1875rem;   /* 19px */
  --text-lg: 1.375rem;    /* 22px */
  --text-xl: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.8vw, 2.875rem);
  --text-hero: clamp(2.25rem, 1.35rem + 3.6vw, 3.75rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(31, 42, 46, 0.04), 0 1px 3px rgba(31, 42, 46, 0.06);
  --shadow-md: 0 4px 14px rgba(31, 42, 46, 0.06), 0 2px 4px rgba(31, 42, 46, 0.04);
  --shadow-lg: 0 18px 40px rgba(31, 42, 46, 0.08), 0 4px 10px rgba(31, 42, 46, 0.04);

  --container: 1200px;
  --container-narrow: 880px;

  --header-height: 72px;
  --transition: 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #161513;
  --bg-alt: #1B1A18;
  --surface: #1F1E1B;
  --surface-2: #25231F;
  --border: #34322D;
  --border-soft: #2A2824;
  --ink: #ECE5D4;
  --ink-soft: #C7C2B5;
  --ink-muted: #8E8B82;
  --primary: #9FBFAB;
  --primary-hover: #BFD6C7;
  --primary-ink: #15201A;
  --accent: #A7C4BC;
  --accent-soft: #87A89F;
  --accent-brown: #C8A878;
  --warm: #D8C3A5;
  --leaf: #9FBFAB;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.4);
  --shadow-lg: 0 18px 40px rgba(0,0,0,0.5);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}



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

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

button { font: inherit; cursor: pointer; }

p { margin: 0 0 var(--space-4); }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
li { margin-bottom: var(--space-2); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 var(--space-4);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }

::selection { background: var(--primary); color: var(--primary-ink); }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  background: var(--ink);
  color: var(--bg);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: 100;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-4); color: var(--bg); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.container--narrow { max-width: var(--container-narrow); }

section { padding-block: clamp(5rem, 8vw, 7rem); /* 80–112px */ }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.site-header.is-scrolled { border-bottom-color: var(--border-soft); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1;
}

.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover { color: var(--ink); background: var(--surface-2); }

.nav__item { position: relative; margin-bottom: 0; }
.nav__details { position: relative; }
.nav__summary {
  cursor: pointer;
  list-style: none;
  gap: var(--space-1);
}
.nav__summary::-webkit-details-marker { display: none; }
.nav__summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  opacity: 0.7;
  transition: transform var(--transition);
}
.nav__details[open] .nav__summary::after {
  transform: translateY(1px) rotate(225deg);
}
.nav__submenu {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: var(--space-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  z-index: 60;
}
.nav__submenu li { margin: 0; }
.nav__submenu-link {
  display: block;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 500;
}
.nav__submenu-link:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.nav__cta { margin-left: var(--space-2); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-muted); }
.theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.nav-toggle__bars { display: block; width: 18px; height: 12px; position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after,
.nav-toggle__bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px;
  background: currentColor; transition: transform var(--transition), opacity var(--transition), top var(--transition);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: 5px; }
.nav-toggle__bars::after { top: 10px; }
[aria-expanded="true"] .nav-toggle__bars::before { top: 5px; transform: rotate(45deg); }
[aria-expanded="true"] .nav-toggle__bars::after { top: 5px; transform: rotate(-45deg); }
[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 6px 14px -8px rgba(14, 92, 102, 0.6);
}
.btn--primary:hover { background: var(--primary-hover); color: var(--primary-ink); box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 10px 20px -8px rgba(14, 92, 102, 0.6); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn--ghost:hover { color: var(--ink); border-color: var(--ink-muted); background: var(--surface); }

.btn--accent {
  background: transparent;
  color: var(--accent-brown);
  border-color: var(--accent);
}
.btn--accent:hover { background: color-mix(in oklab, var(--accent) 12%, transparent); color: var(--accent-brown); }

.btn--lg { padding: 0.95rem 1.6rem; font-size: var(--text-base); }
.btn--block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(4rem, 8vw, 6.5rem);
  position: relative;
  overflow: hidden;
}
.hero::before { content: none; }
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  align-items: center;
}
.hero__media {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px; background: var(--primary);
}
.hero__title {
  margin-top: 0;
  margin-bottom: var(--space-5);
  max-width: 18ch;
  text-wrap: balance;
}
.hero__lede {
  font-size: var(--text-md);
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: var(--space-6);
  line-height: 1.6;
}
.hero__credential {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: var(--space-8);
  max-width: 60ch;
  font-style: italic;
}
.hero__ctas { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.hero__card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-8));
  box-shadow: var(--shadow-md);
  position: relative;
}
.hero__card-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-5);
  font-weight: 600;
}
.hero__pillars { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-5); }
.hero__pillars li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--space-3);
  align-items: start;
  margin: 0;
}
.hero__pillars strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-md);
  color: var(--ink);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}
.hero__pillars span { color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.5; }
.pillar-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: color-mix(in oklab, var(--primary) 10%, var(--surface));
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ---------- Section heading ---------- */
.section-head {
  max-width: 64ch;
  margin-bottom: var(--space-10);
}
.section-head__eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.section-head__title { margin-bottom: var(--space-3); }
.section-head__lede { color: var(--ink-soft); font-size: var(--text-md); margin: 0; max-width: 60ch; }

/* ---------- About / Approach (alternating bg) ---------- */
.section--alt { background: var(--bg-alt); }

/* ---------- Cards (Classes / Approach / Impact) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}
.card-grid--2 { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-5), 2.4vw, var(--space-8));
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card:hover { border-color: var(--ink-muted); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card__eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}
.card__title { margin: 0; font-size: var(--text-lg); font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }
.card__desc { color: var(--ink-soft); margin: 0; font-size: var(--text-sm); line-height: 1.6; }
.card__meta { font-size: var(--text-xs); color: var(--ink-muted); }
.card__list { padding-left: 1rem; margin: 0; }
.card__list li { font-size: var(--text-sm); color: var(--ink-soft); margin-bottom: var(--space-1); }
.card__cta { margin-top: auto; padding-top: var(--space-4); }

.card__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--primary) 9%, var(--surface));
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-2);
}

.tool-card--future {
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--surface) 88%, var(--bg-alt)), var(--surface));
}
.tool-card--future .card__eyebrow { color: var(--ink-muted); }
.tool-card--future .card__icon {
  background: color-mix(in oklab, var(--ink-muted) 10%, var(--surface));
  color: var(--ink-muted);
}

/* ---------- About / company ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  align-items: start;
}
.about--text-first {
  display: block;
  max-width: 820px;
}
.about--text-first .about__prose {
  max-width: 68ch;
}
.about__visual {
  position: relative;
  top: auto;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.about__visual h4 { margin-top: 0; }
.about__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.chip {
  font-size: var(--text-xs);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  border: 1px solid var(--border-soft);
}
.about__prose p { font-size: var(--text-base); color: var(--ink-soft); }


/* ---------- Parent education + systems ---------- */
.systems-callout {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
  max-width: 70ch;
  margin: 0 auto;
}
.systems-callout p { font-size: var(--text-md); color: var(--ink-soft); }
.systems-callout p:last-child { margin-bottom: 0; }

/* ---------- Signup ---------- */
.signup {
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--primary) 8%, var(--bg-alt)) 0%,
    var(--bg-alt) 100%);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.signup__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  align-items: center;
}
.signup__form {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-8));
  box-shadow: var(--shadow-md);
}
.form-row { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.form-label { font-size: var(--text-sm); font-weight: 500; color: var(--ink); }
.form-help { font-size: var(--text-xs); color: var(--ink-muted); }
.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--text-base);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 25%, transparent);
}
.form-status {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  min-height: 1.4em;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
  padding-block: var(--space-12) var(--space-8);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}
.site-footer h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--space-3);
  font-weight: 600;
}
.site-footer p { color: var(--ink-soft); font-size: var(--text-sm); max-width: 38ch; margin-bottom: var(--space-3); }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.footer-list a { color: var(--ink-soft); font-size: var(--text-sm); }
.footer-list a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  color: var(--ink-muted);
  font-size: var(--text-xs);
}
.social-links { display: flex; gap: var(--space-3); }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  background: var(--surface);
  transition: color var(--transition), border-color var(--transition);
}
.social-link:hover { color: var(--ink); border-color: var(--ink-muted); }

/* ---------- Milestones page ---------- */
.tracker-hero { padding-block: clamp(var(--space-12), 7vw, var(--space-20)); }
.tracker-hero__lede {
  color: var(--ink-soft);
  font-size: var(--text-md);
  max-width: 64ch;
}
.tracker-disclaimer {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-6);
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  max-width: 70ch;
}
.tracker-disclaimer strong { color: var(--ink); font-weight: 600; }

.tracker-frame-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-top: var(--space-8);
}
.tracker-frame-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-soft);
}
.tracker-frame-toolbar p { margin: 0; font-size: var(--text-xs); color: var(--ink-muted); }
.tracker-frame-toolbar .btn { padding: 0.5rem 1rem; font-size: var(--text-xs); }
.tracker-frame {
  width: 100%;
  height: clamp(640px, 80vh, 1100px);
  border: 0;
  display: block;
  background: var(--bg);
}
.tracker-fallback {
  padding: clamp(var(--space-6), 3vw, var(--space-10));
  text-align: center;
}
.tracker-fallback p { color: var(--ink-soft); }
.tracker-howto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-12);
}
.howto-step {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-6);
}
.howto-step__num {
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 1.6rem;
  line-height: 1;
}
.howto-step h4 { margin: var(--space-2) 0; }
.howto-step p { font-size: var(--text-sm); color: var(--ink-soft); margin: 0; }

/* ---------- Helpers ---------- */
.muted { color: var(--ink-muted); }
.ink-soft { color: var(--ink-soft); }
.center { text-align: center; }
.lede { font-size: var(--text-md); color: var(--ink-soft); }
.divider {
  width: 40px; height: 1px;
  background: var(--accent);
  margin: var(--space-3) 0 var(--space-5);
  border: 0;
}

/* ---------- How classes work ---------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
.how-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-6);
}
.how-card__num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--primary);
  margin: 0 0 var(--space-2);
  line-height: 1;
  letter-spacing: -0.01em;
}
.how-card__title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
}
.how-card__desc {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}
.how-meta {
  font-size: var(--text-sm);
  max-width: 70ch;
  margin: 0;
}

/* ---------- Product cards (Classes section) ---------- */
.classes {
  /* Most visually prominent section after hero */
  padding-block: clamp(var(--space-20), 10vw, var(--space-32));
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-6);
  align-items: stretch;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 2.4vw, var(--space-8));
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  height: 100%;
}
.product-card:hover {
  border-color: var(--ink-muted);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-card--featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-md);
}
.product-card--featured:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg);
}
.product-card__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}
.product-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}
.product-card__promise {
  color: var(--ink-soft);
  font-size: var(--text-base);
  margin: 0;
  line-height: 1.55;
}
.product-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.product-card__meta div { margin: 0; }
.product-card__meta dt {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 2px;
}
.product-card__meta dd {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink);
}
.product-card__included-label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  margin: 0;
}
.product-card__list {
  padding-left: 1.1rem;
  margin: 0;
}
.product-card__list li {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin-bottom: var(--space-1);
  line-height: 1.5;
}
.product-card__cta {
  margin: 0;
  margin-top: auto;
  padding-top: var(--space-2);
}
.product-card__cta--row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.product-card__cta--row .btn { flex: 1 1 120px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  line-height: 1.4;
}
.badge--soft {
  background: color-mix(in oklab, var(--primary) 10%, var(--surface));
  color: var(--primary);
  border-color: color-mix(in oklab, var(--primary) 18%, transparent);
}
.badge--muted {
  background: var(--surface-2);
  color: var(--ink-soft);
  border-color: var(--border-soft);
}
.badge--accent {
  background: color-mix(in oklab, var(--accent) 18%, var(--surface));
  color: var(--accent-brown);
  border-color: color-mix(in oklab, var(--accent) 30%, transparent);
}

/* ---------- Policy band ---------- */
.policy-band { padding-block: clamp(var(--space-12), 6vw, var(--space-16)); }
.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(var(--space-6), 4vw, var(--space-10));
  max-width: 90ch;
}
.policy-prose {
  font-size: var(--text-base);
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
}

/* ---------- Class detail page ---------- */
.class-hero {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
}
.class-hero__title {
  margin: 0 0 var(--space-5);
  max-width: 22ch;
  text-wrap: balance;
}
.class-hero__lede {
  font-size: var(--text-md);
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: var(--space-6);
}
.check-list {
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 0;
  display: grid;
  gap: var(--space-3);
}
.check-list li {
  position: relative;
  padding-left: 1.75rem;
  font-size: var(--text-base);
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 12px; height: 1px;
  background: var(--accent);
}
.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.diff-item h3 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
}
.diff-item p {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}
.modules {
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0 0;
  display: grid;
  gap: var(--space-3);
}
.modules li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-4);
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-6);
  margin: 0;
}
.modules__num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--primary);
  line-height: 1;
}
.modules h3 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
}
.modules p {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}
.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(var(--space-8), 5vw, var(--space-16));
}
.cred-box {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
}
.cred-box p {
  font-size: var(--text-base);
  color: var(--ink-soft);
  line-height: 1.6;
}
.cred-box p:last-child { margin-bottom: 0; }
.faq {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  transition: border-color var(--transition);
}
.faq details[open] { border-color: var(--ink-muted); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  font-size: var(--text-base);
  list-style: none;
  padding-right: 1.5rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--ink-muted);
  transition: transform var(--transition);
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin: var(--space-3) 0 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ---------- Mobile ---------- */
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-10); }
  .hero__title { max-width: 18ch; }
  .about { grid-template-columns: 1fr; }
  .about__visual { position: static; }
  .signup__inner { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; gap: var(--space-6); }
  .product-grid { grid-template-columns: 1fr; }
  .product-card__cta--row { flex-direction: column; }
  .product-card__cta--row .btn { flex: 1 1 auto; width: 100%; }
  .tracker-frame { height: 70vh; min-height: 560px; }
}

@media (max-width: 720px) {
  :root { --header-height: 64px; }
  .nav-toggle { display: inline-flex; }
  .nav__list {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    padding: var(--space-3);
    border-bottom: 1px solid var(--border-soft);
    transform: translateY(calc(-100% - var(--header-height) - var(--space-8)));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform var(--transition),
      opacity var(--transition),
      visibility 0s linear 180ms;
    box-shadow: var(--shadow-lg);
  }
  .nav.is-open .nav__list {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      transform var(--transition),
      opacity var(--transition),
      visibility 0s;
  }
  .nav__link { padding: var(--space-3); border-radius: var(--radius-sm); }
  .nav__item--tools,
  .nav__details { width: 100%; }
  .nav__summary { width: 100%; justify-content: space-between; }
  .nav__submenu {
    position: static;
    min-width: 0;
    box-shadow: none;
    margin: 0 0 var(--space-2);
    border-color: var(--border-soft);
    background: var(--surface);
  }
  .nav__cta { margin-left: 0; margin-top: var(--space-2); }
  .nav__cta .btn { width: 100%; }
  h1 { letter-spacing: -0.005em; }
  .hero__title { max-width: 100%; }
}

/* ---------- Updated How grid (3 cards) ---------- */
.how-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.how-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--primary) 14%, var(--surface));
  color: var(--primary);
  margin-bottom: var(--space-4);
}

/* ---------- Product card media (images) ---------- */
.product-card {
  padding: var(--space-3);
  overflow: hidden;
  gap: 0;
}
.product-card__media {
  margin: 0;
  aspect-ratio: 3 / 2;
  background: var(--surface);
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - var(--space-2));
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .product-card__media img { transform: scale(1.03); }
.product-card__body {
  padding: clamp(var(--space-5), 2.4vw, var(--space-7)) var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}
.product-card__age {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  margin: 0;
}
.product-card__promise {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.product-card__cta { margin-top: auto; padding-top: var(--space-4); }

/* ---------- Trust section ---------- */
.trust {
  background: color-mix(in oklab, var(--primary) 7%, var(--bg));
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.trust__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  align-items: center;
}
.trust__media {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}
.trust__media img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.trust-list {
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0 0;
  display: grid;
  gap: var(--space-5);
  max-width: 60ch;
}
.trust-list li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: var(--space-4);
  align-items: start;
  margin: 0;
}
.trust-list__dot {
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--primary);
  margin-top: 0.55em;
}
.trust-list strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-md);
  color: var(--ink);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}
.trust-list span {
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.pull-quote {
  margin: var(--space-8) 0 0;
  padding: var(--space-5) var(--space-6);
  border-left: 3px solid var(--primary);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 56ch;
}
.pull-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.4;
  color: var(--ink);
}

/* ---------- About (image-led) ---------- */
.about__visual {
  position: relative;
  top: auto;
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
  margin: 0;
}
.about__visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  display: block;
}
.about__caption {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-top: var(--space-3);
  font-style: italic;
}
.cred-list {
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0 0;
  display: grid;
  gap: var(--space-2);
  border-top: 1px solid var(--border-soft);
  padding-top: var(--space-5);
}
.cred-list li {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}
.cred-list strong { color: var(--ink); font-weight: 600; }

/* ---------- Signup tweaks ---------- */
.signup {
  background: color-mix(in oklab, var(--warm) 22%, var(--bg-alt));
}
.signup__form-title {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0 0 var(--space-4);
}

/* ---------- Mobile overrides for new sections ---------- */
@media (max-width: 880px) {
  .how-grid--three { grid-template-columns: 1fr; }
  .trust__inner { grid-template-columns: 1fr; }
  .trust__media { order: -1; aspect-ratio: 16 / 10; }
}
