/* =====================================================================
   PLAYFUL LAYER: classroom doodles, crayons, chalkboard, phonics.
   Loaded after style.css.
   ===================================================================== */

/* pencil cursor (tip is the hotspot) */
body { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg transform='rotate(-45 16 16)' stroke='%231e1b4b' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M2 16l8-4v8z' fill='%23f6d7b0'/%3E%3Cpath d='M2 16l3-1.5v3z' fill='%231e1b4b'/%3E%3Crect x='10' y='12' width='15' height='8' fill='%23ffd23f'/%3E%3Crect x='25' y='12' width='5' height='8' rx='1.5' fill='%23ff7eb6'/%3E%3C/g%3E%3C/svg%3E") 6 26, auto; }
a, button, [role="button"], label, select, .pword { cursor: pointer; }
input, textarea { cursor: text; }

/* crayon highlight that swipes in behind key words */
.hl { background: linear-gradient(transparent 58%, var(--hlc, var(--sun)) 58%, var(--hlc, var(--sun)) 90%, transparent 90%) no-repeat 0 0 / 0% 100%; transition: background-size 1s .35s var(--ease-out); padding: 0 .08em; }
.in .hl, .hl.in, .hero .hl { background-size: 100% 100%; }
.squig { display: block; width: 90px; height: 18px; color: var(--orange); margin: -4px 0 16px; }
.section-head.center .squig { margin-inline: auto; }
.squig path { stroke-dasharray: 140; stroke-dashoffset: 140; transition: stroke-dashoffset 1.2s .3s var(--ease-out); }
.in .squig path, .squig.in path { stroke-dashoffset: 0; }

/* handwritten notes with arrows that point at things */
.note { position: absolute; z-index: 6; font: 700 1.5rem/1 var(--hand); color: var(--purple); display: flex; align-items: flex-end; gap: 4px; pointer-events: none; white-space: nowrap; }
.note svg { width: 64px; height: 50px; overflow: visible; flex-shrink: 0; }
.note path { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 130; stroke-dashoffset: 130; }
.note span { opacity: 0; animation: fadeUp .6s var(--nd, .6s) forwards; }
.note path { animation: noteDraw 1s calc(var(--nd, .6s) + .3s) var(--ease-out) forwards; }
.hero .note { --nd: 2.1s; }
[data-reveal]:not(.in) .note span, [data-reveal]:not(.in) .note path { animation-play-state: paused; }
@keyframes noteDraw { from { stroke-dashoffset: 130; } to { stroke-dashoffset: 0; } }

/* floating doodles */
.drift .dd {
  position: absolute; width: var(--s, 48px); height: var(--s, 48px); opacity: var(--o, .8);
  translate: calc(var(--mx, 0) * var(--z, 1) * 1px) calc(var(--my, 0) * var(--z, 1) * 1px);
  transition: translate .8s var(--ease-out);
  animation: doodle var(--t, 9s) ease-in-out infinite alternate; animation-delay: var(--d, 0s);
}
.drift .dd svg { width: 100%; height: 100%; }
.drift .dd.ltr { font: 800 var(--s) / 1 var(--serif); color: var(--c); width: auto; height: auto; }
.drift .dd.ph { width: auto; height: auto; font: 700 1.05rem/1 var(--sans); color: #fff; background: var(--c); padding: .45em .7em; border-radius: 16px 16px 16px 4px; box-shadow: 0 5px 0 rgba(0,0,0,.12); }
@keyframes doodle { from { transform: translateY(0) rotate(var(--r1, -10deg)); } to { transform: translateY(var(--y, -26px)) rotate(var(--r2, 12deg)); } }

/* pencil that draws a rainbow line across the top as you scroll */
.pencil-progress { position: fixed; left: 0; top: 0; height: 6px; width: 100%; z-index: 80; pointer-events: none; }
.pencil-progress .line { position: absolute; left: 0; top: 0; height: 6px; width: var(--p, 0%); border-radius: 0 6px 6px 0; background: linear-gradient(90deg, var(--red), var(--orange), var(--sun), var(--green), var(--tile), var(--purple)); background-size: 100vw 100%; }
.pencil-progress svg { position: absolute; top: -13px; left: var(--p, 0%); width: 34px; height: 34px; transform: translateX(-8px) rotate(220deg); }

/* sparkle and letter trail */
.trail { position: fixed; z-index: 70; pointer-events: none; font: 800 1.3rem/1 var(--serif); animation: trail 1.1s var(--ease-out) forwards; }
.trail svg { width: 18px; height: 18px; display: block; }
@keyframes trail { from { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); } to { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + 46px)) scale(.4) rotate(var(--tr)); } }

.burst svg { width: 100%; height: 100%; display: block; }

/* buttons: bouncy wiggle */
.btn:hover { animation: wiggle .5s ease-in-out; }
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -3deg; } 75% { rotate: 3deg; } }

/* scalloped section tops */
.scallop::before { content: ""; position: absolute; left: 0; right: 0; top: -17px; height: 18px; z-index: 2; background: radial-gradient(circle at 18px 18px, var(--sbg) 17px, transparent 18px) repeat-x 0 0 / 36px 18px; }

/* ---------- hero extras ---------- */
.hero { background: radial-gradient(circle at 85% 20%, #fff0c7 0, transparent 40%), radial-gradient(circle at 8% 92%, #dcecff 0, transparent 45%), var(--paper); }
.hero h1 .pen { position: absolute; left: 0; bottom: -.5em; width: .85em; height: .85em; animation: penSlide 1.1s 1.15s var(--ease-out) both; pointer-events: none; }
.hero h1 .pen svg { width: 100%; height: 100%; }
@keyframes penSlide { 0% { left: -4%; opacity: 0; } 10%, 85% { opacity: 1; } 100% { left: 96%; opacity: 0; } }
.mascot { position: absolute; right: -40px; bottom: -66px; width: 170px; z-index: 5; animation: mascotIn 1s 1.1s var(--ease-spring) both; }
.mascot svg { overflow: visible; }
.mascot .body { animation: bob 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.mascot .lids { transform-box: fill-box; transform-origin: center; transform: scaleY(0); animation: blink 4.5s infinite; }
.mascot .arm { transform-box: fill-box; transform-origin: 10% 90%; animation: wave 2.2s ease-in-out infinite; }
.mascot .pupil { transition: transform .15s; }
.mascot-say {
  position: absolute; right: 116px; bottom: 96px; z-index: 6; background: #fff; border: 3px solid var(--ink); border-radius: 18px 18px 4px 18px;
  padding: 6px 14px 4px; font: 700 1.4rem/1.1 var(--hand); color: var(--ink); white-space: nowrap; box-shadow: 0 5px 0 rgba(30,27,75,.15);
  transform-origin: 100% 100%; transition: transform .35s var(--ease-spring), opacity .25s;
}
.mascot-say.pop { transform: scale(0); opacity: 0; }
@keyframes mascotIn { from { opacity: 0; transform: translateY(80px) rotate(10deg); } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(0); } 96% { transform: scaleY(1); } }
@keyframes wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-24deg); } }

/* ---------- phonics strip ---------- */
.phonics-strip { padding: 34px 0 16px; background: var(--sun); overflow: hidden; position: relative; z-index: 2; }
.phonics-strip .label { font: 700 1.7rem/1 var(--hand); color: var(--ink); text-align: center; margin-bottom: 16px; padding: 0 16px; }
.phonics-strip .label svg { display: inline-block; width: 26px; height: 26px; vertical-align: -4px; }
.marquee { display: flex; width: max-content; gap: 14px; padding: 6px 0 14px; animation: marquee var(--dur, 50s) linear infinite; }
.marquee.rev { animation-direction: reverse; }
.phonics-strip:hover .marquee, .phonics-strip:focus-within .marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.pword {
  flex-shrink: 0; display: grid; justify-items: center; gap: 6px; border: 3px solid var(--ink); background: #fff; border-radius: 18px;
  padding: 10px 14px 8px; font: inherit; color: var(--ink); box-shadow: 0 5px 0 var(--ink); transition: transform .25s var(--ease-spring), box-shadow .25s;
}
.pword:hover { transform: translateY(-4px) rotate(-2deg); box-shadow: 0 9px 0 var(--ink); }
.pword:active, .pword.say { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.pword .tiles { display: flex; gap: 3px; font-size: 1.35rem; }
.pword small { font: 500 .78rem/1 var(--sans); color: var(--ink-soft); display: flex; gap: 6px; align-items: center; }
.pword small svg { width: 14px; height: 14px; }
.pword.say .tiles .tile { animation: hop .5s var(--ease-spring) both; animation-delay: calc(var(--i) * .12s); }
@keyframes hop { 40% { transform: translateY(-12px); } }

/* ---------- stats tiles: doodle badges ---------- */
.stats { margin-top: 0; padding-top: 56px; }
.stat { position: relative; }
.stat .badge { position: absolute; right: -14px; top: -22px; width: 60px; height: 60px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.12)); transition: transform .5s var(--ease-spring); animation: floaty 4s ease-in-out infinite; animation-delay: calc(var(--d) * -1s); }
.stat:hover .badge { transform: rotate(-18deg) scale(1.15); }
.stat:nth-child(3) { --c: var(--purple); }
.stat:nth-child(4) { --c: var(--green); }

/* ---------- notebook paper (why it matters) ---------- */
.bg-notebook {
  background-color: #fffdf7;
  background-image: linear-gradient(90deg, transparent 54px, #ffb3c4 54px, #ffb3c4 56px, transparent 56px), repeating-linear-gradient(#fffdf7 0 35px, #d5e6f8 35px 36px);
  overflow: hidden;
}
.holes { position: absolute; left: 18px; top: 40px; bottom: 40px; display: flex; flex-direction: column; justify-content: space-around; }
.holes i { width: 18px; height: 18px; border-radius: 50%; background: #e8e2d4; box-shadow: inset 0 3px 4px rgba(0,0,0,.18); }
.plane-fly { position: absolute; left: 0; top: 0; width: 58px; height: 58px; z-index: 1; offset-path: path("M -80 460 C 220 140, 420 560, 720 300 S 1180 60, 1700 320"); offset-rotate: auto 25deg; animation: fly 12s linear infinite; pointer-events: none; }
.plane-fly svg { width: 100%; height: 100%; }
@keyframes fly { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.why-grid { position: relative; z-index: 2; }

/* ---------- pastel sections ---------- */
.bg-cream { background: var(--lemon); background-image: radial-gradient(#f2dd94 1.3px, transparent 1.7px); background-size: 22px 22px; }
.bg-mint { background: var(--mint); }
.bg-lilac { background: var(--lilac); }
.bg-peach { background: var(--peach); background-image: linear-gradient(#f8d6c0 1px, transparent 1px), linear-gradient(90deg, #f8d6c0 1px, transparent 1px); background-size: 28px 28px; }

/* cards get a chunky outline, like a sticker */
.layer, .strand, .kit, .builder, .level, .level-detail, .points li, .big-fact, .day, .info-card, .post, .form-card, .details li, .word-grid { border: 3px solid var(--ink); box-shadow: 0 7px 0 var(--ink); }
.layer::before { display: none; }
.layer { transition: transform .4s var(--ease-spring), opacity .9s var(--ease-out); }
.layer:hover { transform: translateY(-4px); }
.layer .doodle { position: absolute; right: 16px; top: 14px; width: 46px; height: 46px; transition: transform .6s var(--ease-spring); }
.layer:hover .doodle { transform: rotate(-20deg) scale(1.2); }
.layer .demo { margin-right: 36px; }
.strand { border-top-width: 10px; border-top-color: var(--sc); }
.kit:hover, .level:hover { box-shadow: 0 12px 0 var(--ink); }

/* polaroids with washi tape */
.gallery { row-gap: 74px; column-gap: 26px; }
.gallery figure { border: 10px solid #fff; border-bottom-width: 54px; border-radius: 6px; overflow: visible; background: #fff; box-shadow: 0 18px 30px -16px rgba(30,27,75,.5); transition: transform .5s var(--ease-spring), opacity .9s var(--ease-out); }
.gallery figure:nth-child(1) { rotate: -2deg; }
.gallery figure:nth-child(2) { rotate: 2.5deg; }
.gallery figure:nth-child(3) { rotate: -1.5deg; }
.gallery figure:nth-child(4) { rotate: 1deg; }
.gallery figure:hover { transform: scale(1.03); rotate: 0deg; z-index: 3; }
.gallery figure::before { content: ""; position: absolute; top: -22px; left: 50%; width: 110px; height: 30px; margin-left: -55px; background: color-mix(in srgb, var(--tape, var(--sun)) 78%, transparent); rotate: -4deg; z-index: 2; }
.gallery figure:nth-child(2)::before { --tape: var(--pink); rotate: 5deg; }
.gallery figure:nth-child(3)::before { --tape: var(--teal); }
.gallery figure:nth-child(4)::before { --tape: var(--green); rotate: 3deg; }
.gallery .img-clip { width: 100%; height: 100%; overflow: hidden; }
.gallery figcaption { left: 0; right: 0; bottom: -48px; background: none; transform: none; font: 700 1.5rem/1 var(--hand); color: var(--ink); justify-content: center; padding: 8px; }
.gallery figure:hover figcaption { transform: none; }

/* chalkboard (method) */
.chalkboard {
  background-color: #2a4a3d;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1.5px), radial-gradient(circle at 20% 30%, rgba(255,255,255,.08), transparent 40%), radial-gradient(circle at 80% 70%, rgba(255,255,255,.05), transparent 40%);
  background-size: 5px 5px, 100% 100%, 100% 100%;
  border-top: 18px solid #b07a4f; border-bottom: 18px solid #b07a4f;
  overflow: hidden;
}
.chalkboard .og-copy h2 { font-family: var(--hand); font-size: clamp(2.6rem, 4.8vw, 3.8rem); font-weight: 700; color: #fdfcf5; line-height: 1; }
.chalkboard .og-copy p, .chalkboard .og-copy .lead { color: #dfe9e2; }
.chalkboard .eyebrow { color: var(--sun); }
.chalkboard .principles li { border: 2px dashed rgba(255,255,255,.45); background: none; font: 700 1.35rem/1 var(--hand); color: #fff; }
.chalkboard .og-step .ring { background: rgba(255,255,255,.07); border: 3px dashed rgba(255,255,255,.4); }
.chalkboard .og-step.active .ring { background: var(--sun); border: 3px solid var(--sun); box-shadow: 0 14px 28px -10px rgba(255,210,63,.7); }
.chalkboard .og-step.active .ring svg { stroke: var(--ink); }
.chalkboard .og-step b { font: 700 1.8rem/1 var(--hand); color: #fdfcf5; }
.chalkboard .og-steps::before { background: none; border-top: 3px dashed rgba(255,255,255,.25); height: 0; }
.chalkboard .og-progress { background: var(--sun); }
.chalkboard .og-screen { background-color: #fffdf7; background-image: repeating-linear-gradient(#fffdf7 0 31px, #d5e6f8 31px 32px); box-shadow: 0 30px 50px -28px rgba(0,0,0,.7); border-radius: 10px; rotate: 1.5deg; }
.chalkboard .og-screen .scene p { color: var(--ink); font: 700 1.5rem/1.2 var(--hand); }
.chalkboard .og-screen .bubble { border: 3px solid var(--ink); }
.chalkboard .og-screen .waves i { background: var(--tile); }
.chalk-tray { position: absolute; left: 7%; bottom: 6px; display: flex; gap: 12px; z-index: 2; }
.chalk-tray i { width: 50px; height: 11px; border-radius: 6px; background: var(--c, #fff); rotate: var(--r, 0deg); box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.chalk-doodle { position: absolute; color: rgba(255,255,255,.2); font: 700 2.4rem/1 var(--hand); pointer-events: none; }

/* kit art pastel */
.kit:nth-child(1) .art { background: var(--sky); }
.kit:nth-child(2) .art { background: #ffe4ee; }
.kit:nth-child(3) .art { background: var(--lemon); }
.kit:nth-child(4) .art { background: var(--mint); }
.wb-speak { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; border: 0; background: var(--sun); color: var(--ink); border-radius: 999px; padding: 4px 12px; font: 600 .85rem var(--sans); vertical-align: middle; }
.wb-speak svg { width: 16px; height: 16px; }

/* levels: sticker doodles */
.level .sticker-mini { position: absolute; top: -22px; right: 18px; width: 56px; height: 56px; transition: transform .5s var(--ease-spring); }
.level:hover .sticker-mini { transform: rotate(18deg) scale(1.15); }

/* founder quote: a handwritten sticky note */
blockquote.quote { font: 700 clamp(1.6rem, 2.6vw, 2.1rem)/1.25 var(--hand); color: var(--blue); background: #fff6b8; padding: 30px 30px 24px; border-radius: 4px; box-shadow: 0 14px 26px -16px rgba(30,27,75,.45); rotate: -1.2deg; }
blockquote.quote::before { content: ""; top: -14px; left: 40%; width: 92px; height: 26px; background: color-mix(in srgb, var(--pink) 75%, transparent); rotate: 3deg; opacity: 1; }
.holmes { font-family: var(--hand); font-size: 1.8rem; font-weight: 700; line-height: 1.25; }

/* CTA: crayon blue with doodles */
.cta { background: linear-gradient(160deg, #3a86ff, #1553b6 75%); }
.cta .drift { z-index: 0; }
.cta .wrap { position: relative; z-index: 2; }

/* footer crayon edge */
.site-footer { position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; background: repeating-linear-gradient(90deg, var(--red) 0 60px, var(--orange) 60px 120px, var(--sun) 120px 180px, var(--green) 180px 240px, var(--tile) 240px 300px, var(--purple) 300px 360px); }

/* tiles anywhere: little hop on hover */
.cta-tiles .tile:hover, .hero-tiles .tile:hover, .board-row .tile:hover { animation: hop .5s var(--ease-spring); }

/* page heroes on inner pages */
.page-hero { background: radial-gradient(circle at 90% 10%, #fff0c7 0, transparent 40%), radial-gradient(circle at 0% 100%, #dcecff 0, transparent 45%), var(--paper); }
.timeline .yr { border-color: #fff; box-shadow: 0 5px 0 var(--ink); }
.timeline li:nth-child(3) .yr { background: var(--purple); }
.timeline li:nth-child(4) .yr { background: var(--green); }
.motto { font-family: var(--hand); font-size: 2rem; font-weight: 700; }


/* ---------- fixes and extras ---------- */
.builder { position: relative; }
.hero h1 .line:has(.c-orange) { padding-bottom: .55em; margin-bottom: -.45em; }
.gallery figcaption { font-size: 1.35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero h1 { font-size: clamp(2.4rem, 4.6vw, 4rem); }

/* video placeholder: a bright cartoon TV */
.video-placeholder { background: linear-gradient(150deg, #8b5cf6, #5b3fd1); background-image: none; border: 4px solid var(--ink); box-shadow: 0 10px 0 var(--ink); }
.video-placeholder::after { content: ''; position: absolute; inset: 14px; border-radius: 22px; border: 3px dashed rgba(255,255,255,.35); pointer-events: none; }
.video-placeholder > div:not(.drift):not(.reel) { position: relative; z-index: 2; }
.video-placeholder .play { background: var(--sun); color: var(--ink); border: 4px solid var(--ink); }
.video-placeholder .play::before, .video-placeholder .play::after { border-color: var(--sun); }
.video-placeholder .reel { z-index: 2; opacity: .9; }

/* seats get little faces */
.seat::after { content: ''; position: absolute; inset: 22%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='6.5' cy='8' r='1.8' fill='%23fff'/%3E%3Ccircle cx='13.5' cy='8' r='1.8' fill='%23fff'/%3E%3Cpath d='M6 12.5c2 2.4 6 2.4 8 0' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.seat.t::after { inset: 26% 22% 14%; }
.in .seat { animation: seatBob 3s ease-in-out infinite; animation-delay: calc(var(--n) * .25s + 1.2s); }
@keyframes seatBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

@media (max-width: 900px) {
  .mascot { width: 120px; right: -8px; bottom: -52px; }
  .mascot-say { right: 86px; bottom: 66px; font-size: 1.15rem; }
  .note { display: none; }
  .plane-fly, .holes { display: none; }
  .bg-notebook { background-image: repeating-linear-gradient(#fffdf7 0 35px, #d5e6f8 35px 36px); }
  .layer .demo { margin-right: 0; }
}
@media (max-width: 600px) {
  [data-reveal="left"], [data-reveal="right"] { transform: translateY(34px); }
  .gallery { grid-auto-rows: 230px; }
  .stat .badge { width: 44px; height: 44px; right: -8px; top: -16px; }
  .chalkboard .og-step b { font-size: 1.35rem; }
}
@media (pointer: coarse) { body { cursor: auto; } }
@media (prefers-reduced-motion: reduce) { .plane-fly, .pencil-progress svg { display: none; } .hl { background-size: 100% 100%; } .note span { opacity: 1; } .note path { stroke-dashoffset: 0; } }

/* ---------- the official logo image ---------- */
.logo img { height: 76px; width: auto; display: block; }
.nav { height: 96px; }
.menu-open .nav-links { top: 96px; }
.site-footer .logo { background: #fff; padding: 12px 18px; border-radius: 18px; box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.site-footer .logo img { height: 70px; }
@media (max-width: 600px) { .logo img { height: 58px; } .nav { height: 80px; } .menu-open .nav-links { top: 80px; } }

/* ---------- phonics strip: sound it out, then blend ---------- */
.phonics-strip.busy .marquee { animation-play-state: paused; }
.phonics-strip .row-cap { margin: 2px 0 0; text-align: center; font: 600 .74rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); opacity: .75; padding: 0 16px; }
.pword .tiles { transition: gap .45s var(--ease-spring); }
.pword .tiles .tile { transition: transform .3s var(--ease-spring), box-shadow .3s; }
.pword.playing { transform: translateY(-4px) scale(1.06); box-shadow: 0 9px 0 var(--ink); background: #fffbea; position: relative; z-index: 3; }
.pword.split .tiles { gap: 12px; }
.pword.blend .tiles { gap: 0; }
.pword.blend .tiles .tile { animation: blendSquish .55s var(--ease-spring); }
.pword .tile.lit { transform: translateY(-7px) scale(1.2); box-shadow: 0 0 0 4px var(--sun), 0 8px 14px -6px rgba(0,0,0,.35); z-index: 2; position: relative; }
@keyframes blendSquish { 0% { transform: scaleX(1.12); } 60% { transform: scaleX(.94); } 100% { transform: none; } }
.pword small .units { display: inline-flex; gap: 4px; align-items: center; }
.pword small .units i { font-style: normal; opacity: .6; }
.pword small .u { padding: 1px 4px; border-radius: 6px; transition: background .2s, color .2s, transform .25s var(--ease-spring); }
.pword small .u.on { background: var(--ink); color: #fff; transform: scale(1.15); }
.pword small .whole { display: none; font: 700 .95rem/1 var(--serif); color: var(--blue); }
.pword.blend small .whole { display: inline; }
.pword.blend small .units, .pword.blend small .count { display: none; }
.pword small .count { font-weight: 600; color: var(--orange); margin-left: 4px; }
/* syllable tiles: one chunk each, consonants blue and the vowel red */
.tile.syl { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; background: #fff; color: var(--tile); font-weight: 600; box-shadow: inset 0 0 0 2.5px var(--tile), 0 .06em 0 #d9d1c1, 0 .25em .5em -.1em rgba(0,0,0,.25); padding: 0 .35em; }
.tile.syl em { font-style: normal; color: var(--red); }
.tiles .tile.syl + .tile.syl { margin-left: 2px; }

[hidden] { display: none !important; }
.pword.rule small .whole { font: 600 .8rem/1.2 var(--sans); color: var(--ink); white-space: nowrap; }
.pword.rule .tiles { font-size: 1.6rem; }

/* ---------- compact home layout (same copy, less scrolling) ---------- */
.section { padding: 76px 0; }
.section-head { margin-bottom: 34px; }
.stats { padding-top: 44px; }
/* approach: four layers as a 2 x 2 grid instead of a staircase */
.layers { grid-template-columns: 1fr 1fr; gap: 20px; }
.layer { grid-template-columns: 1fr; gap: 16px; margin: 0; padding: 26px 26px 24px; align-content: start; }
.layer h3 { font-size: 1.4rem; }
.layer .demo { min-height: 118px; margin-right: 0; padding: 16px; }
.layer .doodle { width: 38px; height: 38px; }
.method-cards { margin-top: 20px; }
.mcard { padding: 26px; }
/* five strands: slimmer graphic */
.strands-svg { max-height: 120px; margin-bottom: 18px; }
.strand { padding: 18px 16px; }
/* reading kit */
.kit .art { height: 92px; margin-bottom: 12px; }
.kit .art svg { height: 70px; }
.kit { padding: 20px; }
/* small by design: smaller table, tighter list */
@media (min-width: 901px) { .small-grid { grid-template-columns: .75fr 1.25fr; gap: 48px; } }
.table-art { width: min(340px, 100%); }
.points { gap: 12px; }
.points li { padding: 14px 18px; }
/* founder: smaller photo */
@media (min-width: 901px) { .founder-grid { grid-template-columns: .6fr 1.4fr; gap: 56px; } }
.founder-grid .photo-frame { max-width: 380px; }
blockquote.quote { font-size: clamp(1.4rem, 2.2vw, 1.8rem); padding: 22px 24px 18px; margin-top: 26px; }
.cta { padding: 84px 0; }
.cta-tiles { margin-bottom: 22px; font-size: 2.8rem; }
@media (max-width: 900px) {
  .section { padding: 56px 0; }
  .layers { grid-template-columns: 1fr; }
  .founder-grid .photo-frame { max-width: 320px; margin-inline: auto; }
}

/* ---------- phones and small tablets ---------- */
@media (max-width: 900px) {
  /* doodles stay faint and small so they never fight with text */
  .drift .dd { --o: .32 !important; }
  .drift .dd:not(.ltr):not(.ph) { width: calc(var(--s) * .7); height: calc(var(--s) * .7); }
  .drift .dd.ltr { font-size: calc(var(--s) * .7); }
  .drift .dd.ph { font-size: .8rem; }
  .cta .drift .dd { --o: .18 !important; }
  /* floating WhatsApp button: smaller, tucked into the corner */
  .wa-float { width: 50px; height: 50px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .wa-float svg { width: 26px; height: 26px; }
  /* hero */
  .hero { padding: 20px 0 64px; }
  .hero .sub { font-size: 1.08rem; }
  .btn-row .btn { justify-content: center; }
  .board-wrap { max-width: 400px; }
  .board-row { font-size: clamp(2.2rem, 11vw, 3.4rem); }
  .board-caption { font-size: .9rem; padding: 8px 12px 8px 10px; }
  .board-legend { font-size: .7rem; padding: 8px 10px; }
  /* founder and class format stack into one column */
  .small-grid, .founder-grid { grid-template-columns: 1fr; gap: 36px; }
  .founder-grid .photo-frame { max-width: 300px; margin: 0 auto 30px; }
  .sticker { right: -10px; top: 18px; padding: 8px 12px; }
  .sticker b { font-size: 1.4rem; }
  .table-art { width: min(280px, 100%); }
  /* programme cards: less empty space above the book stack */
  .level { padding: 24px; }
  .books { height: 70px; margin-bottom: 10px; }
  .level-detail::after { font-size: 7rem; top: -16px; }
  /* footer: two link columns side by side */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .site-footer { padding: 50px 0 80px; }
  /* mobile menu: one panel that opens below the logo, links first, then the two buttons */
  .menu-open .nav { flex-wrap: wrap; height: auto; min-height: 80px; padding-bottom: 16px; row-gap: 0; }
  .menu-open .nav-links { position: static; order: 3; width: 100%; margin: 4px 0 0; padding: 8px; box-shadow: var(--shadow); border: 3px solid var(--ink); }
  .menu-open .nav-links a { padding: 13px 16px 13px 28px; }
  .menu-open .nav-links a[aria-current="page"]::after { left: 12px; top: 50%; bottom: auto; transform: translateY(-50%) rotate(45deg); }
  .menu-open .nav-cta { position: static; order: 4; width: 100%; display: flex; justify-content: center; gap: 12px; margin-top: 14px; }
  .menu-open .nav-cta .btn { flex: 1; justify-content: center; max-width: 180px; }
  .menu-open .nav-cta .btn span { display: inline; }
}
@media (max-width: 600px) {
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 24px; }
  h2 { font-size: clamp(1.7rem, 7.4vw, 2.2rem); }
  .lead { font-size: 1rem; }
  /* short cards go two per row to cut scrolling */
  .strand-list { grid-template-columns: 1fr 1fr; gap: 12px; }
  .strand-list .strand:last-child { grid-column: 1 / -1; }
  .strand { padding: 14px 12px; }
  .strand h3 { font-size: 1rem; gap: 6px; }
  .strand p { font-size: .82rem; }
  .strands-svg { max-height: 70px; }
  .kit-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kit { padding: 14px; }
  .kit .art { height: 70px; }
  .kit .art svg { height: 52px; }
  .kit h3 { font-size: .98rem; }
  .kit p { font-size: .8rem; }
  .layer { padding: 20px 18px; }
  .layer .demo { min-height: 96px; }
  .layer .doodle { width: 30px; height: 30px; top: 12px; right: 12px; }
  .mcard { padding: 20px; gap: 14px; }
  .points li { grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 14px; }
  .points .ico { width: 40px; height: 40px; }
  .stat { padding: 18px 16px 16px; }
  .stat b { font-size: 2.3rem; }
  .stat span { font-size: .85rem; }
  .stat .badge { width: 40px; height: 40px; }
  .phonics-strip { padding: 26px 0 10px; }
  .phonics-strip .label { font-size: 1.35rem; }
  .cta { padding: 60px 0; }
  .cta-tiles { font-size: 2.2rem; gap: 6px; }
  .cta .btn-row { flex-direction: column; align-items: stretch; max-width: 300px; margin-inline: auto; }
  .page-hero { padding: 36px 0 44px; }
  .level-detail { padding: 24px 20px; gap: 24px; }
  .learn-list li { padding: 10px 0; }
  .day { padding: 22px; }
  .info-card { padding: 24px; }
  .form-card { padding: 24px 18px; }
  .gallery figcaption { font-size: 1.1rem; }
}

/* section links land just below the sticky header */
main [id] { scroll-margin-top: 112px; }
@media (max-width: 600px) { main [id] { scroll-margin-top: 92px; } }

/* =====================================================================
   PRE-LAUNCH FIXES: readable contrast (WCAG AA), minimum text size, tap targets
   ===================================================================== */
:root {
  --orange-ink: #c2410c; --blue-ink: #1d5fd8; --red-ink: #c81e4a;
  --green-ink: #15803d; --purple-ink: #7c3aed; --teal-ink: #0e7490;
}
/* buttons: dark text on the bright orange; deeper green for WhatsApp */
.btn { color: var(--ink); font-weight: 600; }
.btn.blue, .btn.green { color: #fff; }
.btn.green { --bg: var(--green-ink); }
.btn.ghost { color: var(--ink); }
.cta .btn.ghost { color: #fff; }
.btn:not(.blue):not(.green):not(.ghost) { --bg: var(--orange); }
.wa-float { background: var(--green-ink); }
/* small coloured text uses the deeper shades */
.eyebrow, .tag, .pword small .count, .morph-gloss b, .board-legend { color: var(--orange-ink); }
.chalkboard .eyebrow { color: var(--sun); }
.board-legend { color: var(--ink); }
.layer-num { color: color-mix(in srgb, var(--lc, var(--tile)) 70%, #000); }
.grade, .level .grade, .level-detail .grade { color: color-mix(in srgb, var(--lv) 62%, #000); }
.level-detail .who b { color: color-mix(in srgb, var(--lv) 62%, #000); }
/* number tiles: deeper shades so the white labels read clearly */
.stat { --c: var(--blue-ink); }
.stat:nth-child(2) { --c: var(--red-ink); }
.stat:nth-child(3) { --c: var(--purple-ink); }
.stat:nth-child(4) { --c: var(--green-ink); }
.sticker { background: var(--orange-ink); }
.sent-demo span em { font-size: 1.2rem; font-weight: 700; }
.sent-demo span[style*="--pc:var(--teal)"] em { background: var(--teal-ink); }
/* letter tiles stay bright: bold large text passes AA at 3:1 */
.tile { font-weight: 600; }
.timeline .yr { background: var(--blue-ink); }
.timeline li:nth-child(2) .yr { background: var(--red-ink); }
.timeline li:nth-child(4) .yr { background: var(--green-ink); }
/* nothing smaller than 12px */
.demo-label, .sent-demo span small, .board-legend, .details small, .tag, .sticker span, .pill .tile, .preview-tag { font-size: max(.75rem, 12px); }
.sound-demo .ph { font-size: 1.15rem; }
/* comfortable tap targets */
.site-footer ul a { display: inline-block; padding: 8px 0; }
.site-footer ul { gap: 0; }
.radios input { width: 20px; height: 20px; }
.radios label { min-height: 44px; }
.map-link { padding: 6px 0; }
@media (max-width: 900px) {
  .btn.small { min-height: 44px; }
  .wb-tray { font-size: 1.6rem; gap: 8px; }
  .wb-tray .tile { min-width: 44px; height: 44px; }
}
.strip-pause { position: absolute; right: 12px; top: 12px; z-index: 3; border: 2px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 14px; min-height: 36px; font: 600 .8rem var(--sans); }
.phonics-strip.paused .marquee { animation-play-state: paused; }
@media (max-width: 600px) { .strip-pause { position: static; display: block; margin: -6px auto 10px; } }

.form-note { font-size: .85rem; color: var(--ink-soft); margin: 14px 0 0; max-width: 52ch; }
.thanks .form-note { margin: 0 auto 16px; }
.post .post-title { margin: 10px 0; font-size: 1.3rem; }
/* contrast follow-ups found on the second audit pass */
.post .tag { color: var(--orange-ink); font-size: max(.75rem, 12px); }
.hero h1 .c-orange { color: #e8590c; }
.sound-demo .unit .ph { color: var(--blue-ink); }
.sound-demo .unit[style*="--c:var(--red)"] .ph { color: var(--red-ink); }
.timeline li:nth-child(3) .yr { background: var(--purple-ink); }
.btn[style*="--bg:var(--red)"] { --bg: var(--red-ink) !important; color: #fff; }
.wb-slots .hint { color: #fff; }
.details a, .details span { display: inline-block; padding: 4px 0; }
.story-body a[href^="mailto"], .story-body a[href^="tel"] { display: inline-block; padding: 6px 0; }

/* tilted photos and floating doodles must never cause sideways scrolling */
html { overflow-x: clip; }
.senses span { font-size: max(.75rem, 12px); }
@media (max-width: 600px) { .story-photo { padding-inline: 8px; } }

/* width/height attributes reserve space; CSS keeps the real shape */
.photo-frame img { height: auto; aspect-ratio: 4 / 5; }
img { height: auto; }
.gallery .img-clip img { height: 100%; }

/* analytics consent notice (only shown on the live site once GA is set up) */
.consent { position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 85; max-width: 360px; margin-right: 80px;
  background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); padding: 14px 16px; animation: fadeUp .4s var(--ease-out); }
.consent p { margin: 0 0 10px; font-size: .88rem; color: var(--ink); line-height: 1.45; }
.consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
