/* =========================================================
   Mindset2Learn — styles
   ========================================================= */

:root {
  --orange: #F26A1B;
  --orange-dark: #DB5810;
  --yellow: #F1B41C;
  --yellow-soft: #FDF1D2;
  --orange-soft: #F5C9AE;
  --peach: #FDF0E7;
  --peach-dark: #FBE4D3;
  --peach-line: #F5DED0;
  --bg: #FFFEF9;
  --bg-gray: #F6F5EF;
  --bg-gray-dark: #ECEADF;
  --card: #FFFEF9;
  --ink: #1C1B18;
  --muted: #5F5D56;
  --line: #E6E3D8;

  /* Forms + feedback */
  --input-line: #CFCABA;
  --placeholder: #A9A598;
  --error: #C2331B;
  --success: #2F7A3E;

  /* Tags and chips (one look everywhere) */
  --tag-line: rgba(241, 180, 28, 0.7);
  --tag-bg: rgba(241, 180, 28, 0.08);
  --tag-ink: #6B5310;

  --font-display: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-accent: "Libre Baskerville", Georgia, serif;

  --radius-sm: 0.5rem;
  --radius-tile: 0.8rem; /* icon tiles */
  --radius: 1rem;        /* cards, boxes */
  --radius-lg: 1.5rem;   /* photos */
  --radius-xl: 2rem;     /* large gray panels */

  --container: 76rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --header-h: 4.5rem;
  --main-radius-max: clamp(2.5rem, 5vw, 5rem);
  --section-y: clamp(4.5rem, 7vw, 7.5rem);
  --page-top: clamp(3rem, 6vw, 6rem);         /* top of inner pages (About, Careers, job) */
  --space-head: clamp(2.5rem, 4vw, 3.5rem);   /* heading block → content */
  --space-cta: clamp(2rem, 3vw, 2.5rem);      /* text → its button */
  --gap-cols: clamp(2.5rem, 6vw, 6rem);       /* between two-column halves */
  --panel-pad: clamp(2.5rem, 5vw, 4.5rem);    /* inside large gray panels */

  --shadow-sm: 0 1px 2px rgba(28, 27, 24, 0.04), 0 2px 8px rgba(28, 27, 24, 0.04);
  --shadow: 0 2px 4px rgba(28, 27, 24, 0.04), 0 12px 32px rgba(28, 27, 24, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.25s;   /* color / background changes */
  /* Interaction rule for everything clickable:
     hover = color change (round icon buttons also grow to --grow),
     click = press down to --press */
  --grow: scale(1.08);
  --press: scale(0.96);
  --ease-reveal: cubic-bezier(0.62, 0.05, 0.01, 0.99);
}

/* Fluid root size: ~15px on small laptops, up to 18px on large monitors.
   Everything is in rem, so the whole layout scales with it. */
html {
  font-size: clamp(15px, 0.45vw + 9.4px, 18px);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (max-width: 1100px) { html { font-size: 15px; } }

/* Long in-page jumps: the page fades out, moves, and fades back in (main.js) */
main, .site-footer { transition: opacity 0.22s var(--ease); }
.is-jumping main, .is-jumping .site-footer { opacity: 0; }

/* Custom scrollbar (main.js, "Custom scrollbar"): the native one is hidden
   only once the script has drawn its own, and only for mouse/trackpad. */
html.has-scrollbar { scrollbar-width: none; }
html.has-scrollbar::-webkit-scrollbar { display: none; }
/* Short track centered on the right edge, with the orange pill sliding in it */
.scrollbar {
  position: fixed;
  top: 50%;
  right: 0.25rem;
  width: 1.75rem;        /* hover/grab area; the line and pill are centered in it */
  height: clamp(8rem, 20vh, 12rem);
  transform: translateY(-50%);
  z-index: 60;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.scrollbar.is-visible { opacity: 1; transition-duration: 0.15s; }
.scrollbar.is-off { display: none; }
.scrollbar::before,
.scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin-inline: auto;
  border-radius: 999px;
}
.scrollbar::before {   /* track, same width as the thumb */
  content: "";
  bottom: 0;
  width: 10px;
  background: rgba(28, 27, 24, 0.07);
  transition: width 0.2s var(--ease);
}
.scrollbar-thumb {
  width: 10px;
  background: var(--orange);
  cursor: grab;
  will-change: transform;
  transition: width 0.2s var(--ease), background-color var(--dur);
}
.scrollbar:hover::before,
.scrollbar.is-dragging::before,
.scrollbar:hover .scrollbar-thumb,
.scrollbar.is-dragging .scrollbar-thumb { width: 12px; }
.scrollbar:hover .scrollbar-thumb,
.scrollbar.is-dragging .scrollbar-thumb { background: var(--orange-dark); }
.scrollbar.is-dragging .scrollbar-thumb { cursor: grabbing; }

/* Native fallback when Lenis isn't running */
html:not(.lenis) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:not(.lenis) { scroll-behavior: auto; } }

/* Lenis base styles */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-fill { fill: currentColor; stroke: none; }

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Type ---------- */
.eyebrow {
  color: var(--orange);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 0.75rem;
}

/* Breadcrumb on sub-pages (Tutoring › Grades K–5, Careers › a role); sits where an eyebrow would */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem; /* same as .eyebrow → title */
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}
.breadcrumb a { transition: color var(--dur); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb [aria-current] { color: var(--orange); }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 2.6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-sub {
  color: var(--muted);
  font-size: 1.0625rem;
  margin-top: 1rem;
  max-width: 38rem;
}

.plain-link { color: inherit; white-space: nowrap; transition: color var(--dur); }
/* Keeps a word and the punctuation after it on one line (split headings
   break between every word piece otherwise) */
.nowrap { white-space: nowrap; }
.plain-link:hover { color: var(--orange); }

/* ---------- Buttons ---------- */
/* One size for every button on the site (header, hero, cards, forms) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color var(--dur), transform 0.2s var(--ease);
}
.btn:active { transform: var(--press); }
.btn-primary {
  background: var(--orange);
  color: #fff;
}
.btn-primary:hover {
  background: var(--orange-dark);
}
/* Secondary: quiet gray pill (arrow nudges right on hover) */
.btn-secondary {
  background: var(--bg-gray-dark);
  color: var(--ink);
}
.btn-secondary:hover { background: #E2DFD1; }
.btn-secondary .icon { width: 1rem; height: 1rem; stroke-width: 2.5; transition: transform 0.3s var(--ease); }
.btn-secondary:hover .icon { transform: translateX(3px); }
.btn-block { width: 100%; } /* form submit buttons: full width, same height */

.round-btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  transition: background-color var(--dur), transform 0.25s var(--ease);
}
.round-btn .icon { width: 1.25rem; height: 1.25rem; stroke-width: 2.25; }
.round-btn:hover { transform: var(--grow); }
.round-btn:active { transform: var(--press); }
.round-btn--yellow { background: var(--yellow); color: #fff; }
.round-btn--yellow:hover { background: var(--orange); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 254, 249, 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(28, 27, 24, 0.35);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.logo img { width: auto; }
.logo-mark { height: 2.35rem; }
.logo-word { height: 1.2rem; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: 2.25rem; }
.main-nav a:not(.btn) {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  padding-block: 0.4rem;
  transition: color var(--dur);
}
.main-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
/* Hover only with a real mouse: phones (and phone previews) treat a tap as
   a hover, which would leave the tapped link stuck orange */
@media (hover: hover) and (pointer: fine) {
  .main-nav a:not(.btn):hover { color: var(--orange); }
}
.main-nav a.is-active { color: var(--orange); }
.main-nav a.is-active::after { transform: scaleX(1); }

/* Tutoring dropdown: opens on hover or keyboard focus; "Tutoring" itself
   still links to the Tutoring page. Desktop only: phones get their own
   full-screen menu (Responsive, "Mobile menu"). Keeping these rules out of
   the phone layout matters, because iOS treats a tap as a hover and would
   otherwise slide the sub-list half its width to the left. */
.nav-sub-toggle { display: none; } /* added by main.js; phones only */
.main-nav .nav-sub a::after { display: none; }
.main-nav .nav-sub a.is-current { color: var(--orange); }
@media (min-width: 961px) {
  .nav-drop { position: relative; }
  .nav-drop > a { display: inline-flex; align-items: center; gap: 0.3rem; }
  .nav-caret { width: 0.85rem; height: 0.85rem; stroke-width: 2.5; transition: transform 0.3s var(--ease); }
  .nav-drop:hover .nav-caret,
  .nav-drop:focus-within .nav-caret { transform: rotate(180deg); }
  .nav-sub {
    position: absolute;
    top: 100%;
    left: 50%;
    padding-top: 0.75rem; /* invisible bridge so the menu stays open on the way down */
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -0.35rem);
    transition: opacity 0.2s var(--ease), transform 0.3s var(--ease), visibility 0.2s;
  }
  .nav-drop:hover .nav-sub,
  .nav-drop:focus-within .nav-sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .main-nav .nav-sub ul {
    display: grid;
    gap: 0;
    min-width: 14rem;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
  }
  .main-nav .nav-sub a {
    display: block;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background-color var(--dur), color var(--dur);
  }
  .main-nav .nav-sub a:hover { background: var(--peach); color: var(--orange); }
}

.header-cta { margin-left: 0.5rem; }
.nav-cta-mobile, .menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(2.5rem, 4vw, 4rem) clamp(4rem, 6vw, 6rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.9rem, 4.6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.accent {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  color: var(--yellow);
  letter-spacing: -0.02em;
}
.lead {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-media { justify-self: end; width: 100%; max-width: 32rem; }
.hero-slides {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 4.6;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-gray);
  box-shadow: var(--shadow);
}
.hero-slide {
  grid-area: 1 / 1;
  visibility: hidden;
  z-index: 0;
  will-change: transform;
}
.hero-slide.is-leaving { visibility: visible; z-index: 1; }
.hero-slide.is-active { visibility: visible; z-index: 2; }
.hero-slide img { object-position: center 35%; }

/* Two-column hero: size by viewport height too, so the photo, slider
   controls and headline all fit on short laptop screens (no scrolling). */
@media (min-width: 961px) {
  .hero { padding-top: clamp(1.5rem, 5vh, 4rem); padding-top: clamp(1.5rem, 5svh, 4rem); }
  .hero-title {
    font-size: clamp(2.6rem, min(4.6vw, 8.5vh), 4.6rem);
    font-size: clamp(2.6rem, min(4.6vw, 8.5svh), 4.6rem);
  }
  /* photo height ≈ viewport − header − top padding − controls; width = height ÷ 1.15 */
  .hero-media {
    max-width: min(32rem, max(20rem, calc((100vh - var(--header-h) - 10rem) / 1.15)));
    max-width: min(32rem, max(20rem, calc((100svh - var(--header-h) - 10rem) / 1.15)));
  }
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
/* Same dots as the testimonial carousel (.t-dot) */
.slider-dots { display: flex; align-items: center; gap: 0.5rem; }

/* Shared media frame (with placeholder until real photos are added) */
.media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #F6EBD9, #F3E3CF);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media.is-empty img { visibility: hidden; }
.media.is-empty::after {
  content: "Add photo: " attr(data-placeholder);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #A08D73;
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section--gray { background: var(--bg-gray); }
.section--tight { padding-top: 0; }

.section-head { margin-bottom: var(--space-head); }
.section-head--center { text-align: center; }
.section-head--center .section-sub { margin-inline: auto; }

/* ---------- Cards / Who we help ---------- */
.card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-label {
  color: var(--orange);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.7vw, 1.7rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}
.card-text { color: var(--muted); font-size: 0.975rem; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.1rem;
}
/* Tag look, shared by display tags and the selectable chips on the job form */
.tags li,
.chip span {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--tag-line);
  border-radius: 999px;
  background: var(--tag-bg);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--tag-ink);
}

.grade-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.grade-card {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem 1.75rem;
}
.grade-card .card-title { max-width: 14ch; }


.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-end;
  margin-top: auto;
  padding-top: 2.25rem;
  color: var(--orange);
  font-size: 0.9375rem;
  font-weight: 600;
}
.text-link .icon { width: 1rem; height: 1rem; stroke-width: 2.5; transition: transform 0.3s var(--ease); }
.text-link:hover .icon { transform: translateX(3px); }

.wide-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  margin-top: 1.25rem;
  padding: clamp(1.25rem, 2vw, 1.75rem);
  padding-left: clamp(1.75rem, 3vw, 2.75rem);
}
/* Text at the top, button pinned to the bottom (like the grade cards' links) */
.wide-card-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-block: clamp(0.25rem, 0.5vw, 0.5rem);
}
.wide-card-copy .card-title { margin-bottom: 0.85rem; }
.wide-card-copy .card-text { margin-bottom: var(--space-cta); }
.wide-card-copy .btn { margin-top: auto; }
.wide-card-media {
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--radius) - 0.25rem);
}

/* ---------- Approach ---------- */
.approach-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: var(--gap-cols);
}
/* Photo carousel; reuses the hero slider (.hero-slides / .hero-slide) */
.approach-slides { aspect-ratio: 4 / 4.9; }
.approach-slides .hero-slide img { object-position: center; }
.approach-copy .section-sub { max-width: 40rem; }

.pillars {
  display: grid;
  gap: 1.75rem;
  margin-top: 2.5rem;
}
.pillar {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}
.pillar-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  flex-shrink: 0;
  border-radius: var(--radius-tile);
  background: var(--yellow-soft);
  color: var(--orange);
}
.pillar-icon .icon { width: 1.4rem; height: 1.4rem; }
.pillar-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 0.3rem;
}
.pillar-text { color: var(--muted); max-width: 26rem; }

/* ---------- Testimonials ---------- */
.testimonials { overflow: hidden; }
.t-carousel {
  position: relative;
  max-width: 70rem;
  margin-inline: auto;
  padding-inline: 4rem;
}
.t-stage {
  display: grid;
  justify-items: center;
  align-items: center;
  padding-block: 1.5rem;
  touch-action: pan-y;
}
.t-card {
  grid-area: 1 / 1;
  position: relative;
  width: min(22rem, 100%);
  padding: 2.75rem 2.25rem 2rem;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.7s var(--ease), opacity 0.7s var(--ease), box-shadow 0.7s var(--ease);
  will-change: transform;
  user-select: none;
}
.t-card[data-pos="0"] { transform: translateX(0) scale(1); z-index: 3; box-shadow: var(--shadow); }
.t-card[data-pos="1"] { transform: translateX(112%) scale(0.8); z-index: 2; opacity: 0.95; cursor: pointer; }
.t-card[data-pos="-1"] { transform: translateX(-112%) scale(0.8); z-index: 2; opacity: 0.95; cursor: pointer; }
.t-card[data-pos="2"] { transform: translateX(200%) scale(0.65); z-index: 1; opacity: 0; pointer-events: none; }
.t-card[data-pos="-2"] { transform: translateX(-200%) scale(0.65); z-index: 1; opacity: 0; pointer-events: none; }

.t-quote {
  display: block;
  width: 1.75rem;
  height: 1.3rem;
  fill: var(--orange);
}
.t-quote--open { margin-bottom: 0.9rem; }
.t-quote--close { margin: 0.6rem 0 0 auto; transform: rotate(180deg); }
.t-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.t-stars {
  margin-top: 1.25rem;
  color: var(--yellow);
  font-size: 1.15rem;
  letter-spacing: 0.15em;
}
.t-author {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.t-arrow {
  position: absolute;
  top: calc(50% - 1.5rem);
  transform: translateY(-50%);
  z-index: 5;
}
.t-arrow:hover { transform: translateY(-50%) scale(1.08); }
.t-arrow:active { transform: translateY(-50%) scale(0.96); }
.t-arrow--prev { left: 0; }
.t-arrow--next { right: 0; }

.t-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: -0.45rem;
}
.t-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--orange-soft);
  transition: width 0.4s var(--ease), background-color var(--dur);
}
.t-dot[aria-selected="true"] { width: 1.6rem; background: var(--orange); }

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: var(--gap-cols);
  align-items: start;
}
.faq-head { position: sticky; top: calc(var(--header-h) + 2rem); }
.faq-head .section-title { max-width: 12ch; }

.faq-list { display: grid; gap: 0.9rem; }
/* Browser scroll anchoring jumps the page while an answer opens/closes */
html.faq-animating { overflow-anchor: none; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-gray);
  overflow: hidden;
  transition: background-color var(--dur);
}
.faq-item.is-open { border-color: var(--peach-line); background: var(--peach); }
.faq-item:not(.is-open):hover { background: var(--peach); }
.faq-item:not(.is-open):hover .faq-icon { color: var(--orange); }
.faq-q { font-size: inherit; font-weight: inherit; }
.faq-q button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 1.5rem;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  border-radius: calc(var(--radius) - 1px);
}
.faq-q button:focus-visible { outline-offset: -3px; }
.faq-item.is-open .faq-q button { background: var(--orange); color: #fff; }
.faq-icon { width: 1.35rem; height: 1.35rem; transition: transform 0.4s var(--ease), color var(--dur); }
.faq-item.is-open .faq-icon { transform: rotate(135deg); }

/* Closed answers are also hidden (after the close animation), so nothing
   inside can be tabbed to or tapped. Same as the subject list. */
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.45s var(--ease), visibility 0s 0.45s;
}
.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.45s var(--ease), visibility 0s;
}
.faq-a-inner { overflow: hidden; }
.faq-a p {
  padding: 1.25rem 1.5rem 1.5rem;
  color: var(--ink);
}

/* ---------- Get started ---------- */
.cta-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-cols);
  padding: var(--panel-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--bg-gray);
}
.cta-copy .section-title { max-width: 14ch; }

/* Shared form layout (home page assessment + job application) */
.cta-form, .apply-form { display: grid; gap: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.field { display: grid; gap: 0.3rem; }
.field label { font-size: 0.875rem; font-weight: 600; }
.req { color: var(--orange); margin-left: 0.1em; }
.field input,
.field textarea {
  width: 100%;
  padding: 0.55rem 0;
  border: 0;
  border-bottom: 1.5px solid var(--input-line);
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 0.975rem;
  color: var(--ink);
  resize: vertical;
  transition: border-color var(--dur);
}
/* a little taller than one line, so zoom rounding never shows scroll arrows */
.field textarea { min-height: 3rem; }
.field input::placeholder,
.field textarea::placeholder { color: var(--placeholder); }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--orange); }
.field.has-error input { border-bottom-color: var(--error); }
.field-error { font-size: 0.8rem; color: var(--error); }
.cta-form .btn-block, .apply-form .btn-block { margin-top: 0.75rem; }
.form-status { min-height: 1.5em; font-size: 0.9375rem; font-weight: 500; text-align: center; color: var(--success); }
.form-status.is-error { color: var(--error); }
.form-status.is-sending { color: var(--muted); }
/* Assessment form: the button is the last thing in the panel, level with its
   top padding; the thank-you message shows in the padding below it */
.cta-form { position: relative; }
.cta-form .form-status { position: absolute; top: 100%; left: 0; right: 0; margin-top: 1rem; }

/* ---------- Footer ---------- */
/* Page content sits above the footer; its bottom corners round as the
   footer is uncovered (progress is set from JS while scrolling). */
main {
  position: relative;
  z-index: 1;
  background: var(--bg);
  --main-radius: calc(var(--reveal-progress, 0) * var(--main-radius-max));
  border-bottom-left-radius: var(--main-radius);
  border-bottom-right-radius: var(--main-radius);
}
.footer-reveal .site-footer {
  position: sticky;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
}
/* Footer content rises into place as it's uncovered; each column travels a
   little further than the last so they settle in a staggered, layered way. */
.footer-reveal .footer-grid > *,
.footer-reveal .copyright {
  transform: translateY(calc((1 - var(--reveal-progress, 1)) * var(--rise, 4rem)));
  will-change: transform;
}
.footer-reveal .footer-grid > :nth-child(1) { --rise: 4rem; }
.footer-reveal .footer-grid > :nth-child(2) { --rise: 6rem; }
.footer-reveal .footer-grid > :nth-child(3) { --rise: 8rem; }
.footer-reveal .footer-grid > :nth-child(4) { --rise: 10rem; }
.footer-reveal .copyright { --rise: 3rem; }
.site-footer {
  background: var(--bg-gray);
  /* tucks up behind the page so the gray shows through its rounded corners */
  margin-top: calc(-1 * var(--main-radius-max));
  padding-top: calc(clamp(3.5rem, 5vw, 5rem) + var(--main-radius-max));
}
/* Brand on the left; the three link columns sit together against the right
   edge. The first two share one width so all three titles are evenly spaced;
   the last fits its text so it ends flush with the edge. */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr repeat(2, 10.5rem) auto;
  gap: 2.5rem clamp(3rem, 6vw, 6rem);
  padding-bottom: 3.5rem;
}
.footer-tagline {
  margin-top: 1.1rem;
  font-weight: 500;
  line-height: 1.5;
}
.footer-contact { display: grid; gap: 0.55rem; margin-top: 1.25rem; font-size: 0.9375rem; }
.footer-contact li { display: flex; align-items: center; gap: 0.6rem; }
.footer-contact .icon { width: 1rem; height: 1rem; }
.footer-contact a { transition: color var(--dur); }
.footer-contact a:hover { color: var(--orange); }

.socials { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
/* Same tile style as the "Our approach" icons */
.social {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-tile);
  background: var(--yellow-soft);
  color: var(--orange);
  transition: background-color var(--dur), color var(--dur), transform 0.25s var(--ease);
}
.social .icon { width: 1.25rem; height: 1.25rem; }
.social:hover { background: var(--orange); color: #fff; transform: var(--grow); }
.social:active { transform: var(--press); }

.footer-col h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-col ul { display: grid; gap: 0.55rem; }
.footer-col a { color: var(--muted); font-size: 0.9375rem; transition: color var(--dur); }
.footer-col a:hover { color: var(--orange); }

.copyright {
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Scroll reveal ---------- */

/* Letter-by-letter heading reveal (letters rise from below their line) */
.js [data-split]:not(.split-ready),
.js [data-pop]:not(.pop-ready) {
  visibility: hidden;
  animation: split-fallback 0s 2s forwards; /* never stay hidden if JS fails */
}
@keyframes split-fallback { to { visibility: visible; } }

.split-word {
  display: inline-block;
  clip-path: inset(-0.2em -0.5em); /* the edge each line slides up from */
}
.split-word-inner { display: inline-block; }
/* inline-blocks inherit text-indent; only the paragraph's first line should be indented */
.split-word, .split-word-inner { text-indent: 0; }
.split-ready .split-word-inner {
  transform: translateY(calc(100% + 0.3em));
  transition: transform 1.1s var(--ease-reveal);
  transition-delay: calc(var(--reveal-delay, 0s) + var(--line-delay, 0s));
}
.split-ready.is-visible .split-word-inner { transform: none; }
.reveal-done .split-word { clip-path: none; }

/* Buttons / UI pieces: rise as one block from behind an edge */
/* flex (not inline-block) so the wrapper is exactly as tall as its content,
   with no text descender gap below it for the hidden element to peek through */
.pop-mask {
  display: inline-flex;
  clip-path: inset(-1em -1em 0 -1em);
}
.pop-mask--block { display: flex; flex-direction: column; }
.pop-mask.is-done { clip-path: none; }
.pop-ready:not(.is-visible) { transform: translateY(calc(100% + 0.3em)); }
.pop-ready.is-visible:not(.reveal-done) {
  transition: transform 1.1s var(--ease-reveal) var(--reveal-delay, 0s), background-color var(--dur);
}
/* Fast scrolling: quick ease-out, no waiting */
.split-ready.reveal-fast .split-word-inner {
  transition-duration: 0.6s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
.pop-ready.reveal-fast.is-visible:not(.reveal-done) {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), background-color var(--dur);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   About page
   ========================================================= */
.about-intro { padding-block: var(--page-top) clamp(2rem, 4vw, 4rem); }
.about-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 9vw, 8.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
.about-intro .container { container-type: inline-size; }
/* Four fixed lines (see <br>s in the markup); the font scales with the
   content width so the longest line always spans it, at any screen size */
.about-statement {
  margin-top: clamp(3rem, 7vw, 7rem);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 6.15cqi;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-indent: 36%;
  white-space: nowrap;
}

/* Founder */
.founder { padding-top: clamp(2rem, 4vw, 4rem); }
.founder-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.founder-prefix {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.1;
}
.founder-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.2vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.founder-role { margin-top: 0.35rem; color: var(--orange); font-size: 0.9375rem; font-weight: 600; }
.founder-media {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.founder-media img { object-position: center 30%; }
.founder-bio { color: var(--muted); font-size: 1.0625rem; }
/* bio at the top, specialization pinned to the bottom (level with the photo) */
.founder-side {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}
.founder-spec-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--orange);
}
.founder-spec .tags { margin-top: 0.6rem; }

/* Philosophy: faint drifting words behind the founder's quote */
.philosophy {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.philosophy-bg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}
.philosophy-row {
  display: flex;
  width: max-content;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 8vw, 7.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: rgba(28, 27, 24, 0.045);
  white-space: nowrap;
  animation: philosophy-drift 90s linear infinite;
}
/* Keep each span's trailing space, which flex items otherwise trim */
.philosophy-row span { white-space: pre; }
.philosophy-row:nth-child(2) { margin-left: -12rem; }
.philosophy-row--reverse { animation-direction: reverse; }
@keyframes philosophy-drift { to { transform: translateX(-50%); } }

.philosophy-quote {
  position: relative;
  max-width: 34rem;
  padding: 1rem var(--gutter);
  text-align: center;
}
.philosophy-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  font-weight: 700;
  line-height: 1.5;
}
.philosophy-quote .t-quote--open { margin-bottom: 0.75rem; }

/* Beliefs */
.beliefs-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--gap-cols);
  align-items: start;
}
.beliefs-grid .section-title { max-width: 13ch; }
.beliefs-list {
  margin-top: 0;
  justify-self: end; /* sits against the right edge of the page */
  width: min(100%, 36rem);
}
.beliefs-list .pillar-text { max-width: none; }

/* Tutors */
.team-card {
  --team-pad: clamp(1.5rem, 4vw, 4rem);
  padding: var(--panel-pad) var(--team-pad) clamp(1.75rem, 3vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--bg-gray);
}
/* Strip runs to the card's edges; drifts sideways and can be dragged (js) */
.team-marquee {
  margin-inline: calc(-1 * var(--team-pad));
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y; /* vertical swipes still scroll the page */
  user-select: none;
}
.team-marquee.is-dragging { cursor: grabbing; }
.team-grid {
  display: flex;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  width: max-content;
  padding-inline: var(--team-pad);
  will-change: transform;
}
.team-member { flex: 0 0 clamp(14rem, 22vw, 18.5rem); text-align: center; }
.team-photo img { -webkit-user-drag: none; pointer-events: none; }
.team-photo {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
}
.team-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.team-role { margin-top: 0.35rem; color: var(--orange); font-size: 0.9375rem; font-weight: 600; }
.team-vacant { color: var(--muted); font-weight: 500; }
.team-cta { margin-top: clamp(4.5rem, 7.5vw, 6.5rem); text-align: center; }

/* Closing call to action */
.about-cta { margin-bottom: 0; }
.about-cta .section-sub { max-width: 30rem; }
.about-cta-action {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;          /* same as the hero's button pair */
  margin-top: var(--space-cta);
}

/* =========================================================
   Careers page
   ========================================================= */
.careers {
  min-height: 100vh;
  padding-block: var(--page-top) calc(var(--section-y) * 4);
}
/* Page heading (h1) on inner pages */
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 3.6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.page-title--narrow { max-width: 14ch; }
.job-list {
  display: grid;
  gap: 1.25rem;
  margin-top: var(--space-head);
}
/* Gray box → peach on hover: same as the FAQ items */
.job-card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-gray);
  transition: background-color var(--dur);
}
.job-card:hover { background: var(--peach); }
.job-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.7vw, 1.7rem); /* same as .card-title */
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.job-text { max-width: 50rem; margin-top: 0.85rem; color: var(--muted); }
.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  margin-top: 1rem;
  font-weight: 600;
}
.job-meta li { display: flex; align-items: center; gap: 0.45rem; }
.job-meta .icon { width: 1.1rem; height: 1.1rem; }
.job-card .btn, .job-card .pop-mask { margin-top: var(--space-cta); }
.job-card .pop-mask .btn { margin-top: 0; }

/* =========================================================
   Tutoring page
   ========================================================= */
.subjects { padding-block: var(--page-top) var(--section-y); }

/* Subject list: each row opens to a longer description + tags.
   Row and opened body share the same columns so the text lines up. */
.subject-list {
  --subject-cols: minmax(0, 20rem) minmax(0, 1fr) 1.5rem;
  --subject-gap: clamp(2rem, 4vw, 4rem);
  --subject-num-x: 1.25rem;  /* big faded number, from the row's edge */
  --subject-indent: 3rem;    /* title sits over the number */
  --subject-pad-r: 1.5rem;
  border-top: 1px solid var(--peach-line);
}
/* Same as the FAQ: stop scroll anchoring from moving the page mid-animation */
html.subjects-animating { overflow-anchor: none; }
/* Lined list (no boxes). On hover a peach band (the FAQ's hover color) rises
   from the row's bottom line; it stays filled while the row is open. */
.subject {
  position: relative;
  isolation: isolate;
  border-bottom: 1px solid var(--peach-line);
}
.subject::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--peach);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease);
}
.subject:hover::before, .subject.is-open::before { transform: none; }
.subject-q { font-size: inherit; font-weight: inherit; }
.subject-q button {
  position: relative;
  display: grid;
  grid-template-columns: var(--subject-cols);
  align-items: center;
  column-gap: var(--subject-gap);
  width: 100%;
  padding: clamp(2rem, 3vw, 2.6rem) var(--subject-pad-r) clamp(2rem, 3vw, 2.6rem) var(--subject-indent);
  border: 0;
  background: transparent;
  text-align: left;
}
.subject-q button:focus-visible { outline-offset: -3px; }
.subject-num {
  position: absolute;
  left: var(--subject-num-x);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 4.25rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--bg-gray-dark);
  opacity: 0.6;
  transition: color var(--dur), opacity var(--dur);
}
.subject-name {
  position: relative; /* above the number */
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.7vw, 1.7rem); /* same as .card-title */
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  transition: color var(--dur);
}
.subject-lead { color: var(--muted); font-size: 0.975rem; transition: color var(--dur); }
.subject-icon {
  width: 1.5rem;
  height: 1.5rem;
  justify-self: end;
  transition: transform 0.4s var(--ease), color var(--dur);
}
.subject:hover .subject-num,
.subject.is-open .subject-num { color: var(--orange-soft); opacity: 0.55; }
.subject:hover .subject-name,
.subject.is-open .subject-name,
.subject:hover .subject-icon,
.subject.is-open .subject-icon { color: var(--orange); }
.subject.is-open .subject-icon { transform: rotate(135deg); }

/* Closed rows are also hidden (after the close animation), so links inside
   them can't be tabbed to or tapped while closed */
.subject-a {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.45s var(--ease), visibility 0s 0.45s;
}
.subject.is-open .subject-a {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.45s var(--ease), visibility 0s;
}
.subject-a-inner { overflow: hidden; }
.subject-body {
  display: grid;
  grid-template-columns: var(--subject-cols);
  column-gap: var(--subject-gap);
  padding: 0 var(--subject-pad-r) clamp(2.25rem, 4vw, 3rem) var(--subject-indent);
  opacity: 0;
  transform: translateY(-0.5rem);
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease);
}
.subject.is-open .subject-body { opacity: 1; transform: none; transition-delay: 0.1s; }
.subject-body > * { grid-column: 2; }
.subject-body p { max-width: 38rem; line-height: 1.75; }
.subject-body .tags { gap: 0.6rem; margin-top: 1.6rem; }

@media (max-width: 760px) {
  .subject-list { --subject-num-x: 0.85rem; --subject-indent: 2.4rem; --subject-pad-r: 1.1rem; }
  .subject-q button {
    grid-template-columns: minmax(0, 1fr) 1.5rem;
    row-gap: 0.5rem;
    padding-block: 1.75rem;
  }
  .subject-lead { grid-row: 2; grid-column: 1 / -1; }
  .subject-num { top: 1.25rem; transform: none; font-size: 3.5rem; }
  .subject-body { display: block; padding-block: 0.25rem 2rem; }
}

/* =========================================================
   Grade pages (Grades K–5)
   ========================================================= */
.grade-hero { padding-block: var(--page-top) var(--section-y); }
/* Oversized title (same size as the About page's), set to the right;
   intro under it on the left */
.grade-title {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 9vw, 8.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  text-align: right;
}
.grade-intro {
  max-width: 24rem;
  margin-top: var(--space-head);
  color: var(--muted);
  font-size: 1.0625rem;
}

/* Heading on the left, short intro on the right, sharing a baseline */
.split-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem var(--gap-cols);
}
.split-head .section-sub { max-width: 22rem; margin-top: 0; text-align: right; }

.struggles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem var(--gap-cols);
  padding: clamp(1.5rem, 3vw, 2.25rem); /* same as .job-card */
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-gray);
}
.struggle .pillar-icon { margin-bottom: 1.25rem; }

/* ---------- Falling pills ---------- */
.pill-pit {
  position: relative;
  height: clamp(22rem, 34vw, 30rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-gray);
}
.pill-hint {
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  color: var(--placeholder);
  font-size: 0.8125rem;
  font-weight: 500;
  pointer-events: none;
}
/* Without physics (no JS / reduced motion) the pills sit in a neat pile at the bottom */
.pills {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 1.5rem;
}
.pill {
  display: inline-block;
  padding: 0.65rem 1.3rem;
  border: 1px solid var(--tag-line);
  border-radius: 999px;
  background: #FEF6E1; /* solid, so overlapping pills don't show through */
  color: var(--tag-ink);
  font-size: clamp(0.95rem, 1.15vw, 1.125rem);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.pill--orange { border-color: var(--orange); background: var(--orange); color: #fff; }
.pill--white { border-color: var(--line); background: var(--card); color: var(--ink); }
/* Physics on (main.js): each pill is placed by its body every frame */
.pill-pit.is-physics .pills { inset: 0; display: block; padding: 0; }
.pill-pit.is-physics .pill {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  cursor: grab;
  touch-action: none; /* drag the pill, not the page; the rest of the box still scrolls */
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
}
.pill-pit.is-physics .pill.is-in { visibility: visible; }
.pill-pit.is-physics .pill.is-held { cursor: grabbing; }

/* ---------- How we teach ---------- */
.teach-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: start;
  gap: var(--gap-cols);
}
.teach-grid .pillars { margin-top: 0; }
.teach-grid .pillar-text { max-width: 32rem; }

/* ---------- Other levels ---------- */
.level-list { display: grid; gap: 1.25rem; }
.level-card { grid-template-columns: 1.3fr 1fr; margin-top: 0; }
.level-card .text-link { align-self: flex-start; }
.level-card .wide-card-media { aspect-ratio: 16 / 9; }

/* Desktop: the hero (title + intro) fills the first screen on its own; the
   title stays under the breadcrumb and the intro drops to the bottom-left,
   2.5rem above the fold. The hero's bottom padding (the usual gap to the next
   section) runs on past the fold. */
@media (min-width: 961px) {
  .grade-hero {
    display: flex;
    min-height: calc(100vh - var(--header-h) + var(--section-y) - 2.5rem);
    min-height: calc(100svh - var(--header-h) + var(--section-y) - 2.5rem);
  }
  .grade-hero .container { display: flex; flex-direction: column; }
  .grade-hero-body { display: flex; flex: 1; flex-direction: column; }
  .grade-intro { margin-top: auto; padding-top: var(--space-head); }
}

@media (max-width: 960px) {
  .split-head { flex-direction: column; align-items: flex-start; }
  .split-head .section-sub { text-align: left; }
  .split-head br { display: none; }
  .struggles { grid-template-columns: 1fr; }
  .teach-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* Phones keep the oversized look from desktop: the title scales with the
     screen (15vw, about 59px on an iPhone) and wraps freely, so the longest
     word ("foundations") still fits on a 360px screen */
  .grade-title { text-align: left; font-size: 15vw; text-wrap: balance; }
  .grade-title br { display: none; }
  .pill-pit { height: 26rem; }
  .pill { padding: 0.5rem 1rem; font-size: 0.875rem; }
}

/* =========================================================
   SOL prep: link from the Test Prep subject on the Tutoring page
   ========================================================= */
/* Link from the Test Prep subject to the SOL Prep page */
.subject-body .subject-link { justify-self: start; align-self: auto; margin-top: 1.6rem; padding-top: 0; }

/* =========================================================
   Get Started page (just the form panel)
   ========================================================= */
/* The panel has its own padding, so it only needs a small gap under the header */
.book { padding-block: clamp(1rem, 2.5vw, 2rem) var(--section-y); }

/* =========================================================
   Job page + application form
   ========================================================= */
/* less top space than other pages: the back link sits in it */
.job-page { padding-block: var(--page-top) calc(var(--section-y) * 2); }
.job-page .job-meta { margin-top: 1.5rem; }
.apply-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--gap-cols);
  margin-top: var(--space-head);
}
.job-details { display: grid; gap: clamp(2rem, 4vw, 3rem); max-width: 30rem; }
.job-subhead {
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.job-details p { color: var(--muted); }
.job-bullets { display: grid; gap: 0.3rem; padding-left: 1.1rem; list-style: disc; color: var(--muted); }
.job-bullets li::marker { color: var(--orange); }

.apply-form { max-width: 30rem; }
fieldset.field { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.field legend { margin-bottom: 0.6rem; padding: 0; font-size: 0.875rem; font-weight: 600; }
.legend-note { font-weight: 400; color: var(--muted); }

/* Subject chips: checkboxes styled as pills */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.field .chip { position: relative; display: inline-flex; font-weight: 500; cursor: pointer; }
.field .chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.chip span { transition: background-color var(--dur), border-color var(--dur), color var(--dur), transform 0.2s var(--ease); }
.chip:hover span { background: var(--yellow-soft); }
.chip:active span { transform: var(--press); }
.chip input:checked + span { border-color: var(--orange); background: var(--orange); color: #fff; }
/* Picked chips show an × (clicking the chip again unpicks it) */
.chip span { display: inline-flex; align-items: center; gap: 0.4rem; }
.chip input:checked + span::after {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.chip input:checked:hover + span { border-color: var(--orange-dark); background: var(--orange-dark); }
.chip input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 3px; }
.chip-add {
  display: grid;
  place-items: center;
  width: 1.95rem;
  height: 1.95rem;
  padding: 0;
  border: 1px solid var(--tag-line);
  border-radius: 50%;
  background: var(--tag-bg);
  color: var(--orange);
  transition: background-color var(--dur), transform 0.25s var(--ease);
}
.chip-add:hover { background: var(--yellow-soft); transform: var(--grow); }
.chip-add:active { transform: var(--press); }
.chip-add[hidden] { display: none; }
.chip-add .icon { width: 0.9rem; height: 0.9rem; }
.field .chip-input {
  width: 10rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--orange);
  border-radius: 999px;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Grade range: lowest and highest dropdowns */
.grade-range { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }
.field select {
  width: 6rem;
  padding: 0.45rem 1.3rem 0.45rem 0;
  border: 0;
  border-bottom: 1.5px solid var(--input-line);
  border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1B18' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.1rem center / 0.85rem;
  font: inherit;
  font-size: 0.975rem;
  color: var(--ink);
  appearance: none;
  cursor: pointer;
  transition: border-color var(--dur);
}
.field select:invalid { color: var(--placeholder); }
.field select option { color: var(--ink); }
.field select:focus { outline: none; border-bottom-color: var(--orange); }
.field.has-error select { border-bottom-color: var(--error); }

/* Application form: resumes are emailed instead of uploaded */
.form-note { color: var(--muted); font-size: 0.9375rem; }
.form-note a { color: var(--orange); font-weight: 500; transition: color var(--dur); }
.form-note a:hover { color: var(--orange-dark); }

/* =========================================================
   How it works page
   ========================================================= */
.hiw-intro { padding-top: var(--page-top); }
/* Title on the left, intro line on the right, sharing a baseline */
.hiw-intro-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem 2rem;
}
.hiw-intro-head .section-sub { margin-top: 0; font-size: 0.9375rem; line-height: 1.5; text-align: right; }
/* Wide photo band. The image is taller than its frame and drifts
   through it while scrolling (main.js, "Parallax photo"). */
.hiw-photo {
  aspect-ratio: 16 / 10;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
/* Only 15% extra height: the kids' heads sit near the top of the photo,
   so a bigger drift range would crop them off */
.media.hiw-photo img {
  position: absolute;
  top: -7.5%;
  left: 0;
  height: 115%;
  object-position: center top;
  will-change: transform;
}
/* Desktop: heading + photo fill the first screen and sit just above its
   bottom edge. The photo is a 3.2:1 band, but gives up height on shorter
   laptop screens; on tall monitors the spare room goes above the heading. */
@media (min-width: 961px) {
  .hiw-intro {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: calc(100vh - var(--header-h) - 2rem);
    min-height: calc(100svh - var(--header-h) - 2rem);
    padding-top: min(var(--page-top), 7vh);
    padding-top: min(var(--page-top), 7svh);
  }
  .hiw-intro .container {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--header-h) - min(var(--page-top), 7vh) - 2rem);
    max-height: calc(100svh - var(--header-h) - min(var(--page-top), 7svh) - 2rem);
  }
  .hiw-intro-head { flex-shrink: 0; }
  .hiw-photo {
    aspect-ratio: auto;
    flex: 0 1 calc(100cqi / 3.2);
    min-height: 16rem;
  }
}
.hiw { padding-block: calc(var(--section-y) * 1.4) var(--section-y); }
.hiw-steps { position: relative; display: grid; gap: clamp(13rem, 23vw, 21rem); }
/* Smooth dashed line behind the steps (path data comes from js) */
.hiw-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.hiw-line {
  fill: none;
  stroke: var(--orange);
  stroke-width: 5;
  stroke-linecap: round; /* dash pattern is set by js as the line draws */
}
.hiw-step { position: relative; z-index: 1; }
.hiw-step--one { margin-left: 4%; }
.hiw-step--two { justify-self: end; text-align: right; }
.hiw-step--three { margin-left: 17%; }
.hiw-step-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  white-space: nowrap; /* one line each, so the path can meet them */
}
.hiw-num { color: var(--orange); }
.hiw-step-text { max-width: 28rem; margin-top: 0.75rem; color: var(--muted); text-wrap: balance; }
.hiw-step--two .hiw-step-text { margin-left: auto; }
.hiw-bullets {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.85rem;
  padding-left: 1.1rem;
  list-style: disc;
  color: var(--muted);
}
.hiw-bullets li::marker { color: var(--orange); }
/* Right-hand step: mirrored list, right-aligned with the bullets on the right */
.hiw-step--two .hiw-bullets { padding-left: 0; list-style: none; }
.hiw-step--two .hiw-bullets li::after {
  content: "";
  display: inline-block;
  width: 0.34rem;
  height: 0.34rem;
  margin-left: 0.75rem;
  border-radius: 50%;
  background: var(--orange);
  vertical-align: 0.2em;
}

/* Where we tutor */
.where-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.where-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem 1.75rem 1.75rem;
}
.where-card .pillar-icon { margin-bottom: 1.5rem; }
.where-card .card-title { margin-bottom: 0.5rem; }
.where-card .card-text { max-width: 24rem; }
/* tags sit along the bottom, level across both cards */
.where-card .tags { margin-top: auto; padding-top: 2rem; }

/* =========================================================
   Responsive
   ========================================================= */

/* Large monitors: give the layout a bit more room */
@media (min-width: 1920px) {
  :root { --container: 80rem; }
}

/* Small laptops / tablets landscape */
@media (max-width: 1180px) {
  .main-nav ul { gap: 1.6rem; }
  .header-inner { gap: 1.5rem; }
  .t-text { font-size: 1.05rem; }
}
/* Narrowest laptops: keep each menu link on one line */
@media (min-width: 961px) and (max-width: 1100px) {
  .main-nav a:not(.btn) { white-space: nowrap; }
}

/* Tablets & mobile: collapse navigation */
@media (max-width: 960px) {
  .header-cta { display: none; }
  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: var(--bg-gray);
    transition: background-color var(--dur), transform 0.25s var(--ease);
  }
  @media (hover: hover) and (pointer: fine) {
    .menu-toggle:hover { background: var(--bg-gray-dark); transform: var(--grow); }
  }
  .menu-toggle:active { transform: var(--press); }
  .menu-toggle .icon-close { display: none; }
  .menu-open .menu-toggle .icon-open { display: none; }
  .menu-open .menu-toggle .icon-close { display: block; }

  /* ---------- Mobile menu ----------
     Fills the screen below the header. Big display-font links in rows of
     44px+ (Apple's minimum tap size), Tutoring's pages fold away behind a
     toggle, and the button sits at the bottom where thumbs reach it. */
  /* Page behind can't scroll. Only on <html>: also hiding overflow on <body>
     turns it into the scroll box for the sticky header, which then jumps
     back to the top of the page (off screen) and takes the menu with it. */
  .menu-open { overflow: hidden; }
  .menu-open .site-header { background: var(--bg); border-bottom-color: var(--line); box-shadow: none; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    display: flex;
    flex-direction: column;
    padding: 0.5rem var(--gutter) max(1.5rem, env(safe-area-inset-bottom));
    background: var(--bg);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0s 0.3s;
  }
  .menu-open .main-nav { opacity: 1; visibility: visible; transition: opacity 0.3s var(--ease), visibility 0s; }

  .main-nav ul { display: block; }
  .main-nav > ul { margin-block: 1rem 2rem; }
  /* No dividers: big type and space do the separating */
  .main-nav > ul > li > a:not(.btn) {
    display: flex;
    align-items: center;
    min-height: 4.75rem;
    padding-block: 0.25rem;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 11vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
  }
  .main-nav a:not(.btn)::after { display: none; }

  /* Tutoring row: the word links to the Tutoring page, the round button
     beside it opens the list of tutoring pages */
  .nav-drop { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .nav-caret { display: none; }
  .nav-sub-toggle {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;
    background: var(--bg-gray);
    color: var(--ink);
    transition: background-color var(--dur), transform 0.2s var(--ease);
  }
  .nav-sub-toggle:active { transform: var(--press); }
  .nav-sub-toggle .icon { width: 1.25rem; height: 1.25rem; stroke-width: 2.25; transition: transform 0.35s var(--ease); }
  .nav-drop.is-expanded .nav-sub-toggle { background: var(--peach); color: var(--orange); }
  .nav-drop.is-expanded .nav-sub-toggle .icon { transform: rotate(180deg); }

  .nav-sub { grid-column: 1 / -1; }
  /* Folds open with a height animation (0fr → 1fr). Without JS it just
     stays open. Hidden links can't be tabbed to while it's closed. */
  .js .nav-sub {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.4s var(--ease), visibility 0s 0.4s;
  }
  /* "inherit", not "visible": the menu itself is hidden while closed, and
     "visible" here overrode that, leaving these links invisible but still
     tappable on top of the page (Tutoring pages start with this open) */
  .js .nav-drop.is-expanded .nav-sub {
    grid-template-rows: 1fr;
    visibility: inherit;
    transition: grid-template-rows 0.4s var(--ease), visibility 0s;
  }
  .main-nav .nav-sub ul { min-height: 0; overflow: hidden; }
  .main-nav .nav-sub li:first-child { padding-top: 0.25rem; }
  .main-nav .nav-sub li:last-child { padding-bottom: 1rem; }
  .main-nav .nav-sub a {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    font-size: 1.375rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--muted);
  }
  .main-nav .nav-sub a.is-current { color: var(--orange); }

  .nav-cta-mobile {
    display: flex;
    width: 100%;
    margin-top: auto; /* pinned to the bottom of the screen */
    padding-block: 1.1rem;
    font-size: 1.0625rem;
  }

  /* Rows rise in one after another as the menu opens */
  .main-nav > ul > li,
  .nav-cta-mobile {
    opacity: 0;
    transform: translateY(0.75rem);
    transition: opacity 0.2s, transform 0.2s;
  }
  .menu-open .main-nav > ul > li,
  .menu-open .nav-cta-mobile {
    opacity: 1;
    transform: none;
    transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
  }
  .menu-open .main-nav > ul > li:nth-child(2) { transition-delay: 0.04s; }
  .menu-open .main-nav > ul > li:nth-child(3) { transition-delay: 0.08s; }
  .menu-open .main-nav > ul > li:nth-child(4) { transition-delay: 0.12s; }
  .menu-open .main-nav > ul > li:nth-child(5) { transition-delay: 0.16s; }
  .menu-open .nav-cta-mobile { transition-delay: 0.2s; }

  .hero-grid,
  .approach-grid,
  .faq-grid,
  .cta-card { grid-template-columns: 1fr; }
  .hero-media { justify-self: center; max-width: 30rem; }
  .grade-grid { grid-template-columns: 1fr; }
  .grade-card .card-title { max-width: none; }
  .wide-card { padding: 1.5rem; }
  .approach-media { justify-self: center; width: 100%; max-width: 30rem; }
  .faq-head { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .t-carousel { padding-inline: 0; padding-bottom: 4rem; }
  .t-card[data-pos="1"], .t-card[data-pos="-1"] { opacity: 0; pointer-events: none; }
  .t-arrow { top: auto; bottom: 0; transform: none; }
  .t-arrow:hover { transform: scale(1.08); }
  .t-arrow:active { transform: scale(0.96); }
  .t-arrow--prev { left: calc(50% - 6.5rem); }
  .t-arrow--next { right: calc(50% - 6.5rem); }
  .t-dots { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); margin: 0; }
}

@media (max-width: 960px) {
  .about-statement { text-indent: 0; white-space: normal; font-size: clamp(2rem, 7.5vw, 3.25rem); }
  .about-statement br { display: none; }
  .founder-grid { grid-template-columns: 1fr; }
  .founder-media { max-width: 26rem; }
  .beliefs-grid { grid-template-columns: 1fr; }
  .beliefs-list { justify-self: start; }
  .apply-grid { grid-template-columns: 1fr; }
  /* Stacked steps: no drawn line, everything left-aligned */
  .hiw-path { display: none; }
  .hiw-steps { gap: clamp(3.5rem, 10vw, 5rem); }
  .hiw-step--one, .hiw-step--three { margin-left: 0; }
  .hiw-step--two { justify-self: start; text-align: left; }
  .hiw-step-title { white-space: normal; }
  .hiw-step--two .hiw-step-text { margin-left: 0; }
  .hiw-step--two .hiw-bullets { padding-left: 1.1rem; list-style: disc; }
  .hiw-step--two .hiw-bullets li::after { content: none; }
  .hiw-intro-head { flex-direction: column; align-items: flex-start; }
  .hiw-intro-head .section-sub { text-align: left; }
  .hiw-intro-head .section-sub br { display: none; }
  .where-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  /* Text + photo cards stay side by side on tablets, stack on phones */
  .wide-card { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-title br, .about-cta br, .page-title br { display: none; }
  /* One phone headline size for every page's main heading: Home, the
     tutoring pages (.grade-title), About Us, and the inner pages
     (Tutoring, How It Works, Newsletter, Careers, the job page) */
  .hero-title,
  .page-title,
  .about-title { font-size: 15vw; line-height: 1; letter-spacing: -0.04em; text-wrap: balance; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .js [data-split], .js [data-pop] { visibility: visible; animation: none; }
  .philosophy-row { animation: none; }
}
