/* NextGen Early Care Center
   Palette pulled from the NextGen logo: mint green, purple T, orange, globe blue. */
:root {
  --paper: #fffaf2;
  --cream: #f7efe1;
  --ink: #221637;
  --muted: #5d5470;
  --line: #e7dccb;
  --purple: #6b2fa3;
  --purple-deep: #3b1a5e;
  --green: #2e9d67;
  --mint: #63c99a;
  --orange: #e0681c;
  --blue: #2f7fd0;
  --sun: #ffc83d;

  --display: "Playfair Display", Georgia, serif;
  --serif: "Lora", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-pop: cubic-bezier(0.34, 1.45, 0.64, 1); /* small overshoot, for the playful bits */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 82rem;
  --radius: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 10px; }
.skip-link:focus { top: 1rem; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* Color helpers */
.c-green { color: var(--mint); } .c-orange { color: var(--orange); } .c-blue { color: var(--blue); }
.c-purple { color: var(--purple); } .c-sun { color: var(--sun); }

/* ---------- Type ---------- */
.mega, .big, .page-title, .footer-big { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: .98; text-wrap: balance; }
.mega { font-size: clamp(3.3rem, 10.5vw, 10.5rem); }
.big { font-size: clamp(2.8rem, 7.6vw, 7rem); }
.page-title { font-size: clamp(3.8rem, 15vw, 14rem); line-height: .9; }
.mega em, .big em, .page-title em, .footer-big em { font-style: italic; font-weight: 600; color: var(--purple); }
.eyebrow { font: 700 .8rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--purple); margin-bottom: 1.4rem; display: flex; align-items: center; gap: .6rem; }
.eyebrow::before { content: ""; width: 1.6rem; height: 4px; border-radius: 4px; background: var(--orange); }
.lede { font-family: var(--serif); font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.6; color: var(--muted); max-width: 32rem; }
.muted { color: var(--muted); }

/* ---------- Buttons and links ---------- */
.btn { display: inline-flex; align-items: center; gap: .6rem; padding: 1rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: 1rem; border: 2px solid transparent; transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, box-shadow 200ms ease; cursor: pointer; }
.btn:active { transform: scale(.97); }
.btn svg { transition: transform 200ms var(--ease-out); }
.btn-purple { background: var(--purple); color: #fff; box-shadow: 0 10px 24px -10px rgba(107, 47, 163, .7); }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-ghost { border-color: var(--ink); }
.link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; margin-top: 2rem; padding-bottom: .2rem; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat; }
.link svg { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn-purple:hover { background: var(--purple-deep); }
  .btn-ghost:hover { background: var(--ink); color: var(--paper); }
  .btn:hover svg, .link:hover svg { transform: translateX(4px); }
}

/* ---------- Crayon scroll progress ---------- */
.crayon { position: fixed; inset: 0 0 auto; height: 5px; z-index: 60; pointer-events: none; }
.crayon span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--mint), var(--blue) 35%, var(--purple) 65%, var(--orange)); border-radius: 0 4px 4px 0; }

/* ---------- Header ---------- */
/* Blur lives on a pseudo element so the fixed mobile menu is not trapped inside the header box */
/* Editorial header: links split left and right, logo centered, thin rule underneath */
.site-header { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: .9rem var(--gutter); }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(var(--ink), var(--ink)) bottom center / calc(100% - 2 * var(--gutter)) 1px no-repeat, color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.brand { grid-column: 2; grid-row: 1; position: relative; z-index: 1; display: flex; align-items: center; gap: .6rem; }
.brand-globe { width: 64px; height: auto; mix-blend-mode: multiply; transition: transform 500ms var(--ease-pop); }
.brand:active .brand-globe { transform: rotate(-14deg) scale(.95); }
.brand-globe.spin { animation: globe-spin 900ms var(--ease-out); }
@keyframes globe-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.brand-text { display: grid; line-height: 1; }
.wordmark { font-family: var(--body); font-weight: 800; letter-spacing: -.02em; font-size: 1.55rem; }
.wm-g { color: var(--mint); } .wm-p { color: var(--purple); } .wm-o { color: var(--orange); }
.wordmark b { font-weight: inherit; }
.brand small { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .3rem; }
.site-nav { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-group { display: flex; align-items: center; gap: clamp(1.1rem, 2.4vw, 2.6rem); }
.site-nav a:not(.btn) { position: relative; padding: .4rem 0; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.site-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); transform-origin: left; transition: transform 250ms var(--ease-out); }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .site-nav a:not(.btn):hover::after { transform: scaleX(1); } }
.nav-cta { padding: .65rem 1.05rem; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.menu-btn { display: none; }
@media (max-width: 1100px) and (min-width: 901px) {
  .brand small { display: none; }
  .nav-group { gap: 1.1rem; }
  .site-nav a:not(.btn) { font-size: .74rem; letter-spacing: .07em; }
}

@media (max-width: 900px) {
  .site-header { display: flex; justify-content: space-between; }
  .brand-globe { width: 52px; }
  .wordmark { font-size: 1.35rem; }
  .menu-btn { display: grid; place-content: center; gap: 7px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); cursor: pointer; position: relative; z-index: 2; }
  .menu-btn i { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: var(--paper); transition: transform 250ms var(--ease-out); }
  .menu-btn[aria-expanded="true"] i:first-of-type { transform: translateY(4.75px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] i:last-of-type { transform: translateY(-4.75px) rotate(-45deg); }
  .site-nav { position: fixed; inset: 0; z-index: 1; flex-direction: column; align-items: flex-start; justify-content: center; gap: .2rem; padding: 6rem var(--gutter) 2rem; background: var(--paper); opacity: 0; visibility: hidden; transition: opacity 250ms ease, visibility 0s 250ms; }
  .nav-group { flex-direction: column; align-items: flex-start; gap: .2rem; }
  .site-nav a:not(.btn) { font: 700 clamp(2.6rem, 11vw, 4rem)/1.05 var(--display); letter-spacing: -.015em; text-transform: none; transform: translateY(18px); opacity: 0; transition: transform 400ms var(--ease-out), opacity 300ms ease; }
  .site-nav a:not(.btn)::after { height: 6px; bottom: .1em; }
  .site-nav .nav-cta { margin-top: 1.5rem; font-size: 1rem; opacity: 0; transition: opacity 300ms ease; }
  .nav-open .site-nav { opacity: 1; visibility: visible; transition: opacity 250ms ease; }
  .nav-open .site-nav a { opacity: 1 !important; transform: none !important; }
  .nav-open .nav-left a:nth-child(2) { transition-delay: 40ms; } .nav-open .nav-left a:nth-child(3) { transition-delay: 80ms; }
  .nav-open .nav-right a:nth-child(1) { transition-delay: 120ms; } .nav-open .nav-right a:nth-child(2) { transition-delay: 160ms; }
  .nav-open .nav-right a:nth-child(3) { transition-delay: 200ms; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Doodles (parallax shapes) ---------- */
.doodles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.doodle { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); rotate: var(--r, 0deg); opacity: .9; will-change: transform; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(3rem, 6vw, 5rem); max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; }
.pill { display: inline-flex; align-items: center; gap: .6rem; padding: .5rem .95rem; border-radius: 999px; background: #e3f5ea; color: #1f6b47; font-weight: 700; font-size: .85rem; margin-bottom: 1.6rem; position: relative; }
.pulse { width: .55rem; height: .55rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(46, 157, 103, .5); animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(46, 157, 103, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 157, 103, 0); } }
/* Centered editorial hero: giant title overlaps the top of a centered photo, note sits bottom right */
.hero { text-align: center; padding-top: clamp(2.5rem, 6vw, 5rem); }
.hero .mega { position: relative; z-index: 2; max-width: 15ch; margin-inline: auto; font-size: clamp(3.3rem, 8.6vw, 8.6rem); line-height: .9; }
.hero-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem) minmax(0, 1fr); align-items: end; gap: clamp(1.5rem, 3vw, 3rem); margin-top: calc(-1 * clamp(2.5rem, 6.5vw, 6.5rem)); text-align: left; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.hero-note { font-size: .85rem; font-weight: 600; letter-spacing: .06em; line-height: 1.6; text-transform: uppercase; max-width: 19rem; }
.hero-photo { position: relative; margin: 0; z-index: 1; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 42% 50%; border-radius: var(--radius); }
.badge { position: absolute; right: -3rem; bottom: 12%; width: clamp(6.5rem, 11vw, 9rem); aspect-ratio: 1; border-radius: 50%; background: var(--sun); display: grid; place-items: center; box-shadow: 0 12px 30px -12px rgba(34, 22, 55, .45); }
.badge svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; font: 800 9.4px var(--body); letter-spacing: .14em; fill: var(--ink); }
.badge-heart { width: 30%; color: #e8423a; }
@media (max-width: 760px) {
  .hero-stage { grid-template-columns: 1fr; margin-top: -1.5rem; }
  .hero-photo { order: -1; }
  .hero-photo img { aspect-ratio: 4 / 3; }
  .hero-note { order: 0; max-width: none; }
  .hero-actions { order: 1; flex-direction: row; flex-wrap: wrap; }
  .badge { right: .75rem; bottom: -2.5rem; width: 6rem; }
  .hero-note { margin-top: 1rem; }
}

/* ---------- Marquee ---------- */
/* Footer word banner: loops on its own at a steady, calm pace (linear, since it is constant motion) */
.marquee { --gap: clamp(1rem, 2.5vw, 2rem); overflow: hidden; padding: clamp(1.25rem, 3vw, 2rem) 0; border-top: 2px solid var(--ink); background: var(--cream); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-group { display: flex; align-items: center; gap: var(--gap); padding-right: var(--gap); }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@media (hover: hover) and (pointer: fine) { .marquee:hover .marquee-track { animation-play-state: paused; } }
.marquee-track span { font: 700 clamp(2.6rem, 7vw, 6rem)/1 var(--display); letter-spacing: -.02em; }
.marquee-track span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.marquee-track svg { width: clamp(1.8rem, 4vw, 3rem); height: clamp(1.8rem, 4vw, 3rem); flex: none; }

/* ---------- Statement with scroll highlight ---------- */
.statement { padding-block: clamp(5rem, 12vw, 10rem); }
.statement-text { font: 500 clamp(2rem, 4.4vw, 4rem)/1.15 var(--serif); letter-spacing: -.015em; max-width: 22ch; }
[data-highlight] .w { opacity: .16; transition: opacity 300ms ease; }
[data-highlight] .w.on { opacity: 1; }

/* ---------- Programs list (no cards) ---------- */
.programs { padding-bottom: clamp(4rem, 10vw, 8rem); }
.prog-list { list-style: none; margin: clamp(2.5rem, 5vw, 4rem) 0 0; padding: 0; border-top: 2px solid var(--ink); }
.prog-row { position: relative; display: grid; grid-template-columns: 3.5rem 1fr auto 2.5rem; align-items: center; gap: 1rem; padding: clamp(1.1rem, 2.4vw, 1.8rem) 0; border-bottom: 2px solid var(--ink); }
.prog-row::before { content: ""; position: absolute; inset: 0 calc(-1 * var(--gutter)); background: var(--c); transform: scaleY(0); transform-origin: bottom; transition: transform 350ms var(--ease-out); z-index: -1; }
.prog-num { font-weight: 700; font-size: .9rem; color: var(--muted); transition: color 200ms ease; }
.prog-name { font: 700 clamp(2.4rem, 7vw, 6rem)/.95 var(--display); letter-spacing: -.015em; transition: transform 350ms var(--ease-out), color 200ms ease; }
.prog-age { font-weight: 600; color: var(--muted); text-align: right; transition: color 200ms ease; }
.prog-arrow { width: 2.5rem; height: 2.5rem; padding: .55rem; border-radius: 50%; background: var(--c); color: #fff; transition: transform 300ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.prog-thumb { display: none; }
@media (hover: hover) and (pointer: fine) {
  .prog-row:hover::before { transform: scaleY(1); }
  .prog-row:hover .prog-name { transform: translateX(.6rem); color: #fff; }
  .prog-row:hover .prog-num, .prog-row:hover .prog-age { color: #fff; }
  .prog-row:hover .prog-arrow { background: #fff; color: var(--ink); transform: rotate(-45deg); }
}
.peek { position: fixed; left: 0; top: 0; width: 18rem; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; pointer-events: none; z-index: 40; opacity: 0; scale: .9; transition: opacity 200ms ease, scale 300ms var(--ease-out); box-shadow: 0 24px 50px -18px rgba(34, 22, 55, .5); }
.peek.show { opacity: 1; scale: 1; }
.peek img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .prog-row { grid-template-columns: 4.5rem 1fr 2.25rem; grid-template-rows: auto auto; column-gap: 1rem; row-gap: .2rem; }
  .prog-thumb { display: block; grid-row: 1 / 3; width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: 50%; border: 3px solid var(--c); }
  .prog-num { display: none; }
  .prog-name { grid-column: 2; }
  .prog-age { grid-column: 2; grid-row: 2; text-align: left; font-size: .95rem; }
  .prog-arrow { grid-column: 3; grid-row: 1 / 3; width: 2.25rem; height: 2.25rem; }
}

/* ---------- Learn through play: sticky split ---------- */
.play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(4rem, 10vw, 8rem); border-top: 2px solid var(--ink); }
.play-head { position: sticky; top: 7rem; align-self: start; }
.play-head .muted { margin-top: 1.5rem; max-width: 28rem; font-size: 1.1rem; }
.play-list { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.play-list li { position: relative; padding: 2.2rem 0 2.2rem 5rem; border-bottom: 2px dashed var(--line); counter-increment: p; }
.play-list li:first-child { padding-top: 0; }
.play-list h3 { font: 700 clamp(1.7rem, 3vw, 2.6rem)/1.05 var(--display); letter-spacing: -.02em; margin-bottom: .6rem; }
.play-list p { color: var(--muted); max-width: 30rem; }
.play-doodle { position: absolute; left: 0; top: 2.3rem; width: 3.2rem; height: 3.2rem; transition: rotate 700ms var(--ease-pop) 120ms, scale 700ms var(--ease-pop) 120ms; }
.play-list li:first-child .play-doodle { top: 0; }
.play-list li[data-reveal] .play-doodle { rotate: -50deg; scale: .6; }
.play-list li.is-in .play-doodle { rotate: 0deg; scale: 1; }
@media (max-width: 860px) { .play { grid-template-columns: 1fr; } .play-head { position: static; } .play-list li { padding-left: 4.2rem; } .play-doodle { width: 2.7rem; height: 2.7rem; } }

/* ---------- Photo strip ---------- */
.strip-section { padding-bottom: clamp(4rem, 10vw, 8rem); overflow: hidden; }
.strip-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3rem); }
.strip-head .link { margin-top: 0; }
.strip { display: flex; gap: 1rem; width: max-content; padding-left: var(--gutter); will-change: transform; }
.strip img { width: clamp(15rem, 32vw, 28rem); aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.strip img:nth-child(odd) { rotate: -1.5deg; } .strip img:nth-child(even) { rotate: 1.5deg; margin-top: 1.5rem; }

/* ---------- Why (typographic rows) ---------- */
.why { padding-block: clamp(4rem, 10vw, 8rem); border-top: 2px solid var(--ink); }
.why-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 2rem; align-items: baseline; padding: clamp(1.5rem, 3vw, 2.5rem) 0; border-bottom: 2px solid var(--line); }
.why-title { font: 700 clamp(2rem, 5vw, 4.4rem)/1 var(--display); letter-spacing: -.015em; }
.why-title span { font-size: .4em; vertical-align: super; margin-right: .3em; }
.why-row p { color: var(--muted); font-size: 1.1rem; }
@media (max-width: 760px) { .why-row { grid-template-columns: 1fr; gap: .8rem; } }

/* ---------- Hours band ---------- */
.hours { position: relative; background: var(--purple-deep); color: #fff; padding-block: clamp(5rem, 12vw, 10rem); overflow: hidden; }
.hours .eyebrow { color: var(--sun); }
.hours .mega em { color: var(--sun); }
.hours-time { font-size: clamp(1.2rem, 2vw, 1.6rem); margin: 2rem 0 2.5rem; color: #e4dcf1; }
.hours-time strong { color: #fff; display: block; font: 800 clamp(1.8rem, 4vw, 3rem)/1.1 var(--body); letter-spacing: -.02em; }

/* ---------- Page heroes (inner pages) ---------- */
.page-hero { position: relative; padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) clamp(2.5rem, 5vw, 4rem); max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; }
.page-hero { text-align: center; }
.page-hero .eyebrow { justify-content: center; }
.page-hero h1, .hero h1 { position: relative; z-index: 1; }
.page-title .scribble { bottom: -.2em; }
.page-hero .mega { max-width: 16ch; margin-inline: auto; }
.page-hero .lede { margin: clamp(1.5rem, 3vw, 2.5rem) auto 0; }
.page-hero .jump { justify-content: center; }
.page-hero .jump a { position: relative; background: var(--paper); }
.page-banner { width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto clamp(4rem, 8vw, 7rem); }
.page-banner img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 760px) { .page-banner img { aspect-ratio: 4 / 3; } }

/* ---------- Feature rows (big title + photo, alternating) ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; padding-block: clamp(3rem, 7vw, 6rem); scroll-margin-top: 6rem; }
.feature + .feature { border-top: 2px solid var(--line); }
.feature.flip figure { order: 2; }
.feature figure { margin: 0; }
.feature img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.feature-tag { display: inline-block; font-weight: 700; font-size: .9rem; padding: .35rem .85rem; border-radius: 999px; background: var(--c, var(--mint)); color: #fff; margin-bottom: 1.2rem; }
.feature h2 { font: 700 clamp(2.4rem, 5.4vw, 5rem)/.95 var(--display); letter-spacing: -.015em; margin-bottom: 1.4rem; }
.feature p { color: var(--muted); font-size: 1.1rem; max-width: 34rem; }
.feature .link { margin-top: 1.5rem; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } .feature.flip figure { order: 0; } }

/* Definition list inside feature rows (curriculum) */
.points { margin: 1.8rem 0 0; display: grid; gap: 0; }
.points div { padding: 1.1rem 0; border-top: 2px solid var(--line); }
.points dt { font: 700 1.3rem/1.2 var(--display); margin-bottom: .35rem; display: flex; align-items: center; gap: .6rem; }
.points dt::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--c, var(--mint)); flex: none; }
.points dd { margin: 0; color: var(--muted); }
.group-label { font: 700 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--purple); margin: 2rem 0 0; }

/* ---------- Big list (anchors on programs/curriculum pages) ---------- */
.jump { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.jump a { padding: .6rem 1.1rem; border-radius: 999px; border: 2px solid var(--ink); font-weight: 700; transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out); }
.jump a:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .jump a:hover { background: var(--ink); color: var(--paper); } }

/* ---------- Facility gallery ---------- */
.gallery { columns: 3 18rem; column-gap: 1rem; width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto clamp(4rem, 8vw, 7rem); }
.gallery button { display: block; width: 100%; margin: 0 0 1rem; padding: 0; border: 0; background: none; border-radius: 22px; overflow: hidden; cursor: zoom-in; break-inside: avoid; }
.gallery img { width: 100%; transition: transform 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .gallery button:hover img { transform: scale(1.04); } }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1200px); max-height: 90vh; }
.lightbox::backdrop { background: rgba(34, 22, 55, .82); }
.lightbox img { max-height: 86vh; width: auto; margin: auto; border-radius: 18px; }
.lightbox[open] { animation: lb-in 250ms var(--ease-out); }
@keyframes lb-in { from { opacity: 0; transform: scale(.96); } }
.lightbox-close { position: fixed; top: 1rem; right: 1rem; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--paper); font-size: 1.6rem; cursor: pointer; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto clamp(4rem, 8vw, 7rem); }
.contact-list { display: grid; gap: 0; margin: 0; }
.contact-list div { padding: 1.3rem 0; border-top: 2px solid var(--line); }
.contact-list dt { font: 700 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--purple); margin-bottom: .5rem; }
.contact-list dd { margin: 0; font: 700 clamp(1.2rem, 2vw, 1.5rem)/1.3 var(--body); }
.contact-list a { background: linear-gradient(var(--mint), var(--mint)) 0 100% / 0 3px no-repeat; transition: background-size 250ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .contact-list a:hover { background-size: 100% 3px; } }
.map { margin-top: 2rem; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--line); aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.form { scroll-margin-top: 7rem; }
.form h2 { font: 700 clamp(2.4rem, 5vw, 4.2rem)/.95 var(--display); letter-spacing: -.015em; margin-bottom: .8rem; }
.form > p { color: var(--muted); margin-bottom: 2rem; }
.tabs { display: inline-flex; padding: .3rem; border-radius: 999px; background: var(--cream); margin-bottom: 2rem; position: relative; }
.tabs button { position: relative; z-index: 1; border: 0; background: none; padding: .7rem 1.2rem; border-radius: 999px; font-weight: 700; cursor: pointer; transition: color 200ms ease; }
.tabs button[aria-selected="true"] { color: #fff; }
.tabs-ink { position: absolute; top: .3rem; bottom: .3rem; left: 0; border-radius: 999px; background: var(--purple); transition: transform 300ms var(--ease-out), width 300ms var(--ease-out); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1rem; }
.fields .full { grid-column: 1 / -1; }
.fields label { display: grid; gap: .4rem; font-weight: 700; font-size: .9rem; }
.fields input, .fields select, .fields textarea { width: 100%; padding: .95rem 1rem; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-weight: 400; font-size: 1rem; transition: border-color 200ms ease, box-shadow 200ms ease; }
.fields input:focus, .fields select:focus, .fields textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(107, 47, 163, .15); }
.fields textarea { resize: vertical; min-height: 8rem; }
.opt { color: var(--muted); font-weight: 500; }
.form .btn { margin-top: 1.5rem; }
.form-note { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.sent { padding: 2.5rem 0; }
.sent h3 { font: 700 clamp(2.4rem, 5vw, 4rem)/1 var(--display); color: var(--green); margin-bottom: .6rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .fields { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.mission { background: var(--cream); padding-block: clamp(5rem, 10vw, 8rem); }
.mission .statement-text { max-width: 24ch; }
.mission p.muted { margin-top: 2rem; max-width: 40rem; font-size: 1.15rem; }
.duo { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1rem; margin-top: clamp(3rem, 6vw, 5rem); }
.duo img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.duo figure:last-child img { aspect-ratio: 3 / 4; }
@media (max-width: 640px) { .duo { grid-template-columns: 1fr; } .duo figure:last-child img { aspect-ratio: 4 / 5; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e9e2f3; padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) 2rem; }
.footer-top { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 2rem; padding-bottom: clamp(3rem, 6vw, 5rem); border-bottom: 2px solid rgba(255, 255, 255, .14); }
.footer-big { font-size: clamp(3rem, 8.5vw, 8rem); color: #fff; max-width: 12ch; }
.footer-big em { color: var(--sun); }
.footer-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; padding-block: 3rem; }
.footer-label { font: 700 .75rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--mint); margin: 0 0 .9rem; }
.footer-grid p { line-height: 1.8; }
.footer-grid a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 250ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .footer-grid a:hover { background-size: 100% 1px; } }
.footer-base { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 2rem; border-top: 2px solid rgba(255, 255, 255, .14); }
.footer-base .wordmark { font-size: 2rem; }
.footer-base small { color: #b3a8c6; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Motion. Calm for parents, a little bounce for kids.
   Everything runs once on enter; nothing loops except the
   enrolling pulse.
   ========================================================= */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 700ms ease, transform 800ms var(--ease-out); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* ---- Title entrances ---- */
.js [data-split] .word { display: inline-block; }
.js [data-split] .wi, .js [data-split] .ch { display: inline-block; }

/* rise (default, home + section titles): words pop up out of a line, staggered */
/* Padding gives italic swashes and the crayon line room inside the mask, since Safari ignores overflow-clip-margin */
.js [data-split]:not([data-anim]) .word, .js [data-anim="wave"] .word { overflow: clip; overflow-clip-margin: .25em; vertical-align: bottom; padding: .1em .14em .22em; margin: -.1em -.14em -.22em; }
.js [data-split]:not([data-anim]) .wi, .js [data-anim="wave"] .wi { transform: translateY(110%) rotate(5deg); transform-origin: 0 100%; transition: transform 750ms var(--ease-pop) calc(var(--i) * 45ms); }
.js [data-split]:not([data-anim]).is-in .wi, .js [data-anim="wave"].is-in .wi { transform: none; }

/* wave (About): after rising, the first word waves hello once */
.js [data-anim="wave"].is-in .word:first-child .wi { animation: wave 1100ms var(--ease-in-out) 750ms both; transform-origin: 20% 90%; }
@keyframes wave { 0% { transform: none; } 18% { transform: rotate(-9deg); } 36% { transform: rotate(7deg); } 54% { transform: rotate(-5deg); } 72% { transform: rotate(3deg); } 100% { transform: none; } }

/* blocks (Programs): letters drop in tilted like stacked toy blocks, then settle with a small bounce */
.js [data-anim="blocks"] .ch { opacity: 0; transform: translateY(-.55em) rotate(var(--rot)) scale(.92); transition: transform 800ms var(--ease-pop) calc(120ms + var(--i) * 55ms), opacity 250ms ease calc(120ms + var(--i) * 55ms); }
.js [data-anim="blocks"].is-in .ch { opacity: 1; transform: none; }

/* wipe (Curriculum): a soft edged mask uncovers the title left to right, like a page being read */
.js [data-anim="wipe"] .word { -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%); mask-image: linear-gradient(90deg, #000 45%, transparent 55%); -webkit-mask-size: 250% 100%; mask-size: 250% 100%; -webkit-mask-position: 100% 0; mask-position: 100% 0; transition: -webkit-mask-position 1300ms var(--ease-in-out), mask-position 1300ms var(--ease-in-out); }
.js [data-anim="wipe"].is-in .word { -webkit-mask-position: 0 0; mask-position: 0 0; }

/* focus (Facility): words come into focus from a gentle blur, like a camera finding the room */
.js [data-anim="focus"] .wi { opacity: 0; filter: blur(10px); transform: scale(1.06); transition: opacity 900ms ease calc(var(--i) * 70ms), filter 900ms var(--ease-out) calc(var(--i) * 70ms), transform 1100ms var(--ease-out) calc(var(--i) * 70ms); }
.js [data-anim="focus"].is-in .wi { opacity: 1; filter: none; transform: none; }

/* type (Contact): letters are typed out; space is kept so nothing jumps */
.js [data-anim="type"] .ch { visibility: hidden; }
.js [data-anim="type"] .ch.on, .js [data-anim="type"].typed .ch { visibility: visible; }
.caret { display: inline-block; width: .07em; height: .78em; margin-left: .04em; vertical-align: baseline; background: var(--orange); border-radius: 2px; animation: blink 1s steps(1) infinite; transition: opacity 300ms ease; }
.caret.done { opacity: 0; }
@keyframes blink { 50% { opacity: 0; } }

/* Crayon underline that draws itself in (line drawing) */
.scribble-host { position: relative; }
.scribble { position: absolute; left: -2%; bottom: -.12em; width: 104%; height: .28em; overflow: visible; pointer-events: none; }
/* Inside a masked word, keep the line within the padded box so nothing is clipped */
.word.scribble-host .scribble { left: .1em; width: calc(100% - .2em); bottom: .1em; height: .2em; }
.scribble path { fill: none; stroke: var(--sun); stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .is-in .scribble path { transition: stroke-dashoffset 900ms var(--ease-in-out) calc(500ms + var(--count, 6) * 45ms); stroke-dashoffset: 0; }
[data-anim="wipe"] .scribble path { stroke: var(--mint); }
.js [data-anim="wipe"].is-in .scribble path { transition-delay: 1100ms; }
/* Images unveil from the bottom with rounded corners */
.js [data-clip] img { clip-path: inset(100% 0 0 0 round var(--radius)); transform: scale(1.08); transition: clip-path 1100ms var(--ease-in-out), transform 1400ms var(--ease-out); }
.js [data-clip].is-in img { clip-path: inset(0 0 0 0 round var(--radius)); transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-clip] img { transform: none !important; clip-path: none !important; transition: opacity 400ms ease; }
  .js [data-split] .wi, .js [data-split] .ch, .js [data-split] .word { transform: none !important; filter: none !important; opacity: 1 !important; animation: none !important; transition: none !important; -webkit-mask-image: none !important; mask-image: none !important; }
  .scribble path { stroke-dashoffset: 0 !important; transition: none !important; }
  .caret { display: none; }
  .doodle, .strip, .badge { transform: none !important; }
  .marquee-track { animation: none; }
  .pulse { animation: none; }
  .crayon { display: none; }
  .play-list li[data-reveal] .play-doodle { rotate: 0deg; scale: 1; }
  .brand-globe.spin { animation: none; }
}

/* ---------- Legal pages ---------- */
.legal-date { margin-top: 1.25rem; font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.page-hero .lede a, .legal a, .form-note a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--orange); }
.legal { max-width: 46rem; padding-bottom: clamp(4rem, 8vw, 7rem); }
.legal-toc { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.legal-toc a { padding: .45rem .9rem; border: 1.5px solid var(--line); border-radius: 999px; font-size: .85rem; font-weight: 600; text-decoration: none; transition: border-color 200ms ease, background-color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .legal-toc a:hover { border-color: var(--ink); background: #fff; } }
.legal section { padding: 2rem 0; border-top: 1px solid var(--line); scroll-margin-top: 6rem; }
.legal h2 { font: 700 clamp(1.6rem, 3vw, 2.1rem)/1.15 var(--display); letter-spacing: -.01em; margin-bottom: 1rem; }
.legal h3 { font: 700 1.05rem/1.3 var(--body); margin: 1.5rem 0 .5rem; }
.legal p, .legal li { color: #3f3752; line-height: 1.75; }
.legal p + p { margin-top: .9rem; }
.legal ul { margin: .75rem 0 0; padding-left: 1.2rem; }
.legal li { margin: .45rem 0; }
.legal li::marker { color: var(--orange); }
.legal-contact { font-weight: 600; color: var(--ink) !important; }
.footer-legal { display: flex; gap: 1.5rem; font-size: .85rem; }
.footer-legal a { color: #e9e2f3; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 250ms var(--ease-out); }
.footer-legal a[aria-current="page"] { background-size: 100% 1px; }
@media (hover: hover) and (pointer: fine) { .footer-legal a:hover { background-size: 100% 1px; } }

/* ---------- Contact map placeholder (until cookies are accepted) ---------- */
.map-off { height: 100%; display: grid; place-content: center; justify-items: center; gap: .9rem; padding: 1.5rem; text-align: center; background: var(--cream); }
.map-off p { color: var(--muted); font-size: .95rem; }
.map-off .link { margin-top: 0; font-size: .9rem; }
.footer-cookie { border: 0; padding: 0; background: none; color: #e9e2f3; font: inherit; cursor: pointer; background-image: linear-gradient(currentColor, currentColor); background-position: 0 100%; background-size: 0 1px; background-repeat: no-repeat; transition: background-size 250ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .footer-cookie:hover { background-size: 100% 1px; } }

/* ---------- Cookie banner ---------- */
.cookie { position: fixed; left: 1rem; bottom: 1rem; z-index: 70; width: min(26rem, calc(100% - 2rem)); padding: 1.25rem; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 24px 60px -20px rgba(34, 22, 55, .45); opacity: 0; transform: translateY(12px); transition: opacity 200ms ease, transform 300ms var(--ease-out); }
.cookie.show { opacity: 1; transform: none; }
.cookie p { font-size: .92rem; line-height: 1.55; color: var(--muted); }
.cookie p strong { color: var(--ink); }
.cookie a { text-decoration: underline; text-underline-offset: 3px; color: var(--purple); }
.cookie-actions { display: flex; gap: .6rem; margin-top: 1rem; }
.cookie-actions .btn { flex: 1; justify-content: center; padding: .8rem 1rem; font-size: .9rem; }

/* ---------- NextGen Helper chat ---------- */
.chat { position: fixed; right: 1rem; bottom: 1rem; z-index: 65; display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; }
.chat-fab { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem 1.1rem .45rem .45rem; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: .92rem; cursor: pointer; box-shadow: 0 14px 30px -12px rgba(34, 22, 55, .6); transition: transform 160ms var(--ease-out); }
.chat-fab:active { transform: scale(.96); }
.chat-fab img { width: 2.6rem; height: 2.6rem; object-fit: contain; border-radius: 50%; background: #fff; padding: .2rem; }
.chat-panel { width: min(23rem, calc(100vw - 2rem)); max-height: min(34rem, calc(100vh - 7rem)); display: flex; flex-direction: column; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 30px 70px -24px rgba(34, 22, 55, .5); overflow: hidden; transform-origin: bottom right; opacity: 0; transform: translateY(8px) scale(.96); transition: opacity 150ms ease, transform 150ms var(--ease-out); }
.chat-panel.open { opacity: 1; transform: none; transition-duration: 200ms, 250ms; }
.chat-head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; background: var(--ink); color: #fff; }
.chat-head img { width: 2.4rem; height: 2.4rem; object-fit: contain; border-radius: 50%; background: #fff; padding: .2rem; }
.chat-head div { display: grid; flex: 1; line-height: 1.25; }
.chat-head small { color: #c9bfdb; font-size: .78rem; }
.chat-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .55rem; min-height: 9rem; }
.msg { max-width: 85%; padding: .65rem .85rem; border-radius: 16px; font-size: .92rem; line-height: 1.5; animation: msg-in 220ms var(--ease-out); }
.msg-bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg-user { align-self: flex-end; background: var(--purple); color: #fff; border-bottom-right-radius: 6px; }
.msg a { color: var(--purple); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }
.dots { display: inline-flex; gap: 4px; padding: .2rem 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot 900ms ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 120ms; } .dots i:nth-child(3) { animation-delay: 240ms; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-chips { display: flex; gap: .4rem; overflow-x: auto; padding: 0 1rem .75rem; scrollbar-width: none; }
.chat-chips button { flex: none; padding: .45rem .8rem; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: .82rem; font-weight: 600; cursor: pointer; transition: border-color 200ms ease, transform 160ms var(--ease-out); }
.chat-chips button:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .chat-chips button:hover { border-color: var(--purple); } }
.chat-form { display: flex; gap: .5rem; padding: .75rem 1rem 1rem; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: 16px; }
.chat-form input:focus { outline: none; border-color: var(--purple); }
.chat-form button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform 160ms var(--ease-out); }
.chat-form button:active { transform: scale(.95); }
@media (max-width: 640px) {
  .cookie { left: .75rem; right: .75rem; bottom: .75rem; width: auto; }
  body.cookie-open .chat { display: none; }
  .chat { right: .75rem; bottom: .75rem; }
  .chat-fab span { display: none; }
  .chat-fab { padding: .4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie, .chat-panel { transform: none !important; }
  .msg, .dots i { animation: none; }
}
