/* ==========================================================================
   Kitabu AI — design system (KITABU_WEBSITE_UPGRADE_PLAN Section 3 + 4)
   ========================================================================== */

/* ---- Fonts (self-hosted variable woff2, latin subset) ---- */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/bricolage-grotesque-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Tokens (spec 3.1 — implement exactly) ---- */
:root {
  /* Brand core — retained from current site */
  --kitabu-green:      #1F7F4D;  /* primary brand, parent/progress, nav accents */
  --green-deep:        #0E3D26;  /* dark sections, footer, chalkboard panels */
  --green-tint:        #E6F4EC;  /* soft section backgrounds, card washes */

  /* Vibrant education accents */
  --sunrise-orange:    #F97316;  /* PRIMARY CTA color — every "Start Free" button */
  --orange-tint:       #FFF1E6;
  --sky-blue:          #2AA5E0;  /* student/learning moments, links, chat bubbles */
  --blue-tint:         #E8F6FD;
  --sunshine-yellow:   #FACC15;  /* streaks, badges, highlights, marker underlines */
  --yellow-tint:       #FEF9E7;

  /* Neutrals — warm, never stark */
  --paper:             #FDFBF5;  /* page background (warm cream, not #fff) */
  --ink:               #14231B;  /* headings/body on light */
  --ink-soft:          #4A5A50;  /* secondary text */
  --card:              #FFFFFF;
  --line:              #E5E0D4;

  --radius-card: 20px; --radius-btn: 14px;
  --shadow-card: 0 6px 24px rgba(20,35,27,.08);
  --shadow-lift: 0 14px 40px rgba(20,35,27,.14);

  --font-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (min-width: 768px) { body { font-size: 18px; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--kitabu-green); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--sky-blue); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 6.5vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 720px; }
.center { text-align: center; margin-inline: auto; }

.eyebrow, .section-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kitabu-green);
  margin: 0 0 14px;
}
.section-dark .section-kicker { color: var(--sunshine-yellow); }

.swahili-lockup {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  color: var(--ink);
  display: inline-block;
  position: relative;
  margin: 6px 0 18px;
}
.swahili-lockup .underline-svg {
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  width: 100%; height: 10px;
}
.swahili-lockup .underline-svg path {
  stroke: var(--sunshine-yellow);
  stroke-width: 5;
  fill: none;
  stroke-linecap: round;
}
.js .swahili-lockup .underline-svg path {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  transition: stroke-dashoffset 0.9s var(--ease-out) 1s;
}
.js .swahili-lockup.is-visible .underline-svg path { stroke-dashoffset: 0; }

.marker-underline {
  background-image: linear-gradient(transparent 62%, var(--sunshine-yellow) 62%, var(--sunshine-yellow) 92%, transparent 92%);
  padding: 0 2px;
}

/* ---- Buttons (motion spec 4.2-J) ---- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: var(--radius-btn);
  border: 0;
  background: var(--sunrise-orange);
  color: #fff;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), filter 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  box-shadow: 0 4px 14px rgba(249,115,22,.28);
}
.button:hover { filter: brightness(1.06); transform: translateY(-2px); text-decoration: none; color: #fff; }
.button:active { transform: scale(0.97); }
.button-quiet {
  background: transparent;
  color: var(--kitabu-green);
  border: 2px solid var(--kitabu-green);
  box-shadow: none;
}
.button-quiet:hover { background: var(--green-tint); color: var(--kitabu-green); }
.button-whatsapp {
  background: var(--card);
  color: var(--kitabu-green);
  border: 2px solid var(--line);
  box-shadow: none;
}
.button-whatsapp:hover { border-color: var(--kitabu-green); color: var(--kitabu-green); }
.button-small { padding: 10px 18px; font-size: 15px; }
.button-block { width: 100%; }
.section-dark .button-quiet { color: #fff; border-color: rgba(255,255,255,.5); }
.section-dark .button-quiet:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Hero primary pulse — only place a looping effect is allowed */
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(249,115,22,.28); }
  50% { box-shadow: 0 6px 26px rgba(249,115,22,.5); }
}
.js .hero .button-hero-primary { animation: cta-pulse 3s ease-in-out infinite; }

/* ---- Header (motion spec 4.2-F) ---- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(253,251,245,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(20,35,27,.06);
}
.nav-shell {
  width: min(1160px, 100% - 40px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--header-h);
  transition: height 0.3s var(--ease-out);
}
.site-header.is-scrolled .nav-shell { height: 60px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}
.brand-icon img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 9px;
}
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 500;
  font-size: 15.5px;
}
.nav-links a:hover { background: var(--green-tint); text-decoration: none; }
/* The WhatsApp link inside .nav-links exists for the mobile sheet only —
   desktop already shows the WhatsApp button in .nav-actions */
@media (min-width: 901px) {
  .nav-links a[data-event-source="menu_whatsapp"] { display: none; }
}
.nav-actions { display: flex; gap: 10px; align-items: center; }
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links, .nav-actions .button-whatsapp { display: none; }
  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    padding: 10px;
    margin-left: auto;
    background: transparent;
    border: 0;
    cursor: pointer;
    z-index: 75;
  }
  .menu-toggle span {
    display: block;
    height: 2.5px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.3s var(--ease-out), opacity 0.2s;
  }
  .nav-actions { margin-left: auto; }
  .menu-toggle { margin-left: 0; }
  body.menu-open { overflow: hidden; }
  .menu-open .menu-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .nav-links {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 70;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 90px 28px 40px;
    background: var(--paper);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease-out);
  }
  .menu-open .nav-links { opacity: 1; pointer-events: auto; }
  .nav-links a {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  }
  .menu-open .nav-links a { opacity: 1; transform: none; }
  .menu-open .nav-links a:nth-child(1) { transition-delay: 0.04s; }
  .menu-open .nav-links a:nth-child(2) { transition-delay: 0.08s; }
  .menu-open .nav-links a:nth-child(3) { transition-delay: 0.12s; }
  .menu-open .nav-links a:nth-child(4) { transition-delay: 0.16s; }
  .menu-open .nav-links a:nth-child(5) { transition-delay: 0.20s; }
  .menu-open .nav-links a:nth-child(6) { transition-delay: 0.24s; }
  .menu-open .nav-links a:nth-child(7) { transition-delay: 0.28s; }
}

/* ---- Sections & washes (motion spec 4.2-K) ---- */
.section {
  position: relative;
  padding: 72px 0;
}
@media (min-width: 768px) { .section { padding: 96px 0; } }
.section-tint-green { background: var(--green-tint); }
.section-tint-blue { background: var(--blue-tint); }
.section-tint-yellow { background: var(--yellow-tint); }
.section-tint-orange { background: var(--orange-tint); }
.section-dark {
  background: var(--green-deep);
  color: #fff;
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255,255,255,.88); }
.section-stack { border-radius: 28px 28px 0 0; margin-top: -28px; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; }

/* ---- Reveal-on-scroll (spec 4.1) ---- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
@media (max-width: 767px) { .js [data-reveal] { transform: translateY(12px); } }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---- Split-text word reveal (spec 4.2-A) ---- */
.js [data-split] .split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.js [data-split] .split-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.6s var(--ease-out);
}
.js [data-split].is-visible .split-word > span { transform: translateY(0); }

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 40px) 0 64px;
  background:
    radial-gradient(60% 50% at 85% 10%, var(--yellow-tint) 0%, transparent 60%),
    radial-gradient(50% 45% at 10% 90%, var(--green-tint) 0%, transparent 65%),
    var(--paper);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 44px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero { padding: calc(var(--header-h) + 64px) 0 96px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}
.hero-lede { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: var(--ink-soft); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }
@media (max-width: 640px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero .hero-actions .button-quiet {
    align-self: flex-start;
    width: auto;
  }
}

/* Official store artwork. Keep badges unmodified and label unavailable stores separately. */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 18px;
}
.store-badges-centered { justify-content: center; }
.store-badge {
  width: 178px;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
a.store-badge {
  border-radius: 8px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
a.store-badge:hover { transform: translateY(-2px); text-decoration: none; }
a.store-badge:focus-visible { outline: 3px solid var(--sky-blue); outline-offset: 3px; }
.store-badge img { display: block; max-width: 100%; height: auto; }
.store-badge-google img { width: 178px; }
.store-badge-app img { width: 156px; margin-top: 10px; }
.store-badge-status {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
@media (max-width: 420px) {
  .store-badges { flex-wrap: nowrap; gap: 6px; }
  .store-badge { width: calc(50% - 3px); min-width: 0; }
  .store-badge-google img { width: 100%; }
  .store-badge-app img { width: 88%; }
}

/* Trust strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}
.trust-strip li {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
}

/* Hero visual: weekly parent update mockup */
.hero-visual {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 480px;
}

.phone {
  position: relative;
  z-index: 2;
  width: min(78vw, 340px);
  margin-top: 44px;
  background: #101913;
  border-radius: 38px;
  padding: 10px;
  box-shadow: var(--shadow-lift);
}
.js .phone {
  opacity: 0;
  transform: translateY(40px) rotate(-6deg);
}
.js .phone.is-live {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out), transform 0.9s cubic-bezier(0.34, 1.4, 0.44, 1);
}
.phone-screen {
  background: #ECE9E2;
  border-radius: 30px;
  overflow: hidden;
  min-height: 430px;
  display: flex;
  flex-direction: column;
}
.phone-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--kitabu-green);
  color: #fff;
}
.phone-top .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--sunshine-yellow);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--green-deep);
  font-size: 15px;
}
.phone-top strong { font-size: 14.5px; display: block; line-height: 1.2; }
.phone-top small { font-size: 11.5px; opacity: .85; }
.phone-chat { padding: 16px 14px; display: grid; gap: 12px; flex: 1; }
.chat-day {
  justify-self: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  background: rgba(255,255,255,.75);
  padding: 3px 10px;
  border-radius: 999px;
}
.chat-bubble {
  background: #fff;
  border-radius: 4px 16px 16px 16px;
  padding: 11px 13px;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(20,35,27,.10);
  max-width: 95%;
}
.js .chat-bubble[data-type-in] { opacity: 0; transform: translateY(10px); transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out); }
.js .chat-bubble[data-type-in].is-visible { opacity: 1; transform: none; }
.chat-bubble .chat-meta { display: block; margin-top: 6px; font-size: 10.5px; color: var(--ink-soft); text-align: right; }

/* Progress card + animated bar (motion spec 4.2-C) */
.progress-card {
  background: #fff;
  border-radius: 14px;
  padding: 13px;
  box-shadow: 0 1px 2px rgba(20,35,27,.10);
  font-size: 13px;
}
.progress-card .progress-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.progress-card .progress-title strong { font-size: 13.5px; }
.progress-value { font-weight: 800; color: var(--kitabu-green); font-variant-numeric: tabular-nums; }
.progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--green-tint);
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  width: var(--progress-from, 42%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--kitabu-green), #2FA36A);
}
.js .progress-fill { transition: width 1.2s var(--ease-out); }
.js .progress-bar-anim.is-visible .progress-fill { width: var(--progress-to, 68%); }
.improving-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  font-size: 11.5px;
  font-weight: 700;
  color: #7A5B00;
  background: var(--yellow-tint);
  border: 1px solid var(--sunshine-yellow);
  padding: 3px 9px;
  border-radius: 999px;
}
.js .improving-chip { opacity: 0; transform: scale(0.8); transition: opacity 0.4s var(--ease-out) 1s, transform 0.4s var(--ease-out) 1s; }
.js .progress-bar-anim.is-visible .improving-chip { opacity: 1; transform: scale(1); }

.parent-love {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 18px;
  background: var(--card);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
  color: var(--kitabu-green);
}

/* ---- Marquee (motion spec 4.2-D) — subject chips until real proof exists ---- */
.marquee-band { padding: 26px 0; background: var(--card); border-block: 1px solid var(--line); overflow: hidden; }
.marquee { display: flex; overflow: hidden; gap: 14px; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-track {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
  min-width: 100%;
  animation: marquee-scroll 40s linear infinite;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - 14px)); }
}
.subject-chip {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: var(--paper);
}
.subject-chip.chip-green { background: var(--green-tint); border-color: transparent; color: var(--kitabu-green); }
.subject-chip.chip-blue { background: var(--blue-tint); border-color: transparent; color: #16729F; }
.subject-chip.chip-yellow { background: var(--yellow-tint); border-color: transparent; color: #7A5B00; }
.subject-chip.chip-orange { background: var(--orange-tint); border-color: transparent; color: #B54708; }

/* ---- Persona cards (Solution section) ---- */
.persona-grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .persona-grid { grid-template-columns: repeat(3, 1fr); } }
.persona-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 28px 24px 32px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  overflow: hidden;
}
.persona-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--persona-color, var(--kitabu-green));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.persona-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.persona-card:hover::after { transform: scaleX(1); }
@media (hover: none) { .persona-card:active { transform: scale(0.98); } }
.persona-card.persona-student { --persona-color: var(--sky-blue); }
.persona-card.persona-parent { --persona-color: var(--kitabu-green); }
.persona-card.persona-teacher { --persona-color: var(--sunrise-orange); }
.persona-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.persona-student .persona-tag { background: var(--blue-tint); color: #16729F; }
.persona-parent .persona-tag { background: var(--green-tint); color: var(--kitabu-green); }
.persona-teacher .persona-tag { background: var(--orange-tint); color: #B54708; }

/* ---- Tiles (Promise banner) ---- */
.tile-grid { display: grid; gap: 16px; margin-top: 36px; }
@media (min-width: 768px) { .tile-grid { grid-template-columns: repeat(3, 1fr); } }
.tile {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-card);
  padding: 22px 20px;
  font-weight: 600;
  color: #fff;
}
.tile .tile-icon { display: block; font-size: 1.5rem; margin-bottom: 10px; }

.promise-progress {
  max-width: 460px;
  margin: 30px auto 0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius-card);
  padding: 20px;
}
.promise-progress .progress-track { background: rgba(255,255,255,.18); }
.promise-progress .progress-fill { background: linear-gradient(90deg, var(--sunshine-yellow), #FFE066); }
.promise-progress .progress-value { color: var(--sunshine-yellow); }
.promise-progress p { margin: 0 0 10px; font-size: 14.5px; }

/* ---- Steps (How it works) ---- */
.steps-grid { display: grid; gap: 20px; counter-reset: step; }
@media (min-width: 860px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}
.step-number {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--kitabu-green);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 16px;
}
.step-card:nth-child(2) .step-number { background: var(--blue-tint); color: #16729F; }
.step-card:nth-child(3) .step-number { background: var(--yellow-tint); color: #7A5B00; }

/* ---- Comparison table (motion spec 4.2-G) ---- */
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  font-size: 15.5px;
}
.compare-table th, .compare-table td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: 0; }
.compare-table thead th {
  font-family: var(--font-display);
  font-size: 1.02rem;
  background: var(--paper);
}
.compare-table .col-kitabu {
  background: var(--green-tint);
  font-weight: 600;
  position: relative;
}
.compare-table thead .col-kitabu { color: var(--kitabu-green); }
.js .compare-glow {
  box-shadow: inset 0 0 0 0 rgba(31,127,77,0);
  transition: box-shadow 0.7s var(--ease-out) 0.4s;
}
.js .compare-glow.is-visible { box-shadow: inset 0 0 0 3px rgba(31,127,77,.55), 0 6px 24px rgba(31,127,77,.18); }
.compare-check { color: var(--kitabu-green); font-weight: 800; margin-right: 6px; }
.compare-miss { color: var(--ink-soft); }

/* ---- Pricing ---- */
.pricing-grid { display: grid; gap: 20px; align-items: stretch; }
@media (min-width: 860px) { .pricing-grid { grid-template-columns: 1.1fr 0.9fr; } }
.price-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.price-card-featured { border: 3px solid var(--sunrise-orange); position: relative; }
.popular-tag {
  position: absolute;
  top: -15px;
  left: 24px;
  background: var(--sunrise-orange);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
}
.price-figure {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.6rem);
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 6px 0 2px;
}
.price-figure span { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.price-note { font-size: 14px; color: var(--ink-soft); }
.price-card ul { padding-left: 0; list-style: none; margin: 12px 0 20px; display: grid; gap: 9px; }
.price-card li { padding-left: 26px; position: relative; font-size: 15.5px; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--kitabu-green); font-weight: 800; }
.price-card .button { margin-top: auto; }
.schools-tile { background: var(--green-deep); color: #fff; }
.schools-tile h3 { color: #fff; }
.schools-tile p { color: rgba(255,255,255,.88); }

/* ---- FAQ accordion (motion spec 4.2-H) ---- */
.faq-list { max-width: 760px; margin-inline: auto; display: grid; gap: 12px; }
.faq-list details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.faq-list summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 700;
  font-size: 16.5px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-chevron { flex: none; transition: transform 0.3s var(--ease-out); color: var(--kitabu-green); }
details[open] .faq-chevron { transform: rotate(180deg); }
.faq-body { padding: 0 20px; overflow: hidden; }
.faq-body p { color: var(--ink-soft); margin: 0 0 18px; }

/* ---- Safety ---- */
.safety-grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .safety-grid { grid-template-columns: repeat(3, 1fr); } }
.safety-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 26px 22px;
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--sky-blue);
}

/* ---- Blog cards ---- */
.blog-grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }
.blog-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 24px 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.blog-card span {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kitabu-green);
  background: var(--green-tint);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.blog-card h3 { font-size: 1.1rem; }
.blog-card h3 a { color: var(--ink); }
.blog-card p { color: var(--ink-soft); font-size: 15px; margin: 0; }

/* ---- Final CTA ---- */
.final-panel { text-align: center; max-width: 720px; margin-inline: auto; }
.reassurance { font-size: 15px; color: rgba(255,255,255,.82); margin-top: 16px; }

/* ---- Footer ---- */
.site-footer {
  background: var(--green-deep);
  color: rgba(255,255,255,.85);
  padding: 64px 0 32px;
  margin-top: -28px;
  border-radius: 28px 28px 0 0;
  position: relative;
}
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h3 { color: #fff; font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { display: block; color: rgba(255,255,255,.85); padding: 4px 0; font-size: 15px; }
.site-footer a:hover { color: var(--sunshine-yellow); }
.footer-brand { color: #fff; margin-bottom: 12px; }
.footer-brand:hover { color: #fff; }
.footer-tagline { font-family: var(--font-display); font-style: italic; font-weight: 600; color: var(--sunshine-yellow); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.16);
  font-size: 13.5px;
  color: rgba(255,255,255,.65);
}
.footer-bottom p { margin: 0; }
.footer-bottom .store-legal {
  flex-basis: 100%;
  color: rgba(255,255,255,.54);
  font-size: 11.5px;
  line-height: 1.55;
}

/* ---- Sticky mobile CTA bar (spec 4.3) ---- */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 55;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(253,251,245,.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -6px 24px rgba(20,35,27,.12);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease-out);
}
.sticky-cta.is-shown { transform: none; }
.sticky-cta .button { flex: 1; padding: 13px 18px; }
.sticky-cta-dismiss {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font-size: 18px;
  cursor: pointer;
}
@media (max-width: 767px) { .sticky-cta { display: flex; } }

/* ---- Page hero (sub-pages) ---- */
.page-hero {
  padding: calc(var(--header-h) + 44px) 0 56px;
  background:
    radial-gradient(55% 55% at 90% 0%, var(--green-tint) 0%, transparent 60%),
    var(--paper);
}
.page-hero .hero-lede { max-width: 40em; }
.breadcrumbs { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 18px; }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs span[aria-current] { color: var(--ink); font-weight: 600; }

/* ---- Prose (articles, authority pages) ---- */
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(1.35rem, 3.4vw, 1.8rem); margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose img { border-radius: var(--radius-card); box-shadow: var(--shadow-card); margin: 28px 0; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--sunshine-yellow);
  background: var(--yellow-tint);
  border-radius: 0 14px 14px 0;
  font-weight: 600;
}
.article-meta { font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; }
.article-back { display: inline-block; font-weight: 700; margin-bottom: 18px; font-size: 15px; }

/* Proof module reused on landings (progress moment) */
.proof-module {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  max-width: 460px;
  margin: 32px 0;
}
.proof-module p:first-child { font-size: 14px; font-weight: 700; color: var(--kitabu-green); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }

/* ---- Forms (/schools/demo) ---- */
.form-card {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px 26px;
  max-width: 560px;
}
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 7px; }
.form-field input, .form-field select {
  width: 100%;
  padding: 13px 14px;
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
}
.form-field input:focus, .form-field select:focus {
  outline: 3px solid var(--sky-blue);
  outline-offset: 0;
  border-color: transparent;
}
.form-note { font-size: 14px; color: var(--ink-soft); }
.form-success {
  background: var(--green-tint);
  border: 1.5px solid var(--kitabu-green);
  border-radius: 14px;
  padding: 18px 20px;
  font-weight: 600;
  color: var(--green-deep);
}
[hidden] { display: none !important; }

/* ---- Feature list rows (persona pages) ---- */
.feature-rows { display: grid; gap: 18px; margin: 32px 0; }
.feature-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px;
  align-items: start;
}
.feature-row .feature-icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--green-tint);
  font-size: 1.3rem;
}
.feature-row h3 { margin-bottom: 4px; }
.feature-row p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* ---- About team ---- */
.team-section { border-radius: 28px 28px 0 0; }
.team-section-head { max-width: 650px; }
.team-section-head > p:last-child { max-width: 570px; color: var(--ink-soft); margin-bottom: 0; }
.team-grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.team-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 22px;
  align-items: center;
  padding: 24px;
  background: var(--card);
  border: 1px solid rgba(31,127,77,.12);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.team-portrait { width: 112px; height: 112px; margin: 0; overflow: hidden; border: 5px solid var(--green-tint); border-radius: 50%; background: var(--green-tint); }
.team-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.team-card-body h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); margin-bottom: 7px; }
.team-card-body p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; margin: 0 0 12px; }
.team-card-body .team-role { color: var(--kitabu-green); font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 7px; }
.team-source { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; }
.team-source span { font-size: 1.05em; }
@media (max-width: 520px) {
  .team-card { grid-template-columns: 80px 1fr; gap: 16px; padding: 18px; }
  .team-portrait { width: 80px; height: 80px; border-width: 4px; }
  .team-card-body p { font-size: 14px; }
}
@media (max-width: 360px) {
  .team-card { grid-template-columns: 1fr; }
  .team-portrait { width: 104px; height: 104px; }
}

/* ---- 404 ---- */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 120px 20px 80px; }
.error-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 18vw, 8rem); color: var(--green-tint); line-height: 1; -webkit-text-stroke: 2px var(--kitabu-green); }

/* ---- Reduced motion (spec 4.1) ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
    transition-delay: 0s !important;
  }
  .marquee-track { animation: none !important; }
  .js [data-reveal], .js [data-split] .split-word > span, .js .phone, .js .chat-bubble[data-type-in] {
    opacity: 1 !important;
    transform: none !important;
  }
  .js .progress-fill { width: var(--progress-to, 68%) !important; }
  .js .improving-chip { opacity: 1 !important; transform: none !important; }
  .js .hero .button-hero-primary { animation: none !important; }
}
