/* ==========================================================================
   CLEBS — Children Life English Boarding School
   Implements docs/CLEBS_Design_Blueprint.md. Token names match Appendix A.
   Section references in comments (§4.3 etc.) point back to the blueprint.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts — self-hosted, latin subset, variable weight 100–900 (§2.2)
   No font CDN: third-party font requests are a common source of multi-second
   delays on the Nepali and Gulf mobile networks this site is built for.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Noto Sans';
  src: url('../assets/fonts/noto-sans-latin.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Noto Serif';
  src: url('../assets/fonts/noto-serif-latin.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

/* --------------------------------------------------------------------------
   Tokens (Appendix A)
   -------------------------------------------------------------------------- */
:root {
  /* Brand — sampled from the crest, not invented (§2.1) */
  --brand-blue: #021C8B;
  --brand-red: #E80111;
  --brand-gold: #FCCF23;
  --brand-ink: #0A1533;

  /* Surface — neutrals held near hue 215° so interface greys agree with the
     blue-cast uniform greys in every photograph the school will ever take */
  --bg: #FFFFFF;
  --surface: #F4F7FB;
  --surface-sunken: #E9EEF7;
  --border: #D6DEEA;
  --border-strong: #A9B8DC;

  /* Text */
  --text: #1C2733;
  --text-muted: #4A5A6B;
  --text-subtle: #5B6B7C;
  --text-on-dark: #FFFFFF;

  /* Semantic */
  --success: #1B7A4B;
  --warning: #B26A00;
  --error: #B3261E;
  --info: #021C8B;

  /* Extended tints */
  --blue-900: #010F4D;
  --blue-500: #3E52B8;
  --blue-100: #E3E8F8;
  --red-900: #A80009;
  --red-700: #C10310;
  --red-100: #FDE7E8;
  --gold-700: #8A5200;
  --gold-100: #FFF6DC;

  /* Type */
  --font-display: 'Noto Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --type-display: clamp(2.125rem, 1.489rem + 2.826vw, 3.75rem);
  --type-h1: clamp(1.8125rem, 1.446rem + 1.630vw, 2.75rem);
  --type-h2: clamp(1.5rem, 1.255rem + 1.087vw, 2.125rem);
  --type-h3: clamp(1.25rem, 1.152rem + 0.435vw, 1.5rem);
  --type-h4: clamp(1.125rem, 1.101rem + 0.109vw, 1.1875rem);
  --type-body-lg: clamp(1.125rem, 1.076rem + 0.217vw, 1.25rem);
  --type-body: 1.0625rem;   /* 17px, not 16 — the cheapest accessibility win available (§2.2) */
  --type-body-sm: 0.9375rem;
  --type-caption: 0.875rem;
  --type-eyebrow: clamp(0.75rem, 0.726rem + 0.109vw, 0.8125rem);
  --type-button: 1rem;
  --type-stat: clamp(2.5rem, 2.109rem + 1.739vw, 3.5rem);

  /* Spacing — 4px base (§6.1) */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 16px;
  --space-5: 20px;  --space-6: 24px;  --space-8: 32px;  --space-10: 40px;
  --space-12: 48px; --space-14: 56px; --space-18: 72px; --space-24: 96px;
  --space-28: 112px;

  /* Radius (§6.2) */
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows — tinted with the brand blue, never neutral black (§6.3) */
  --shadow-xs: 0 1px 2px rgba(2, 28, 139, 0.06);
  --shadow-sm: 0 2px 6px rgba(2, 28, 139, 0.08);
  --shadow-md: 0 6px 16px rgba(2, 28, 139, 0.10);
  --shadow-lg: 0 12px 32px rgba(2, 28, 139, 0.14);
  --shadow-nav: 0 2px 12px rgba(10, 21, 51, 0.10);

  /* Motion (§11.2) */
  --motion-instant: 100ms;
  --motion-fast: 150ms;
  --motion-base: 250ms;
  --motion-slow: 400ms;
  --motion-draw: 500ms;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);

  /* Layout */
  --container: 1200px;
  --container-wide: 1360px;
  --container-reading: 720px;
  --gutter: 16px;
  --section-pad: var(--space-14);
  --section-pad-emphasis: 64px;
  --section-pad-compact: var(--space-10);

  /* Z-index (§6.5) */
  --z-nav: 100; --z-bottombar: 110; --z-dropdown: 200; --z-drawer: 300;
  --z-modal-backdrop: 400; --z-modal: 410; --z-lightbox: 500;
}

@media (min-width: 768px) {
  :root {
    --gutter: 20px;
    --section-pad: var(--space-18);
    --section-pad-emphasis: 80px;
    --section-pad-compact: var(--space-12);
  }
}
@media (min-width: 1024px) {
  :root {
    --gutter: 24px;
    --section-pad: var(--space-24);
    --section-pad-emphasis: var(--space-28);
    --section-pad-compact: 64px;
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Focus must never be hidden behind the sticky nav — WCAG 2.2 SC 2.4.11 */
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--type-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
address { font-style: normal; }
/* `hidden` must win over any component display rule that follows it */
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--type-h1); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; }
h2 { font-size: var(--type-h2); font-weight: 600; line-height: 1.20; letter-spacing: -0.01em; }
h3 { font-size: var(--type-h3); font-weight: 600; line-height: 1.30; }
h4 { font-size: var(--type-h4); font-weight: 600; line-height: 1.35; font-family: var(--font-body); }
p  { margin: 0; }

/* Every number that sits above or below another number gets tabular figures */
.tabular, time, .stat__figure, .gpa__count, .routine__time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

::selection { background: var(--brand-gold); color: var(--brand-ink); }

/* One focus indicator, everywhere. Gold is the only brand colour that holds
   contrast against white, Paper, ink and blue alike (§9.3). */
:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--brand-ink);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius-md) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--container-wide); }
.container--reading { max-width: var(--container-reading); }

.section { padding-block: var(--section-pad); }
.section--emphasis { padding-block: var(--section-pad-emphasis); }
.section--compact { padding-block: var(--section-pad-compact); }
.section--paper { background: var(--surface); }

.section-head { max-width: 640px; margin-bottom: var(--space-12); }
.section-head--wide { max-width: 780px; }

/* Eyebrow + the 50° gold rule that replaces a horizontal one (§2.3) */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--type-eyebrow);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--gold-700);
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--brand-gold);
  transform: rotate(-50deg);
  flex: none;
}
.eyebrow--on-ink { color: var(--brand-gold); }

.section-head h2 + .section-intro { margin-top: var(--space-4); }
.section-intro { font-size: var(--type-body-lg); color: var(--text-muted); max-width: 60ch; }

.section-link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin-top: var(--space-10);
  font-weight: 600; color: var(--brand-blue); text-decoration: none;
}
.section-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.section-link .arrow { transition: transform var(--motion-fast) var(--ease-out); }
.section-link:hover .arrow { transform: translateX(3px); }

/* Body copy never runs the full container — 68 characters maximum (§2.2) */
.prose { max-width: 68ch; }

/* --------------------------------------------------------------------------
   Buttons (§5.5)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--type-button);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  /* Background and border only. Never width, height or padding — a hover that
     resizes an element moves its own hit area out from under the cursor. */
  transition: background-color var(--motion-fast) var(--ease-out),
              border-color var(--motion-fast) var(--ease-out),
              color var(--motion-fast) var(--ease-out);
}
.btn--lg { min-height: 48px; padding: 0 var(--space-6); }
.btn--sm { min-height: 36px; padding: 0 var(--space-4); font-size: var(--type-body-sm); }

/* The only red buttons on the site. One conversion action, nothing else. */
.btn--red { background: var(--brand-red); color: #fff; }
.btn--red:hover { background: var(--red-700); }
.btn--red:active { background: var(--red-900); }

.btn--blue { background: var(--brand-blue); color: #fff; }
.btn--blue:hover { background: var(--blue-900); }

.btn--secondary { background: transparent; color: var(--brand-blue); box-shadow: inset 0 0 0 1.5px var(--brand-blue); }
.btn--secondary:hover { background: var(--blue-100); }

.btn--on-ink { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.5); }
.btn--on-ink:hover { background: rgba(255, 255, 255, 0.12); }

.btn:disabled { background: var(--surface-sunken); color: var(--text-subtle); cursor: not-allowed; box-shadow: none; }

/* --------------------------------------------------------------------------
   Cards (§5.4)
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--motion-base) var(--ease-out),
              transform var(--motion-base) var(--ease-out),
              border-color var(--motion-base) var(--ease-out);
}
.section--paper .card { background: var(--bg); }
.card--paper { background: var(--surface); }

.card--link:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
/* The whole card is the target; the title carries the link for assistive tech */
.card__title a { color: inherit; text-decoration: none; }
.card__title a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.card--link:focus-within { outline: 3px solid var(--brand-gold); outline-offset: 2px; }
.card--link a:focus-visible { outline: none; }

.card__title { margin-bottom: var(--space-2); }
.card__body { color: var(--text-muted); font-size: var(--type-body-sm); }

/* On ink: shadow is invisible on dark, so the border does the work */
.card--on-ink {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  color: #fff;
}
.card--on-ink .card__body { color: var(--border-strong); }
.card--on-ink.card--link:hover { border-color: rgba(255, 255, 255, 0.32); box-shadow: none; }

@media (min-width: 1024px) { .card { padding: var(--space-6); } }

/* --------------------------------------------------------------------------
   Tags, badges, the star marker and the crest diagonal (§2.3, §6.6)
   -------------------------------------------------------------------------- */
.tag {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  white-space: nowrap;
}
.tag--category { background: var(--blue-100); color: var(--brand-blue); }
.tag--new { background: var(--brand-red); color: #fff; }
.tag--honours { background: var(--gold-100); color: var(--gold-700); box-shadow: inset 0 0 0 1px var(--brand-gold); }
.tag--grade { background: var(--surface); color: var(--text-muted); }
.tag--on-ink { background: rgba(255, 255, 255, 0.12); color: #fff; }
.tag--soon { background: var(--gold-100); color: var(--gold-700); box-shadow: inset 0 0 0 1px var(--brand-gold); }

/* The signature motif: the crest's shield split at its true 50° (§2.3).
   A 140° gradient axis puts the colour boundary at exactly 50° from horizontal. */
.diagonal-badge {
  width: 24px; height: 24px; flex: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(140deg,
    var(--brand-red) 0 49.2%,
    var(--brand-gold) 49.2% 50.8%,
    var(--brand-blue) 50.8% 100%);
}
.diagonal-badge--lg { width: 48px; height: 48px; border-radius: var(--radius-md); }

/* The six-pointed star from the crest, reserved for honours lists only —
   reserving it is what makes it mean something */
.star-list { list-style: none; margin: 0; padding: 0; }
.star-list > li {
  position: relative;
  padding-left: var(--space-8);
  margin-bottom: var(--space-4);
}
.star-list > li::before {
  content: '';
  position: absolute; left: 0; top: 0.35em;
  width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolygon points='12,1 15.17,6.5 21.53,6.5 18.35,12 21.53,17.5 15.17,17.5 12,23 8.83,17.5 2.47,17.5 5.65,12 2.47,6.5 8.83,6.5' fill='none' stroke='%23FCCF23' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* --------------------------------------------------------------------------
   Announcement bar (§4.1)
   Ink, not red: a permanent red bar teaches people to ignore red, and red is
   the one signal this site holds in reserve.
   -------------------------------------------------------------------------- */
.announce {
  background: var(--brand-ink);
  border-top: 3px solid var(--brand-gold);
  color: #fff;
  font-size: var(--type-body-sm);
}
.announce[hidden] { display: none; }
.announce__inner {
  display: flex; align-items: center; justify-content: center; gap: var(--space-4);
  min-height: 52px;
  padding-block: 14px;
  text-align: center;
}
.announce__text { margin: 0; }
.announce a { color: var(--brand-gold); text-underline-offset: 3px; }
.announce__dismiss {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none; border: none; color: var(--border-strong); cursor: pointer;
  border-radius: var(--radius-sm);
}
.announce__dismiss:hover { color: #fff; }
@media (min-width: 768px) { .announce__inner { min-height: 44px; padding-block: 12px; } }

/* --------------------------------------------------------------------------
   Navigation (§4.2)
   -------------------------------------------------------------------------- */
.nav-utility {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: var(--type-caption);
}
.nav-utility__inner { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-6); min-height: 36px; }
.nav-utility a { color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.nav-utility a:hover { color: var(--brand-blue); }

.site-header { position: sticky; top: 0; z-index: var(--z-nav); }
.nav-main { background: var(--bg); border-bottom: 1px solid var(--border); transition: box-shadow var(--motion-base) var(--ease-out), background-color var(--motion-base) var(--ease-out); }
.site-header.is-scrolled .nav-main { box-shadow: var(--shadow-nav); background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px); border-bottom-color: transparent; }
.site-header.is-scrolled .nav-utility { display: none; }

.nav-main__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); min-height: 60px; }
@media (min-width: 1024px) {
  .nav-utility { display: block; }
  .nav-main__inner { min-height: 76px; transition: min-height var(--motion-base) var(--ease-out); }
  .site-header.is-scrolled .nav-main__inner { min-height: 60px; }
}

/* The school's own crest, plus a wordmark. §1.6 warns the full crest loses its
   fine detail below roughly 100px, so it is set as large as the bar allows and
   the wordmark carries the name at small sizes. */
.brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--text); }
.brand__mark { width: 44px; height: 44px; flex: none; object-fit: contain; }
.brand__word { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; color: var(--brand-blue); }
.brand__place { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
@media (min-width: 1024px) { .brand__mark { width: 60px; height: 60px; } }

/* The crest is drawn to sit on white. On the ink footer it gets a white chip
   rather than floating, so its inner field reads as part of the mark instead
   of as a hole cut in the design (§1.6). */
.brand__mark--chip {
  width: 64px; height: 64px;
  background: #fff;
  border-radius: var(--radius-full);
  padding: 5px;
}

.nav-links { display: none; }
@media (min-width: 1024px) {
  .nav-links { display: flex; align-items: center; gap: var(--space-8); list-style: none; margin: 0; padding: 0; }
  .nav-links a {
    position: relative;
    display: block; padding: var(--space-2) 0;
    font-size: var(--type-button); font-weight: 600; letter-spacing: 0.01em;
    color: var(--text); text-decoration: none;
  }
  .nav-links a::after {
    content: ''; position: absolute; left: 50%; right: 50%; bottom: -2px;
    height: 3px; background: var(--brand-gold);
    transition: left var(--motion-fast) var(--ease-out), right var(--motion-fast) var(--ease-out);
  }
  .nav-links a:hover { color: var(--brand-blue); }
  .nav-links a:hover::after, .nav-links a[aria-current="true"]::after { left: 0; right: 0; }
}

.nav-actions { display: flex; align-items: center; gap: var(--space-2); }
.nav-actions .btn { display: none; }
@media (min-width: 1024px) { .nav-actions .btn { display: inline-flex; } }

.icon-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none; border: none; border-radius: var(--radius-md);
  color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface); }
@media (min-width: 1024px) { .nav-actions .icon-btn { display: none; } }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: var(--z-drawer);
  visibility: hidden;
}
.drawer[data-state="open"] { visibility: visible; }
.drawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 21, 51, 0.55);
  opacity: 0;
  transition: opacity var(--motion-base) var(--ease-out);
}
.drawer[data-state="open"] .drawer__backdrop { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(88vw, 400px);
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--motion-base) var(--ease-out);
  overflow-y: auto;
}
.drawer[data-state="open"] .drawer__panel { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4); border-bottom: 1px solid var(--border); }
.drawer__nav { list-style: none; margin: 0; padding: var(--space-2) 0; flex: 1; }
.drawer__nav a {
  display: block; padding: var(--space-3) var(--space-5);
  font-size: var(--type-h4); font-weight: 600;
  color: var(--text); text-decoration: none;
}
.drawer__nav a:hover { background: var(--surface); color: var(--brand-blue); }
.drawer__foot { padding: var(--space-5); border-top: 1px solid var(--border); display: grid; gap: var(--space-3); }
.drawer__foot .btn { width: 100%; }
.drawer__contact { display: grid; gap: var(--space-2); font-size: var(--type-body-sm); }
.drawer__contact a { color: var(--text-muted); text-decoration: none; }

/* Mobile bottom bar — 56px of viewport traded for thumb-reach on the three
   or four things this audience returns for every week (§4.2) */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-bottombar);
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: 56px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(10, 21, 51, 0.08);
  transition: transform var(--motion-base) var(--ease-out);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-bar.is-hidden { transform: translateY(100%); }
.bottom-bar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted); text-decoration: none;
}
.bottom-bar a:hover { color: var(--brand-blue); }
.bottom-bar svg { width: 22px; height: 22px; }
@media (min-width: 1024px) { .bottom-bar { display: none; } }
body { padding-bottom: 56px; }
@media (min-width: 1024px) { body { padding-bottom: 0; } }

/* --------------------------------------------------------------------------
   Hero (§4.3)
   -------------------------------------------------------------------------- */
.hero { background: linear-gradient(180deg, var(--bg) 60%, var(--surface) 100%); }
.hero__inner { display: grid; gap: var(--space-10); padding-block: var(--space-12) var(--space-10); }

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: 7fr 5fr;
    align-items: center;
    gap: var(--space-12);
    min-height: 620px;
    padding-block: var(--space-24) 80px;
  }
}

.hero__eyebrow {
  font-size: var(--type-eyebrow); font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--gold-700);
}
.hero__headline {
  font-size: var(--type-display);
  font-weight: 700; line-height: 1.08; letter-spacing: -0.02em;
  margin-block: var(--space-5) var(--space-3);
}
.hero__attribution { font-size: var(--type-body-sm); color: var(--text-muted); }
.hero__support { font-size: var(--type-body-lg); color: var(--text-muted); margin-top: var(--space-6); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

/* No suitable hero photograph exists yet, so the image column is the specified
   fallback: an ink panel carrying the star motif and one figure in gold.
   Swap for a photograph when the shot list in §2.3 is delivered. */
.hero__panel {
  position: relative;
  background: var(--brand-ink);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-6);
  color: #fff;
  overflow: hidden;
  text-align: center;
}
/* The one permitted corner cut on the page, at the crest's true 50°:
   atan(76 / 64) = 49.9°. Once per page maximum (§2.3). */
.hero__panel::before {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 64px; height: 76px;
  background: var(--brand-gold);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}
.hero__panel-star { width: 56px; height: 56px; margin: 0 auto var(--space-6); opacity: 0.9; }
.hero__panel-figure {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--type-stat); line-height: 1; letter-spacing: -0.02em;
  color: var(--brand-gold);
}
.hero__panel-label { margin-top: var(--space-3); color: var(--border-strong); font-size: var(--type-body-sm); }
.hero__panel-note { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid rgba(255,255,255,0.16); font-size: var(--type-caption); color: var(--border-strong); }
@media (min-width: 1024px) { .hero__panel { padding: 64px var(--space-10); } }

/* --------------------------------------------------------------------------
   Parent Bridge (§4.4) — the section that distinguishes this site.
   Renders instantly, animates never: a parent came here to read it.
   -------------------------------------------------------------------------- */
.bridge {
  background: var(--brand-ink);
  border-top: 3px solid var(--brand-gold);
  color: #fff;
  padding-block: var(--section-pad-compact);
}
.bridge__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.bridge__title { font-size: var(--type-eyebrow); font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: var(--brand-gold); }
.bridge__subtitle { color: var(--border-strong); font-size: var(--type-body-sm); display: block; margin-top: var(--space-1); letter-spacing: 0; text-transform: none; font-weight: 400; }
.bridge__clock { font-size: var(--type-body-sm); color: var(--border-strong); font-variant-numeric: tabular-nums; }

.bridge__grid { display: grid; gap: var(--space-4); }
@media (min-width: 768px) { .bridge__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); } }
@media (min-width: 1024px) { .bridge__grid { grid-template-columns: repeat(4, 1fr); } }

/* Mobile: a snap-scroll row with a peek of the next card. A scroll, not a
   carousel — dragging is never the only way to reach anything (SC 2.5.7). */
@media (max-width: 767px) {
  .bridge__grid {
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-bottom: var(--space-2);
    scrollbar-width: none;
  }
  .bridge__grid::-webkit-scrollbar { display: none; }
  .bridge__card { scroll-snap-align: start; }
}

.bridge__card {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 156px;
  padding: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  text-decoration: none;
  transition: border-color var(--motion-fast) var(--ease-out), background-color var(--motion-fast) var(--ease-out);
}
.bridge__card:hover { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.07); }
.bridge__label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--brand-gold);
  margin-bottom: var(--space-3);
}
.bridge__headline { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; line-height: 1.3; margin-bottom: var(--space-2); }
.bridge__card--primary .bridge__headline { font-size: var(--type-h3); }
.bridge__meta { margin-top: auto; padding-top: var(--space-3); font-size: var(--type-caption); color: var(--border-strong); }
.bridge__meta time { display: block; }
.bridge__empty { color: var(--border-strong); font-size: var(--type-body-sm); }

/* Compact month calendar */
.mini-cal { margin-top: var(--space-1); }
.mini-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-size: 11px; text-align: center; }
.mini-cal__dow { color: var(--border-strong); font-weight: 700; padding-bottom: 2px; }
.mini-cal__day { padding: 3px 0; border-radius: var(--radius-sm); color: rgba(255,255,255,0.85); font-variant-numeric: tabular-nums; }
.mini-cal__day--today { background: var(--brand-gold); color: var(--brand-ink); font-weight: 700; }

/* --------------------------------------------------------------------------
   Statistics (§4.5) — no count-up. It delays comprehension, breaks for anyone
   who scrolls fast, and makes an institution look like a start-up dashboard.
   -------------------------------------------------------------------------- */
.stats { background: var(--surface); padding-block: var(--section-pad-compact); }
.stats__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8) var(--space-4); }
@media (min-width: 768px) {
  .stats__grid { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .stats__item + .stats__item { border-left: 1px solid var(--border); padding-left: var(--space-6); }
}
.stat__figure {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--type-stat); line-height: 1; letter-spacing: -0.02em;
  color: var(--brand-blue);
  white-space: nowrap;
}
/* A figure that is a range rather than a number needs the room to stay on one
   line in a 2-column mobile grid */
.stat__figure--range { font-size: clamp(1.75rem, 1.359rem + 1.739vw, 3.5rem); }
.stat__label { margin-top: var(--space-3); font-size: var(--type-caption); color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Why families choose CLEBS (§4.6)
   -------------------------------------------------------------------------- */
.reasons { display: grid; gap: var(--space-6); }
@media (min-width: 768px) { .reasons { grid-template-columns: repeat(2, 1fr); gap: var(--space-8); } }
@media (min-width: 1024px) { .reasons { grid-template-columns: repeat(4, 1fr); } }

/* Mobile stacks the icon inline-left rather than above, which halves the run */
.reason { display: grid; grid-template-columns: 32px 1fr; gap: var(--space-4); align-items: start; }
@media (min-width: 768px) { .reason { grid-template-columns: 1fr; gap: var(--space-5); } }
.reason__icon { width: 32px; height: 32px; color: var(--brand-blue); }
.reason h3 { margin-bottom: var(--space-2); }
.reason p { color: var(--text-muted); font-size: var(--type-body-sm); }

/* --------------------------------------------------------------------------
   Programmes pathway (§4.7)
   A grid says "we offer five things". A connected pathway says "your child can
   stay here from age three to eighteen" — which is the actual argument.
   -------------------------------------------------------------------------- */
.pathway { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); }
@media (min-width: 1024px) { .pathway { grid-template-columns: repeat(5, 1fr); gap: var(--space-5); padding-top: var(--space-8); } }

/* Desktop: the rule runs horizontally through the nodes */
.pathway__rule { display: none; }
@media (min-width: 1024px) {
  .pathway__rule {
    display: block; position: absolute;
    top: 8px; left: 10%; right: 10%; height: 2px;
    background: var(--brand-blue);
    transform-origin: left center;
    transition: transform var(--motion-draw) ease-in-out;
  }
  .pathway.is-visible .pathway__rule { transform: scaleX(1); }
}

.stage { position: relative; display: flex; flex-direction: column; }
.stage__card { flex: 1; }
@media (min-width: 1024px) { .stage { padding-top: var(--space-6); } }
.stage__node {
  position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: var(--radius-full);
  background: var(--brand-gold); box-shadow: 0 0 0 3px var(--bg);
  display: none;
}
@media (min-width: 1024px) { .stage__node { display: block; } }

/* Mobile: a vertical timeline. Never a horizontal scroll — a parent must be
   able to see that the pathway is complete. */
@media (max-width: 1023px) {
  .pathway { padding-left: var(--space-8); }
  .pathway::before {
    content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px;
    width: 2px; background: var(--border);
  }
  .stage::before {
    content: ''; position: absolute; left: calc(var(--space-8) * -1 + 1px); top: 22px;
    width: 14px; height: 14px; border-radius: var(--radius-full);
    background: var(--brand-gold); box-shadow: 0 0 0 3px var(--bg);
  }
}

.stage__card { height: 100%; }
/* The two +2 cards are terminal stages and carry a gold top edge */
.stage--terminal .stage__card { border-top: 3px solid var(--brand-gold); }
.stage__range { font-size: var(--type-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-700); margin-bottom: var(--space-2); }

/* --------------------------------------------------------------------------
   Boarding Life (§4.8) — ink, entered on the 4° section transition.
   The steep 50° cut is reserved for small marks; a full-width 50° edge would
   destroy a third of a mobile viewport.
   -------------------------------------------------------------------------- */
.boarding {
  position: relative;
  background: var(--brand-ink);
  color: #fff;
  padding-block: calc(var(--section-pad-emphasis) + 4vw) var(--section-pad-emphasis);
  clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 100%);
  margin-top: -1px;
}
.boarding h2, .boarding h3 { color: #fff; }
.boarding .section-intro { color: var(--border-strong); }

.routine { list-style: none; margin: 0 0 var(--space-12); padding: 0; position: relative; display: grid; gap: var(--space-5); }
@media (min-width: 768px) { .routine { grid-template-columns: repeat(5, 1fr); gap: var(--space-4); padding-top: var(--space-6); } }
.routine__rule { display: none; }
@media (min-width: 768px) {
  .routine__rule {
    display: block; position: absolute; top: 6px; left: 10%; right: 10%;
    height: 2px; background: rgba(255, 255, 255, 0.25);
  }
}
.routine__step { position: relative; padding-left: var(--space-6); }
@media (min-width: 768px) { .routine__step { padding-left: 0; padding-top: var(--space-6); text-align: center; } }
.routine__step::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 12px; height: 12px; border-radius: var(--radius-full);
  background: var(--brand-gold);
}
@media (min-width: 768px) { .routine__step::before { left: 50%; top: 0; transform: translateX(-50%); } }
.routine__name { font-weight: 600; }
.routine__time { display: block; font-size: var(--type-caption); color: var(--border-strong); margin-top: 2px; }

.boarding__cards { display: grid; gap: var(--space-5); }
@media (min-width: 768px) { .boarding__cards { grid-template-columns: repeat(3, 1fr); } }
.boarding__note { margin-top: var(--space-10); font-size: var(--type-body-sm); color: var(--border-strong); }

/* --------------------------------------------------------------------------
   School Life (§4.9)
   With fewer than six usable photographs the section is a star list, by
   design. Padding it with weak photographs would be the worse outcome.
   -------------------------------------------------------------------------- */
.activities { display: grid; gap: var(--space-6) var(--space-8); }
@media (min-width: 640px) { .activities { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .activities { grid-template-columns: repeat(3, 1fr); } }
.activity { position: relative; padding-left: var(--space-8); }
.activity__name { font-family: var(--font-display); font-size: var(--type-h4); font-weight: 600; }
.activity p { font-size: var(--type-body-sm); color: var(--text-muted); margin-top: var(--space-1); }

/* --------------------------------------------------------------------------
   Achievements (§4.10)
   -------------------------------------------------------------------------- */
.achievements { display: grid; gap: var(--space-6); }
@media (min-width: 768px) { .achievements { grid-template-columns: repeat(3, 1fr); } }
.achievement__head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.achievement__date { font-size: var(--type-caption); color: var(--text-muted); margin-top: var(--space-3); }

.honours-panel {
  margin-top: var(--space-8);
  background: var(--gold-100);
  border: 1px solid var(--brand-gold);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.honours-panel h3 { margin-bottom: var(--space-5); }
.gpa { display: grid; gap: var(--space-4); }
.gpa__row { display: grid; gap: 6px; }
.gpa__head { display: flex; justify-content: space-between; font-size: var(--type-body-sm); }
.gpa__count { color: var(--gold-700); font-weight: 600; }
.gpa__track { height: 8px; border-radius: var(--radius-full); background: rgba(138, 82, 0, 0.14); overflow: hidden; }
.gpa__fill { height: 100%; border-radius: var(--radius-full); background: var(--gold-700); }
.honours-panel__source { margin-top: var(--space-5); font-size: var(--type-caption); color: var(--gold-700); }

/* --------------------------------------------------------------------------
   Notices & Events (§4.11) — rows, not cards. This is a list people scan.
   -------------------------------------------------------------------------- */
.notices__layout { display: grid; gap: var(--space-10); }
@media (min-width: 1024px) { .notices__layout { grid-template-columns: 2fr 1fr; gap: var(--space-12); align-items: start; } }

.tabs { display: flex; gap: var(--space-2); border-bottom: 1px solid var(--border); margin-bottom: var(--space-2); }
.tab {
  position: relative;
  min-height: 44px; padding: 0 var(--space-5);
  background: none; border: none; cursor: pointer;
  font-size: var(--type-button); font-weight: 600; color: var(--text-muted);
}
.tab[aria-selected="true"] { color: var(--brand-blue); }
.tab::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--brand-gold);
  transform: scaleX(0);
  transition: transform var(--motion-base) var(--ease-out);
}
.tab[aria-selected="true"]::after { transform: scaleX(1); }

.rows { list-style: none; margin: 0; padding: 0; }
.row {
  position: relative;
  display: grid; gap: var(--space-1);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 640px) {
  .row { grid-template-columns: 1fr auto; align-items: center; gap: var(--space-4); }
}
.row:hover { background: var(--surface); }
.row__title { font-weight: 600; color: var(--text); text-decoration: none; }
/* Only a linked title makes the whole row a target — a disclosure row must
   leave its own expanded panel clickable */
a.row__title::after { content: ''; position: absolute; inset: 0; }
.row:hover a.row__title { color: var(--brand-blue); }
.row__title--static { cursor: default; }

/* Notice that opens in place, using the same disclosure as the FAQ */
.row__title--toggle {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  width: 100%; padding: 0; text-align: left;
  background: none; border: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--text);
}
.row__title--toggle:hover { color: var(--brand-blue); }
.row__chevron { flex: none; color: var(--brand-blue); transition: transform var(--motion-base) var(--ease-out); }
.row__title--toggle[aria-expanded="true"] .row__chevron { transform: rotate(180deg); }
.row__panel { grid-column: 1 / -1; overflow: hidden; height: 0; transition: height var(--motion-base) var(--ease-out); }
.row__panel-inner { padding-top: var(--space-3); color: var(--text-muted); font-size: var(--type-body-sm); max-width: 68ch; }
.row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); font-size: var(--type-caption); color: var(--text-muted); }
.row__dates { display: grid; }
.row__bs { color: var(--text-subtle); }

.event { display: grid; grid-template-columns: 56px 1fr; gap: var(--space-4); align-items: center; }
.event__date {
  display: grid; place-items: center;
  padding: var(--space-2) 0;
  background: var(--surface); border-radius: var(--radius-md);
  line-height: 1.1;
}
.event__day { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.event__mon { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }

.empty-state {
  padding: var(--space-8) var(--space-5);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--type-body-sm);
}
.empty-state strong { display: block; color: var(--text); font-size: var(--type-body); margin-bottom: var(--space-2); }

.cal-panel { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); background: var(--bg); }
.cal-panel__month { font-family: var(--font-display); font-weight: 600; font-size: var(--type-h4); margin-bottom: var(--space-1); }
.cal-panel__bs { font-size: var(--type-caption); color: var(--text-muted); margin-bottom: var(--space-4); }
.cal-panel .mini-cal__grid { font-size: var(--type-body-sm); gap: 3px; }
.cal-panel .mini-cal__dow { color: var(--text-muted); }
.cal-panel .mini-cal__day { color: var(--text); padding: 6px 0; }
.cal-panel .mini-cal__day--today { background: var(--brand-blue); color: #fff; }

/* --------------------------------------------------------------------------
   Leadership (§4.12 slot)
   The blueprint specifies a Principal's message. No real excerpt or portrait
   exists yet, and inventing one would break the rule this site is built on,
   so the slot carries the verified leadership record instead.
   -------------------------------------------------------------------------- */
.leaders { display: grid; gap: var(--space-6); }
@media (min-width: 768px) { .leaders { grid-template-columns: repeat(2, 1fr); } }
.leader { display: grid; grid-template-columns: 64px 1fr; gap: var(--space-5); align-items: center; }
.leader__avatar {
  width: 64px; height: 64px; border-radius: var(--radius-full);
  background: var(--blue-100); color: var(--brand-blue);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
}
.leader__role { font-size: var(--type-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-700); }
.leader__name { font-family: var(--font-display); font-size: var(--type-h3); font-weight: 600; margin-top: 2px; }
.leader__np { color: var(--text-muted); font-size: var(--type-body-sm); }

/* --------------------------------------------------------------------------
   Gallery (§4.13)
   -------------------------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-1); }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery__tile {
  position: relative; display: block;
  aspect-ratio: 1 / 1;
  border: none; padding: 0; margin: 0;
  background: var(--surface-sunken);
  cursor: pointer; overflow: hidden;
}
.gallery__tile img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--motion-base) var(--ease-out); }
.gallery__tile:hover img { transform: scale(1.04); }
.gallery__tile:focus-visible { outline-offset: -3px; }
.gallery__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--space-5) var(--space-3) var(--space-3);
  background: linear-gradient(180deg, transparent, rgba(10, 21, 51, 0.85));
  color: #fff; font-size: var(--type-caption); text-align: left;
}
.gallery__placeholder {
  display: grid; place-items: center;
  aspect-ratio: 1 / 1;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  color: var(--text-subtle);
  font-size: var(--type-caption);
  text-align: center; padding: var(--space-4);
}

/* --------------------------------------------------------------------------
   Modal (§6.6)
   Carries the first-visit development notice. The blueprint asks that modals be
   used sparingly; this is a deliberate third one, and it is meant to be
   switched off in content.js once the site's information is confirmed.
   -------------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: none; }
.modal.is-open { display: grid; place-items: center; padding: var(--space-4); }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10, 21, 51, 0.55); }
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - var(--space-8));
  overflow-y: auto;
  background: var(--bg);
  border-radius: var(--radius-xl);
  border-top: 3px solid var(--brand-gold);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  animation: modal-in var(--motion-base) var(--ease-out);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } }
.modal__close {
  position: absolute; top: var(--space-3); right: var(--space-3);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none; border: none; border-radius: var(--radius-md);
  color: var(--text-muted); cursor: pointer;
}
.modal__close:hover { background: var(--surface); color: var(--text); }
.modal__panel > .tag { align-self: flex-start; }
.modal__title { margin: var(--space-4) 0 var(--space-4); padding-right: var(--space-8); }
.modal__body { display: grid; gap: var(--space-4); color: var(--text-muted); }
.modal__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.modal__actions .btn { flex: 1 1 200px; }

/* Full-screen below 480px */
@media (max-width: 479px) {
  .modal.is-open { padding: 0; place-items: stretch; }
  .modal__panel {
    max-width: none; max-height: none; min-height: 100vh;
    border-radius: 0;
    padding: var(--space-6) var(--space-5) var(--space-10);
    display: flex; flex-direction: column; justify-content: center;
  }
}

.lightbox { position: fixed; inset: 0; z-index: var(--z-lightbox); display: none; }
.lightbox[open], .lightbox.is-open { display: grid; place-items: center; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(10, 21, 51, 0.92); }
.lightbox__figure { position: relative; max-width: min(1100px, 92vw); max-height: 86vh; margin: 0; }
.lightbox__figure img { max-height: 78vh; width: auto; border-radius: var(--radius-md); }
.lightbox__caption { color: #fff; font-size: var(--type-body-sm); margin-top: var(--space-4); text-align: center; }
.lightbox__close {
  position: absolute; top: max(var(--space-4), env(safe-area-inset-top)); right: var(--space-4);
  width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(255,255,255,0.12); color: #fff;
  border: none; border-radius: var(--radius-full); cursor: pointer;
}
.lightbox__close:hover { background: rgba(255,255,255,0.24); }

/* --------------------------------------------------------------------------
   Admissions (§4.14)
   -------------------------------------------------------------------------- */
.steps { list-style: none; margin: 0 0 var(--space-12); padding: 0; position: relative; display: grid; gap: var(--space-6); counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(5, 1fr); gap: var(--space-5); padding-top: var(--space-6); } }
.steps__rule { display: none; }
@media (min-width: 768px) {
  .steps__rule {
    display: block; position: absolute; top: 19px; left: 10%; right: 10%; height: 2px;
    background: var(--border);
    transform-origin: left center;
    transition: transform var(--motion-draw) ease-in-out;
  }
  .steps.is-visible .steps__rule { transform: scaleX(1); }
}
.step { position: relative; padding-left: 56px; counter-increment: step; }
@media (min-width: 768px) { .step { padding-left: 0; padding-top: var(--space-10); } }
.step::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: var(--brand-blue); color: #fff;
  font-family: var(--font-display); font-weight: 700;
  box-shadow: 0 0 0 4px var(--bg);
}
@media (min-width: 768px) { .step::before { left: 50%; transform: translateX(-50%); } }
.step__name { font-weight: 600; }
.step p { font-size: var(--type-body-sm); color: var(--text-muted); margin-top: var(--space-1); }
@media (min-width: 768px) { .step { text-align: center; } }

.cta-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand-gold);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-5);
  text-align: center;
}
@media (min-width: 768px) { .cta-panel { padding: var(--space-10); } }
.cta-panel h3 { margin-bottom: var(--space-3); }
.cta-panel p { color: var(--text-muted); max-width: 52ch; margin-inline: auto; }
.cta-panel__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-top: var(--space-8); }
/* Many families here will always prefer to call. The phone is not a lesser path. */
.cta-panel__actions .btn { flex: 1 1 220px; max-width: 300px; }

/* --------------------------------------------------------------------------
   FAQ (§4.15)
   -------------------------------------------------------------------------- */
.faq { max-width: 800px; margin-inline: auto; }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-5) 0;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-display); font-size: var(--type-h4); font-weight: 600;
  color: var(--text); text-align: left;
}
.faq__chevron { flex: none; transition: transform var(--motion-base) var(--ease-out); color: var(--brand-blue); }
.faq__trigger[aria-expanded="true"] .faq__chevron { transform: rotate(180deg); }
.faq__panel { overflow: hidden; height: 0; transition: height var(--motion-base) var(--ease-out); }
.faq__panel-inner { padding-bottom: var(--space-5); color: var(--text-muted); max-width: 68ch; }

/* --------------------------------------------------------------------------
   Contact (§4.15)
   -------------------------------------------------------------------------- */
.contact__layout { display: grid; gap: var(--space-10); }
@media (min-width: 1024px) { .contact__layout { grid-template-columns: 5fr 7fr; gap: var(--space-12); align-items: start; } }
.contact__list { display: grid; gap: var(--space-6); }
.contact__item { display: grid; grid-template-columns: 24px 1fr; gap: var(--space-4); }
.contact__item svg { width: 24px; height: 24px; color: var(--brand-blue); }
.contact__label { font-size: var(--type-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; }
.contact__item a { color: var(--text); text-decoration: none; }
.contact__item a:hover { color: var(--brand-blue); text-decoration: underline; }

.form { display: grid; gap: var(--space-5); }
.field { display: grid; gap: var(--space-2); }
.field label { font-weight: 600; font-size: var(--type-body-sm); }
.field .req { color: var(--text-muted); font-weight: 400; }
.field input, .field textarea {
  min-height: 48px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  font-size: var(--type-body);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--brand-blue); border-width: 1.5px; }
.field__help { font-size: var(--type-caption); color: var(--text-muted); }
.form__note { font-size: var(--type-caption); color: var(--text-muted); }

/* Form result (§5.10). Errors use --error, never the brand red, and always
   carry an icon-free but explicit label plus a route that works now. */
.form-status {
  display: grid; gap: var(--space-2);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--type-body-sm);
}
.form-status strong { font-size: var(--type-body); }
.form-status--success {
  background: #EAF6EF; color: #1B5E3A;
  border-left: 3px solid var(--success);
}
.form-status--error {
  background: #FDECEA; color: #8F1D17;
  border-left: 3px solid var(--error);
}
.form-status--error a { color: inherit; }

.map-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.map-panel__body { padding: var(--space-6); display: grid; gap: var(--space-4); }
.map-panel__coords { font-size: var(--type-caption); color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Footer (§4.15) — the institutional record. Full postal address in real
   text on every page, for local search and for officials.
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--brand-ink);
  border-top: 3px solid var(--brand-gold);
  color: var(--border-strong);
  padding-top: var(--space-18);
  padding-bottom: var(--space-10);
  font-size: var(--type-body-sm);
}
.footer__grid { display: grid; gap: var(--space-10); }
@media (min-width: 640px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--space-8); } }
.footer h2, .footer h3 { color: #fff; }
.footer__heading { font-family: var(--font-body); font-size: var(--type-caption); font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: #fff; margin-bottom: var(--space-5); }
.footer__brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.footer__brand .brand__name { color: #fff; }
.footer__brand .brand__place { color: var(--border-strong); }
.footer__motto { color: var(--brand-gold); font-family: var(--font-display); font-size: var(--type-h4); line-height: 1.4; }
.footer__estd { margin-top: var(--space-3); font-size: var(--type-caption); }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.footer__list a, .site-footer address a { color: var(--border-strong); text-decoration: none; }
.footer__list a:hover, .site-footer address a:hover { color: #fff; text-decoration: underline; }
.site-footer address { font-style: normal; display: grid; gap: var(--space-3); }
.footer__bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6);
  justify-content: space-between;
  font-size: var(--type-caption);
}

/* --------------------------------------------------------------------------
   Motion (§11) — reveals fire once, and never on anything a parent might be
   trying to read urgently.
   -------------------------------------------------------------------------- */
/* Scoped to .js so that with scripting off, slow or broken, every section is
   fully readable rather than invisible (§9.9). The class is set by an inline
   script in <head>, before first paint. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--motion-slow) var(--ease-out), transform var(--motion-slow) var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 60ms; }
.reveal[data-delay="2"] { transition-delay: 120ms; }
.reveal[data-delay="3"] { transition-delay: 180ms; }
.reveal[data-delay="4"] { transition-delay: 240ms; }
.reveal[data-delay="5"] { transition-delay: 300ms; }

/* The hero's single orchestrated entrance — the only one on the page */
.hero__enter > * { opacity: 0; transform: translateY(12px); animation: enter var(--motion-slow) var(--ease-out) forwards; }
.hero__enter > *:nth-child(1) { animation-delay: 0ms; }
.hero__enter > *:nth-child(2) { animation-delay: 60ms; }
.hero__enter > *:nth-child(3) { animation-delay: 120ms; }
.hero__enter > *:nth-child(4) { animation-delay: 180ms; }
.hero__enter > *:nth-child(5) { animation-delay: 240ms; }
@keyframes enter { to { opacity: 1; transform: none; } }

/* The pathway and admissions rules only start at zero width when scripting is
   available to draw them; otherwise they are simply present */
.js .pathway__rule, .js .steps__rule { transform: scaleX(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__enter > * { opacity: 1; transform: none; animation: none; }
  .pathway__rule, .steps__rule { transform: scaleX(1) !important; }
  /* Hover scale on gallery tiles becomes a border change instead */
  .gallery__tile:hover img { transform: none; }
  .gallery__tile:hover { outline: 3px solid var(--brand-gold); outline-offset: -3px; }
}

/* Print: the address and contact details must survive a printed page */
@media print {
  .site-header, .bottom-bar, .announce, .hero__actions, .cta-panel__actions, .form { display: none; }
  body { padding-bottom: 0; color: #000; }
  .boarding, .bridge, .site-footer { background: #fff; color: #000; clip-path: none; }
}
