/* ==========================================================================
   Breightmet School — main stylesheet
   --------------------------------------------------------------------------
   One hand-written stylesheet, no frameworks. Organised with cascade layers
   so later layers always win without specificity battles:

     reset → base → layout → components → pages → utilities

   CONTENTS
     1.  Fonts
     2.  Design tokens (colours, type, spacing)  ← change the brand here
     3.  Reset
     4.  Base elements (body, headings, links, focus)
     5.  Layout helpers (container, section, grids)
     6.  Header: top bar, masthead, primary navigation
     7.  Page hero & breadcrumb
     8.  Buttons & small UI (eyebrow, badges, icons)
     9.  Cards (link, document, value, person, news, contact)
     10. Content components (prose, callout, figures, tables, filter)
     11. Home page sections
     12. Page-specific components
     13. Footer & back-to-top
     14. Motion (reveal on scroll, keyframes, reduced motion)
     15. Utilities
     16. Print
   ========================================================================== */

@layer reset, base, layout, components, pages, utilities;

/* --------------------------------------------------------------------------
   1. Fonts — self-hosted (no third-party requests, GDPR-friendly)
   Lexend: designed to improve reading fluency — a good fit for a SEND school.
   Fraunces: warm, characterful serif for headings.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Lexend";
  src: url("/assets/fonts/lexend-latin-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-var.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Design tokens
   Brand greens are sampled from the school logo (#0c603c / #0c843c / #54b454).
   -------------------------------------------------------------------------- */
:root {
  /* Brand greens */
  --forest-950: #062418;
  --forest-900: #0a3323;
  --forest-800: #0b4a31;
  --forest-700: #0c603c; /* primary brand colour */
  --forest-600: #0b7a42;
  --green-500: #0c843c;
  --leaf-400: #54b454;
  --leaf-300: #8fd18a;
  --leaf-100: #e3f3df;
  --leaf-50: #f2f9f0;

  /* Friendly accents (used for icons and highlights, never body text) */
  --sun-400: #f4b63f;
  --sun-100: #fdf1d6;
  --sky-500: #2f7fc1;
  --sky-100: #e2eef9;
  --coral-500: #d65f3a;
  --coral-100: #fbe6de;

  /* Neutrals */
  --cream: #f8f5ee;
  --sand: #eee7d8;
  --ink: #13221a;
  --ink-soft: #33443b;
  --muted: #56655b;
  --line: #dde5dc;
  --white: #ffffff;

  /* Semantic roles */
  --text: var(--ink);
  --heading: var(--forest-900);
  --link: var(--forest-600);
  --link-hover: var(--forest-800);
  --focus: var(--forest-950);
  --focus-halo: var(--sun-400);

  /* Typography */
  --font-body: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --fs-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.3rem);
  --fs-h4: 1.2rem;
  --fs-h3: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.7vw, 2.75rem);
  --fs-h1: clamp(2.2rem, 1.55rem + 3vw, 3.9rem);
  --fs-display: clamp(2.5rem, 1.6rem + 4.2vw, 4.6rem);

  /* Spacing & layout */
  --gutter: clamp(1rem, 4vw, 2rem);
  --container: 1200px;
  --container-narrow: 820px;
  --section-space: clamp(3.5rem, 7vw, 6.25rem);

  /* Shape & depth */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 36px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(6 36 24 / 0.06), 0 2px 8px rgb(6 36 24 / 0.05);
  --shadow-md: 0 6px 16px rgb(6 36 24 / 0.08), 0 16px 40px rgb(6 36 24 / 0.08);
  --shadow-lg: 0 24px 64px rgb(6 36 24 / 0.18);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.3s;

  /* Header heights (used for sticky offsets) */
  --nav-height: 3.5rem;
}

/* --------------------------------------------------------------------------
   3. Reset (modern, minimal)
   -------------------------------------------------------------------------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { min-height: 100vh; }
  img, picture, svg, video, iframe { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: 0; padding: 0; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  table { border-collapse: collapse; }
  [hidden] { display: none !important; }
}

/* --------------------------------------------------------------------------
   4. Base elements
   -------------------------------------------------------------------------- */
@layer base {
  html {
    scroll-padding-top: calc(var(--nav-height) + 1rem);
    color-scheme: light;
  }
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
  }

  body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.012em;
    color: var(--heading);
    text-wrap: balance;
  }
  h1 { font-size: var(--fs-h1); }
  h2 { font-size: var(--fs-h2); }
  h3 { font-size: var(--fs-h3); }
  h4 { font-size: var(--fs-h4); }

  p, li { text-wrap: pretty; }
  strong, b { font-weight: 600; }

  a {
    color: var(--link);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color var(--dur), text-decoration-color var(--dur);
  }
  a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }

  /* One clear, high-contrast focus style everywhere (WCAG 2.4.7 / 2.4.11) */
  :focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px var(--focus-halo);
  }

  ::selection { background: var(--leaf-300); color: var(--forest-950); }

  /* <main tabindex="-1"> receives focus from the skip link — no ring needed */
  [tabindex="-1"]:focus { outline: none; box-shadow: none; }

  /* Elements that slide in from the side must never cause sideways scrolling.
     "clip" (unlike "hidden") keeps position: sticky working. */
  main { overflow-x: clip; }

  hr { border: 0; border-top: 1px solid var(--line); }
}

/* --------------------------------------------------------------------------
   5. Layout helpers
   -------------------------------------------------------------------------- */
@layer layout {
  .container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
  }
  .container--narrow { width: min(100% - 2 * var(--gutter), var(--container-narrow)); }

  .section { padding-block: var(--section-space); position: relative; }
  .section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
  .section--flush-top { padding-top: 0; }
  .section--cream { background: var(--cream); }
  .section--leaf { background: var(--leaf-50); }
  .section--dark {
    background: var(--forest-900);
    color: #dcebe1;
    --heading: var(--white);
    --link: var(--leaf-300);
    --link-hover: var(--white);
    --focus: var(--sun-400);
    --focus-halo: transparent;
  }

  .section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
  .section-head--center { text-align: center; margin-inline: auto; }
  .section-head--split {
    max-width: none;
    display: flex; flex-wrap: wrap; gap: 1.25rem 2rem;
    align-items: end; justify-content: space-between;
  }
  .section-head > * + * { margin-top: 0.75rem; }

  /* Two-column split that collapses on small screens */
  .split {
    display: grid;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
  }
  .split > * { min-width: 0; }
  @media (min-width: 900px) {
    .split { grid-template-columns: 1fr 1fr; }
    .split--wide-left { grid-template-columns: 1.15fr 0.85fr; }
    .split--wide-right { grid-template-columns: 0.85fr 1.15fr; }
    .split--top { align-items: start; }
  }

  /* Responsive card grids */
  .card-grid {
    display: grid;
    gap: clamp(1rem, 2.5vw, 1.75rem);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  }
  .card-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); max-width: 920px; }
  .card-grid--2.is-centered { margin-inline: auto; }
  .card-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
  .card-grid--docs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }

  /* Vertical rhythm for stacked content */
  .flow > * + * { margin-top: var(--flow-space, 1em); }
}

/* --------------------------------------------------------------------------
   6. Header: top bar, masthead, primary navigation
   -------------------------------------------------------------------------- */
@layer components {
  .skip-link {
    position: absolute; left: 1rem; top: 0; z-index: 100;
    padding: 0.75rem 1.25rem;
    background: var(--forest-950); color: var(--white);
    font-weight: 600; text-decoration: none;
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    transform: translateY(-110%);
    transition: transform 0.2s var(--ease-out);
  }
  .skip-link:focus { transform: translateY(0); color: var(--white); }

  /* Icon sprite + generic icon sizing */
  .sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
  .icon {
    width: 1.25em; height: 1.25em; flex: none;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .icon--fill { fill: currentColor; stroke: none; }

  /* ---- Top bar (desktop) ---- */
  .topbar {
    display: none;
    background: var(--forest-950);
    color: #cfe2d6;
    font-size: var(--fs-xs);
    letter-spacing: 0.01em;
  }
  @media (min-width: 900px) { .topbar { display: block; } }
  .topbar__inner {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    min-height: 2.5rem;
  }
  .topbar__hours, .topbar__links a {
    display: inline-flex; align-items: center; gap: 0.5rem;
  }
  .topbar .icon { color: var(--leaf-300); width: 1.05em; height: 1.05em; }
  .topbar__links { display: flex; gap: 1.75rem; }
  .topbar a { color: inherit; text-decoration: none; }
  .topbar a:hover { color: var(--white); text-decoration: underline; }
  .topbar :focus-visible { --focus: var(--sun-400); --focus-halo: transparent; }

  /* ---- Masthead ---- */
  .masthead {
    position: sticky; top: 0; z-index: 60;
    background: rgb(255 255 255 / 0.94);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow var(--dur);
  }
  .masthead.is-scrolled { box-shadow: var(--shadow-sm); }
  @media (min-width: 1100px) {
    .masthead { position: relative; border-bottom: 0; background: var(--white); }
  }
  .masthead__inner {
    display: flex; align-items: center; gap: 1rem;
    min-height: 4.5rem;
  }
  @media (min-width: 1100px) { .masthead__inner { min-height: 6.25rem; } }

  .brand {
    display: inline-flex; align-items: center; gap: 0.8rem;
    color: var(--forest-900); text-decoration: none;
    margin-right: auto;
  }
  .brand:hover { color: var(--forest-900); }
  .brand__logo {
    width: 52px; height: 52px; border-radius: 50%;
    transition: transform 0.5s var(--ease-out);
  }
  .brand:hover .brand__logo { transform: rotate(-8deg) scale(1.04); }
  @media (min-width: 1100px) { .brand__logo { width: 72px; height: 72px; } }
  .brand__text { display: grid; line-height: 1.1; }
  .brand__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.15rem, 1rem + 0.9vw, 1.65rem);
    letter-spacing: -0.01em;
  }
  .brand__tagline {
    margin-top: 0.3rem;
    font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--forest-600);
  }

  .masthead__actions { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); }
  .masthead__contact {
    display: none; align-items: center; gap: 0.75rem;
    color: var(--forest-900); text-decoration: none; line-height: 1.25;
  }
  @media (min-width: 1100px) { .masthead__contact { display: inline-flex; } }
  .masthead__contact small { display: block; font-size: var(--fs-xs); color: var(--muted); }
  .masthead__contact strong { font-size: 1.05rem; }
  .masthead__contact:hover { color: var(--forest-600); }
  .masthead__contact-icon {
    display: grid; place-items: center;
    width: 2.75rem; height: 2.75rem; border-radius: 50%;
    background: var(--leaf-100); color: var(--forest-700);
    transition: background var(--dur), color var(--dur), transform var(--dur);
  }
  .masthead__contact:hover .masthead__contact-icon { background: var(--forest-700); color: var(--white); transform: rotate(-10deg); }
  /* (scoped to .masthead__actions so it outranks the generic .btn display rule) */
  .masthead__actions .masthead__cta { display: none; }
  @media (min-width: 640px) { .masthead__actions .masthead__cta { display: inline-flex; } }
  .brand__name { white-space: nowrap; }
  @media (max-width: 419.98px) { .brand__tagline { display: none; } }

  /* Menu (hamburger) button — mobile & tablet only */
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 0.6rem;
    min-height: 44px; padding: 0.55rem 0.95rem;
    border-radius: var(--r-pill);
    background: var(--forest-700); color: var(--white);
    font-weight: 600; font-size: var(--fs-sm);
    transition: background var(--dur);
  }
  .menu-toggle:hover { background: var(--forest-800); }
  .menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after {
    display: block; width: 18px; height: 2px; border-radius: 2px;
    background: currentColor;
    transition: transform 0.3s var(--ease-out), opacity 0.2s;
  }
  .menu-toggle__bars { position: relative; }
  .menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle__bars::before { top: -6px; }
  .menu-toggle__bars::after { top: 6px; }
  @media (min-width: 1100px) { .menu-toggle { display: none; } }

  /* ---- Primary navigation: shared ---- */
  .primary-nav__link, .primary-nav__sub a { text-decoration: none; }
  .primary-nav__toggle .icon { transition: transform 0.3s var(--ease-out); }
  .primary-nav__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }

  /* ---- Primary navigation: desktop bar (≥ 1100px) ---- */
  @media (min-width: 1100px) {
    .primary-nav {
      position: sticky; top: 0; z-index: 60;
      background: var(--forest-800);
      transition: box-shadow var(--dur);
    }
    .primary-nav.is-scrolled { box-shadow: 0 8px 24px rgb(6 36 24 / 0.22); }
    .primary-nav__head, .primary-nav__contact { display: none; }
    .primary-nav__list {
      display: flex; align-items: stretch; justify-content: space-between;
      min-height: var(--nav-height);
    }
    .primary-nav__item { position: relative; display: flex; align-items: center; }
    .primary-nav__link {
      position: relative;
      display: flex; align-items: center; height: 100%;
      padding: 0 0.85rem;
      color: #e8f3ec; font-weight: 500; font-size: 0.95rem; white-space: nowrap;
    }
    .has-sub > .primary-nav__link { padding-right: 0.2rem; }
    .primary-nav__link::after {
      content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.7rem;
      height: 2px; border-radius: 2px; background: var(--leaf-300);
      transform: scaleX(0); transform-origin: left;
      transition: transform 0.35s var(--ease-out);
    }
    .has-sub > .primary-nav__link::after { right: 0.2rem; }
    .primary-nav__link:hover, .primary-nav__item.is-current > .primary-nav__link { color: var(--white); }
    .primary-nav__link:hover::after,
    .primary-nav__item.is-current > .primary-nav__link::after { transform: scaleX(1); }
    .primary-nav__item.is-current > .primary-nav__link::after { background: var(--sun-400); }

    .primary-nav__toggle {
      display: grid; place-items: center;
      width: 1.9rem; height: 1.9rem; margin-right: 0.35rem;
      border-radius: 50%; color: #cfe2d6;
    }
    .primary-nav__toggle:hover { color: var(--white); background: rgb(255 255 255 / 0.1); }
    .primary-nav__toggle .icon { width: 1rem; height: 1rem; }
    .primary-nav :focus-visible { --focus: var(--sun-400); --focus-halo: transparent; }

    /* Dropdown panel */
    .primary-nav__sub {
      position: absolute; top: calc(100% - 0.25rem); left: 0.25rem; z-index: 5;
      min-width: 15rem; padding: 0.5rem;
      background: var(--white); border-radius: var(--r-md);
      box-shadow: var(--shadow-lg);
      opacity: 0; visibility: hidden; transform: translateY(10px);
      transition: opacity 0.25s, transform 0.3s var(--ease-out), visibility 0s 0.3s;
    }
    .primary-nav__sub::before { /* little pointer */
      content: ""; position: absolute; top: -6px; left: 1.5rem;
      width: 12px; height: 12px; background: var(--white);
      transform: rotate(45deg); border-radius: 2px;
    }
    .primary-nav__item:last-child .primary-nav__sub { left: auto; right: 0; }
    .has-sub:hover > .primary-nav__sub,
    .primary-nav__toggle[aria-expanded="true"] + .primary-nav__sub {
      opacity: 1; visibility: visible; transform: none;
      transition: opacity 0.25s, transform 0.3s var(--ease-out), visibility 0s;
    }
    .primary-nav__sub a {
      display: block; padding: 0.6rem 0.85rem; border-radius: var(--r-sm);
      color: var(--ink); font-size: 0.95rem; font-weight: 500;
      transition: background var(--dur), color var(--dur), padding var(--dur);
    }
    .primary-nav__sub a:hover { background: var(--leaf-50); color: var(--forest-700); padding-left: 1.1rem; }
    .primary-nav__sub a[aria-current="page"] { background: var(--leaf-100); color: var(--forest-800); font-weight: 600; }
    .primary-nav__sub :focus-visible { --focus: var(--forest-950); --focus-halo: var(--sun-400); }
  }

  /* ---- Primary navigation: off-canvas drawer (< 1100px) ---- */
  @media (max-width: 1099.98px) {
    .primary-nav {
      position: fixed; inset: 0 0 0 auto; z-index: 90;
      width: min(90vw, 400px);
      background: var(--white);
      box-shadow: var(--shadow-lg);
      overflow-y: auto; overscroll-behavior: contain;
      transform: translateX(100%); visibility: hidden;
      transition: transform 0.4s var(--ease-out), visibility 0s 0.4s;
    }
    .nav-open .primary-nav {
      transform: none; visibility: visible;
      transition: transform 0.4s var(--ease-out), visibility 0s;
    }
    .primary-nav__inner { width: auto; margin: 0; padding: 1rem 1.25rem 2rem; }
    .primary-nav__head {
      display: flex; align-items: center; justify-content: space-between;
      padding-bottom: 1rem; margin-bottom: 0.5rem;
      border-bottom: 1px solid var(--line);
    }
    .primary-nav__title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--forest-900); }
    .primary-nav__close {
      display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
      background: var(--leaf-50); color: var(--forest-800);
    }
    .primary-nav__close:hover { background: var(--leaf-100); }
    .primary-nav__item {
      display: grid; grid-template-columns: 1fr auto; align-items: center;
      border-bottom: 1px solid var(--line);
    }
    .primary-nav__link {
      display: block; padding: 0.9rem 0.25rem;
      color: var(--ink); font-weight: 500; font-size: 1.05rem;
    }
    .primary-nav__item.is-current > .primary-nav__link { color: var(--forest-700); font-weight: 600; }
    .primary-nav__link[aria-current="page"]::before {
      content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.6rem;
      border-radius: 50%; background: var(--leaf-400); vertical-align: middle;
    }
    .primary-nav__toggle {
      display: grid; place-items: center; width: 44px; height: 44px;
      border-radius: 50%; color: var(--forest-700);
    }
    .primary-nav__toggle:hover { background: var(--leaf-50); }
    .primary-nav__sub {
      grid-column: 1 / -1; display: none;
      padding: 0 0 0.85rem 0.5rem;
    }
    .primary-nav__toggle[aria-expanded="true"] + .primary-nav__sub { display: block; animation: fade-down 0.3s var(--ease-out); }
    .primary-nav__sub a {
      display: block; padding: 0.55rem 0.9rem;
      color: var(--ink-soft); border-left: 2px solid var(--line);
    }
    .primary-nav__sub a:hover { color: var(--forest-700); border-left-color: var(--leaf-400); }
    .primary-nav__sub a[aria-current="page"] { color: var(--forest-700); font-weight: 600; border-left-color: var(--forest-700); }
    .primary-nav__contact {
      margin-top: 1.5rem; padding: 1.1rem 1.2rem;
      background: var(--leaf-50); border-radius: var(--r-md);
      display: grid; gap: 0.6rem; font-size: var(--fs-sm);
    }
    .primary-nav__contact a, .primary-nav__contact p {
      display: flex; align-items: center; gap: 0.65rem; color: var(--forest-900); text-decoration: none;
    }
    .primary-nav__contact .icon { color: var(--forest-600); }

    .nav-overlay {
      position: fixed; inset: 0; z-index: 85;
      background: rgb(6 36 24 / 0.55);
      backdrop-filter: blur(2px);
      opacity: 0; transition: opacity 0.35s;
    }
    .nav-overlay.is-visible { opacity: 1; }
    .nav-open { overflow: hidden; }
  }
  @media (min-width: 1100px) { .nav-overlay { display: none !important; } }
}

/* --------------------------------------------------------------------------
   7. Page hero & breadcrumb (inner pages)
   -------------------------------------------------------------------------- */
@layer components {
  .page-hero {
    position: relative; isolation: isolate; overflow: hidden;
    padding-block: clamp(2.25rem, 5vw, 4.25rem) clamp(3rem, 7vw, 5.25rem);
    background:
      radial-gradient(120% 140% at 100% 0%, rgb(84 180 84 / 0.28), transparent 55%),
      linear-gradient(135deg, var(--forest-900) 0%, var(--forest-700) 100%);
    color: var(--white);
    border-radius: 0 0 var(--r-xl) var(--r-xl);
    --heading: var(--white);
    --focus: var(--sun-400);
    --focus-halo: transparent;
  }
  .page-hero::before { /* decorative handprint-tree canopy */
    content: ""; position: absolute; z-index: -1;
    right: clamp(-12rem, -8vw, -3rem); top: 50%;
    width: clamp(18rem, 42vw, 34rem); aspect-ratio: 1;
    background: url("/assets/images/canopy.svg") center / contain no-repeat;
    opacity: 0.5;
    transform: translateY(-50%);
    animation: float-slow 14s ease-in-out infinite;
  }
  .page-hero__inner { position: relative; }
  .page-hero__inner > * { max-width: 50rem; }
  .page-hero__eyebrow {
    display: inline-flex; align-items: center; gap: 0.55rem;
    margin-top: clamp(1.5rem, 3vw, 2.25rem);
    font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--leaf-300);
  }
  .page-hero__eyebrow .icon { width: 1.1rem; height: 1.1rem; }
  .page-hero__title { margin-top: 0.5rem; }
  .page-hero__lead {
    margin-top: 1.1rem; max-width: 62ch;
    font-size: var(--fs-lg); line-height: 1.6;
    color: rgb(255 255 255 / 0.88);
  }

  .breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.35rem; font-size: var(--fs-sm); }
  .breadcrumb li { display: inline-flex; align-items: center; gap: 0.35rem; color: rgb(255 255 255 / 0.75); }
  .breadcrumb li + li::before {
    content: ""; width: 0.4rem; height: 0.4rem;
    border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor;
    transform: rotate(45deg); margin-right: 0.3rem; opacity: 0.7;
  }
  .breadcrumb a { color: rgb(255 255 255 / 0.85); text-decoration: none; }
  .breadcrumb a:hover { color: var(--white); text-decoration: underline; }
  .breadcrumb [aria-current="page"] { color: var(--white); font-weight: 500; }
}

/* --------------------------------------------------------------------------
   8. Buttons & small UI
   -------------------------------------------------------------------------- */
@layer components {
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
    min-height: 48px; padding: 0.8rem 1.45rem;
    border: 2px solid transparent; border-radius: var(--r-pill);
    font-weight: 600; font-size: 0.975rem; line-height: 1.2; text-align: center;
    text-decoration: none; cursor: pointer;
    transition: transform var(--dur) var(--ease-out), background-color var(--dur),
                color var(--dur), border-color var(--dur), box-shadow var(--dur);
  }
  .btn:hover { text-decoration: none; transform: translateY(-2px); }
  .btn:active { transform: translateY(0); }
  .btn .icon { width: 1.15em; height: 1.15em; transition: transform var(--dur) var(--ease-out); }
  .btn:hover .icon--arrow { transform: translateX(4px); }

  .btn--primary { background: var(--forest-700); color: var(--white); box-shadow: 0 6px 18px rgb(12 96 60 / 0.25); }
  .btn--primary:hover { background: var(--forest-800); color: var(--white); box-shadow: 0 10px 26px rgb(12 96 60 / 0.32); }
  .btn--sun { background: var(--sun-400); color: var(--forest-950); }
  .btn--sun:hover { background: #f0a823; color: var(--forest-950); }
  .btn--outline { border-color: var(--forest-700); color: var(--forest-700); background: transparent; }
  .btn--outline:hover { background: var(--forest-700); color: var(--white); }
  .btn--light { background: var(--white); color: var(--forest-800); }
  .btn--light:hover { background: var(--leaf-100); color: var(--forest-900); }
  .btn--ghost-light { border-color: rgb(255 255 255 / 0.55); color: var(--white); }
  .btn--ghost-light:hover { background: var(--white); color: var(--forest-900); }
  .btn--sm { min-height: 40px; padding: 0.55rem 1.05rem; font-size: var(--fs-sm); }

  .btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }
  .btn-row--center { justify-content: center; }

  .eyebrow {
    display: inline-flex; align-items: center; gap: 0.65rem;
    font-size: var(--fs-xs); font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--forest-600);
  }
  .eyebrow::before {
    content: ""; width: 1.75rem; height: 2px; border-radius: 2px; background: var(--leaf-400);
  }
  .section--dark .eyebrow { color: var(--leaf-300); }

  .pill {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.9rem 0.4rem 0.5rem;
    border-radius: var(--r-pill);
    background: var(--white); color: var(--forest-800);
    font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em;
    box-shadow: var(--shadow-sm);
  }
  .pill__dot {
    display: grid; place-items: center;
    width: 1.6rem; height: 1.6rem; border-radius: 50%;
    background: var(--sun-100); color: #9a6400;
  }
  .pill__dot .icon { width: 0.95rem; height: 0.95rem; }

  /* Icon badge (square-ish rounded tile holding an icon) */
  .icon-badge {
    --badge-bg: var(--leaf-100);
    --badge-fg: var(--forest-700);
    display: grid; place-items: center; flex: none;
    width: 3.5rem; height: 3.5rem; border-radius: 1.1rem;
    background: var(--badge-bg); color: var(--badge-fg);
    transition: transform 0.4s var(--ease-out), background-color var(--dur), color var(--dur);
  }
  .icon-badge .icon { width: 1.6rem; height: 1.6rem; }
  .icon-badge--sun { --badge-bg: var(--sun-100); --badge-fg: #8a5a00; }
  .icon-badge--sky { --badge-bg: var(--sky-100); --badge-fg: #1d5f96; }
  .icon-badge--coral { --badge-bg: var(--coral-100); --badge-fg: #a3401f; }
  .icon-badge--forest { --badge-bg: var(--forest-700); --badge-fg: var(--white); }

  /* File-type tag on document cards */
  .file-tag {
    display: grid; place-items: center; flex: none;
    width: 3.25rem; height: 3.75rem; border-radius: 0.6rem 1.1rem 0.6rem 0.6rem;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
    background: var(--leaf-100); color: var(--forest-800);
    position: relative;
  }
  .file-tag::after { /* folded corner */
    content: ""; position: absolute; top: 0; right: 0;
    width: 0.9rem; height: 0.9rem;
    background: linear-gradient(225deg, var(--white) 50%, rgb(0 0 0 / 0.08) 50%);
    border-radius: 0 1.1rem 0 0.3rem;
  }
  .file-tag--pdf { background: var(--coral-100); color: #9b3517; }
  .file-tag--docx { background: var(--sky-100); color: #1b5a8f; }
  .file-tag--jpg { background: var(--sun-100); color: #7d5200; }
  .file-tag--web { background: var(--leaf-100); color: var(--forest-800); }
}

/* --------------------------------------------------------------------------
   9. Cards
   -------------------------------------------------------------------------- */
@layer components {
  .card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color var(--dur);
  }
  .card--interactive:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--leaf-300);
  }
  /* "Stretched link": the whole card is clickable, but only one link is announced */
  .card__link { text-decoration: none; color: inherit; }
  .card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
  .card__link:hover { color: inherit; }
  .card__link:focus-visible { outline: none; box-shadow: none; }
  .card:has(.card__link:focus-visible) {
    outline: 3px solid var(--focus); outline-offset: 3px;
    box-shadow: 0 0 0 7px var(--focus-halo);
  }

  /* ---- Link card (section landing pages) ---- */
  .link-card { display: flex; flex-direction: column; gap: 1.1rem; min-height: 13.5rem; }
  .link-card__title { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem); }
  .link-card__more {
    margin-top: auto;
    display: inline-flex; align-items: center; gap: 0.45rem;
    color: var(--forest-600); font-weight: 600; font-size: var(--fs-sm);
  }
  .link-card__more .icon { transition: transform var(--dur) var(--ease-out); }
  .card--interactive:hover .link-card__more .icon { transform: translateX(5px); }
  .card--interactive:hover .icon-badge { transform: rotate(-8deg) scale(1.06); background: var(--forest-700); color: var(--white); }

  /* ---- Document card ---- */
  .doc-card {
    display: flex; align-items: center; gap: 1.1rem;
    padding: 1.1rem 1.25rem;
    border-radius: var(--r-md);
  }
  .doc-card__body { flex: 1; min-width: 0; }
  .doc-card__title { font-family: var(--font-body); font-size: 1.02rem; font-weight: 600; line-height: 1.35; color: var(--ink); letter-spacing: 0; }
  .doc-card__meta { margin-top: 0.25rem; font-size: var(--fs-xs); color: var(--muted); }
  .doc-card__action {
    display: grid; place-items: center; flex: none;
    width: 2.6rem; height: 2.6rem; border-radius: 50%;
    background: var(--leaf-50); color: var(--forest-700);
    transition: background var(--dur), color var(--dur), transform var(--dur) var(--ease-out);
  }
  .doc-card__action .icon { width: 1.15rem; height: 1.15rem; }
  .card--interactive:hover .doc-card__action { background: var(--forest-700); color: var(--white); transform: scale(1.08); }
  .doc-card--static { box-shadow: none; background: var(--cream); border-style: dashed; }

  /* ---- Value card (Potential, Achievement, Growth, Empowerment) ---- */
  .value-grid {
    display: grid; gap: clamp(1rem, 2.5vw, 1.5rem);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  }
  .value-card { display: flex; flex-direction: column; gap: 0.9rem; overflow: hidden; }
  .value-card::before { /* coloured top edge */
    content: ""; position: absolute; inset: 0 0 auto; height: 5px;
    background: var(--badge-fg, var(--leaf-400));
  }
  .value-card__term { display: block; margin-bottom: 0.35rem; font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; color: var(--forest-900); }
  .value-card__sep { display: none; } /* the original "Term – text" dash; the card layout separates them */
  .value-card__text { color: var(--ink-soft); }
  .value-card:hover .icon-badge { transform: translateY(-4px) rotate(-6deg); }

  /* (Staff cards live in section 12, "Staff directory".) */

  /* ---- News card ---- */
  .news-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
  .news-card__cover {
    position: relative; display: grid; place-items: center;
    aspect-ratio: 16 / 9;
    background:
      radial-gradient(circle at 20% 20%, rgb(143 209 138 / 0.45), transparent 45%),
      linear-gradient(140deg, var(--forest-800), var(--forest-600));
    color: var(--white);
  }
  .news-card:nth-child(4n + 2) .news-card__cover { background: radial-gradient(circle at 80% 25%, rgb(244 182 63 / 0.45), transparent 50%), linear-gradient(140deg, var(--forest-900), var(--forest-700)); }
  .news-card:nth-child(4n + 3) .news-card__cover { background: radial-gradient(circle at 30% 80%, rgb(84 180 84 / 0.55), transparent 50%), linear-gradient(140deg, var(--forest-700), var(--forest-900)); }
  .news-card:nth-child(4n + 4) .news-card__cover { background: radial-gradient(circle at 75% 70%, rgb(47 127 193 / 0.45), transparent 50%), linear-gradient(140deg, var(--forest-900), var(--forest-800)); }
  .news-card__cover .icon { width: 3.25rem; height: 3.25rem; stroke-width: 1.5; transition: transform 0.5s var(--ease-out); }
  .card--interactive:hover .news-card__cover .icon { transform: scale(1.12) rotate(-6deg); }
  .news-card__type {
    position: absolute; left: 1rem; top: 1rem;
    padding: 0.25rem 0.7rem; border-radius: var(--r-pill);
    background: rgb(255 255 255 / 0.16); backdrop-filter: blur(6px);
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  }
  .news-card__body { display: flex; flex-direction: column; gap: 0.75rem; flex: 1; padding: 1.35rem 1.4rem 1.5rem; }
  .news-card__title { font-size: 1.3rem; }
  .news-card__meta { font-size: var(--fs-xs); color: var(--muted); }

  /* ---- Contact card ---- */
  .contact-card { display: flex; flex-direction: column; gap: 0.9rem; text-align: left; }
  .contact-card__title { font-size: 1.3rem; }
  .contact-card a { font-weight: 600; word-break: break-word; }
  .contact-card .card__link { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; }
  .card--interactive.contact-card:hover .card__link { color: var(--link-hover); text-decoration-thickness: 2px; }
}

/* --------------------------------------------------------------------------
   10. Content components
   -------------------------------------------------------------------------- */
@layer components {
  /* Long-form text */
  .prose { max-width: 72ch; }
  .prose > * + * { margin-top: 1.1em; }
  .prose--center { margin-inline: auto; }
  .prose h2 { margin-top: 1.8em; font-size: clamp(1.5rem, 1.25rem + 1vw, 2.1rem); }
  .prose h3 { margin-top: 1.6em; }
  .prose strong { color: var(--forest-900); }
  .section--dark .prose strong { color: var(--white); }
  /* Plain content lists get leaf bullets; styled component lists use role="list" */
  .prose ul, .prose ol { padding-left: 0; }
  .prose :is(ul, ol):not([role="list"]) > li + li { margin-top: 0.55em; }
  .prose ul:not([role="list"]) > li { position: relative; list-style: none; padding-left: 1.85rem; }
  .prose ul:not([role="list"]) > li::before { /* leaf bullet */
    content: ""; position: absolute; left: 0.2rem; top: 0.48em;
    width: 0.8rem; height: 0.8rem;
    background: var(--leaf-400);
    border-radius: 0 70% 0 70%;
    transform: rotate(-10deg);
  }
  .prose ol:not([role="list"]) { counter-reset: steps; }
  .prose ol:not([role="list"]) > li { counter-increment: steps; position: relative; list-style: none; padding-left: 2.6rem; min-height: 1.9rem; }
  .prose ol:not([role="list"]) > li::before {
    content: counter(steps); position: absolute; left: 0; top: 0.05em;
    width: 1.85rem; height: 1.85rem; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--leaf-100); color: var(--forest-800);
    font-size: 0.85rem; font-weight: 700;
  }
  .lead { font-size: var(--fs-lg); line-height: 1.65; color: var(--ink-soft); }
  .section--dark .lead { color: #dcebe1; }

  /* Checklist with icons (used for guidelines, curriculum aims, uniform) */
  .checklist { display: grid; gap: 0.75rem; }
  .checklist--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
  .checklist li {
    display: flex; gap: 0.9rem; align-items: flex-start;
    padding: 0.95rem 1.1rem;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
    transition: border-color var(--dur), transform var(--dur) var(--ease-out), box-shadow var(--dur);
  }
  .checklist li:hover { border-color: var(--leaf-300); transform: translateX(4px); box-shadow: var(--shadow-sm); }
  .checklist__icon {
    display: grid; place-items: center; flex: none;
    width: 1.9rem; height: 1.9rem; border-radius: 50%;
    background: var(--leaf-100); color: var(--forest-700);
  }
  .checklist__icon .icon { width: 1.05rem; height: 1.05rem; stroke-width: 2.5; }
  /* Variant with larger coloured icon tiles (values, principles) */
  .checklist li > .icon-badge { width: 2.75rem; height: 2.75rem; border-radius: 0.85rem; }
  .checklist li > .icon-badge .icon { width: 1.3rem; height: 1.3rem; }
  .checklist li:has(> .icon-badge) { align-items: center; }
  .checklist li:hover > .icon-badge { transform: rotate(-8deg); }

  /* Callout / notice */
  .callout {
    position: relative;
    display: grid; gap: 0.75rem;
    padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
    background: var(--sun-100);
    border: 1px solid #f3d99a; border-left: 6px solid var(--sun-400);
    border-radius: var(--r-md);
  }
  .callout__label {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    color: #7d5200;
  }
  .callout__title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--forest-900); }
  .callout > * { margin: 0; }

  /* Image frame with offset decorative block */
  .frame { position: relative; isolation: isolate; }
  .frame::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    border-radius: var(--r-xl);
    background: var(--leaf-100);
    transform: translate(clamp(10px, 2vw, 22px), clamp(10px, 2vw, 22px)) rotate(2deg);
    transition: transform 0.6s var(--ease-out);
  }
  .frame:hover::before { transform: translate(6px, 6px) rotate(0deg); }
  .frame img { width: 100%; border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
  .frame--sun::before { background: var(--sun-100); }
  .frame--logo img { box-shadow: none; background: var(--white); padding: clamp(1.5rem, 4vw, 3rem); }

  /* Responsive data table (term dates) */
  .table-wrap { overflow-x: auto; }
  .data-table { width: 100%; text-align: center; }
  .data-table th {
    padding: 0.85rem 0.75rem;
    font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  }
  .data-table td {
    padding: 1.05rem 0.75rem;
    font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; color: var(--forest-900);
    border-top: 1px solid var(--line);
  }
  .data-table .is-open { color: var(--forest-600); }
  .data-table .is-close { color: #a3401f; }
  .data-table th + th, .data-table td + td { border-left: 1px dashed var(--line); }
  @media (max-width: 640px) {
    .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .data-table, .data-table tbody, .data-table tr { display: block; }
    .data-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .data-table td {
      display: grid; gap: 0.2rem; text-align: left;
      padding: 0.85rem 1rem; border: 1px solid var(--line) !important; border-radius: var(--r-sm);
      font-size: 1rem;
    }
    .data-table td::before {
      content: attr(data-label);
      font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
    }
    .data-table td:nth-child(odd)::before { color: var(--forest-600); }
    .data-table td:nth-child(even)::before { color: #a3401f; }
  }

  /* Filter box (policies) */
  .filter { position: relative; max-width: 26rem; margin-bottom: 1.75rem; }
  .filter__label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: var(--fs-sm); color: var(--forest-900); }
  .filter__field { position: relative; }
  .filter__field .icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
  .filter input {
    width: 100%; min-height: 50px; padding: 0.7rem 1rem 0.7rem 2.9rem;
    border: 2px solid var(--line); border-radius: var(--r-pill);
    background: var(--white);
    transition: border-color var(--dur), box-shadow var(--dur);
  }
  .filter input:hover { border-color: var(--leaf-300); }
  .filter input:focus-visible { outline: none; border-color: var(--forest-700); box-shadow: 0 0 0 4px var(--leaf-100); border-radius: var(--r-pill); }
  .filter__status { margin-top: 0.5rem; font-size: var(--fs-xs); color: var(--muted); }
  .empty-state { padding: 1.5rem; border: 2px dashed var(--line); border-radius: var(--r-md); text-align: center; color: var(--muted); }

  /* Map (static image + CSS pin; links to the interactive map) */
  .map-frame { position: relative; }
  .map-frame__link {
    position: relative; display: block; overflow: hidden;
    border-radius: var(--r-xl); box-shadow: var(--shadow-md);
    background: var(--sand);
  }
  .map-frame__link:focus-visible { outline-offset: 4px; }
  .map-frame img {
    width: 100%; height: clamp(300px, 42vw, 480px); object-fit: cover;
    filter: saturate(0.85);
    transition: transform 1.2s var(--ease-out), filter var(--dur);
  }
  .map-frame__link:hover img { transform: scale(1.04); filter: saturate(1); }
  .map-pin {
    position: absolute; left: 50%; top: 50%; z-index: 1;
    display: grid; place-items: center;
    width: 3.25rem; height: 3.25rem;
    background: var(--forest-700); color: var(--white);
    border: 3px solid var(--white);
    border-radius: 50% 50% 50% 0;
    box-shadow: var(--shadow-md);
    transform: translate(-50%, -100%) rotate(-45deg);
    animation: pin-drop 0.9s 0.3s var(--ease-out) both;
  }
  .map-pin .icon { width: 1.4rem; height: 1.4rem; transform: rotate(45deg); }
  .map-pin::after { /* soft pulse on the ground */
    content: ""; position: absolute; left: -0.6rem; bottom: -0.6rem;
    width: 1.2rem; height: 1.2rem; border-radius: 50%;
    background: rgb(12 96 60 / 0.35);
    animation: pulse 2.4s 1.2s ease-out infinite;
  }
  .map-frame__label {
    position: absolute; left: 1rem; bottom: 1rem; z-index: 1;
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem 1.1rem; border-radius: var(--r-pill);
    background: var(--white); box-shadow: var(--shadow-md);
    font-weight: 600; color: var(--forest-900); font-size: var(--fs-sm);
    transition: background var(--dur), color var(--dur);
  }
  .map-frame__label .icon { color: var(--forest-700); }
  .map-frame__link:hover .map-frame__label { background: var(--forest-700); color: var(--white); }
  .map-frame__link:hover .map-frame__label .icon { color: var(--white); }
  .map-frame__credit { margin-top: 0.5rem; font-size: var(--fs-xs); color: var(--muted); text-align: right; }
  .map-frame__credit a { color: inherit; }
  .map-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 0.5rem; font-weight: 600; }
  .map-links a { display: inline-flex; align-items: center; gap: 0.4rem; }
}

/* --------------------------------------------------------------------------
   11. Home page sections
   -------------------------------------------------------------------------- */
@layer pages {
  /* ---- Hero ---- */
  .home-hero {
    position: relative; isolation: isolate; overflow: hidden;
    padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(4rem, 8vw, 6rem);
    background: var(--forest-950); /* shows while the photo loads */
    color: var(--white);
    --heading: var(--white);
  }

  /* Building photo behind the hero, with a brand-green tint: strongest behind
     the text (left on desktop, top on phones) so the words stay easy to read. */
  .home-hero__bg { position: absolute; inset: 0; z-index: -2; }
  .home-hero__bg img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: 50% 62%;
    animation: hero-settle 14s var(--ease-out) both;
  }
  .home-hero__bg::after {
    content: ""; position: absolute; inset: 0;
    background:
      linear-gradient(to top, rgb(6 36 24 / 0.55), transparent 30%),
      linear-gradient(100deg, rgb(6 36 24 / 0.86) 0%, rgb(6 36 24 / 0.66) 32%, rgb(10 51 35 / 0.3) 58%, rgb(10 51 35 / 0.12) 100%);
  }
  @media (max-width: 959.98px) {
    .home-hero__bg img { object-position: 45% 50%; }
    .home-hero__bg::after {
      background: linear-gradient(to bottom, rgb(6 36 24 / 0.5) 0%, rgb(6 36 24 / 0.68) 45%, rgb(6 36 24 / 0.85) 100%);
    }
  }
  .home-hero__grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
  .home-hero__grid > * { min-width: 0; } /* let long words wrap instead of widening the grid */
  @media (min-width: 960px) { .home-hero__grid { grid-template-columns: 1.05fr 0.95fr; } }
  .home-hero__copy > * + * { margin-top: 1.4rem; }
  .home-hero__title { font-size: clamp(2.15rem, 1.4rem + 4.2vw, 4.6rem); line-height: 1.05; text-shadow: 0 2px 18px rgb(0 0 0 / 0.25); }
  .home-hero__title .highlight { /* hand-drawn underline that also works when the words wrap */
    color: var(--leaf-300);
    padding-bottom: 0.08em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 24' preserveAspectRatio='none'%3E%3Cpath d='M3 17C60 6 140 3 297 12' fill='none' stroke='%2354b454' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 100% 0.3em no-repeat;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
    animation: draw-underline 1.1s 0.35s var(--ease-out) both;
  }
  .home-hero__lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); max-width: 34ch; color: rgb(255 255 255 / 0.9); line-height: 1.6; }

  /* Two vertical (desktop) / horizontal (mobile) scrolling photo columns */
  .photo-marquee {
    position: relative;
    display: grid; gap: 1rem;
    height: clamp(26rem, 52vw, 36rem);
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border-radius: var(--r-xl);
    mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  }
  .photo-marquee__track {
    display: flex; flex-direction: column; gap: 1rem;
    animation: marquee-y 48s linear infinite;
  }
  .photo-marquee__track:nth-child(2) { animation-direction: reverse; animation-duration: 54s; }
  .photo-marquee img {
    width: 100%; border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    background: var(--sand);
  }
  .photo-marquee:hover .photo-marquee__track,
  .photo-marquee:focus-within .photo-marquee__track,
  .photo-marquee.is-paused .photo-marquee__track { animation-play-state: paused; }
  .photo-marquee__toggle {
    position: absolute; right: 0.9rem; bottom: 0.9rem; z-index: 2;
    display: inline-flex; align-items: center; gap: 0.45rem;
    min-height: 40px; padding: 0.45rem 0.9rem;
    border-radius: var(--r-pill);
    background: rgb(255 255 255 / 0.92); color: var(--forest-900);
    font-size: var(--fs-xs); font-weight: 600;
    box-shadow: var(--shadow-md);
  }
  .photo-marquee__toggle .icon { width: 0.95rem; height: 0.95rem; }
  .photo-marquee__toggle .icon--play { display: none; }
  .photo-marquee.is-paused .photo-marquee__toggle .icon--play { display: block; }
  .photo-marquee.is-paused .photo-marquee__toggle .icon--pause { display: none; }
  .hero-badge {
    position: absolute; left: -0.5rem; bottom: 2.25rem; z-index: 3;
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 1.1rem 0.65rem 0.65rem;
    background: var(--white); border-radius: var(--r-pill); box-shadow: var(--shadow-lg);
    font-family: var(--font-display); font-weight: 600; color: var(--forest-900);
    animation: float-y 6s ease-in-out infinite;
  }
  .hero-badge img { width: 2.75rem; height: 2.75rem; border-radius: 50%; }
  .home-hero__media { position: relative; }
  @media (max-width: 959.98px) {
    .photo-marquee {
      height: auto; grid-template-columns: 1fr; gap: 0.75rem;
      mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
      -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
      border-radius: 0;
      margin-inline: calc(-1 * var(--gutter));
    }
    .photo-marquee__track { flex-direction: row; width: max-content; gap: 0.75rem; animation-name: marquee-x; }
    .photo-marquee img { width: auto; height: clamp(9rem, 30vw, 12rem); }
    .hero-badge { display: none; }
  }

  /* Decorative floating leaves behind hero */
  .deco-leaf {
    position: absolute; z-index: -1; pointer-events: none;
    width: var(--size, 3rem); aspect-ratio: 1;
    background: var(--leaf-400);
    border-radius: 0 70% 0 70%;
    opacity: 0.18;
    animation: float-y 9s ease-in-out infinite;
  }
  .deco-leaf--1 { --size: 4.5rem; top: 9%; left: 3%; }
  .deco-leaf--2 { --size: 2.25rem; top: 62%; left: 44%; background: var(--sun-400); animation-delay: -3s; }
  .deco-leaf--3 { --size: 3rem; bottom: 8%; left: 18%; transform: rotate(90deg); animation-delay: -6s; opacity: 0.12; }

  /* ---- Values overlap strip ---- */
  .values-strip { margin-top: clamp(-3rem, -4vw, -2rem); position: relative; z-index: 2; }

  /* ---- Mission band ---- */
  .mission-band {
    background: var(--forest-800);
    color: var(--white);
    padding-block: clamp(1.25rem, 3vw, 1.75rem);
    overflow: hidden;
  }
  .mission-band__title {
    color: var(--white);
    font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2.2rem);
    font-style: italic; font-weight: 600; text-align: center;
  }
  .mission-band__title .icon { display: inline-block; vertical-align: -0.12em; width: 0.9em; height: 0.9em; color: var(--leaf-300); margin-inline: 0.5rem; }

  /* ---- Head Teacher's welcome ----
     Photo "pops out" of a green circle: the cut-out image is masked to the
     circle below its centre line, but left uncut above it so the head can
     overlap the top edge. A dashed ring slowly turns behind it. */
  .ht-grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
  @media (min-width: 960px) { .ht-grid { grid-template-columns: 0.9fr 1.1fr; } }
  .ht-photo {
    position: relative; width: 100%; max-width: 30rem; margin: 2.5rem auto 0;
    aspect-ratio: 1;
  }
  .ht-photo__shape {
    position: absolute; inset: 0;
    background:
      radial-gradient(circle at 30% 25%, rgb(143 209 138 / 0.55), transparent 55%),
      linear-gradient(140deg, var(--green-500), var(--forest-800));
    border-radius: 50%;
  }
  .ht-photo__ring {
    position: absolute; inset: -14px;
    border: 2px dashed var(--leaf-400); border-radius: 50%;
    animation: spin 40s linear infinite;
  }
  .ht-photo__cutout {
    position: absolute; left: 0; right: 0; bottom: 0; height: 115%;
    /* union of: ellipse matching the circle + rectangle above the circle's centre */
    -webkit-mask: radial-gradient(ellipse 50% 43.48% at 50% 56.52%, #000 99.5%, transparent 100%),
                  linear-gradient(#000, #000) top / 100% 56.52% no-repeat;
            mask: radial-gradient(ellipse 50% 43.48% at 50% 56.52%, #000 99.5%, transparent 100%),
                  linear-gradient(#000, #000) top / 100% 56.52% no-repeat;
  }
  .ht-photo__cutout img {
    position: absolute; left: 50%; bottom: 0;
    width: 108%; max-width: none; height: auto;
    transform: translateX(-50%);
  }
  .ht-name {
    position: absolute; right: -4%; bottom: 10%; z-index: 2;
    padding: 0.8rem 1.15rem;
    background: var(--white); border-radius: var(--r-md); box-shadow: var(--shadow-md);
    line-height: 1.3;
    animation: float-y 6s ease-in-out infinite;
  }
  .ht-name strong { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--forest-900); }
  .ht-name span { font-size: var(--fs-sm); font-weight: 600; color: var(--forest-600); }
  @media (max-width: 600px) { .ht-photo { max-width: 20rem; } .ht-name { right: 0; bottom: 4%; } }

  .ht-text { position: relative; }
  .ht-text .eyebrow { font-family: var(--font-body); font-size: var(--fs-xs); letter-spacing: 0.14em; }
  .ht-quote-mark {
    display: block; height: 3.25rem; margin-top: 0.75rem;
    font-family: var(--font-display); font-size: 6rem; line-height: 1; color: var(--leaf-400);
  }
  .ht-text blockquote {
    margin: 0.5rem 0 1.4rem;
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(1.4rem, 1.15rem + 1vw, 2rem); line-height: 1.35; color: var(--forest-900);
  }
  .ht-text p + p { margin-top: 1rem; }
  .ht-signature { width: auto; height: clamp(4rem, 7vw, 5.25rem); margin-top: 1.75rem; }

  /* ---- Aim + testimonials ---- */
  .aim-statement {
    font-family: var(--font-display); font-weight: 500;
    font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.8rem); line-height: 1.45;
    color: var(--forest-900);
  }
  .aim-statement::first-letter { color: var(--forest-600); }

  /* Carousel (testimonials) */
  .carousel { position: relative; }
  .carousel__viewport { display: grid; }
  .js .carousel__slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateX(16px); transition: opacity 0.5s, transform 0.6s var(--ease-out), visibility 0s 0.6s; }
  .js .carousel__slide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity 0.5s, transform 0.6s var(--ease-out), visibility 0s; }
  .carousel__slide + .carousel__slide { margin-top: 1rem; }
  .js .carousel__slide + .carousel__slide { margin-top: 0; }
  .carousel__controls { display: none; align-items: center; gap: 0.75rem; margin-top: 1.25rem; }
  .js .carousel__controls { display: flex; }
  .carousel__btn {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: var(--white); color: var(--forest-800); border: 1px solid var(--line);
    transition: background var(--dur), color var(--dur), transform var(--dur);
  }
  .carousel__btn:hover { background: var(--forest-700); color: var(--white); transform: scale(1.06); }
  .carousel__dots { display: flex; gap: 0.5rem; }
  .carousel__dot { width: 0.75rem; height: 0.75rem; border-radius: var(--r-pill); background: var(--line); transition: width 0.35s var(--ease-out), background var(--dur); }
  .carousel__dot[aria-current="true"] { width: 2rem; background: var(--forest-700); }
  .carousel__dot:hover { background: var(--leaf-400); }

  .testimonial { display: grid; gap: 1.25rem; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--r-xl); }
  .testimonial__icon { width: 2.75rem; height: 2.75rem; color: var(--leaf-400); }
  .testimonial blockquote { font-family: var(--font-display); font-size: clamp(1.3rem, 1.15rem + 0.7vw, 1.65rem); line-height: 1.4; color: var(--forest-900); }
  .testimonial figcaption { display: flex; align-items: center; gap: 0.9rem; font-weight: 600; color: var(--forest-800); }
  .testimonial figcaption img { width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm); }
}

/* --------------------------------------------------------------------------
   12. Page-specific components
   -------------------------------------------------------------------------- */
@layer pages {
  /* Our School: learning journey */
  .journey { position: relative; display: grid; gap: 1.25rem; }
  @media (min-width: 900px) {
    .journey { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
    .journey::before { /* connecting path */
      content: ""; position: absolute; left: 12%; right: 12%; top: calc(4.5rem - 1.5px); height: 3px;
      background: repeating-linear-gradient(90deg, var(--leaf-400) 0 12px, transparent 12px 22px);
      z-index: 0;
    }
  }
  .journey__stage {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; gap: 1.25rem; text-align: center;
    padding-block: 2.25rem;
  }
  .journey__stage .icon-badge { width: 4.5rem; height: 4.5rem; border-radius: 50%; box-shadow: 0 0 0 8px var(--white), var(--shadow-md); }
  .journey__stage .icon-badge .icon { width: 2rem; height: 2rem; }
  .journey__title { font-size: 1.5rem; }
  .journey__stage:hover .icon-badge { transform: translateY(-6px) scale(1.06); }

  /* Term dates */
  .term-stack { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); max-width: 62rem; margin-inline: auto; }
  .term-card { padding: 0; overflow: hidden; display: grid; }
  .term-card__head {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.15rem 1.5rem;
    background: var(--leaf-50); border-bottom: 1px solid var(--line);
  }
  .term-card__title { font-size: 1.5rem; }
  .term-card .table-wrap { padding: 0.5rem 1rem 1rem; align-self: center; }
  @media (min-width: 900px) {
    .term-card { grid-template-columns: 14rem 1fr; }
    .term-card__head { flex-direction: column; align-items: flex-start; justify-content: center; border-bottom: 0; border-right: 1px solid var(--line); }
  }
  @media (max-width: 640px) { .term-card .table-wrap { padding: 1rem; } }
  .date-list { display: grid; gap: 0.6rem; }
  .date-list li {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 0.8rem 1rem; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line);
    font-weight: 500;
  }
  .date-list .icon { color: var(--forest-600); }
  .date-list sup { font-size: 0.65em; }

  /* OFSTED report cards */
  .split--stretch { align-items: stretch; }
  .report-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1.25rem; text-align: center;
    padding-block: clamp(2rem, 5vw, 3rem);
  }
  .report-card > * { margin: 0; }
  .report-card__image { width: clamp(9rem, 18vw, 13.75rem); }
  .file-tag--lg { width: 5.5rem; height: 6.5rem; font-size: 1.05rem; border-radius: 0.8rem 1.6rem 0.8rem 0.8rem; }
  .file-tag--lg::after { width: 1.4rem; height: 1.4rem; border-radius: 0 1.6rem 0 0.4rem; }

  /* Address card (questions & complaints) */
  .address-card { display: grid; gap: 1.25rem; }
  .address-card h2, .principles-title { font-size: clamp(1.3rem, 1.15rem + 0.8vw, 1.8rem); }
  .principles-title { margin-top: 1.75rem; margin-bottom: 1.25rem; }

  /* Designated Safeguarding Lead card (sticky beside the text on wide screens) */
  @media (min-width: 900px) { .sticky-aside { position: sticky; top: calc(var(--nav-height) + 1.5rem); } }
  .dsl-card { display: grid; gap: 1rem; border-top: 5px solid var(--forest-700); }
  .dsl-card__title { font-size: 1.35rem; }
  .dsl-list { display: grid; gap: 1rem; }
  .dsl-list li { display: flex; gap: 0.9rem; align-items: flex-start; padding-top: 1rem; border-top: 1px solid var(--line); }
  .dsl-list .icon-badge { width: 2.5rem; height: 2.5rem; border-radius: 50%; }
  .dsl-list .icon-badge .icon { width: 1.2rem; height: 1.2rem; }
  .dsl-list strong { color: var(--forest-900); }
  .address-card address { font-style: normal; font-size: 1.15rem; line-height: 1.6; color: var(--forest-900); }
  .person-row { display: flex; gap: 1rem; align-items: flex-start; }
  .person-row .lead { color: var(--forest-900); font-weight: 500; }
  .person-row p + p { margin-top: 0.25rem; }

  /* British values pillars */
  .pillar-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
  .pillar { display: flex; flex-direction: column; gap: 0.9rem; text-align: left; }
  .pillar__title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--forest-900); line-height: 1.3; }

  /* Tag cloud (SMSC activities) */
  .tag-cloud { display: flex; flex-wrap: wrap; gap: 0.6rem; }
  .tag-cloud li {
    padding: 0.55rem 1rem; border-radius: var(--r-pill);
    background: var(--white); border: 1px solid var(--line);
    font-size: var(--fs-sm); font-weight: 500; color: var(--forest-900);
    transition: background var(--dur), border-color var(--dur), transform var(--dur) var(--ease-out);
  }
  .tag-cloud li:hover { background: var(--leaf-100); border-color: var(--leaf-300); transform: translateY(-2px); }

  /* Contact list inside DSL / help callouts */
  .contact-inline { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
  .contact-inline a { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; }

  /* ---- Staff directory (Meet The Team) ---- */
  .staff-toolbar {
    display: flex; flex-wrap: wrap; gap: 1rem 1.5rem;
    align-items: center; justify-content: space-between;
    margin-bottom: 2rem;
  }
  .filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .filter-chips button {
    display: inline-flex; align-items: center; gap: 0.4rem;
    min-height: 44px; padding: 0.55rem 1.05rem;
    border: 1px solid var(--line); border-radius: var(--r-pill);
    background: var(--white); color: var(--ink);
    font-weight: 600; font-size: var(--fs-sm);
    transition: background var(--dur), color var(--dur), border-color var(--dur);
  }
  .filter-chips button:hover { border-color: var(--forest-600); color: var(--forest-700); }
  .filter-chips button[aria-pressed="true"] { background: var(--forest-700); border-color: var(--forest-700); color: var(--white); }
  .filter-chips .count {
    display: inline-grid; place-items: center;
    min-width: 1.4rem; height: 1.4rem; padding-inline: 0.3rem; border-radius: var(--r-pill);
    background: var(--leaf-100); color: var(--forest-700); font-size: 0.72rem;
  }
  .filter-chips button[aria-pressed="true"] .count { background: rgb(255 255 255 / 0.2); color: var(--white); }
  .staff-toolbar .filter { margin: 0; min-width: min(100%, 17rem); }

  .staff-grid {
    display: grid; gap: clamp(0.9rem, 2vw, 1.4rem);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  }
  @media (max-width: 520px) { .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .staff-grid--team { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 280px)); justify-content: center; }
  .staff-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
  .staff-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--leaf-300); }
  .staff-card__photo { position: relative; aspect-ratio: 1 / 1.08; overflow: hidden; background: var(--sand); }
  .staff-card__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.8s var(--ease-out); }
  .staff-card:hover .staff-card__photo img { transform: scale(1.07); }
  .staff-card__view {
    position: absolute; right: 0.8rem; bottom: 0.8rem;
    display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
    background: var(--white); color: var(--forest-700); box-shadow: var(--shadow-md);
    transform: scale(0); transition: transform 0.35s var(--ease-out);
  }
  .staff-card__view .icon { width: 1.2rem; height: 1.2rem; }
  .staff-card:hover .staff-card__view, .staff-card:focus-within .staff-card__view { transform: scale(1); }
  .staff-card__info { padding: 1.05rem 1.2rem 1.25rem; }
  .staff-card__name { font-size: 1.15rem; }
  .staff-card__name .card__link { text-align: left; }
  .staff-card__role { margin-top: 0.2rem; font-size: 0.86rem; font-weight: 600; line-height: 1.4; color: var(--forest-600); }

  /* Staff profile pop-up (native <dialog>) */
  .modal {
    width: min(760px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem);
    margin: auto; padding: 0; border: 0; border-radius: var(--r-lg);
    background: var(--white); color: var(--text);
    box-shadow: var(--shadow-lg); overflow: hidden auto;
    overscroll-behavior: contain;
  }
  .modal::backdrop { background: rgb(6 36 24 / 0.55); backdrop-filter: blur(4px); }
  .modal[open] { animation: pop 0.4s var(--ease-out); }
  .modal__inner { display: grid; grid-template-columns: 280px 1fr; }
  .modal__photo { background: var(--sand); }
  .modal__photo img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; object-position: top; }
  .modal__body { padding: clamp(1.5rem, 4vw, 2.25rem); overflow-y: auto; max-height: calc(100vh - 2rem); }
  .modal__body h2 { margin-top: 0.6rem; font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); }
  .modal__role { margin: 0.3rem 0 1.2rem; font-weight: 600; color: var(--forest-600); }
  .modal__bio > * + * { margin-top: 0.8rem; }
  .modal__contact {
    display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
    margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
    font-size: var(--fs-sm);
  }
  .modal__contact a { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; }
  .modal__close {
    position: absolute; top: 1rem; right: 1rem; z-index: 2;
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: var(--white); color: var(--ink); box-shadow: var(--shadow-md);
    transition: background var(--dur), color var(--dur);
  }
  .modal__close:hover { background: var(--forest-700); color: var(--white); }
  @media (max-width: 640px) {
    .modal__inner { grid-template-columns: 1fr; }
    .modal__photo img { min-height: 0; height: min(42vh, 22rem); object-position: center 35%; }
    .modal__body { max-height: none; overflow: visible; } /* the whole pop-up scrolls instead */
  }

  /* 404 */
  .error-code {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(5rem, 3rem + 10vw, 10rem); line-height: 1;
    color: var(--leaf-300);
  }
}

/* --------------------------------------------------------------------------
   13. Footer & back-to-top
   -------------------------------------------------------------------------- */
@layer components {
  .site-footer {
    position: relative; overflow: hidden;
    background: var(--forest-950);
    color: #c6dacd;
    padding-top: clamp(3rem, 6vw, 4.5rem);
    font-size: var(--fs-sm);
    --heading: var(--white);
    --link: #c6dacd;
    --link-hover: var(--white);
    --focus: var(--sun-400);
    --focus-halo: transparent;
  }
  .site-footer::before {
    content: ""; position: absolute; right: -8rem; bottom: -6rem;
    width: 28rem; aspect-ratio: 1;
    background: url("/assets/images/canopy.svg") center / contain no-repeat;
    opacity: 0.12; pointer-events: none;
  }
  .footer-contact { display: grid; gap: 1rem; }
  @media (min-width: 800px) { .footer-contact { grid-template-columns: repeat(3, 1fr); } }
  .footer-contact__card {
    position: relative;
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.4rem 1.5rem;
    background: rgb(255 255 255 / 0.05);
    border: 1px solid rgb(255 255 255 / 0.09);
    border-radius: var(--r-lg);
    transition: background var(--dur), transform 0.4s var(--ease-out), border-color var(--dur);
  }
  .footer-contact__card:hover { background: rgb(255 255 255 / 0.08); border-color: rgb(143 209 138 / 0.35); transform: translateY(-3px); }
  .footer-contact__card .icon-badge { --badge-bg: rgb(143 209 138 / 0.15); --badge-fg: var(--leaf-300); width: 3rem; height: 3rem; border-radius: 50%; }
  .footer-contact__card .icon-badge .icon { width: 1.3rem; height: 1.3rem; }
  .footer-contact__title { font-size: 1.2rem; margin-bottom: 0.3rem; }
  .footer-contact__card a { color: var(--white); text-decoration: none; font-weight: 500; }
  .footer-contact__card a:hover { text-decoration: underline; }

  .footer-main {
    display: grid; gap: 2.5rem;
    padding-block: clamp(2.5rem, 5vw, 3.5rem);
  }
  @media (min-width: 800px) { .footer-main { grid-template-columns: 1.3fr 1.2fr 1fr; } }
  .footer-brand { display: grid; gap: 1rem; align-content: start; max-width: 22rem; }
  .footer-brand__logo { display: flex; align-items: center; gap: 0.85rem; color: var(--white); text-decoration: none; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
  .footer-brand__logo img { width: 4rem; height: 4rem; border-radius: 50%; }
  .footer-brand__logo:hover { color: var(--white); }
  .footer-heading {
    margin-bottom: 1rem;
    font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--leaf-300);
  }
  .footer-nav ul { columns: 2; column-gap: 1.5rem; }
  .footer-nav li { break-inside: avoid; padding-block: 0.3rem; }
  .footer-nav a { text-decoration: none; display: inline-block; transition: color var(--dur), transform var(--dur) var(--ease-out); }
  .footer-nav a:hover { transform: translateX(3px); text-decoration: underline; }
  .footer-nav a[aria-current="page"] { color: var(--white); font-weight: 600; }
  .footer-details { display: grid; gap: 0.75rem; font-style: normal; }
  .footer-details p, .footer-details a { display: flex; gap: 0.65rem; align-items: flex-start; }
  .footer-details .icon { margin-top: 0.2rem; color: var(--leaf-300); }

  .footer-bottom {
    display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; align-items: center; justify-content: space-between;
    padding-block: 1.35rem;
    border-top: 1px solid rgb(255 255 255 / 0.1);
    font-size: var(--fs-xs);
  }
  .footer-bottom a { color: var(--white); }

  /* Back to top */
  .to-top {
    position: fixed; right: clamp(0.85rem, 2vw, 1.5rem); bottom: clamp(0.85rem, 2vw, 1.5rem); z-index: 50;
    display: grid; place-items: center;
    width: 3rem; height: 3rem; border-radius: 50%;
    background: var(--forest-700); color: var(--white);
    box-shadow: var(--shadow-md);
    transition: opacity var(--dur), transform 0.4s var(--ease-out), visibility 0s, background var(--dur);
  }
  .to-top:hover { background: var(--forest-900); color: var(--white); transform: translateY(-3px); }
  .js .to-top:not(.is-visible) { opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity var(--dur), transform 0.4s var(--ease-out), visibility 0s var(--dur); }
  .nav-open .to-top { display: none; }
}

/* --------------------------------------------------------------------------
   14. Motion
   Elements marked data-reveal (or children of data-reveal-group) fade up
   as they scroll into view. Only applied when JS is running (html.js).
   -------------------------------------------------------------------------- */
@layer utilities {
  .js [data-reveal],
  .js [data-reveal-group] > * {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js [data-reveal="left"] { transform: translateX(-36px); }
  .js [data-reveal="right"] { transform: translateX(36px); }
  .js [data-reveal="zoom"] { transform: scale(0.94); }
  .js [data-reveal].is-revealed,
  .js [data-reveal-group] > .is-revealed { opacity: 1; transform: none; }
}

@keyframes fade-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes float-slow { 0%, 100% { transform: translateY(-50%) rotate(0deg); } 50% { transform: translateY(-53%) rotate(4deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes pin-drop { from { opacity: 0; transform: translate(-50%, -260%) rotate(-45deg); } to { opacity: 1; transform: translate(-50%, -100%) rotate(-45deg); } }
@keyframes pulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(3); opacity: 0; } }
@keyframes hero-settle { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes draw-underline { from { background-size: 0% 0.3em; } to { background-size: 100% 0.3em; } }
@keyframes marquee-y { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 0.5rem)); } }
@keyframes marquee-x { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 0.375rem)); } }

/* Respect users who prefer less motion: no animation, everything visible */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal], .js [data-reveal-group] > * { opacity: 1; transform: none; }
  /* Photo marquee becomes a still grid of the first set of photos */
  .photo-marquee__track { animation: none !important; }
  .photo-marquee__toggle { display: none; }
}

/* --------------------------------------------------------------------------
   15. Utilities
   -------------------------------------------------------------------------- */
@layer utilities {
  .sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .text-center { text-align: center; }
  .mt-0 { margin-top: 0 !important; }
  .mt-1 { margin-top: 1rem; }
  .mt-2 { margin-top: 2rem; }
  .mt-3 { margin-top: clamp(2rem, 4vw, 3rem); }
  .mx-auto { margin-inline: auto; }
  .muted { color: var(--muted); }
}

/* --------------------------------------------------------------------------
   16. Print — clean, ink-friendly pages (e.g. printing term dates)
   -------------------------------------------------------------------------- */
@media print {
  .topbar, .primary-nav, .menu-toggle, .masthead__actions, .to-top, .nav-overlay,
  .footer-contact, .footer-nav, .photo-marquee__toggle, .carousel__controls, .map-frame, .filter, .home-hero__bg { display: none !important; }
  .masthead { position: static; border: 0; }
  .page-hero, .home-hero, .section--dark, .mission-band, .site-footer { background: none !important; color: #000 !important; --heading: #000; }
  .page-hero::before, .site-footer::before { display: none; }
  .card { box-shadow: none !important; break-inside: avoid; }
  .js [data-reveal], .js [data-reveal-group] > * { opacity: 1 !important; transform: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
