/* ---------- Homepage only: The Unfold master palette ----------
   White 45% · Navy 25% · Sage 12% · Mustard 8% · Coral 5% · Sky Blue 5%
   Loaded only by index.html, so other pages keep their current look. */
body[data-page="home"] {
  --hp-white: #FFFFFF;
  --hp-navy: #172B4D;
  --hp-sage: #A8B8A0;
  --hp-mustard: #F2C94C;
  --hp-coral: #F28B82;
  --hp-sky: #91C9E8;
  background: var(--hp-white);
  color: var(--hp-navy);
  overflow-x: hidden;
}
body[data-page="home"] .hero-video { background: var(--hp-white); }
body[data-page="home"] h1,
body[data-page="home"] h2,
body[data-page="home"] h3 { color: var(--hp-navy); }
body[data-page="home"] .btn.amber { --bg: var(--hp-mustard); --fg: var(--hp-navy); }
body[data-page="home"] .btn.ghost { --fg: var(--hp-navy); border-color: var(--hp-navy); }

/* Sections: generous space and alternating colour bands */
body[data-page="home"] main > section { padding: 120px 0; position: relative; overflow: hidden; }
body[data-page="home"] main > section.hp-sage { background: linear-gradient(180deg, rgba(168,184,160,.28), rgba(168,184,160,.12)); }
body[data-page="home"] main > section.hp-sky { background: linear-gradient(180deg, rgba(145,201,232,.28), rgba(145,201,232,.10)); }
body[data-page="home"] main > section.hp-mustard { background: linear-gradient(180deg, rgba(242,201,76,.22), rgba(242,201,76,.08)); }
body[data-page="home"] main > section.hp-navy { background: var(--hp-navy); }
body[data-page="home"] main > section.hp-navy h2,
body[data-page="home"] main > section.hp-navy h3,
body[data-page="home"] main > section.hp-navy p,
body[data-page="home"] main > section.hp-navy li { color: #fff; }
body[data-page="home"] main > section.hp-navy .btn.amber { color: var(--hp-navy); }

/* Headings: serif, with a short mustard rule */
body[data-page="home"] .section-title { font-size: clamp(2.2rem, 4.4vw, 3.3rem); letter-spacing: -.01em; }
body[data-page="home"] .section-title::after {
  content: ""; display: block; width: 72px; height: 4px; border-radius: 4px;
  background: var(--hp-mustard); margin: 18px auto 0;
}
body[data-page="home"] .hp-text .section-title { text-align: left; }
body[data-page="home"] .hp-text .section-title::after { margin-left: 0; }
body[data-page="home"] .hp-center { text-align: center; max-width: 760px; margin: 0 auto 48px; }

/* Split layout: text on one side, image on the other (reversed with .hp-rev) */
body[data-page="home"] .hp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
body[data-page="home"] .hp-text { min-width: 0; }
body[data-page="home"] .hp-text .prose p { color: var(--hp-navy); opacity: .9; }
body[data-page="home"] .hp-text h3 { font-family: var(--font-display); font-size: 1.35rem; color: var(--hp-coral); margin: 0 0 .6em; }
body[data-page="home"] .hp-text .prose li::marker { color: var(--hp-coral); }
body[data-page="home"] main > section.hp-navy .hp-text .prose p { color: #fff; opacity: .9; }

/* Image slot: a placeholder until a real photo is added */
body[data-page="home"] .hp-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  margin: 0;
  box-shadow: 0 40px 70px -40px rgba(23, 43, 77, .5);
  background: linear-gradient(135deg, var(--hp-sky), var(--hp-sage));
  will-change: transform, clip-path;
}
body[data-page="home"] .hp-photo.tone-coral { background: linear-gradient(135deg, var(--hp-coral), var(--hp-mustard)); }
body[data-page="home"] .hp-photo.tone-mustard { background: linear-gradient(135deg, var(--hp-mustard), var(--hp-sky)); }
body[data-page="home"] .hp-photo.tone-sky { background: linear-gradient(135deg, var(--hp-sky), #cfe7f5); }
body[data-page="home"] .hp-photo.tone-navy { background: linear-gradient(135deg, var(--hp-navy), #2c4a7c); }
body[data-page="home"] .hp-photo img,
body[data-page="home"] .hp-photo picture { width: 100%; height: 100%; object-fit: cover; display: block; }
body[data-page="home"] .hp-photo::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,.12) 0 2px, transparent 2px 22px);
  pointer-events: none;
}
body[data-page="home"] .hp-photo:has(img)::after { display: none; }

/* Cards and stage tiles: white, with a mustard top edge */
body[data-page="home"] .hp-cards { margin-top: 64px; }
body[data-page="home"] .card,
body[data-page="home"] .tile {
  background: var(--hp-white);
  border: 0;
  border-top: 6px solid var(--hp-mustard);
  border-radius: 28px;
  box-shadow: 0 24px 50px -34px rgba(23, 43, 77, .35);
}
body[data-page="home"] .card h3,
body[data-page="home"] .tile h3 { color: var(--hp-navy); }
body[data-page="home"] .card p,
body[data-page="home"] .tile p { color: var(--hp-navy); opacity: .82; }
body[data-page="home"] .tile .hp-photo.tile-photo {
  aspect-ratio: 16 / 10;
  border-radius: 0;
  box-shadow: none;
}

/* FAQ */
body[data-page="home"] .hp-faq { margin-top: 8px; }
body[data-page="home"] details.faq { background: var(--hp-white); border-left: 5px solid var(--hp-sky); }
body[data-page="home"] details.faq summary { color: var(--hp-navy); }
body[data-page="home"] details.faq summary::after { color: var(--hp-coral); }

/* Phones: stack the split columns; the image goes after the text */
@media (max-width: 900px) {
  body[data-page="home"] main > section { padding: 80px 0; }
  body[data-page="home"] .hp-grid { grid-template-columns: 1fr; gap: 40px; }
  body[data-page="home"] .hp-rev .hp-photo { order: 2; }
  body[data-page="home"] .hp-photo { aspect-ratio: 16 / 11; border-radius: 28px; }
  body[data-page="home"] .hp-text .section-title { text-align: center; }
  body[data-page="home"] .hp-text .section-title::after { margin: 18px auto 0; }
}

/* ---------- Hero before the first scroll ----------
   Static: big logo, title on the left, the facilities photo on the right.
   The header stays hidden until scrolling starts; then the video takes over the banner. */
body[data-page="home"] .site-header:not(.stuck) { opacity: 0; pointer-events: none; }
body[data-page="home"] .site-header.stuck { opacity: 1; pointer-events: auto; }
body[data-page="home"] .site-header { transition: opacity .4s ease, background .3s, box-shadow .3s; }
body[data-page="home"] .hero-frame .hero-still {
  position: absolute; top: 0; bottom: 0; right: 0; width: 50%; z-index: 1; overflow: hidden;
  background: var(--hp-white);
}
body[data-page="home"] .hero-frame .hero-still img { width: 100%; height: 100%; object-fit: cover; display: block; }
body[data-page="home"] .hero-frame .hero-logo {
  display: block; width: min(250px, 44vw); height: auto; margin: clamp(24px, 5vh, 56px) 0 28px;
}
@media (max-width: 700px) {
  body[data-page="home"] .hero-frame .hero-still { top: 38%; left: 0; right: 0; width: auto; }
}

/* Hero backdrop: the site's beige, matching the rest of the page header */
body[data-page="home"] .hero-video { background: #faf3e5 url("../img/bg-cream.jpg") center / cover no-repeat; }
body[data-page="home"] .hero-frame .hero-still { background: var(--cream); }

/* Hero title: a little smaller */
body[data-page="home"] .hero-frame .hero-copy h1 { font-size: clamp(1.6rem, 2.7vw, 2.2rem); }
/* Hero copy sits centred in the left half on desktop */
@media (min-width: 701px) {
  body[data-page="home"] .hero-frame .hero-copy { position: absolute; inset: 0; width: 50%; max-width: none; margin: 0; padding-left: 40px; padding-right: 24px; text-align: left; display: flex; flex-direction: column; justify-content: center; }
  body[data-page="home"] .hero-frame .hero-copy .hero-logo { position: absolute; top: clamp(24px, 5vh, 56px); left: 40px; margin: 0; }
  body[data-page="home"] .hero-frame .hero-copy h1 { margin: 0; }
  body[data-page="home"] .hero-frame .hero-copy .hero-enroll { align-self: flex-start; margin-top: 28px; }
}
body[data-page="home"] .hero-frame .hero-copy .hero-enroll { display: inline-flex; margin-top: 22px; }
body[data-page="home"] .bottom-bar { display: none; }

/* Hero illustration on the right: multiply drops its white background onto the cream */
body[data-page="home"] .hero-frame .hero-still img { object-fit: contain; object-position: center; mix-blend-mode: multiply; padding: 6vh 4vw; box-sizing: border-box; }

/* Hero illustration: larger, filling the right half */
body[data-page="home"] .hero-frame .hero-still { display: flex; align-items: center; justify-content: center; }
body[data-page="home"] .hero-frame .hero-still img { width: 112%; max-width: none; height: auto; object-fit: contain; padding: 0; margin-left: -6%; }
@media (max-width: 700px) {
  body[data-page="home"] .hero-frame .hero-still img { width: 100%; margin-left: 0; }
}

/* Banner photo on the right (desktop image; mobile image via <picture>), with the paper rocket floating over it */
body[data-page="home"] .hero-frame .hero-still { border-radius: 0; background: #faf3e5 url("../img/bg-cream.jpg") center / cover no-repeat; }
body[data-page="home"] .hero-frame .hero-still picture { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
body[data-page="home"] .hero-frame .hero-still img.hero-banner { position: relative; width: 100%; height: auto; max-width: none; margin: 0; padding: 0; mix-blend-mode: normal; -webkit-mask-image: radial-gradient(ellipse at center, #000 38%, transparent 76%); mask-image: radial-gradient(ellipse at center, #000 38%, transparent 76%); }
@media (min-width: 701px) {
  body[data-page="home"] .hero-frame .hero-still img.hero-banner { top: -9vh; }
}

/* Hero title words are set on their own lines and spread down the empty space under the logo */
body[data-page="home"] .hero-frame .hero-copy h1 span { display: block; }
@media (min-width: 701px) {
  body[data-page="home"] .hero-frame .hero-copy { justify-content: flex-start; padding-top: clamp(24px, 5vh, 56px); padding-bottom: 9vh; }
  body[data-page="home"] .hero-frame .hero-copy .hero-logo { position: relative; top: auto; left: auto; margin: 0; }
  body[data-page="home"] .hero-frame .hero-copy h1 { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; margin: clamp(24px, 6vh, 64px) 0 0; font-size: clamp(1.8rem, 3vw, 2.5rem); }
}

/* Decorative paper pieces: wave along the bottom, fish leaping from it, butterfly top-left, fan on the right */
body[data-page="home"] .hero-deco { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
body[data-page="home"] .hero-deco .hd { position: absolute; height: auto; max-width: none; mix-blend-mode: multiply; }
body[data-page="home"] .hero-deco .hd-wave { left: 0; bottom: 0; width: 100%; }
body[data-page="home"] .hero-deco .hd-fish { left: 31%; bottom: 0.9vw; width: 13%; animation: hd-leap 5s ease-in-out infinite; }
body[data-page="home"] .hero-deco .hd-butterfly { left: 46%; top: 14%; width: 11%; animation: hp-bob 7s ease-in-out infinite; }
body[data-page="home"] .hero-frame .hero-copy .hero-enroll { margin-top: auto; }
@keyframes hd-leap {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-6deg); }
  50% { transform: translate3d(0, 0, 0) rotate(4deg); }
}
@media (max-width: 700px) {
  body[data-page="home"] .hero-deco .hd-wave { width: 100%; }
  body[data-page="home"] .hero-deco .hd-fish { left: 4%; bottom: 12.5vw; width: 34%; }
  body[data-page="home"] .hero-deco .hd-butterfly { left: 58%; top: 8%; width: 26%; }
}

/* Phone layout: full-width banner between the logo at the top and the wave at the bottom */
@media (max-width: 700px) {
  body[data-page="home"] .hero-frame .hero-still { top: 0; bottom: 0; left: 0; right: 0; width: auto; background: transparent; }
  body[data-page="home"] .hero-frame .hero-still picture { top: 22vh; bottom: 14vh; }
  body[data-page="home"] .hero-frame .hero-still img.hero-banner { width: 100%; height: 100%; object-fit: contain; }
  body[data-page="home"] .hero-frame .hero-copy { position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 5vh 16px 0; }
  body[data-page="home"] .hero-frame .hero-copy .hero-logo { width: min(230px, 58vw); margin: 0 auto; }
  body[data-page="home"] .hero-frame .hero-copy .hero-enroll { position: absolute; bottom: 18vh; left: 50%; transform: translateX(-50%); margin: 0; }
  body[data-page="home"] .hero-deco .hd-butterfly { left: 6%; top: 27%; width: 24%; }
}

/* Cream throughout: body, every section and the text panels share the same cream; no shadows behind the pictures */
body[data-page="home"] { background: #faf3e5; }
body[data-page="home"] main > section[class] { background: #faf3e5; }
body[data-page="home"] .hp-split .hp-text { background: transparent; box-shadow: none; }
body[data-page="home"] .hp-photo,
body[data-page="home"] .hp-split .hp-photo { box-shadow: none !important; }
body[data-page="home"] main > section.hp-navy h2,
body[data-page="home"] main > section.hp-navy h3,
body[data-page="home"] main > section.hp-navy p,
body[data-page="home"] main > section.hp-navy li,
body[data-page="home"] main > section.hp-navy .hp-text .prose p { color: var(--hp-navy); }

/* Scene pictures in the sections: the whole picture is shown inside its shape, not zoomed */
body[data-page="home"] .hp-photo img[src*="/img/scene-"] { object-fit: contain; }

/* Sea-boat picture: keeps the blob shape, the whole picture is shown inside it (not zoomed or cropped) */
body[data-page="home"] .hp-photo img[src*="sea-boat"] { object-fit: contain; background: transparent; }

/* FAQ section: less space above and below, no background behind it or its text */
body[data-page="home"] main > section.hp-mustard { padding-top: 40px; padding-bottom: 40px; }
body[data-page="home"] main > section.hp-split.hp-mustard .hp-text { background: none; box-shadow: none; }

/* Desktop: each section's photo stays in view while the text beside it scrolls; once the text ends, the page scrolls on as normal */
@media (min-width: 901px) {
  body[data-page="home"] main > section { overflow: clip; }
  body[data-page="home"] .hp-split .hp-grid { align-items: start; }
  body[data-page="home"] .hp-split .hp-photo { position: sticky; top: 14vh; }
}

/* FAQ block takes about 70% of the width on the left; the blob photo sits in the remaining space */
@media (min-width: 901px) {
  body[data-page="home"] section.hp-mustard .hp-grid { grid-template-columns: 7fr 3fr; }
}

/* No page-fold image on the homepage */
body[data-page="home"] #page-fold { display: none !important; }

/* Remove the dark seam at the centre: the cream panel starts a couple of pixels left of the split */
@media (min-width: 701px) {
  body[data-page="home"] .hero-frame .hero-still { left: calc(50% - 3px); right: auto; width: calc(50% + 3px); border: 0; box-shadow: none; }
  body[data-page="home"] .hero-frame .hero-bg { clip-path: inset(0% 0% 0% calc(50% - 3px)); }
}

/* Floating elements from the illustration sheet, bobbing gently over the hero */
body[data-page="home"] .hero-frame .hero-art { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
body[data-page="home"] .hero-frame .hero-art .fl { position: absolute; height: auto; filter: drop-shadow(0 18px 18px rgba(23, 43, 77, .18)); will-change: transform; }
body[data-page="home"] .hero-frame .fl-plane { width: 13%; top: 14%; left: 58%; animation: hp-bob 6.5s ease-in-out infinite; }
body[data-page="home"] .hero-frame .fl-drops { width: 11%; top: 22%; right: 7%; animation: hp-bob 7.5s ease-in-out -2s infinite; }
body[data-page="home"] .hero-frame .fl-blocks { width: 12%; bottom: 9%; right: 12%; animation: hp-bob 8s ease-in-out -4s infinite; }
@keyframes hp-bob {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-3deg); }
  50% { transform: translate3d(0, -18px, 0) rotate(3deg); }
}
@media (max-width: 700px) {
  body[data-page="home"] .hero-frame .fl-plane { width: 22%; top: 8%; left: 60%; }
  body[data-page="home"] .hero-frame .fl-drops { width: 20%; top: auto; bottom: 20%; right: 4%; }
  body[data-page="home"] .hero-frame .fl-blocks { width: 20%; bottom: 3%; right: 4%; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .hero-frame .hero-art .fl { animation: none; }
}

/* Floating objects from the activity cards (books, letter blocks, puzzle, pencil cup) */
body[data-page="home"] .hero-frame .fl-books { width: 12%; top: 10%; right: 6%; animation: hp-bob 7s ease-in-out infinite; }
body[data-page="home"] .hero-frame .fl-abc { width: 10%; top: 44%; left: 53%; animation: hp-bob 8s ease-in-out -2s infinite; }
body[data-page="home"] .hero-frame .fl-puzzle { width: 12%; bottom: 8%; left: 56%; animation: hp-bob 6.5s ease-in-out -4s infinite; }
body[data-page="home"] .hero-frame .fl-cup { width: 9%; bottom: 14%; right: 4%; animation: hp-bob 7.5s ease-in-out -1s infinite; }
@media (max-width: 700px) {
  body[data-page="home"] .hero-frame .fl-books { width: 22%; top: 8%; right: 4%; }
  body[data-page="home"] .hero-frame .fl-abc { width: 18%; top: auto; bottom: 30%; left: 6%; }
  body[data-page="home"] .hero-frame .fl-puzzle { width: 22%; bottom: 3%; left: 6%; }
  body[data-page="home"] .hero-frame .fl-cup { width: 16%; bottom: 3%; right: 6%; }
}

/* Floating pieces: three on the left and three on the right, spread around the banner */
body[data-page="home"] .hero-frame .hero-art .fl { animation: hp-bob 7s ease-in-out infinite; }
body[data-page="home"] .hero-frame .fl-abc-l { width: 11%; top: 4%; left: 3%; animation-duration: 8s; }
body[data-page="home"] .hero-frame .fl-books-l { width: 12%; bottom: 6%; left: 3%; animation-delay: -2s; }
body[data-page="home"] .hero-frame .fl-puzzle-l { width: 10%; bottom: 7%; left: 21%; animation-duration: 6.5s; animation-delay: -4s; }
body[data-page="home"] .hero-frame .fl-books-r { width: 12%; top: 5%; right: 4%; animation-delay: -1s; }
body[data-page="home"] .hero-frame .fl-abc-r { width: 10%; bottom: 8%; right: 4%; transform: scaleX(-1); animation-duration: 7.5s; animation-delay: -3s; }
body[data-page="home"] .hero-frame .fl-puzzle-r { width: 9%; top: 40%; right: 2%; transform: scaleX(-1); animation-duration: 6s; animation-delay: -5s; }
@keyframes hp-bob-mirror {
  0%, 100% { transform: scaleX(-1) translate3d(0, 0, 0) rotate(-3deg); }
  50% { transform: scaleX(-1) translate3d(0, -18px, 0) rotate(3deg); }
}
body[data-page="home"] .hero-frame .fl-abc-r,
body[data-page="home"] .hero-frame .fl-puzzle-r { animation-name: hp-bob-mirror; }
@media (max-width: 700px) {
  body[data-page="home"] .hero-frame .fl-books-l,
  body[data-page="home"] .hero-frame .fl-puzzle-l,
  body[data-page="home"] .hero-frame .fl-abc-r,
  body[data-page="home"] .hero-frame .fl-puzzle-r { display: none; }
  body[data-page="home"] .hero-frame .fl-abc-l { width: 20%; top: 3%; left: 4%; }
  body[data-page="home"] .hero-frame .fl-books-r { width: 22%; top: 4%; right: 4%; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .hero-frame .hero-art .fl { animation: none; }
}

/* One of each floating piece: ABC blocks top-left, puzzle top-right, books bottom-right */
body[data-page="home"] .hero-frame .fl-abc { width: 11%; top: 4%; left: 3%; animation: hp-bob 8s ease-in-out infinite; }
body[data-page="home"] .hero-frame .fl-puzzle { width: 12%; top: 3%; right: 4%; animation: hp-bob 6.5s ease-in-out -2s infinite; }
body[data-page="home"] .hero-frame .fl-books { width: 11%; bottom: 4%; right: 4%; animation: hp-bob 7s ease-in-out -4s infinite; }
@media (max-width: 700px) {
  body[data-page="home"] .hero-frame .fl-abc { width: 20%; top: 3%; left: 4%; }
  body[data-page="home"] .hero-frame .fl-puzzle { width: 22%; top: 3%; right: 4%; }
  body[data-page="home"] .hero-frame .fl-books { display: none; }
}

/* Explicit sides so older position rules cannot pull a piece out of its corner */
body[data-page="home"] .hero-frame .fl-abc { top: 4%; right: auto; bottom: auto; left: 3%; }
body[data-page="home"] .hero-frame .fl-puzzle { top: 3%; right: 4%; bottom: auto; left: auto; }
body[data-page="home"] .hero-frame .fl-books { top: auto; right: 4%; bottom: 4%; left: auto; }

/* Smaller floating pieces */
body[data-page="home"] .hero-frame .fl-abc { width: 8%; }
body[data-page="home"] .hero-frame .fl-puzzle { width: 9%; }
body[data-page="home"] .hero-frame .fl-books { width: 8%; }
@media (max-width: 700px) {
  body[data-page="home"] .hero-frame .fl-abc { width: 14%; }
  body[data-page="home"] .hero-frame .fl-puzzle { width: 16%; }
}

/* ---------- Split sections: colour cards for text, blob-shaped images ---------- */
body[data-page="home"] .hp-split .hp-text {
  background: #D9EEF8;
  border-radius: 56px 120px 56px 130px / 60px 50px 110px 70px;
  padding: 52px 56px;
  box-shadow: 0 30px 60px -44px rgba(23, 43, 77, .35);
}
body[data-page="home"] .hp-split.hp-rev .hp-text {
  background: #DDE7D8;
  border-radius: 120px 56px 130px 56px / 50px 60px 70px 110px;
}
body[data-page="home"] .hp-split.hp-sage .hp-text { background: #FBEFC2; }
body[data-page="home"] .hp-split.hp-mustard .hp-text { background: #FFF4D1; }
body[data-page="home"] .hp-split.hp-navy .hp-text { background: #FFFFFF; }
body[data-page="home"] main > section.hp-navy .hp-text h2,
body[data-page="home"] main > section.hp-navy .hp-text p,
body[data-page="home"] main > section.hp-navy .hp-text li,
body[data-page="home"] main > section.hp-navy .hp-text .prose p { color: var(--hp-navy); opacity: .9; }
body[data-page="home"] main > section.hp-navy .hp-text h2 { opacity: 1; }

/* images wrapped in organic blob shapes */
body[data-page="home"] .hp-photo {
  border-radius: 58% 42% 48% 52% / 46% 54% 46% 54%;
  box-shadow: 0 40px 70px -40px rgba(23, 43, 77, .45);
}
body[data-page="home"] .hp-split.hp-rev .hp-photo { border-radius: 42% 58% 52% 48% / 54% 46% 54% 46%; }
body[data-page="home"] .tile .hp-photo.tile-photo { border-radius: 0; }

@media (max-width: 900px) {
  body[data-page="home"] .hp-split .hp-text { padding: 32px 26px; border-radius: 40px; }
  body[data-page="home"] .hp-photo { border-radius: 46% 54% 50% 50% / 50% 50% 50% 50%; }
}

/* ---------- Four key areas: fanned open pages (like the open-book graphic) ---------- */
body[data-page="home"] .hp-fan {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  align-items: end;
  margin-top: 40px;
  padding-top: 30px;
}
body[data-page="home"] .hp-fan .card {
  position: relative;
  border: 0;
  border-top: 0;
  border-radius: 0;
  box-shadow: 0 30px 40px -28px rgba(23, 43, 77, .45);
  border-radius: 46px 46px 14px 14px;
  padding: 58px 30px 40px;
  min-height: 430px;
  margin: 0 -4px;
  transform-origin: 50% 100%;
}
body[data-page="home"] .hp-fan .card.c-amber { background: var(--hp-mustard); }
body[data-page="home"] .hp-fan .card.c-blue { background: var(--hp-sky); }
body[data-page="home"] .hp-fan .card.c-green { background: var(--hp-sage); }
body[data-page="home"] .hp-fan .card.c-red { background: var(--hp-coral); }
body[data-page="home"] .hp-fan .card:nth-child(1) { transform: rotate(-5deg) translateY(26px); z-index: 1; }
body[data-page="home"] .hp-fan .card:nth-child(2) { transform: rotate(-1.8deg) translateY(10px); z-index: 2; }
body[data-page="home"] .hp-fan .card:nth-child(3) { transform: rotate(1.8deg) translateY(10px); z-index: 3; }
body[data-page="home"] .hp-fan .card:nth-child(4) { transform: rotate(5deg) translateY(26px); z-index: 4; }
body[data-page="home"] .hp-fan .card:hover { transform: none; }
body[data-page="home"] .hp-fan .hp-ic {
  position: absolute; top: 14px; left: 26px; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; display: grid; place-items: center; color: var(--hp-navy);
  box-shadow: 0 10px 20px -12px rgba(23, 43, 77, .5);
}
body[data-page="home"] .hp-fan .hp-ic svg { width: 24px; height: 24px; }
body[data-page="home"] .hp-fan .card h3 { font-size: 1.35rem; margin-bottom: 12px; }
body[data-page="home"] .hp-fan .card p { font-size: .95rem; line-height: 1.6; opacity: .95; }
body[data-page="home"] .hp-fan .card p + p { margin-top: 10px; }
@media (max-width: 900px) {
  body[data-page="home"] .hp-fan { grid-template-columns: 1fr 1fr; gap: 18px; }
  body[data-page="home"] .hp-fan .card { transform: none !important; clip-path: none; border-radius: 24px; min-height: 0; margin: 0; }
}

/* ---------- Stage cards: the same fanned open-page layout ---------- */
body[data-page="home"] .hp-fan.hp-stage > .tile {
  border: 0;
  border-radius: 46px 46px 14px 14px;
  box-shadow: 0 30px 40px -28px rgba(23, 43, 77, .45);
  transform-origin: 50% 100%;
  margin: 0 -4px;
  overflow: visible;
}
body[data-page="home"] .hp-fan.hp-stage > .tile .body { padding: 26px 26px 34px; }
body[data-page="home"] .hp-fan.hp-stage > .tile .hp-photo.tile-photo { border-radius: 36px 36px 0 0; }
body[data-page="home"] .hp-fan.hp-stage > .tile:nth-child(1) { background: var(--hp-mustard); transform: rotate(-5deg) translateY(26px); z-index: 1; }
body[data-page="home"] .hp-fan.hp-stage > .tile:nth-child(2) { background: var(--hp-sky); transform: rotate(-1.8deg) translateY(10px); z-index: 2; }
body[data-page="home"] .hp-fan.hp-stage > .tile:nth-child(3) { background: var(--hp-sage); transform: rotate(1.8deg) translateY(10px); z-index: 3; }
body[data-page="home"] .hp-fan.hp-stage > .tile:nth-child(4) { background: var(--hp-coral); transform: rotate(5deg) translateY(26px); z-index: 4; }
body[data-page="home"] .hp-fan.hp-stage > .tile:hover { transform: none; }
body[data-page="home"] .hp-fan.hp-stage > .tile h3,
body[data-page="home"] .hp-fan.hp-stage > .tile p { color: var(--hp-navy); }
body[data-page="home"] .hp-fan.hp-stage > .tile p { opacity: .9; }
@media (max-width: 900px) {
  body[data-page="home"] .hp-fan.hp-stage > .tile { transform: none !important; border-radius: 26px; margin: 0; }
}

/* Section pictures are shown as they are: no shape, no shadow, no crop */
body[data-page="home"] .hp-split .hp-photo:has(img) { aspect-ratio: auto; border-radius: 0 !important; background: none !important; box-shadow: none !important; overflow: visible; }
body[data-page="home"] .hp-split .hp-photo:has(img) img { position: static; width: 100%; height: auto; object-fit: contain; display: block; border-radius: 0; }

/* Phone: the two-column card and stage grids stay inside the screen width */
@media (max-width: 900px) {
  body[data-page="home"] .hp-fan { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  body[data-page="home"] .hp-fan > * { min-width: 0; }
  body[data-page="home"] .hp-fan .card, body[data-page="home"] .hp-fan.hp-stage > .tile { overflow-wrap: anywhere; }
}
@media (max-width: 900px) {
  body[data-page="home"] .hp-fan.hp-stage .btn { max-width: 100%; white-space: normal; text-align: center; }
}

/* Less space above and below every homepage section (the hero is unchanged) */
body[data-page="home"] main > section[class]:not(.hero) { padding-top: 24px; padding-bottom: 24px; }

/* Text cards: no shadow underneath (and no tinted panel behind them) */
body[data-page="home"] main > section.hp-split .hp-text { box-shadow: none !important; background: transparent !important; }

/* Phone: no space left for the bottom bar (hidden on the homepage), and each section shows its picture above its text */
@media (max-width: 900px) {
  body[data-page="home"] { padding-bottom: 0 !important; }
  body[data-page="home"] .hp-split .hp-photo { order: -1; }
}

/* Phone: the sound button sits in the corner, and the footer leaves room for it so its text is not covered */
@media (max-width: 900px) {
  body[data-page="home"] .audio-toggle { bottom: 14px; left: 14px; }
  body[data-page="home"] .site-footer { padding-bottom: 96px; }
}

/* Stage tiles with a picture: shown as it is, no coloured shape behind it */
body[data-page="home"] .hp-fan.hp-stage > .tile .hp-photo.tile-photo:has(img) { aspect-ratio: auto; background: none; border-radius: 0; }
body[data-page="home"] .hp-fan.hp-stage > .tile .hp-photo.tile-photo:has(img) img { position: static; width: 100%; height: auto; object-fit: contain; display: block; }

/* Key-area cards: the new icon pictures */
body[data-page="home"] .hp-fan .hp-ic img { width: 26px; height: 26px; object-fit: contain; display: block; }

/* Phone: the key-area and stage cards show one card at a time and slide sideways */
@media (max-width: 900px) {
  body[data-page="home"] .hp-cards.hp-fan { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 7% 24px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  body[data-page="home"] .hp-cards.hp-fan::-webkit-scrollbar { display: none; }
  body[data-page="home"] .hp-cards.hp-fan > * { flex: 0 0 86%; scroll-snap-align: center; }
}


/* Homepage: fluid container (full width, with side gutters) instead of a fixed-width container */
body[data-page="home"] .wrap { width: 100%; max-width: none; padding-left: clamp(16px, 4vw, 64px); padding-right: clamp(16px, 4vw, 64px); box-sizing: border-box; }

/* Key-area cards: bigger icons, and more space between the icon and the heading */
body[data-page="home"] .hp-fan .card { padding-top: 84px; }
body[data-page="home"] .hp-fan .hp-ic { width: 60px; height: 60px; top: 14px; left: 26px; }
body[data-page="home"] .hp-fan .hp-ic img { width: 38px; height: 38px; }

/* Every homepage section: the same top and bottom spacing */
body[data-page="home"] main > section[class]:not(.hero) { padding-top: 48px !important; padding-bottom: 48px !important; }
body[data-page="home"] .hp-cards { margin-top: 24px; }
@media (max-width: 900px) {
  body[data-page="home"] main > section[class]:not(.hero) { padding-top: 36px !important; padding-bottom: 36px !important; }
}

/* Gap between sections: 10px in total (5px at the bottom of one section and 5px at the top of the next) */
body[data-page="home"] main > section[class]:not(.hero) { padding-top: 5px !important; padding-bottom: 5px !important; }

/* Phone card sliders: dots under the list */
.slider-dots { display: none; }
@media (max-width: 900px) {
  body[data-page="home"] .slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
  body[data-page="home"] .slider-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgba(23, 43, 77, .25); cursor: pointer; transition: width .3s, background .3s; }
  body[data-page="home"] .slider-dot.on { width: 22px; border-radius: 6px; background: var(--hp-navy); }
}
/* Stage cards: no gap above them */
body[data-page="home"] .hp-fan.hp-stage { margin-top: 0; padding-top: 0; }
/* Gap between sections: 10px at the bottom of one and 10px at the top of the next (20px in total) */
body[data-page="home"] main > section[class]:not(.hero) { padding-top: 10px !important; padding-bottom: 10px !important; }

/* Pictures are no longer cut off at the edges of their section */
body[data-page="home"] main > section[class]:not(.hero) { overflow: visible; }

/* Picture and its text sit closer together */
body[data-page="home"] .hp-split .hp-grid { gap: 20px; }
@media (max-width: 900px) {
  body[data-page="home"] .hp-split .hp-grid { gap: 16px; }
}
/* Stage section: space above its heading, and the text sits closer to the cards */
body[data-page="home"] section.hp-sky > .wrap > .section-title { margin-top: 60px; }
body[data-page="home"] section.hp-sky .hp-center { margin-bottom: 0; }
body[data-page="home"] section.hp-sky .hp-fan.hp-stage { margin-top: -10px; }

/* Key-area cards sit closer to the text above them */
body[data-page="home"] .hp-split > .wrap:not(.hp-grid) .hp-cards.hp-fan { margin-top: -8px; padding-top: 0; }
body[data-page="home"] .hp-split > .wrap:not(.hp-grid) { padding-top: 0; }

/* Phones: picture and text touch each other in every section */
@media (max-width: 900px) {
  body[data-page="home"] .hp-split .hp-grid { gap: 0; }
  body[data-page="home"] .hp-split .hp-text { padding-top: 0; }
  body[data-page="home"] .hp-split .hp-photo { margin: 0; }
}

/* Programme tiles: short bullet lists under each stage */
body[data-page="home"] .tile .hp-tile-list { margin: .6em 0 1.1em; padding-left: 1.2em; color: var(--hp-navy); font-size: .95rem; opacity: .9; }
body[data-page="home"] .tile .hp-tile-list li { margin: .25em 0; }
body[data-page="home"] .tile .hp-tile-list li::marker { color: var(--hp-coral); }

/* Intro text that fades in over the scrolling video (see initHeroScroll) */
body[data-page="home"] .hero-intro h1 { margin: 0 0 .5em; font-size: clamp(1.9rem, 3.6vw, 3.2rem); line-height: 1.12; }
body[data-page="home"] .hero-intro p { margin: 0 0 .8em; font: 400 clamp(1rem, 1.3vw, 1.2rem)/1.6 var(--font-body); }
body[data-page="home"] .hero-intro .btn { margin-top: .4em; text-shadow: none; }
body[data-page="home"] .hero-intro-inner { max-width: 40rem; }
body[data-page="home"] .hero-frame .hero-intro { visibility: hidden; z-index: 3; top: 0; bottom: 0; transform: none; display: flex; align-items: center; padding: 0 7%; text-shadow: 0 2px 16px rgba(10, 25, 50, .55); }
body[data-page="home"] .hero-frame .hero-shade { background: linear-gradient(90deg, rgba(8, 18, 38, .7) 0%, rgba(8, 18, 38, .45) 50%, rgba(8, 18, 38, .08) 100%); }
body[data-page="home"] .hero-frame .hero-intro h1 { color: #fff; }
body[data-page="home"] .hero-frame .hero-intro p { color: rgba(255, 255, 255, .95); }
@media (max-width: 700px) {
  body[data-page="home"] .hero-frame .hero-intro { padding: 0 6%; }
  body[data-page="home"] .hero-frame .hero-shade { background: rgba(10, 20, 40, .5); }
  body[data-page="home"] .hero-intro h1 { font-size: clamp(1.6rem, 7vw, 2rem); }
  body[data-page="home"] .hero-intro p { font-size: .95rem; }
}
/* Fallback when scroll animation is off: a plain block under the banner */
body[data-page="home"] .hero-intro.hero-intro-static { position: static; transform: none; opacity: 1; visibility: visible; text-shadow: none; padding: clamp(48px, 7vw, 90px) 7%; color: var(--hp-navy); }
body[data-page="home"] .hero-intro.hero-intro-static p { color: #2b3f5e; }

/* Folded-paper corner patterns behind each section (added by addHomePatterns in site.js) */
body[data-page="home"] main > section > .wrap { position: relative; z-index: 1; }
body[data-page="home"] .hp-pattern-clip { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
body[data-page="home"] .hp-pattern {
  position: absolute; z-index: 2; pointer-events: none; width: clamp(170px, 26vw, 420px);
  background: no-repeat top left / 100% 100%; filter: drop-shadow(0 12px 18px rgba(23, 43, 77, .12));
}
body[data-page="home"] .hp-pattern.p1 { background-image: url("../img/Pattern1.png"); aspect-ratio: 430 / 211; }
body[data-page="home"] .hp-pattern.p3 { background-image: url("../img/Pattern3.png"); aspect-ratio: 526 / 321; }
body[data-page="home"] .hp-pattern.p4 { background-image: url("../img/Pattern4.png"); aspect-ratio: 509 / 475; width: clamp(150px, 20vw, 320px); }
body[data-page="home"] .hp-pattern.p5 { background-image: url("../img/Pattern5.png"); aspect-ratio: 529 / 371; }
/* The artwork is drawn for the top-left corner; flip it for the others */
body[data-page="home"] .hp-pattern.tl { top: 0; left: 0; }
body[data-page="home"] .hp-pattern.tr { top: 0; right: 0; scale: -1 1; }
body[data-page="home"] .hp-pattern.bl { bottom: 0; left: 0; scale: 1 -1; }
body[data-page="home"] .hp-pattern.br { bottom: 0; right: 0; scale: -1 -1; }
@media (max-width: 700px) {
  body[data-page="home"] .hp-pattern { width: 38vw; }
  body[data-page="home"] .hp-pattern.p4 { width: 30vw; }
}

/* Picture sizing: section illustrations always fit on screen and sit centred beside their text */
body[data-page="home"] .hp-split .hp-photo:has(img) { display: flex; align-items: center; justify-content: center; }
body[data-page="home"] .hp-split .hp-photo:has(img) img { width: auto; max-width: min(100%, 460px); height: auto; max-height: min(60vh, 480px); }
body[data-page="home"] .hp-split .hp-text { align-self: center; }
@media (max-width: 900px) {
  body[data-page="home"] .hp-split .hp-photo:has(img) img { max-width: min(100%, 380px); max-height: 44vh; }
}
/* Programme cards: every picture gets the same height so the four cards line up */
body[data-page="home"] .hp-fan.hp-stage > .tile .hp-photo.tile-photo:has(img) { height: clamp(190px, 17vw, 250px); display: flex; align-items: flex-end; justify-content: center; padding-top: 14px; }
body[data-page="home"] .hp-fan.hp-stage > .tile .hp-photo.tile-photo:has(img) img { width: auto; max-width: 90%; height: 100%; object-fit: contain; }

/* ===== Client polish ===== */

/* A soft, slowly changing blob behind every section picture */
body[data-page="home"] .hp-split .hp-photo:has(img) { position: relative; isolation: isolate; --blob: #dfe8d3; }
body[data-page="home"] .hp-split .hp-photo.tone-mustard { --blob: #fbe1a1; }
body[data-page="home"] .hp-split .hp-photo.tone-sky { --blob: #cfe5f2; }
body[data-page="home"] .hp-split .hp-photo.tone-coral { --blob: #f7d2c3; }
body[data-page="home"] .hp-split .hp-photo.tone-navy { --blob: #d6ddef; }
body[data-page="home"] .hp-split .hp-photo:has(img)::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 52%; width: min(92%, 470px); aspect-ratio: 1;
  translate: -50% -50%; background: var(--blob); border-radius: 58% 42% 55% 45% / 45% 55% 45% 55%;
  animation: hp-blob 14s ease-in-out infinite;
}
@keyframes hp-blob {
  0%, 100% { border-radius: 58% 42% 55% 45% / 45% 55% 45% 55%; rotate: 0deg; }
  50% { border-radius: 42% 58% 45% 55% / 56% 44% 56% 44%; rotate: 8deg; }
}
@media (max-width: 900px) {
  body[data-page="home"] .hp-split .hp-photo:has(img)::before { width: min(88%, 360px); }
}

/* Keep the centred "Supporting each stage" heading clear of the corner pattern */
body[data-page="home"] main > section.hp-sky[class]:not(.hero) { padding-top: clamp(70px, 11vw, 160px) !important; }

/* Body copy: a touch more room to breathe */
body[data-page="home"] .hp-text .prose p { line-height: 1.75; }

/* FAQ: softer cards that lift on hover and show a coral edge when open */
body[data-page="home"] details.faq { border-radius: 18px; transition: box-shadow .3s, transform .3s, border-color .3s; }
body[data-page="home"] details.faq:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(23, 43, 77, .35); }
body[data-page="home"] details.faq[open] { border-left-color: var(--hp-coral); }
body[data-page="home"] details.faq p { color: var(--hp-navy); opacity: .85; line-height: 1.7; }

/* Footer: rounded top with a folded-paper corner from the pattern set */
body[data-page="home"] .site-footer { border-radius: 48px 48px 0 0; padding-top: 48px; }
body[data-page="home"] .site-footer::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: clamp(140px, 18vw, 280px); aspect-ratio: 509 / 475;
  background: url("../img/Pattern4.png") no-repeat center / 100% 100%; scale: -1 -1; opacity: .9; pointer-events: none;
}
body[data-page="home"] .site-footer .wrap { position: relative; z-index: 1; }
@media (max-width: 700px) {
  body[data-page="home"] .site-footer { border-radius: 32px 32px 0 0; padding-bottom: 90px; }
  body[data-page="home"] .site-footer::after { width: 34vw; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .hp-split .hp-photo:has(img)::before { animation: none; }
}

/* ===== Playful layer ===== */

/* Extra breathing room for the sections that used to have colour bands */
body[data-page="home"] main > section:is(.hp-sage, .hp-navy, .hp-mustard)[class]:not(.hero) { padding-top: clamp(56px, 7vw, 100px) !important; padding-bottom: clamp(56px, 7vw, 100px) !important; }
body[data-page="home"] main > section.hp-sky[class]:not(.hero) { padding-bottom: clamp(56px, 7vw, 100px) !important; }

/* Headings: a hand-drawn coral squiggle instead of the flat bar */
body[data-page="home"] .section-title::after {
  width: 96px; height: 14px; border-radius: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 14'%3E%3Cpath d='M2 8c8-6 14-6 22 0s14 6 22 0 14-6 22 0 14 6 22 0' fill='none' stroke='%23E8644A' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center / contain;
}

/* 3D toys bobbing around the section pictures (added by addHomeToys in site.js) */
body[data-page="home"] .hp-toy {
  position: absolute; z-index: 2; width: clamp(58px, 6.5vw, 104px); aspect-ratio: 1; pointer-events: none;
  background: no-repeat center / contain; filter: drop-shadow(0 14px 14px rgba(23, 43, 77, .18));
  animation: hp-bob 6.5s ease-in-out infinite;
}
body[data-page="home"] .hp-toy.toy-abc { background-image: url("../img/float/abc.webp"); }
body[data-page="home"] .hp-toy.toy-books { background-image: url("../img/float/puzzle.webp"); }
body[data-page="home"] .hp-toy.toy-puzzle { background-image: url("../img/float/books.webp"); }
body[data-page="home"] .hp-toy.toy-cup { background-image: url("../img/float/cup.webp"); width: clamp(44px, 4.6vw, 72px); }
body[data-page="home"] .hp-toy.tr { top: 6%; right: 6%; }
body[data-page="home"] .hp-toy.bl { bottom: 6%; left: 6%; animation-delay: -3s; animation-duration: 7.5s; }

/* Pictures lift a little when hovered */
@media (hover: hover) {
  body[data-page="home"] .hp-split .hp-photo:has(img) img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
  body[data-page="home"] .hp-split .hp-photo:has(img):hover img { transform: translateY(-8px) scale(1.03); }
}
@media (max-width: 700px) {
  body[data-page="home"] .hp-toy { width: 54px; }
  body[data-page="home"] .hp-toy.toy-cup { width: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .hp-toy { animation: none; }
}
body[data-page="home"] .hp-toy.tl { top: 6%; left: 6%; animation-delay: -1.5s; }

/* Learning cards: straight, equal height, even gaps (desktop); they lift a little on hover */
@media (min-width: 901px) {
  body[data-page="home"] .hp-fan:not(.hp-stage) { gap: clamp(16px, 1.8vw, 28px); align-items: stretch; padding-top: 10px; }
  body[data-page="home"] .hp-fan:not(.hp-stage) > .card { transform: none; margin: 0; min-height: 0; border-radius: 32px; padding-bottom: 34px; transition: transform .35s ease, box-shadow .35s ease; }
  body[data-page="home"] .hp-fan:not(.hp-stage) > .card:hover { transform: translateY(-8px); box-shadow: 0 34px 44px -26px rgba(23, 43, 77, .5); }
}
/* Space under the learning cards so the next section starts below them */
body[data-page="home"] main > section[class]:not(.hero):has(.hp-fan:not(.hp-stage)) { padding-bottom: clamp(56px, 7vw, 110px) !important; }

/* ===== One background for the whole site: the cream paper texture (img/bg-cream.jpg, set on body in site.css) ===== */
body[data-page="home"],
body[data-page="home"] main > section[class],
body[data-page="home"] .hero-video,
body[data-page="home"] .hero-frame .hero-still,
body[data-page="home"] .site-footer { background: transparent; }
body[data-page="home"] .site-footer { border-top: 1px solid rgba(23, 43, 77, .1); }

/* ===== Learning cards: playful craft-sticker look for kids ===== */
body[data-page="home"] .hp-fan:not(.hp-stage) > .card {
  position: relative; padding-top: 108px;
  /* polka dots over the card colour */
  background-image: radial-gradient(rgba(255, 255, 255, .24) 2.2px, transparent 2.9px);
  background-size: 22px 22px;
  /* white sticker edge + a cartoon offset shadow */
  box-shadow: 0 0 0 6px #fff, 10px 12px 0 6px rgba(23, 43, 77, .12);
}
/* each card has its own hand-cut wobble */
body[data-page="home"] .hp-fan:not(.hp-stage) > .card:nth-child(1) { border-radius: 46px 30px 52px 28px / 34px 48px 30px 50px; }
body[data-page="home"] .hp-fan:not(.hp-stage) > .card:nth-child(2) { border-radius: 30px 50px 28px 46px / 50px 30px 48px 32px; }
body[data-page="home"] .hp-fan:not(.hp-stage) > .card:nth-child(3) { border-radius: 52px 32px 46px 30px / 30px 50px 34px 46px; }
body[data-page="home"] .hp-fan:not(.hp-stage) > .card:nth-child(4) { border-radius: 32px 48px 30px 52px / 48px 32px 50px 30px; }
/* dashed "stitching" just inside the edge */
body[data-page="home"] .hp-fan:not(.hp-stage) > .card::before {
  content: ""; position: absolute; inset: 11px; border: 2.5px dashed rgba(255, 255, 255, .8);
  border-radius: inherit; pointer-events: none;
}
/* big icon bubbles that bob gently, each on its own beat */
body[data-page="home"] .hp-fan:not(.hp-stage) .hp-ic {
  width: 74px; height: 74px; top: 22px; left: 24px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .45), 0 12px 20px -12px rgba(23, 43, 77, .55);
  animation: hp-ic-bob 3.2s ease-in-out infinite;
}
body[data-page="home"] .hp-fan:not(.hp-stage) .hp-ic img { width: 44px; height: 44px; }
body[data-page="home"] .hp-fan:not(.hp-stage) > .card:nth-child(2) .hp-ic { animation-delay: -.8s; }
body[data-page="home"] .hp-fan:not(.hp-stage) > .card:nth-child(3) .hp-ic { animation-delay: -1.6s; }
body[data-page="home"] .hp-fan:not(.hp-stage) > .card:nth-child(4) .hp-ic { animation-delay: -2.4s; }
body[data-page="home"] .hp-fan:not(.hp-stage) > .card h3 { font-size: 1.55rem; letter-spacing: .01em; }
@keyframes hp-ic-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}
/* hover: the card wiggles and the icon does a little spin */
@keyframes hp-card-wiggle {
  0% { transform: translateY(-8px) rotate(0); }
  25% { transform: translateY(-8px) rotate(-2.2deg); }
  55% { transform: translateY(-8px) rotate(1.8deg); }
  80% { transform: translateY(-8px) rotate(-.8deg); }
  100% { transform: translateY(-8px) rotate(0); }
}
@media (hover: hover) and (min-width: 901px) {
  body[data-page="home"] .hp-fan:not(.hp-stage) > .card:hover {
    animation: hp-card-wiggle .6s ease-in-out; transform: translateY(-8px);
    box-shadow: 0 0 0 6px #fff, 12px 18px 0 6px rgba(23, 43, 77, .14);
  }
  body[data-page="home"] .hp-fan:not(.hp-stage) > .card:hover .hp-ic { animation: none; transform: rotate(360deg) scale(1.08); transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); }
}
/* phone slider: room for the sticker edge so it isn't cut off */
@media (max-width: 900px) {
  body[data-page="home"] .hp-cards.hp-fan:not(.hp-stage) { padding-top: 20px; padding-bottom: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .hp-fan:not(.hp-stage) .hp-ic { animation: none; }
  body[data-page="home"] .hp-fan:not(.hp-stage) > .card:hover { animation: none; }
}
/* Space between the "Learning and development" intro (text + picture) and its four cards */
body[data-page="home"] .hp-split > .wrap:not(.hp-grid) .hp-cards.hp-fan:not(.hp-stage) { margin-top: clamp(36px, 5vw, 84px); }
/* The learning section's picture stays in place (no sticky follow), so it can't slide down onto the cards */
body[data-page="home"] .hp-split:has(.hp-fan:not(.hp-stage)) .hp-grid .hp-photo { position: relative !important; top: auto !important; }

/* ===== Wow layer (see initHomeWow in site.js) ===== */

/* Headings: each word sits in a mask and rises into place */
body[data-page="home"] .section-title .hw { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
body[data-page="home"] .section-title .hw > span { display: inline-block; transform-origin: 0 100%; }
/* the coral squiggle draws itself from left to right */
body[data-page="home"] .section-title::after { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s cubic-bezier(.65, 0, .25, 1) .45s; }
body[data-page="home"] .section-title.is-in::after { clip-path: inset(0 0 0 0); }
body[data-page="home"] .hp-center .section-title::after,
body[data-page="home"] section.hp-sky > .wrap > .section-title::after { background-position: center; }

/* Pictures: smooth 3D tilt that follows the pointer */
body[data-page="home"] .hp-split .hp-grid > .hp-photo { perspective: 900px; }
body[data-page="home"] .hp-split .hp-grid > .hp-photo img { transition: transform .35s cubic-bezier(.2, .7, .2, 1); will-change: transform; }

/* Drifting shapes in the side margins */
body[data-page="home"] .hp-shape { position: absolute; z-index: 1; width: clamp(18px, 1.9vw, 30px); aspect-ratio: 1; pointer-events: none; background: no-repeat center / contain; opacity: .85; }
body[data-page="home"] .hp-shape.shape-star { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.3 6.9.8-5.1 4.7 1.4 6.8L12 17.2 5.9 20.6l1.4-6.8L2.2 9.1l6.9-.8z' fill='%23F2C94C' stroke='%23E0A82E' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
body[data-page="home"] .hp-shape.shape-dot { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='%23E8644A'/%3E%3C/svg%3E"); width: clamp(12px, 1.2vw, 18px); }
body[data-page="home"] .hp-shape.shape-ring { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%2391C9E8' stroke-width='3.5'/%3E%3C/svg%3E"); }
body[data-page="home"] .hp-shape.shape-squiggle { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 16'%3E%3Cpath d='M2 10c4-6 8-6 12 0s8 6 12 0 4-4 4-4' fill='none' stroke='%23A8B8A0' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); width: clamp(26px, 2.6vw, 40px); aspect-ratio: 2; }
body[data-page="home"] .hp-shape.shape-tri { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4l9 15H3z' fill='none' stroke='%23172B4D' stroke-opacity='.45' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@media (max-width: 700px) { body[data-page="home"] .hp-shape { display: none; } }

/* Scroll progress bar along the very top */
#hp-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 1000; pointer-events: none;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, #E8644A, #F2C94C 35%, #91C9E8 68%, #A8B8A0);
}

/* Programme cards: bouncy lift, and the child picture hops a little */
@media (hover: hover) and (min-width: 901px) {
  body[data-page="home"] .hp-fan.hp-stage > .tile { transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), box-shadow .4s ease; }
  body[data-page="home"] .hp-fan.hp-stage > .tile:hover { transform: translateY(-14px) rotate(0deg) scale(1.02); z-index: 6; box-shadow: 0 34px 46px -26px rgba(23, 43, 77, .5); }
  body[data-page="home"] .hp-fan.hp-stage > .tile .tile-photo img { transition: transform .55s cubic-bezier(.3, 1.6, .5, 1); }
  body[data-page="home"] .hp-fan.hp-stage > .tile:hover .tile-photo img { transform: translateY(-8px) rotate(-3deg) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .section-title::after { clip-path: none; transition: none; }
}
