/* ==========================================================================
   Westridge Primary School — design system v3
   Editorial and calm: serif headlines, generous paper, real photographs,
   hairlines instead of boxes, motion that guides the eye rather than decorates.
   ========================================================================== */

/* ── Fonts (self-hosted) ────────────────────────────────────────────────── */
/* Erode — Indian Type Foundry, ITF Free Font License. Figtree — SIL OFL. */
@font-face { font-family: "Erode"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/Erode-400.woff2") format("woff2"); }
@font-face { font-family: "Erode"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/Erode-500.woff2") format("woff2"); }
@font-face { font-family: "Erode"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/Erode-400i.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400 800; font-style: normal; font-display: swap; src: url("../fonts/Figtree-var.woff2") format("woff2"); }

:root {
  /* Brand — the school's navy and golden yellow */
  --navy: #1e3a8a;
  --navy-ink: #162c6b;
  --navy-soft: #e8ecf6;
  --gold: #ffd700;
  --gold-warm: #f5c400;
  --gold-ink: #7a5d00;
  --midnight: #0a1233;

  /* Paper and ink */
  --paper: #fbfaf6;
  --ivory: #f3efe5;
  --white: #ffffff;
  --ink: #121833;
  --ink-2: #474d66;
  --ink-3: #737890;
  --line: rgba(18, 24, 51, 0.12);
  --line-2: rgba(18, 24, 51, 0.2);

  /* ECD colour groups */
  --grp-yellow: #e9ad00; --grp-red: #d9434a; --grp-purple: #8a4bc0; --grp-blue: #2c66d6; --grp-green: #2a9964;

  --serif: "Erode", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gn-h: 64px;
  --ln-h: 52px;
  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1320px;
  --r: 14px;
  --r-sm: 10px;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: light;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-padding-top: calc(var(--gn-h) + var(--ln-h) + 16px);
  background: var(--paper);
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
::selection { background: var(--gold); color: var(--midnight); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible { outline-color: var(--gold); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: 12px; z-index: 1000; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; transform: translateY(-160%); transition: transform 0.3s var(--ease-out); }
.skip:focus { transform: none; }
@media (max-width: 600px) { body { font-size: 17px; } }

/* ── Type ───────────────────────────────────────────────────────────────── */
.display, .h1, .h2, .h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); text-wrap: balance; }
.display { font-size: clamp(3.1rem, 8.6vw, 8.4rem); line-height: 0.98; letter-spacing: -0.03em; }
.h1 { font-size: clamp(2.7rem, 6.4vw, 6rem); line-height: 1.02; letter-spacing: -0.028em; }
.h2 { font-size: clamp(2.1rem, 4.4vw, 4rem); line-height: 1.06; letter-spacing: -0.022em; }
.h3 { font-size: clamp(1.45rem, 2.2vw, 2rem); line-height: 1.15; letter-spacing: -0.012em; font-weight: 500; }
.h4 { font-size: 1.1rem; line-height: 1.35; font-weight: 650; letter-spacing: -0.01em; }
em, .em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--navy); letter-spacing: -0.01em; }
.dark em, .dark .em { color: var(--gold); }
.lead { font-size: clamp(1.15rem, 1.55vw, 1.42rem); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.body-lg { font-size: clamp(1.05rem, 1.2vw, 1.18rem); line-height: 1.65; color: var(--ink-2); }
.meta { font-size: 14px; font-weight: 600; letter-spacing: 0.01em; color: var(--ink-3); }
.small { font-size: 15px; line-height: 1.5; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.measure { max-width: 62ch; }
.measure-s { max-width: 44ch; }
.prose > * + * { margin-top: 1em; }
.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Masked lines for headline reveals (spans generated at build time) */
.ln-mask { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.ln-mask > span { display: block; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--gutter), 1040px); margin-inline: auto; }
.wrap-text { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; }
.sec { padding-block: clamp(80px, 11vw, 160px); position: relative; }
.sec--tight { padding-block: clamp(56px, 7vw, 104px); }
.sec--flush-top { padding-top: 0; }
.sec--flush-bottom { padding-bottom: 0; }
.ivory { background: var(--ivory); }
.white { background: var(--white); }
.dark {
  background: var(--midnight); color: #f4f2ec;
  --ink: #f4f2ec; --ink-2: rgba(244, 242, 236, 0.76); --ink-3: rgba(244, 242, 236, 0.56);
  --line: rgba(255, 255, 255, 0.14); --line-2: rgba(255, 255, 255, 0.24);
}
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 7vw, 120px); align-items: center; }
.split--top { align-items: start; }
.split--wide-left { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.split--wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.mt-s { margin-top: 16px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: clamp(40px, 5vw, 64px); } .mt-xl { margin-top: clamp(64px, 9vw, 120px); }
.hr { height: 1px; border: 0; margin: 0; background: var(--line); }

/* Section heading: headline left, supporting sentence right */
.head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(40px, 6vw, 80px); }
.head .lead { max-width: 44ch; padding-bottom: 0.4em; }
.head--stack { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.head--stack .lead { padding-bottom: 0; }
@media (max-width: 900px) {
  .split, .split--wide-left, .split--wide-right, .head { grid-template-columns: minmax(0, 1fr); }
}

/* ── Media ──────────────────────────────────────────────────────────────── */
.media { position: relative; display: block; overflow: hidden; background: #e7e3d9 var(--lqip, none) center / cover no-repeat; }
.media > img, .media > video { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.media--alpha { background: none; }
.media--fill { position: absolute; inset: 0; }
.js .media > img { opacity: 0; transition: opacity 0.8s var(--ease); }
.js .media > img.is-loaded { opacity: 1; }
.frame { border-radius: var(--r); overflow: hidden; position: relative; }
.frame > .media { width: 100%; height: 100%; }
.cap { margin-top: 12px; font-size: 14.5px; color: var(--ink-3); }

/* ── Global nav ─────────────────────────────────────────────────────────── */
.gn { position: fixed; inset: 0 0 auto; z-index: 200; height: var(--gn-h); transition: transform 0.55s var(--ease-out); view-transition-name: gn; }
.gn-hidden .gn:not(.is-open):not(.is-menu) { transform: translateY(-100%); }
.gn__bar {
  position: absolute; inset: 0;
  background: rgba(251, 250, 246, 0.84);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.gn__inner { position: relative; height: 100%; width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; display: flex; align-items: center; gap: 20px; }
.gn__brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.gn__crest { width: 34px; height: auto; }
.gn__word { font-family: var(--serif); font-size: 21px; line-height: 1; letter-spacing: -0.01em; color: var(--ink); transition: color 0.4s var(--ease); }
.gn__word small { display: block; margin-top: 3px; font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); transition: color 0.4s var(--ease); }
.gn__nav { margin-left: auto; height: 100%; }
.gn__links { display: flex; height: 100%; list-style: none; margin: 0; padding: 0; }
.gn__item { position: relative; display: flex; align-items: center; }
.gn__link { display: inline-flex; align-items: center; gap: 5px; height: 100%; padding: 0 clamp(8px, 0.95vw, 14px); font-size: 15px; font-weight: 550; color: var(--ink-2); transition: color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.gn__link svg { width: 11px; height: 11px; opacity: 0.6; transition: transform 0.35s var(--ease-out); }
.gn__item.is-active .gn__link svg { transform: rotate(180deg); }
.gn__link:hover, .gn__item.is-active > .gn__link, .gn__link[aria-current="page"] { color: var(--ink); }
.gn__link[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold-warm); }
.gn__actions { display: flex; align-items: center; gap: 18px; flex: none; }
.gn__phone { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 650; color: var(--ink); white-space: nowrap; transition: color 0.4s var(--ease); }
.gn__phone svg { width: 17px; height: 17px; color: var(--navy); }
.gn__cta { display: inline-flex; align-items: center; height: 40px; padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 650; background: var(--navy); color: #fff; transition: background-color 0.25s var(--ease), color 0.25s var(--ease); }
.gn__cta:hover { background: var(--navy-ink); }
.gn__burger { display: none; align-items: center; gap: 10px; height: 44px; padding: 0 2px 0 12px; font-size: 15px; font-weight: 650; color: var(--ink); }
.gn__burger i { position: relative; width: 20px; height: 12px; }
.gn__burger i::before, .gn__burger i::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.45s var(--ease-out), top 0.3s var(--ease-out); }
.gn__burger i::before { top: 0; } .gn__burger i::after { top: 10px; }
.gn.is-menu .gn__burger i::before { top: 5px; transform: rotate(45deg); }
.gn.is-menu .gn__burger i::after { top: 5px; transform: rotate(-45deg); }

.nav-dark .gn__bar { background: rgba(10, 18, 51, 0.5); border-color: rgba(255, 255, 255, 0.1); }
.nav-dark .gn__word, .nav-dark .gn__link:hover, .nav-dark .gn__link[aria-current="page"], .nav-dark .gn__item.is-active > .gn__link, .nav-dark .gn__phone, .nav-dark .gn__burger { color: #fff; }
.nav-dark .gn__word small { color: rgba(255, 255, 255, 0.62); }
.nav-dark .gn__link { color: rgba(255, 255, 255, 0.84); }
.nav-dark .gn__phone svg { color: var(--gold); }
.nav-dark .gn__cta { background: var(--gold); color: var(--midnight); }
.nav-dark .gn__cta:hover { background: #ffe24a; }
.gn.is-open .gn__bar, .gn.is-menu .gn__bar { background: var(--paper); border-color: var(--line); }
.gn.is-open .gn__word, .gn.is-menu .gn__word, .gn.is-menu .gn__burger, .gn.is-open .gn__phone { color: var(--ink); }
.gn.is-open .gn__word small, .gn.is-menu .gn__word small { color: var(--ink-3); }
.gn.is-open .gn__link { color: var(--ink-2); }
.gn.is-open .gn__item.is-active > .gn__link, .gn.is-open .gn__link[aria-current="page"] { color: var(--ink); }
.gn.is-open .gn__phone svg { color: var(--navy); }
.gn.is-open .gn__cta, .gn.is-menu .gn__cta { background: var(--navy); color: #fff; }

/* Flyout */
.gn__fly {
  position: absolute; left: 0; right: 0; top: 0; z-index: -1;
  height: var(--fly-h, var(--gn-h)); overflow: hidden;
  background: var(--paper); border-bottom: 1px solid var(--line);
  opacity: 0; pointer-events: none;
  transition: height 0.5s var(--ease-io), opacity 0.2s var(--ease) 0.3s;
}
.gn.is-open .gn__fly { opacity: 1; pointer-events: auto; transition: height 0.5s var(--ease-io), opacity 0.1s; }
.gn__scrim { position: fixed; inset: var(--gn-h) 0 0; z-index: -2; background: rgba(10, 18, 51, 0.3); opacity: 0; visibility: hidden; transition: opacity 0.45s var(--ease), visibility 0s 0.45s; }
.gn.is-open .gn__scrim { opacity: 1; visibility: visible; transition: opacity 0.45s var(--ease); }
.fly { position: absolute; left: 0; right: 0; top: var(--gn-h); padding: 40px 0 52px; visibility: hidden; }
.fly.is-active { visibility: visible; }
.fly__inner { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; display: grid; grid-template-columns: minmax(240px, 0.8fr) minmax(0, 2.2fr); gap: clamp(32px, 5vw, 80px); }
.fly__intro .h3 { font-size: 32px; font-weight: 400; }
.fly__intro p { margin-top: 10px; font-size: 16px; color: var(--ink-2); max-width: 30ch; }
.fly__intro a { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-weight: 650; font-size: 16px; color: var(--navy); }
.fly__intro a svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease-out); }
.fly__intro a:hover svg { transform: translateX(3px); }
.fly__links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); align-content: start; }
.fly__links a { display: block; padding: 14px 0 15px; border-top: 1px solid var(--line); }
.fly__links a b { display: block; font-size: 17px; font-weight: 650; color: var(--ink); transition: color 0.2s; }
.fly__links a span { display: block; margin-top: 2px; font-size: 14.5px; color: var(--ink-3); }
.fly__links a:hover b { color: var(--navy); }
.fly__intro, .fly__links li { opacity: 0; transform: translateY(-6px); transition: opacity 0.2s var(--ease), transform 0.3s var(--ease); }
.gn.is-open .fly.is-active .fly__intro, .gn.is-open .fly.is-active .fly__links li {
  opacity: 1; transform: none;
  transition: opacity 0.45s var(--ease) calc(0.14s + var(--i, 0) * 0.035s), transform 0.6s var(--ease-out) calc(0.14s + var(--i, 0) * 0.035s);
}

/* Mobile menu */
.mm { position: fixed; inset: 0; z-index: -1; height: 100dvh; background: var(--paper); overflow: hidden; opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0s 0.3s; }
.gn.is-menu .mm { opacity: 1; visibility: visible; transition: opacity 0.3s var(--ease); }
.mm__panel { position: absolute; inset: var(--gn-h) 0 0; padding: 12px var(--gutter) 120px; overflow-y: auto; transition: transform 0.5s var(--ease-out), opacity 0.3s var(--ease); }
.mm__panel[data-level="2"] { transform: translateX(100%); opacity: 0; visibility: hidden; }
.mm.is-sub .mm__panel[data-level="1"] { transform: translateX(-24%); opacity: 0; visibility: hidden; }
.mm.is-sub .mm__panel.is-current[data-level="2"] { transform: none; opacity: 1; visibility: visible; }
.mm__list { list-style: none; margin: 0; padding: 0; }
.mm__list li { border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(8px); transition: opacity 0.3s var(--ease), transform 0.45s var(--ease-out); }
.gn.is-menu .mm__list li { opacity: 1; transform: none; transition-delay: calc(0.05s + var(--i, 0) * 0.03s); }
.mm__link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 15px 0; text-align: left; }
.mm__link b { display: block; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; letter-spacing: -0.012em; }
.mm__link > span > span { display: block; font-size: 14.5px; color: var(--ink-3); margin-top: 3px; }
.mm__link svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.mm__back { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0 14px; font-size: 15px; font-weight: 650; color: var(--ink-2); }
.mm__back svg { width: 16px; height: 16px; }
.mm__title { font-family: var(--serif); font-size: 34px; line-height: 1.1; margin-bottom: 10px; }
.mm__panel[data-level="2"] .mm__link b { font-family: var(--sans); font-size: 18px; font-weight: 650; }
.mm__contact { margin-top: 28px; display: grid; gap: 14px; font-size: 16px; }
.mm__contact a { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.mm__contact svg { width: 20px; height: 20px; color: var(--navy); }

@media (max-width: 1240px) { .gn__phone { display: none; } }
@media (max-width: 1080px) {
  .gn__nav, .gn__fly, .gn__scrim { display: none; }
  .gn__burger { display: inline-flex; }
  .gn__actions { margin-left: auto; gap: 6px; }
  .gn__cta { height: 38px; padding: 0 16px; }
}
@media (min-width: 1081px) { .mm { display: none; } }
@media (max-width: 400px) { .gn__word small { display: none; } .gn__burger span { display: none; } }

/* ── Local nav + breadcrumb ─────────────────────────────────────────────── */
.ln { position: sticky; top: var(--gn-h); z-index: 150; height: var(--ln-h); margin-top: var(--gn-h); transition: top 0.55s var(--ease-out); }
.gn-hidden .ln { top: 0; }
.ln__bar { position: absolute; inset: 0; background: rgba(251, 250, 246, 0.9); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); }
.ln__inner { position: relative; height: 100%; width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; display: flex; align-items: center; gap: 24px; }
.ln__title { font-family: var(--serif); font-size: 21px; white-space: nowrap; }
.ln__toggle { display: none; }
.ln__links { display: flex; gap: clamp(16px, 2vw, 30px); list-style: none; margin: 0 0 0 auto; padding: 0; }
.ln__links a { position: relative; font-size: 14.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap; transition: color 0.2s; }
.ln__links a:hover, .ln__links a.is-current { color: var(--ink); }
.ln__links a.is-current::after { content: ""; position: absolute; left: 0; right: 0; bottom: -17px; height: 2px; background: var(--gold-warm); }
@media (max-width: 900px) {
  .ln__toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; height: 40px; font-size: 14.5px; font-weight: 650; color: var(--ink-2); }
  .ln__toggle svg { width: 14px; height: 14px; transition: transform 0.4s var(--ease-out); }
  .ln.is-open .ln__toggle svg { transform: rotate(180deg); }
  .ln__links {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; padding: 4px var(--gutter) 18px;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px -24px rgba(10, 18, 51, 0.3);
    clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path 0.45s var(--ease-io), visibility 0s 0.45s;
  }
  .ln.is-open .ln__links { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.45s var(--ease-io); }
  .ln__links a { display: block; padding: 13px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .ln__links a.is-current::after { display: none; }
  .ln__links a.is-current { color: var(--navy); }
}

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 24px; padding: 0; font-size: 14.5px; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.5; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ── Buttons & links ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 26px; border-radius: 999px;
  font-size: 16.5px; font-weight: 650; white-space: nowrap;
  background: var(--navy); color: #fff;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { background: var(--navy-ink); }
.btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn--gold { background: var(--gold); color: var(--midnight); }
.btn--gold:hover { background: #ffe24a; }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn--line:hover { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--white { background: #fff; color: var(--midnight); }
.btn--white:hover { background: var(--ivory); }
.dark .btn--line { color: #fff; }
.dark .btn--line:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.btn--sm { height: 42px; padding: 0 18px; font-size: 15px; }
@media (max-width: 600px) { .btn { height: 52px; padding: 0 22px; font-size: 16px; } }

.go { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 17px; color: var(--navy); }
.go svg { width: 17px; height: 17px; flex: none; transition: transform 0.35s var(--ease-out); }
.go:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.go:hover svg { transform: translateX(4px); }
.dark .go { color: var(--gold); }
.go--play svg { width: 20px; height: 20px; }
.go--play:hover svg { transform: scale(1.1); }

/* ── Page header ────────────────────────────────────────────────────────── */
.ph { padding-top: clamp(calc(var(--gn-h) + 56px), 12vw, 200px); padding-bottom: clamp(40px, 6vw, 80px); }
.has-ln .ph { padding-top: clamp(40px, 6vw, 96px); }
.ph__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px clamp(32px, 6vw, 96px); align-items: end; }
.ph__grid .lead { max-width: 40ch; padding-bottom: 0.5em; }
.ph__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 28px; }
.ph__meta { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 22px; font-size: 15.5px; color: var(--ink-3); }
.ph__meta b { color: var(--ink); font-weight: 650; }
.ph-img .frame { aspect-ratio: 21 / 9; }
@media (max-width: 900px) { .ph__grid { grid-template-columns: minmax(0, 1fr); } .ph-img .frame { aspect-ratio: 4 / 3; } }

/* ── Home: film scene ───────────────────────────────────────────────────── */
.scene { position: relative; height: 220vh; background: var(--midnight); color: #fff; }
.scene__stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scene__copy {
  position: absolute; inset: 0 0 auto; z-index: 0;
  padding: calc(var(--gn-h) + clamp(36px, 8vh, 96px)) var(--gutter) 0; text-align: center;
  transform: translate3d(0, calc(var(--e, 0) * -16vh), 0); opacity: calc(1 - var(--e, 0) * 2.2);
}
.scene__crest { width: clamp(52px, 5vw, 70px); margin: 0 auto clamp(18px, 2.6vh, 28px); }
.scene__copy .display { color: #fff; margin-inline: auto; }
.scene__copy .display em { color: var(--gold); }
.scene__copy .lead { color: rgba(255, 255, 255, 0.82); margin: 0.8em auto 0; max-width: 34ch; }
.scene__copy .ph__actions { justify-content: center; }
@media (max-width: 480px) { .scene__copy .ph__actions { gap: 18px; } .scene__copy .ph__actions .btn { width: 100%; } }
.scene__copy .go { color: #fff; }
.scene__frame {
  position: absolute; inset: 0; z-index: 1; background: #000;
  clip-path: inset(calc((1 - var(--e, 0)) * var(--top, 62vh)) calc((1 - var(--e, 0)) * 6vw) calc((1 - var(--e, 0)) * 4vh) round calc((1 - var(--e, 0)) * var(--r)));
}
.scene__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.14 - var(--e, 0) * 0.14)); }
.scene__frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 18, 51, 0.72), rgba(10, 18, 51, 0) 50%); opacity: var(--e, 0); }
.scene__cap { position: absolute; left: var(--gutter); right: calc(var(--gutter) + 60px); bottom: clamp(28px, 6vh, 56px); z-index: 2; opacity: calc((var(--e, 0) - 0.6) * 2.5); pointer-events: none; }
.scene__cap .h2 { color: #fff; max-width: 16ch; }
.scene__cap p { margin-top: 12px; color: rgba(255, 255, 255, 0.82); max-width: 44ch; }
.scene.is-open .scene__copy { pointer-events: none; }
.vctl { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 18, 51, 0.45); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.vctl svg { width: 16px; height: 16px; }
.vctl .i-play { display: none; }
.vctl.is-paused .i-play { display: block; }
.vctl.is-paused .i-pause { display: none; }
.scene .vctl { position: absolute; right: var(--gutter); bottom: clamp(28px, 6vh, 56px); z-index: 3; }
@media (max-width: 900px) { .scene { height: 190vh; } }

/* ── Home: "How can we help?" task list ─────────────────────────────────── */
.tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 80px); list-style: none; margin: 0; padding: 0; }
.task { border-top: 1px solid var(--line-2); }
.tasks .task:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line-2); }
.task a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: clamp(20px, 2.4vw, 30px) 0; }
.task b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.3vw, 2.1rem); line-height: 1.12; letter-spacing: -0.012em; transition: color 0.25s var(--ease); }
.task a > span > span { display: block; margin-top: 5px; font-size: 16px; color: var(--ink-3); }
.task .arrow { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink); transition: background-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.45s var(--ease-out); }
.task .arrow svg { width: 18px; height: 18px; }
.task a:hover b { color: var(--navy); }
.task a:hover .arrow { background: var(--navy); color: #fff; box-shadow: none; transform: translateX(4px); }
@media (max-width: 900px) { .tasks { grid-template-columns: minmax(0, 1fr); } .tasks .task:nth-last-child(2) { border-bottom: 0; } }

/* ── Welcome (headmaster) ───────────────────────────────────────────────── */
.welcome { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 7vw, 120px); align-items: center; }
.welcome .frame { aspect-ratio: 4 / 5; }
.welcome .media { --pos: 50% 18%; }
.welcome blockquote p { font-family: var(--serif); font-size: clamp(1.6rem, 2.9vw, 2.7rem); line-height: 1.22; letter-spacing: -0.012em; text-wrap: pretty; }
.sig { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.sig img { width: 38px; }
.sig b { display: block; font-size: 17px; font-weight: 700; }
.sig span { font-size: 15px; color: var(--ink-3); }
@media (max-width: 900px) { .welcome { grid-template-columns: minmax(0, 1fr); } .welcome .frame { max-width: 440px; } }

/* ── Two paths (ECD / Primary) ──────────────────────────────────────────── */
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3.4vw, 48px); }
.path { display: block; }
.path .frame { aspect-ratio: 4 / 3; }
.path .media > img { transition: transform 1.4s var(--ease-out), opacity 0.8s var(--ease); }
.path:hover .media > img.is-loaded { transform: scale(1.035); }
.path__body { padding-top: 26px; }
.path__age { font-size: 15.5px; font-weight: 700; color: var(--gold-ink); }
.path .h2 { margin-top: 6px; font-size: clamp(2rem, 3.4vw, 3.1rem); }
.path p { margin-top: 12px; color: var(--ink-2); max-width: 46ch; }
.path ul { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line); }
.path li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16.5px; }
.path li span { color: var(--ink-3); }
.path .go { margin-top: 24px; }
@media (max-width: 800px) { .paths { grid-template-columns: minmax(0, 1fr); gap: 64px; } }

/* ── Reasons ────────────────────────────────────────────────────────────── */
.reasons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px clamp(24px, 3vw, 44px); list-style: none; margin: 0; padding: 0; }
.reasons li { border-top: 1px solid var(--line-2); padding-top: 22px; }
.reasons h3 { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; line-height: 1.2; letter-spacing: -0.01em; }
.reasons p { margin-top: 10px; font-size: 16.5px; color: var(--ink-2); }
@media (max-width: 1040px) { .reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .reasons { grid-template-columns: minmax(0, 1fr); } }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 28px clamp(28px, 5vw, 72px); }
.logos img { height: clamp(40px, 4vw, 56px); width: auto; filter: grayscale(1); opacity: 0.75; transition: filter 0.35s, opacity 0.35s; }
.logos img:hover { filter: none; opacity: 1; }

/* ── Facts row ──────────────────────────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.facts > div { padding: 24px clamp(14px, 2vw, 28px) 26px 0; }
.facts > div + div { padding-left: clamp(14px, 2vw, 28px); border-left: 1px solid var(--line); }
.facts dt { font-size: 14.5px; font-weight: 600; color: var(--ink-3); }
.facts dd { margin-top: 6px; font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.4rem); line-height: 1.1; letter-spacing: -0.015em; }
@media (max-width: 800px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ── Photo cards & rails ────────────────────────────────────────────────── */
.pcard { display: block; }
.pcard .frame { aspect-ratio: var(--ar, 4 / 5); }
.pcard .media > img { transition: transform 1.4s var(--ease-out), opacity 0.8s var(--ease); }
.pcard:hover .media > img.is-loaded { transform: scale(1.04); }
.pcard h3 { margin-top: 16px; font-family: var(--serif); font-weight: 500; font-size: 1.45rem; line-height: 1.2; }
.pcard p { margin-top: 6px; font-size: 16px; color: var(--ink-2); }
.pcard .meta { margin-top: 16px; }
.pcard .meta + h3 { margin-top: 4px; }
.grid-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px clamp(18px, 2.4vw, 32px); }
@media (max-width: 1000px) { .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-cards { grid-template-columns: minmax(0, 1fr); } }

.rail { position: relative; }
.rail__track {
  display: flex; gap: clamp(16px, 2vw, 28px); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
  padding-bottom: 8px;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__track > * { flex: none; width: clamp(270px, 28vw, 380px); scroll-snap-align: start; }
.rail--wide .rail__track > * { width: clamp(290px, 44vw, 620px); }
.rail__nav { display: flex; justify-content: flex-end; gap: 10px; width: min(100% - 2 * var(--gutter), var(--maxw)); margin: 24px auto 0; }
.rail__btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink); transition: background-color 0.25s, color 0.25s, opacity 0.25s, box-shadow 0.25s; }
.rail__btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); box-shadow: none; }
.rail__btn:disabled { opacity: 0.3; cursor: default; }
.rail__btn svg { width: 18px; height: 18px; }

/* ── Pinned horizontal (desktop) ────────────────────────────────────────── */
.hs { position: relative; overflow: hidden; }
.hs__track { display: flex; gap: clamp(18px, 2vw, 32px); padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2)); width: max-content; }
.hs__item { flex: none; width: clamp(300px, 32vw, 520px); }
.hs__item .frame { aspect-ratio: 4 / 5; }
.hs__item h3 { margin-top: 18px; font-family: var(--serif); font-weight: 500; font-size: 1.55rem; }
.hs__item p { margin-top: 6px; font-size: 16px; color: var(--ink-2); max-width: 38ch; }
.hs__progress { width: min(100% - 2 * var(--gutter), var(--maxw)); margin: 40px auto 0; height: 2px; background: var(--line); }
.hs__progress span { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.hs.is-pinned .hs__item .frame { aspect-ratio: auto; height: min(56vh, 580px); }
.hs:not(.is-pinned) .hs__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hs:not(.is-pinned) .hs__track::-webkit-scrollbar { display: none; }
.hs:not(.is-pinned) .hs__item { scroll-snap-align: start; width: min(80vw, 420px); }
.hs:not(.is-pinned) .hs__progress { display: none; }

/* ── Full-bleed statement photo ─────────────────────────────────────────── */
.statement { position: relative; min-height: min(96vh, 980px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; isolation: isolate; }
.statement > .media--fill { z-index: -2; }
.statement::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(10, 18, 51, 0.85) 0%, rgba(10, 18, 51, 0.35) 45%, rgba(10, 18, 51, 0) 72%); }
.statement .wrap { padding-block: clamp(64px, 10vw, 140px); }
.statement .h1 { color: #fff; max-width: 13ch; }
.statement .h1 em { color: var(--gold); }
.statement .lead { color: rgba(255, 255, 255, 0.86); margin-top: 0.7em; max-width: 44ch; }
.statement .go { color: var(--gold); margin-top: 26px; }

/* ── Feature rows ───────────────────────────────────────────────────────── */
.feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 110px); align-items: center; }
.feature + .feature { margin-top: clamp(72px, 10vw, 150px); }
.feature--flip > :first-child { order: 2; }
.feature .frame { aspect-ratio: 5 / 4; }
.feature .h3 { margin-bottom: 14px; }
.feature p { color: var(--ink-2); }
@media (max-width: 900px) { .feature { grid-template-columns: minmax(0, 1fr); } .feature--flip > :first-child { order: 0; } }

/* ── Definition lists, checklists, steps, FAQ ───────────────────────────── */
.specs { border-top: 1px solid var(--line); }
.specs > div { display: grid; grid-template-columns: minmax(120px, 0.4fr) 1fr; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: 15px; font-weight: 650; color: var(--ink-3); }
.specs dd { font-size: 17px; line-height: 1.5; }
@media (max-width: 520px) { .specs > div { grid-template-columns: 1fr; gap: 2px; } }
.ticks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 17px; color: var(--ink-2); }
.ticks li svg { width: 20px; height: 20px; margin-top: 3px; color: var(--navy); }
.dark .ticks li svg { color: var(--gold); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; border-top: 1px solid var(--line-2); }
.steps li { counter-increment: s; display: grid; grid-template-columns: clamp(56px, 7vw, 96px) 1fr; gap: 16px; padding: clamp(22px, 2.6vw, 32px) 0; border-bottom: 1px solid var(--line-2); }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; color: var(--navy); }
.steps h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.2; }
.steps p { margin-top: 6px; color: var(--ink-2); }

.faq { border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line-2); interpolate-size: allow-keywords; }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 28px; gap: 24px; align-items: center; padding: clamp(20px, 2.2vw, 28px) 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary b { font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.25; letter-spacing: -0.01em; transition: color 0.2s; }
.faq summary:hover b { color: var(--navy); }
.faq summary i { position: relative; width: 20px; height: 20px; justify-self: end; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.4s var(--ease-out); }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i::after { transform: rotate(0deg); }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.5s var(--ease-io), content-visibility 0.5s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq__a { padding: 0 48px clamp(22px, 2.4vw, 30px) 0; color: var(--ink-2); max-width: 70ch; }
.faq__a > * + * { margin-top: 0.8em; }
.faq__a a { color: var(--navy); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.faq__a ul { padding-left: 1.2em; }

/* ── People ─────────────────────────────────────────────────────────────── */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 44px clamp(16px, 2vw, 28px); }
.person .frame { aspect-ratio: 4 / 5; }
.person .media { --pos: 50% 18%; }
.person h3 { margin-top: 16px; font-family: var(--serif); font-weight: 500; font-size: 1.4rem; line-height: 1.2; }
.person p { margin-top: 3px; font-size: 15.5px; color: var(--ink-3); }
.grade { display: grid; grid-template-columns: minmax(150px, 0.7fr) minmax(0, 2.3fr); gap: 24px clamp(24px, 5vw, 80px); padding-block: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line-2); }
.grade .h2 { font-size: clamp(2rem, 3.4vw, 3rem); }
.grade .people { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; gap: 20px; }
@media (max-width: 800px) { .grade { grid-template-columns: minmax(0, 1fr); } }

/* ── Segmented control ──────────────────────────────────────────────────── */
.seg { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(18, 24, 51, 0.06); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg__btn { position: relative; z-index: 1; padding: 11px 20px; border-radius: 999px; white-space: nowrap; font-size: 15.5px; font-weight: 600; color: var(--ink-2); transition: color 0.3s var(--ease); }
.seg__btn[aria-selected="true"], .seg__btn[aria-pressed="true"] { color: var(--ink); }
.seg__pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--white); box-shadow: 0 1px 3px rgba(18, 24, 51, 0.14); transition: transform 0.5s var(--ease-out), width 0.5s var(--ease-out); }
.tabpanel[hidden] { display: none; }
.tabpanel.is-entering { animation: fade-up 0.7s var(--ease-out) both; }

/* ── Gallery ────────────────────────────────────────────────────────────── */
.masonry { columns: 3 300px; column-gap: clamp(12px, 1.4vw, 20px); }
.masonry > a { display: block; margin-bottom: clamp(18px, 2vw, 28px); break-inside: avoid; }
.masonry .media > img { transition: transform 1.2s var(--ease-out), opacity 0.8s var(--ease); }
.masonry > a:hover .media > img.is-loaded { transform: scale(1.035); }
.masonry .cap { margin-top: 10px; }
[data-cat].is-out { display: none !important; }
[data-cat].is-in-anim { animation: fade-up 0.6s var(--ease-out) both; animation-delay: calc(var(--k, 0) * 35ms); }
@media (max-width: 600px) { .masonry { columns: 2; } .masonry .cap { font-size: 13px; } }

/* PhotoSwipe skin */
.pswp { --pswp-bg: #07091a; --pswp-placeholder-bg: #1a1f3a; font-family: var(--sans); }
.pswp__wps-caption { position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: min(90vw, 720px); padding: 9px 18px; border-radius: 999px; font-size: 15px; color: #fff; background: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-align: center; pointer-events: none; }
.pswp__wps-caption:empty { display: none; }

/* ── Instagram ──────────────────────────────────────────────────────────── */
/* Square tiles; on wide screens the first is a 2×2 feature. A square frame
   two columns wide is exactly two rows plus one gap tall, so the mosaic stays flush. */
.ig { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.3vw, 18px); }
.ig__item:first-child { grid-column: span 2; grid-row: span 2; }
.ig__post { display: block; border-radius: var(--r); }
.ig__post .frame { aspect-ratio: 1; }
.ig__post .media > img { transition: transform 1.2s var(--ease-out), opacity 0.8s var(--ease); }
.ig__cap {
  position: absolute; inset: auto 0 0; z-index: 1; padding: 44px 16px 14px;
  font-size: 15px; font-weight: 600; line-height: 1.35; color: #fff;
  background: linear-gradient(0deg, rgba(10, 18, 51, 0.86) 0%, rgba(10, 18, 51, 0.5) 55%, rgba(10, 18, 51, 0) 100%);
  opacity: 0; transform: translateY(8px); transition: opacity 0.35s var(--ease), transform 0.5s var(--ease-out); pointer-events: none;
}
.ig__cap > span:first-child { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ig__type { position: absolute; top: 12px; right: 12px; z-index: 1; color: #fff; filter: drop-shadow(0 1px 4px rgba(10, 18, 51, 0.55)); }
.ig__type svg { display: none; width: 20px; height: 20px; }
.ig__post[data-type="multi"] .i-multi, .ig__post[data-type="video"] .i-video { display: block; }
.ig__post:focus-visible .ig__cap { opacity: 1; transform: none; }
@media (hover: hover) {
  .ig__post:hover .ig__cap { opacity: 1; transform: none; }
  .ig__post:hover .media > img.is-loaded { transform: scale(1.04); }
}
/* The feature tile always carries its caption, set like the site's other photo captions */
@media (min-width: 701px) {
  .ig__item:first-child .ig__cap { opacity: 1; transform: none; padding: 80px clamp(18px, 2vw, 28px) clamp(16px, 1.8vw, 24px); font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 1.9vw, 1.75rem); line-height: 1.2; letter-spacing: -0.01em; }
}
.ig__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; margin-top: clamp(32px, 4vw, 52px); padding-top: clamp(24px, 2.8vw, 32px); border-top: 1px solid var(--line-2); }
.ig__handle { display: inline-flex; align-items: center; gap: 16px; }
.ig__badge { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--navy); color: #fff; transition: background-color 0.25s var(--ease); }
.ig__badge svg { width: 24px; height: 24px; }
.ig__handle b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.15; letter-spacing: -0.01em; transition: color 0.2s; }
.ig__handle b + span { display: block; margin-top: 2px; font-size: 15px; color: var(--ink-3); }
.ig__handle:hover b { color: var(--navy); }
.ig__handle:hover .ig__badge { background: var(--navy-ink); }
/* Phones: a tight 3 × 3 grid, like the profile it links to */
@media (max-width: 700px) {
  .ig { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ig__item:first-child { grid-column: auto; grid-row: auto; }
  .ig__post, .ig__post .frame { border-radius: 8px; }
  .ig__type { top: 7px; right: 7px; }
  .ig__type svg { width: 16px; height: 16px; }
  .ig__foot .btn { width: 100%; }
}

/* ── Content from the admin panel ───────────────────────────────────────── */
/* A person or photo slot the admin panel has left empty: initials, or a short note */
.media--blank { display: grid; place-items: center; background: var(--navy-soft); color: var(--navy); }
.media--blank span { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -0.01em; }
.media--note span { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--ink-3); }
.honours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 64px) clamp(36px, 7vw, 120px); align-items: start; }
@media (max-width: 900px) { .honours { grid-template-columns: minmax(0, 1fr); } }
/* ECD staff: each colour group's teacher, ringed in the group's colour */
/* .groups.groups--staff outranks the base .groups rules, which come later in this file */
.groups.groups--staff li { display: flex; flex-direction: column; align-items: flex-start; }
.groups.groups--staff li b { display: flex; align-items: center; gap: 9px; }
.groups--staff li b i { width: 10px; height: 10px; margin: 0; flex: none; }
.groups__pic { width: clamp(72px, 7vw, 92px); aspect-ratio: 1; border-radius: 50%; margin: 4px 0 18px 2px; box-shadow: 0 0 0 3px var(--ivory), 0 0 0 5px var(--c); }
.groups__pic .media { --pos: 50% 22%; }
.groups__pic .media--blank { background: color-mix(in srgb, var(--c) 14%, var(--white)); color: var(--c); }
.groups__pic .media--blank span { font-size: 1.6rem; color: var(--c); }
.groups .groups__name { display: block; margin-top: 8px; font-size: 16px; font-weight: 650; line-height: 1.35; color: var(--ink); }
.groups .groups__note { display: block; margin-top: 2px; }

/* ── Forms & contact list ───────────────────────────────────────────────── */
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: 15px; font-weight: 650; }
.field input, .field textarea { width: 100%; font: inherit; font-size: 17px; color: var(--ink); padding: 14px 16px; border-radius: var(--r-sm); background: var(--white); border: 1.5px solid var(--line-2); transition: border-color 0.2s, box-shadow 0.2s; -webkit-appearance: none; appearance: none; }
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.12); }
.form__status { font-size: 16px; }
.form__status.is-ok { color: #16704a; }
.form__status.is-err { color: #b3261e; }
.btn.is-busy { opacity: 0.6; pointer-events: none; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.contacts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.contacts li { border-bottom: 1px solid var(--line-2); }
.contacts li > a, .contacts li > div { display: grid; grid-template-columns: 26px 1fr; gap: 16px; padding: 18px 0; }
.contacts svg { width: 22px; height: 22px; color: var(--navy); margin-top: 2px; }
.dark .contacts svg { color: var(--gold); }
.contacts small { display: block; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.contacts b { font-size: 18px; font-weight: 600; word-break: break-word; }
.contacts a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.map { border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; background: var(--ivory); position: relative; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 700px) { .map { aspect-ratio: 4 / 5; } }

/* ── Next steps (pre-footer) ────────────────────────────────────────────── */
.next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.next .h2 { max-width: 11ch; }
.next .lead { margin-top: 16px; max-width: 34ch; }
.next__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.next__list li { border-bottom: 1px solid var(--line-2); }
.next__list a { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 22px 0; }
.next__list b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.15; transition: color 0.2s; }
.next__list a > span > span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 16px; }
.next__list svg { width: 22px; height: 22px; transition: transform 0.4s var(--ease-out); }
.next__list a:hover b { color: var(--gold); }
.next__list a:hover svg { transform: translateX(5px); }
@media (max-width: 900px) { .next { grid-template-columns: minmax(0, 1fr); } }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.ft { background: var(--ivory); color: var(--ink-2); font-size: 15.5px; padding: clamp(56px, 7vw, 88px) 0 32px; }
.ft a { transition: color 0.2s; }
.ft a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ft__top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); gap: 40px clamp(40px, 6vw, 96px); padding-bottom: 48px; border-bottom: 1px solid var(--line-2); }
.ft__brand { display: flex; gap: 16px; align-items: flex-start; }
.ft__brand img { width: 56px; flex: none; }
.ft__brand b { display: block; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; color: var(--ink); }
.ft__brand p { margin-top: 8px; font-size: 15px; color: var(--ink-3); max-width: 30ch; }
.ft__reach { margin-top: 28px; display: grid; gap: 10px; }
.ft__reach a, .ft__reach span { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.ft__reach svg { width: 18px; height: 18px; color: var(--navy); flex: none; }
.ft__dir { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.ft__dir h3 { font-size: 13px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.ft__dir ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ft__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; padding-top: 26px; font-size: 14.5px; color: var(--ink-3); }
.ft__bottom nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.ft__social { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.ft__social a { display: inline-flex; align-items: center; gap: 7px; }
.ft__social svg { width: 18px; height: 18px; }
@media (max-width: 1000px) { .ft__top { grid-template-columns: minmax(0, 1fr); } .ft__dir { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Mobile quick actions */
.mbar { display: none; }
@media (max-width: 700px) {
  .mbar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 120;
    display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 6px; padding: 6px; border-radius: 999px;
    background: rgba(251, 250, 246, 0.92); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
    box-shadow: 0 12px 36px -12px rgba(10, 18, 51, 0.35), inset 0 0 0 1px var(--line);
    transition: transform 0.5s var(--ease-out);
  }
  .mbar.is-hidden { transform: translateY(calc(100% + 30px)); }
  .mbar a { display: flex; align-items: center; justify-content: center; gap: 7px; height: 48px; border-radius: 999px; font-size: 15px; font-weight: 650; }
  .mbar svg { width: 19px; height: 19px; }
  .mbar a.is-primary { background: var(--navy); color: #fff; }
  .ft { padding-bottom: 110px; }
}

/* ── Page pieces ────────────────────────────────────────────────────────── */
.mascot { width: clamp(130px, 13vw, 190px); pointer-events: none; }
.groups { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.groups li { padding: 22px 18px 24px; border-left: 1px solid var(--line); }
.groups li:first-child { border-left: 0; padding-left: 0; }
.groups li i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--c); margin-bottom: 14px; }
.groups li b { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.35rem; }
.groups li span { font-size: 14.5px; color: var(--ink-3); }
@media (max-width: 900px) { .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } .groups li:nth-child(odd) { border-left: 0; padding-left: 0; } .groups li:nth-child(n + 3) { border-top: 1px solid var(--line); } }
.big-time { font-family: var(--serif); font-size: clamp(4rem, 11vw, 10rem); line-height: 0.9; letter-spacing: -0.04em; }
.big-time span { color: var(--ink-3); }
.exam { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.exam__logo { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); padding: 16%; }
.exam__logo img { max-height: 140px; width: auto; object-fit: contain; }
@media (max-width: 800px) { .exam { grid-template-columns: minmax(0, 1fr); } .exam__logo { max-width: 320px; } }
.dl { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px clamp(24px, 4vw, 56px); padding: clamp(24px, 3vw, 40px); border-radius: var(--r); background: var(--white); border: 1px solid var(--line); }
.dl__doc { width: 64px; height: 80px; border-radius: 8px; display: grid; place-items: center; background: var(--navy-soft); color: var(--navy); position: relative; }
.dl__doc svg { width: 30px; height: 30px; }
.dl__doc span { position: absolute; left: -6px; bottom: 8px; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; background: #c62f35; color: #fff; }
.dl p { margin-top: 4px; color: var(--ink-3); font-size: 16px; }
@media (max-width: 800px) { .dl { grid-template-columns: auto 1fr; } .dl .btn { grid-column: 1 / -1; } }
.honour { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.honour .frame { aspect-ratio: 4 / 5; }
.honour p { margin-top: 10px; color: var(--ink-2); }
@media (max-width: 600px) { .honour { grid-template-columns: 1fr; } }
.tl { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.tl > li { display: grid; grid-template-columns: minmax(110px, 0.5fr) minmax(0, 1.5fr); gap: 16px clamp(24px, 5vw, 80px); padding: clamp(32px, 4vw, 56px) 0; border-bottom: 1px solid var(--line-2); }
.tl__year { font-family: var(--serif); font-size: clamp(2.6rem, 5.4vw, 4.8rem); line-height: 0.95; letter-spacing: -0.03em; color: var(--navy); }
.tl h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.2; }
.tl p { margin-top: 10px; color: var(--ink-2); max-width: 58ch; }
.tl .frame { margin-top: 24px; aspect-ratio: 16 / 9; max-width: 720px; }
@media (max-width: 700px) { .tl > li { grid-template-columns: minmax(0, 1fr); } }
.values { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.values li { padding: clamp(18px, 2.2vw, 28px) 0; border-bottom: 1px solid var(--line-2); font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 3.4rem); line-height: 1.08; letter-spacing: -0.02em; }
.cols-2 { columns: 2 320px; column-gap: clamp(32px, 5vw, 72px); }
.cols-2 > * { break-inside: avoid; }
.nf { min-height: 100svh; display: grid; align-items: center; padding-block: calc(var(--gn-h) + 40px) 60px; }
.nf__inner { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 40px; align-items: center; }
@media (max-width: 800px) { .nf__inner { grid-template-columns: 1fr; } .nf .mascot { order: -1; width: 150px; } }

/* ── Film dialog ────────────────────────────────────────────────────────── */
.film { width: min(100% - 24px, 1200px); max-width: none; padding: 0; border: 0; background: transparent; overflow: visible; }
.film::backdrop { background: rgba(5, 8, 24, 0.9); }
.film__box { position: relative; border-radius: var(--r); overflow: hidden; background: #000; animation: fade-up 0.5s var(--ease-out) both; }
.film video { width: 100%; aspect-ratio: 16 / 9; }
.film__close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); color: #fff; }
.film__close svg { width: 20px; height: 20px; }

/* Pinned horizontal: fit the heading, photos and captions inside one screen */
.hs.is-pinned { height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.hs.is-pinned .head { margin-bottom: clamp(24px, 4vh, 48px); }

/* ── Motion ─────────────────────────────────────────────────────────────── */
/* First-screen headline lines animate with CSS alone, so they never wait on a script download */
.intro .ln-mask > span { animation: line-up 1.2s var(--ease-out) both; animation-delay: calc(0.12s + var(--l, 0) * 0.1s); }
.intro .fade-in { animation: fade-up 1.1s var(--ease-out) both; animation-delay: var(--d, 0.4s); }
@keyframes line-up { from { transform: translateY(108%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }


/* Cross-document page transitions */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.25s var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in 0.5s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* Lenis smooth scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .scene { height: auto; }
  .scene__stick { position: relative; height: auto; }
  .scene__copy { position: relative; transform: none; opacity: 1; padding-bottom: 48px; }
  .scene__frame { position: relative; height: 70vh; clip-path: none; margin: 0 var(--gutter) var(--gutter); border-radius: var(--r); overflow: hidden; }
  .scene__frame video { transform: none; }
  .scene__cap { opacity: 1; }
  @view-transition { navigation: none; }
}
@media print { .gn, .ln, .mbar, .scene__frame, .vctl, .rail__nav { display: none !important; } }

/* Three-column reasons + learning video frame */
.reasons--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1040px) { .reasons--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .reasons--3 { grid-template-columns: minmax(0, 1fr); } }
.ph-video { position: relative; aspect-ratio: 21 / 9; background: var(--midnight); }
.ph-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-video .vctl { position: absolute; right: 18px; bottom: 18px; }
@media (max-width: 900px) { .ph-video { aspect-ratio: 4 / 3; } }
.card-specs { margin-top: 14px; }
.card-specs .specs > div { grid-template-columns: minmax(96px, 0.45fr) 1fr; padding: 10px 0; }
.card-specs .specs dt { font-size: 14px; }
.card-specs .specs dd { font-size: 15.5px; }
.quote-block { border-left: 2px solid var(--gold-warm); padding-left: clamp(20px, 3vw, 40px); }
.quote-block p { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.4rem); line-height: 1.25; letter-spacing: -0.012em; }
.reasons--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) { .reasons--2 { grid-template-columns: minmax(0, 1fr); } }
