/* ==========================================================================
   Candi's Play + Pre-school: site stylesheet
   One file for every page. Sections:
   1. Tokens   2. Base   3. Layout   4. Typography   5. Buttons & links
   6. Header & navigation   7. Footer   8. Shared components
   9. Page sections (home, classes, gallery, events, blog, forms, contact)
   10. Motion & utilities
   Breakpoints: 640px (large phone), 900px (tablet), 1100px (desktop nav)
   ========================================================================== */

/* 0. FONTS: self-hosted Nunito Sans (SIL Open Font License), matching the live site's clean sans */
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/nunito-sans-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched fallback so text barely moves when the web font arrives (measured against the font file) */
@font-face {
  font-family: 'Nunito Sans Fallback';
  src: local('Arial'), local('Helvetica');
  size-adjust: 101.64%;
  ascent-override: 99.47%;
  descent-override: 34.73%;
  line-gap-override: 0%;
}

/* 1. TOKENS ---------------------------------------------------------------- */
:root {
  /* Brand palette: the five colours used on candisplayschool.co.za, kept fully saturated */
  --c-green: #0abe67;
  --c-green-hover: #09ad5d;
  --c-green-dark: #0C5335;    /* headings and dark brand text */
  --c-green-text: #0a7d44;    /* green that passes AA as small text */
  --c-green-soft: #D8F5E6;
  --c-red: #fd2f18;
  --c-red-deep: #e0250d;      /* same hue, deep enough for white text / AA */
  --c-red-soft: #FDE3DE;
  --c-yellow: #fece00;
  --c-yellow-hover: #f2c200;
  --c-purple: #97448c;
  --c-blue: #1888de;
  --c-blue-deep: #1473c4;
  --c-blue-light: #4aa9ff;
  --stripe: linear-gradient(90deg, var(--c-green) 0 20%, var(--c-red) 0 40%, var(--c-yellow) 0 60%, var(--c-purple) 0 80%, var(--c-blue) 0);

  /* Light tints of the brand colours for section backgrounds */
  --tint-green: #E3F6EA;
  --tint-yellow: #FFF5CC;
  --tint-blue: #E2F0FC;
  --tint-purple: #F3E6F1;
  --tint-red: #FDE7E3;

  /* Neutrals */
  --c-cream: #F7FAF6;         /* page background, as on the live site */
  --c-paper: #FFFFFF;
  --c-sand: #E9F7EF;          /* light green wash for alternate sections */
  --c-sand-deep: #DCEFE3;
  --c-line: #D3E3D8;
  --c-ink: #000000;          /* normal text is black, as on the live site */
  --c-ink-soft: #000000;
  --c-ink-mute: #4A4A4A;     /* small captions only */
  --c-banner: #FCF8EC;        /* textured cream behind the visit banner */
  --c-dark-ui: #C9D8C4;       /* text on the dark photo viewer */

  /* Class colours (live-site tiles) and the text colour that reads on each */
  --t-lambs: var(--c-purple);
  --t-pals: var(--c-red);
  --t-sea: var(--c-blue);
  --t-owls: var(--c-yellow);
  --t-furry: var(--c-green);
  --t-bugs: var(--c-blue-light);

  /* Type */
  --f-display: var(--f-body);
  --f-body: "Nunito Sans", "Nunito Sans Fallback", Arial, sans-serif;
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  --t-lg: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --t-h4: 1.1875rem;
  --t-h3: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --t-h2: clamp(2rem, 1.45rem + 2.2vw, 3.25rem);
  --t-h1: clamp(2.5rem, 1.6rem + 3.8vw, 4.75rem);

  /* Space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --section: clamp(4rem, 2.5rem + 6vw, 8rem);
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);

  /* Widths */
  --w-max: 1240px;
  --w-text: 66ch;

  /* Shape */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 24px;

  /* Depth (tinted to the warm palette, one light source from above) */
  --shadow-sm: 0 1px 2px rgb(12 60 35 / 0.06), 0 2px 10px rgb(12 60 35 / 0.07);
  --shadow-md: 0 18px 40px -18px rgb(12 60 35 / 0.35);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 220ms;

  /* Layers */
  --z-float: 40;
  --z-header: 50;
  --z-dialog: 100;

  --header-h: 76px;
}

@media (min-width: 1100px) {
  :root { --header-h: 88px; }
}

/* 2. BASE ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.menu-open { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }
img { font-style: italic; } /* alt text styling if an image fails */

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--c-ink);
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: var(--t-h2); line-height: 1.06; letter-spacing: -0.02em; }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); letter-spacing: -0.005em; }
h1 em, h2 em, h3 em { font-style: normal; color: inherit; }

p, ul, ol, blockquote, figure, dl { margin: 0 0 1em; }
p { text-wrap: pretty; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--c-line); margin: var(--s-6) 0; }

a { color: var(--c-green-text); text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: color var(--dur) var(--ease); }
a:hover { color: var(--c-green-dark); }

:focus-visible { outline: 3px solid var(--c-blue-deep); outline-offset: 3px; border-radius: 4px; }

::selection { background: var(--c-green-soft); color: var(--c-ink); }

/* 3. LAYOUT ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--w-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(820px + 2 * var(--gutter)); }

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section--green-soft { background: var(--tint-green); }
.section--yellow-soft { background: var(--tint-yellow); }
.section--blue-soft { background: var(--tint-blue); }
.section--purple-soft { background: var(--tint-purple); }
.section--red-soft { background: var(--tint-red); }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--split { max-width: none; display: grid; gap: var(--s-4) var(--s-8); align-items: end; }
.section-head p:last-child { margin-bottom: 0; }

@media (min-width: 900px) {
  .section-head--split { grid-template-columns: 1.1fr 1fr; }
}

.split { display: grid; gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-media { grid-template-columns: 1.15fr 1fr; }
  .split--reverse > :first-child { order: 2; }
  .split--top { align-items: start; }
}

/* 4. TYPOGRAPHY HELPERS ---------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 var(--s-4);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--c-ink);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 1.25em;
  height: 1.25em;
  background: var(--c-green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 3C10 3 4 8.5 4 16c0 1.6.3 3.1.9 4.4l1.6-.8C6.2 18.5 6 17.3 6 16c0-.7.1-1.4.2-2.1 2.3-1.6 6-3.4 10.3-4.2-3.8 1.6-7.3 3.6-9.6 5.7C7.9 19 10.6 21 14 21c5 0 7-5 7-11 0-2.4-.3-4.8-1-7Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 3C10 3 4 8.5 4 16c0 1.6.3 3.1.9 4.4l1.6-.8C6.2 18.5 6 17.3 6 16c0-.7.1-1.4.2-2.1 2.3-1.6 6-3.4 10.3-4.2-3.8 1.6-7.3 3.6-9.6 5.7C7.9 19 10.6 21 14 21c5 0 7-5 7-11 0-2.4-.3-4.8-1-7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.eyebrow--plain::before { display: none; }

.page-hero h1::after,
.section-head h2::after {
  content: "";
  display: block;
  width: 88px;
  height: 6px;
  margin-top: 0.45em;
  border-radius: 3px;
  background: var(--stripe);
}
.page-hero--center h1::after, .section-head--center h2::after { margin-inline: auto; }

.lede { font-size: var(--t-lg); line-height: 1.6; color: var(--c-ink-soft); max-width: 40rem; }
.muted { color: var(--c-ink-mute); }
.small { font-size: var(--t-sm); }

.prose { max-width: var(--w-text); }
.prose > * + h2, .prose > * + h3 { margin-top: 1.6em; }
.prose h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem); }
.prose h3 { font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem); }
.prose li { padding-left: 0.25em; }
.prose li::marker { color: var(--c-red-deep); font-weight: 700; }

.scripture {
  margin: var(--s-6) 0 0;
  padding-left: var(--s-5);
  border-left: 2px solid var(--c-green);
  font-size: var(--t-lg);
  font-weight: 600;
  line-height: 1.5;
  color: var(--c-ink);
}
.scripture cite { display: block; margin-top: var(--s-2); font-family: var(--f-body); font-style: normal; font-size: var(--t-sm); font-weight: 700; color: var(--c-ink-mute); }

/* 5. BUTTONS & LINKS ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* Primary = brand green (as the live "Book a Visit" button); dark text keeps it AA */
.btn--primary { background: var(--c-green); color: #fff; box-shadow: 0 6px 16px -8px rgb(6 120 64 / 0.6); }
.btn--primary:hover { background: var(--c-green-hover); color: #fff; transform: translateY(-1px); }

/* Enrol = brand yellow (as the live "Enroll Now" button) */
.btn--enrol { background: var(--c-yellow); color: var(--c-ink); box-shadow: 0 6px 16px -8px rgb(160 120 0 / 0.6); }
.btn--enrol:hover { background: var(--c-yellow-hover); color: var(--c-ink); transform: translateY(-1px); }

.btn--secondary { background: var(--c-paper); color: var(--c-green-dark); border-color: currentColor; }
.btn--secondary:hover { background: var(--c-green-dark); border-color: var(--c-green-dark); color: var(--c-paper); }


.btn--lg { min-height: 56px; padding: 0.95rem 1.7rem; font-size: 1.0625rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  font-weight: 800;
  color: var(--c-green-text);
  text-decoration: none;
}
.link-arrow::after {
  content: "";
  width: 1.1em;
  height: 1.1em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--dur) var(--ease);
}
.link-arrow:hover { color: var(--c-green-dark); }
.link-arrow:hover::after { transform: translateX(4px); }

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: calc(var(--z-dialog) + 1);
  padding: var(--s-3) var(--s-4);
  background: var(--c-green-dark);
  color: var(--c-paper);
  border-radius: var(--r-sm);
  font-weight: 700;
}
.skip-link:focus { top: var(--s-4); color: var(--c-paper); }

/* 6. HEADER & NAVIGATION --------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
/* Background + blur live on a pseudo-element: backdrop-filter on the header itself would
   become the containing block for the fixed mobile menu and clip it. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(255 255 255 / 0.95);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header::before { background: rgb(255 255 255 / 0.86); backdrop-filter: saturate(1.3) blur(12px); }
}
.menu-open .site-header::before { background: var(--c-cream); }
.site-header.is-scrolled { border-bottom-color: var(--c-line); box-shadow: 0 8px 24px -20px rgb(12 60 35 / 0.5); }

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: var(--header-h);
}

.brand { display: block; flex: none; border-radius: var(--r-sm); }
.brand img { width: 138px; height: auto; transform-origin: 0 50%; transition: scale 350ms var(--ease); }
.site-header.is-scrolled .brand img { scale: 0.88; }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--stripe); clip-path: inset(0 100% 0 0); pointer-events: none; }
@media (min-width: 1100px) { .brand img { width: 168px; } }

.nav-toggle { display: none; }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__list li { margin: 0; }

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 44px;
  padding: 0 0.15rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--c-ink-soft);
  text-decoration: none;
  cursor: pointer;
  position: relative;
}
.site-nav__link:hover { color: var(--c-green-text); }
.site-nav__link[aria-current="page"] { color: var(--c-green-dark); }
.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--c-green);
}

/* Parents downloads menu (a <details> element, enhanced by JS) */
.submenu { position: relative; }
.submenu > summary { list-style: none; }
.submenu > summary::-webkit-details-marker { display: none; }
.submenu > summary::after {
  content: "";
  width: 0.55em;
  height: 0.55em;
  margin-left: 0.15rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur) var(--ease);
}
.submenu[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.submenu__panel {
  margin: 0;
  padding: var(--s-2);
  list-style: none;
}
.submenu__panel li { margin: 0; }
.submenu__panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--c-ink);
  text-decoration: none;
}
.submenu__panel a:hover { background: var(--c-sand); color: var(--c-green-dark); }
.submenu__panel a span { font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.06em; color: var(--c-ink-mute); }

.site-nav__extra { display: none; }

/* Desktop navigation */
@media (min-width: 1100px) {
  .site-nav { display: flex; align-items: center; gap: var(--s-6); }
  .site-nav__list { flex-wrap: nowrap; gap: var(--s-4); }
  .site-nav { gap: var(--s-5); }
  .submenu__panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    min-width: 260px;
    transform: translateX(-50%);
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
  }
}

@media (min-width: 1280px) { .site-nav__list { gap: var(--s-5); } }

/* Mobile navigation: only collapses when JavaScript is available */
@media (max-width: 1099.98px) {
  .site-nav { width: 100%; padding-bottom: var(--s-4); }
  .site-nav__cta { margin-top: var(--s-3); }
  .submenu__panel { padding-left: 0; }

  .js .site-nav { width: auto; padding: 0; }
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.5rem 0.9rem;
    border: 1.5px solid var(--c-line);
    border-radius: 10px;
    background: var(--c-paper);
    font: inherit;
    font-size: var(--t-sm);
    font-weight: 700;
    color: var(--c-ink);
    cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

  .js .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
    padding: var(--s-5) var(--gutter) var(--s-7);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--c-cream);
    border-top: 1px solid var(--c-line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
  }
  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s;
  }
  .js .site-nav__list { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .js .site-nav__list > li { border-bottom: 1px solid var(--c-line); }
  .js .site-nav__link {
    width: 100%;
    min-height: 56px;
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--c-ink);
  }
  .js .site-nav__link[aria-current="page"]::after { left: auto; right: 0.25rem; bottom: 50%; margin: 0 0 -3px; }
  .js .submenu > summary { justify-content: space-between; }
  .js .submenu__panel { padding: 0 0 var(--s-3); }
  .js .site-nav__cta { width: 100%; margin: 0; }
  .js .site-nav__extra { display: grid; gap: var(--s-2); font-size: var(--t-sm); color: var(--c-ink-soft); }
  .site-nav__extra a { font-weight: 700; }
}

/* 7. FOOTER ---------------------------------------------------------------- */
/* Paper-cut jungle foliage grows out of the footer's top edge, over the section above */
.site-footer::before {
  content: "";
  position: absolute;
  left: -24px;
  right: -24px;
  bottom: calc(100% - 6px);
  height: clamp(58px, 7vw, 100px);
  background: url("../images/brand/jungle-canopy.svg") left bottom / auto 100% repeat-x;
  pointer-events: none;
  transform-origin: 50% 100%;
}
.site-footer {
  position: relative;
  overflow-x: clip;               /* the foliage overhangs both edges so its sway never shows a gap */
  background: var(--c-green);
  color: #fff;
  padding: clamp(3.5rem, 2rem + 5vw, 6rem) 0 var(--s-6);
  font-size: var(--t-sm);
}
.site-footer a { color: #fff; font-weight: 600; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer :focus-visible { outline-color: #fff; }

.footer-grid { display: grid; gap: var(--s-7) var(--s-6); }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }

.footer-brand__name { font-size: 1.625rem; font-weight: 800; line-height: 1.15; color: #fff; margin-bottom: var(--s-3); }
.footer-brand__tagline { font-size: 1.125rem; font-weight: 600; color: #fff; max-width: 22rem; }

.footer-col h2 {
  margin-bottom: var(--s-4);
  font-family: var(--f-body);
  font-size: var(--t-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li + li { margin-top: 0.15rem; }
.footer-col li a, .footer-col address a { display: inline-flex; align-items: center; min-height: 36px; }
.footer-col address { font-style: normal; line-height: 1.6; }

.social { display: flex; gap: var(--s-2); margin-top: var(--s-5); padding: 0; list-style: none; }
.social li { margin: 0; }
.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgb(255 255 255 / 0.6);
  border-radius: 50%;
  color: #fff;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.social a:hover { background: rgb(255 255 255 / 0.2); border-color: #fff; }
.social svg { width: 18px; height: 18px; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid rgb(255 255 255 / 0.35);
  font-size: var(--t-xs);
}
.footer-base p { margin: 0; }

/* WhatsApp quick-contact button */
.whatsapp-float {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: var(--z-float);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1E8E4E;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgb(20 70 40 / 0.55);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.whatsapp-float:hover { background: #18773F; color: #fff; transform: translateY(-2px); }
.whatsapp-float svg { width: 28px; height: 28px; }

/* 8. SHARED COMPONENTS ----------------------------------------------------- */

/* Image frames */
.frame { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--c-sand-deep); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--portrait { aspect-ratio: 4 / 5; }
.frame--landscape { aspect-ratio: 4 / 3; }
.frame--wide { aspect-ratio: 3 / 2; }
.frame--focus-right img { object-position: 70% 50%; }
/* Animated brand-colour blobs on a white block (the live site's blurred background, set in motion).
   Soft-edged gradients instead of filter: blur, so the moving layers stay cheap to animate. */
.blob-area { position: relative; isolation: isolate; overflow: hidden; background: #fff; }
.blob-area::before,
.blob-area::after {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -2;
  pointer-events: none;
  will-change: transform;
}
.blob-area::before {
  background:
    radial-gradient(circle clamp(260px, 35vmax, 620px) at 20% 26%, rgb(10 190 103 / 0.28) 0 30%, transparent 64%),
    radial-gradient(circle clamp(240px, 32vmax, 560px) at 82% 20%, rgb(253 47 24 / 0.24) 0 30%, transparent 64%),
    radial-gradient(circle clamp(280px, 40vmax, 680px) at 52% 80%, rgb(254 206 0 / 0.30) 0 30%, transparent 64%);
}
.blob-area::after {
  background:
    radial-gradient(circle clamp(220px, 30vmax, 520px) at 14% 74%, rgb(151 68 140 / 0.22) 0 30%, transparent 64%),
    radial-gradient(circle clamp(250px, 36vmax, 600px) at 88% 66%, rgb(24 136 222 / 0.24) 0 30%, transparent 64%);
}
@media (prefers-reduced-motion: no-preference) {
  .blob-area::before { animation: blobDriftA 19s ease-in-out infinite alternate; }
  .blob-area::after { animation: blobDriftB 24s ease-in-out infinite alternate; }
}
/* vary the layout from one area to the next */
.blob-area:nth-of-type(even)::before { scale: -1 1; }
.blob-area:nth-of-type(3n)::after { scale: 1 -1; }
@keyframes blobDriftA {
  from { transform: translate3d(-4%, -3%, 0) scale(1); }
  to { transform: translate3d(4%, 4%, 0) scale(1.1); }
}
@keyframes blobDriftB {
  from { transform: translate3d(4%, 3%, 0) scale(1.08); }
  to { transform: translate3d(-4%, -4%, 0) scale(0.95); }
}

/* Inner-page hero */
.page-hero { padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) 0 clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.page-hero h1 { max-width: 16ch; margin-bottom: var(--s-4); }
.page-hero .lede { margin-bottom: 0; }
.page-hero--center { text-align: center; }
.page-hero--center h1, .page-hero--center .lede { margin-inline: auto; }
.page-hero__actions { margin-top: var(--s-6); }
.page-hero--center .btn-row { justify-content: center; }

/* Jump links (in-page navigation) */
.jump-nav { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin: 0; list-style: none; }
.jump-nav li { margin: 0; }
.jump-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.4rem 0.95rem 0.4rem 0.5rem;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-paper);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--c-ink);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.jump-nav a:hover { border-color: var(--c-green-dark); color: var(--c-green-dark); }
.jump-nav a[class*="tint-"]:hover,
.jump-nav a[class*="tint-"]:focus-visible { background: var(--tint); border-color: var(--tint); color: #fff; text-shadow: 0 1px 4px rgb(0 0 0 / 0.25); }
.jump-nav img { width: 30px; height: 30px; object-fit: contain; }
.jump-nav--text a { padding-left: 0.95rem; }

/* Facts list */
.facts { display: grid; gap: var(--s-4); margin: 0; padding: 0; list-style: none; }
.facts li { margin: 0; }
.facts dt, .facts strong { display: block; font-size: 1.25rem; font-weight: 800; color: var(--c-ink); line-height: 1.2; }

/* Feature list with leaf bullets */
.ticks { list-style: none; padding: 0; margin: 0 0 var(--s-5); }
.ticks li { position: relative; padding-left: 1.9rem; }
.ticks li + li { margin-top: 0.6rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--c-green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230C5335' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* Quote (testimonials taken from existing site content) */
.quote { margin: 0; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); background: var(--c-paper); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.quote p { font-size: var(--t-lg); font-weight: 600; line-height: 1.55; color: var(--c-ink); }
.quote p::before { content: "\201C"; }
.quote p::after { content: "\201D"; }
.quote footer { font-size: var(--t-sm); color: var(--c-ink-mute); }
.quote footer strong { color: var(--c-ink); }

/* Staff portrait */
.person { margin: 0; }
.person .frame { aspect-ratio: 2 / 3; border-radius: var(--r-sm); box-shadow: var(--shadow-sm); }
.person .frame img { object-position: 50% 50%; }
.person figcaption { padding-top: var(--s-3); line-height: 1.35; }
.person__name { display: block; font-size: 1.125rem; font-weight: 800; color: var(--c-ink); }
.person__role { font-size: var(--t-sm); color: var(--c-ink-mute); }

/* Downloads list */
.downloads { display: grid; gap: var(--s-2); list-style: none; padding: 0; margin: 0; }
.downloads li { margin: 0; }
.downloads a {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 52px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-paper);
  font-weight: 700;
  color: var(--c-ink);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.downloads a:hover { border-color: var(--c-green-dark); color: var(--c-green-dark); }
.downloads svg { width: 22px; height: 22px; flex: none; color: var(--c-red-deep); }
.downloads small { margin-left: auto; font-size: var(--t-xs); font-weight: 700; color: var(--c-ink-mute); }

/* "Come swing into our school for a visit" banner: the school's artwork on white with animated brand blobs (.blob-area) */
.visit-banner {
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) calc(clamp(3rem, 2rem + 4vw, 5.5rem) + clamp(40px, 5vw, 80px));
}
.visit-banner__inner { display: grid; gap: var(--s-6); align-items: center; }
.visit-banner__art { margin: 0; max-width: 720px; }
.visit-banner__art img {
  width: 100%;
  height: auto;
  /* the artwork's corner leaves stop at the canvas edge: fade the edges so they don't end in a hard line */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent), linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent), linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
          mask-composite: intersect;
}
.visit-banner .lede { margin-bottom: var(--s-6); color: var(--c-ink); }
.visit-banner__contact { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); margin: var(--s-6) 0 0; padding: 0; list-style: none; font-size: var(--t-sm); font-weight: 600; color: var(--c-ink); }
.visit-banner__contact li { margin: 0; }
.visit-banner__contact a { font-weight: 800; }
@media (min-width: 900px) {
  .visit-banner__inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s-7); }
}

/* 9. PAGE SECTIONS --------------------------------------------------------- */

/* ---- Home: hero ---- */
.hero { padding: clamp(1.75rem, 1rem + 3vw, 3.5rem) 0 var(--section); }
.hero__intro { display: grid; gap: var(--s-5) var(--s-8); align-items: end; margin-bottom: clamp(2rem, 1.25rem + 2.5vw, 3.25rem); }
.hero__title { max-width: 16ch; margin: 0; font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.4rem); }
.hero__title .w { display: inline-block; }
.hero__lede { max-width: 30rem; margin-bottom: var(--s-5); }
.hero__stage { position: relative; }
.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: var(--s-4) clamp(1.5rem, 4vw, 3.5rem);
  margin: var(--s-6) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--t-sm);
  color: var(--c-ink-mute);
  line-height: 1.35;
}
.hero__facts li { margin: 0; padding-left: var(--s-4); border-left: 3px solid var(--c-green); }
.hero__facts li:nth-child(2) { border-color: var(--c-yellow); }
.hero__facts li:nth-child(3) { border-color: var(--c-blue); }
.hero__facts strong { display: block; margin-bottom: 0.15rem; font-size: 1.1875rem; font-weight: 800; color: var(--c-ink); }
@media (max-width: 639.98px) {
  .hero__facts { grid-template-columns: 1fr 1fr; }
  .hero__facts li:last-child { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .hero__intro { grid-template-columns: 1.5fr 1fr; }
  .hero__copy { padding-bottom: 0.35rem; }
}

/* "2027 Enrolments open now!" badge: the school's image with the live site's gentle pulse */
.hero__badge {
  position: absolute;
  top: -2rem;
  right: -1.25rem;
  z-index: 4;
  width: clamp(110px, 13vw, 190px);
}
.hero__badge img {
  width: 100%;
  height: auto;
  transform-origin: 100% 0%;
  filter: drop-shadow(0 14px 26px rgb(0 0 0 / 0.18));
}
@media (prefers-reduced-motion: no-preference) {
  .hero__badge img { will-change: transform, filter; animation: enrolPulse 1.3s ease-in-out infinite alternate; }
}
@keyframes enrolPulse {
  from { transform: scale(1); filter: brightness(1) saturate(1) drop-shadow(0 14px 26px rgb(0 0 0 / 0.18)); }
  to { transform: scale(1.065); filter: brightness(1.04) saturate(1.03) drop-shadow(0 14px 26px rgb(0 0 0 / 0.18)); }
}
@media (max-width: 899.98px) { .hero__badge { top: -1.5rem; right: -0.5rem; } }

/* Hero carousel (after the original site's: sliding photos, arrows, autoplay). Without JS the first photo shows. */
.carousel { position: relative; isolation: isolate; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-lg); background: var(--c-sand-deep); box-shadow: var(--shadow-md); }
@media (min-width: 900px) { .carousel { aspect-ratio: auto; height: clamp(340px, 54vh, 600px); } }
.carousel__track { position: absolute; inset: 0; }
/* hidden slides are display:none so their photos aren't fetched until js/site.js asks for them */
.carousel__slide { position: absolute; inset: 0; margin: 0; display: none; }
.carousel__slide.is-active { display: block; z-index: 2; }
.carousel__slide.is-leaving { display: block; z-index: 1; }
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.carousel__arrow, .carousel__bar { display: none; }
.js .carousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.88);
  color: var(--c-ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  translate: 0 -50%;
  transition: background-color var(--dur) var(--ease), scale var(--dur) var(--ease);
}
.js .carousel__arrow:hover { background: #fff; scale: 1.08; }
.carousel__arrow svg { width: 20px; height: 20px; }
.carousel__arrow--prev { left: var(--s-4); }
.carousel__arrow--next { right: var(--s-4); }
.js .carousel__bar {
  position: absolute;
  left: 50%;
  bottom: var(--s-4);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.25rem 0.3rem 0.25rem 0.9rem;
  border-radius: 999px;
  background: rgb(10 30 18 / 0.45);
  translate: -50% 0;
}
@supports (backdrop-filter: blur(1px)) { .js .carousel__bar { backdrop-filter: blur(8px); } }
.carousel__dots { display: flex; align-items: center; gap: 2px; }
/* each dot is a 24px target; the visible pill is drawn inside it */
.carousel__dots button { position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; transition: width 300ms var(--ease); }
.carousel__dots button::before,
.carousel__dots button[aria-current="true"]::after { content: ""; position: absolute; left: 50%; top: 50%; height: 10px; border-radius: 999px; translate: -50% -50%; }
.carousel__dots button::before { width: 10px; background: rgb(255 255 255 / 0.6); transition: width 300ms var(--ease), background-color 300ms var(--ease); }
.carousel__dots button:hover::before { background: rgb(255 255 255 / 0.85); }
.carousel__dots button[aria-current="true"] { width: 38px; }
.carousel__dots button[aria-current="true"]::before { width: 30px; background: rgb(255 255 255 / 0.95); }
/* the active dot fills up while the slideshow is playing */
.carousel__dots button[aria-current="true"]::after { width: 30px; background: var(--c-yellow); transform: scaleX(0); transform-origin: 0 50%; }
.carousel__pause { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.carousel__pause:hover { background: rgb(255 255 255 / 0.18); }
.carousel__pause svg { width: 15px; height: 15px; }
.carousel__pause .icon-play, .carousel.is-paused .carousel__pause .icon-pause { display: none; }
.carousel.is-paused .carousel__pause .icon-play { display: block; }
.carousel :focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .carousel.is-playing:not(.is-paused) .carousel__dots button[aria-current="true"]::after { animation: dotFill var(--interval, 5.5s) linear forwards; }
  .carousel.is-holding .carousel__dots button[aria-current="true"]::after { animation-play-state: paused; }
  .carousel.is-animated .carousel__slide.is-active { animation: slideIn 900ms var(--ease) both; }
  .carousel.is-animated .carousel__slide.is-leaving { animation: slideOut 900ms var(--ease) both; }
  .carousel__slide.is-active img { animation: kenBurns 7s ease-out both; }
}
@keyframes slideIn { from { translate: calc(var(--dir, 1) * 100%) 0; } }
@keyframes slideOut { to { translate: calc(var(--dir, 1) * -100%) 0; } }
@keyframes kenBurns { from { scale: 1.08; } }
@keyframes dotFill { to { transform: scaleX(1); } }

/* ---- Home: approach ---- */
.approach__media { position: relative; max-width: 520px; }
.approach__media .frame { aspect-ratio: 4 / 5; }
.approach__media .frame img { object-position: 60% 50%; }
.approach__badge {
  position: absolute;
  right: -0.75rem;
  bottom: 2rem;
  max-width: 15rem;
  padding: var(--s-4) var(--s-5);
  background: var(--c-paper);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--c-ink);
}
.approach__badge cite { display: block; margin-top: 0.35rem; font-family: var(--f-body); font-style: normal; font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.06em; color: var(--c-ink-mute); }

.pillars {
  display: grid;
  gap: var(--s-6) var(--s-5);
  margin: clamp(3rem, 2rem + 4vw, 5rem) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: pillar;
}
.pillars li { margin: 0; padding-top: var(--s-4); border-top: 3px solid var(--c-green); counter-increment: pillar; }
.pillars h3 { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: var(--s-2); font-size: 1.3125rem; }
.pillars h3::before { content: none; }
.pillars p { margin: 0; font-size: var(--t-sm); color: var(--c-ink-soft); }
@media (min-width: 640px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .pillars { grid-template-columns: repeat(4, 1fr); } }

/* ---- Home: class journey ---- */
.journey { position: relative; display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.journey li { margin: 0; }
.journey__item {
  position: relative;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--tint, var(--c-sand));
  color: #fff;
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.25);
  text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.journey__item:hover { color: #fff; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.journey__mascot { width: 76px; height: 76px; padding: 8px; border-radius: 50%; background: var(--c-paper); }
.journey__mascot img { width: 100%; height: 100%; object-fit: contain; }
.journey__age { display: block; font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.journey__tagline { display: block; margin-top: 0.1rem; }
.journey__name { display: block; margin: 0.1rem 0 0.25rem; font-size: 1.375rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
.journey__desc { display: block; font-size: var(--t-sm); font-weight: 600; line-height: 1.5; }

@media (min-width: 640px) { .journey { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) {
  .journey { grid-template-columns: repeat(6, 1fr); gap: var(--s-4); }
  .journey__item { grid-template-columns: 1fr; align-content: start; height: 100%; padding: var(--s-5) var(--s-4) var(--s-5); text-align: left; }
  .journey__mascot { width: 88px; height: 88px; margin-bottom: var(--s-2); }
  /* gentle upward steps: each class sits a little higher, like a growth chart */
  .journey li:nth-child(1) { padding-top: 5rem; }
  .journey li:nth-child(2) { padding-top: 4rem; }
  .journey li:nth-child(3) { padding-top: 3rem; }
  .journey li:nth-child(4) { padding-top: 2rem; }
  .journey li:nth-child(5) { padding-top: 1rem; }
  .journey li { display: flex; flex-direction: column; }
  .journey li > a { flex: 1; }
}

/* ---- Home: school life mosaic ---- */
.mosaic { display: grid; gap: var(--s-3); grid-template-columns: 1fr 1fr; }
.mosaic .frame { border-radius: var(--r-md); }
.mosaic .frame:nth-child(1) { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.mosaic .frame:nth-child(n+2) { aspect-ratio: 1; }
@media (min-width: 900px) {
  .mosaic { grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--s-4); }
  .mosaic .frame:nth-child(1) { grid-column: 1; grid-row: 1 / 3; aspect-ratio: auto; }
  .mosaic .frame:nth-child(n+2) { aspect-ratio: 1; }
}

/* ---- Home: principal ---- */
.welcome__media { max-width: 440px; }
.welcome__media .frame { aspect-ratio: 4 / 5; }
.welcome__media .frame img { object-position: 50% 30%; }
.welcome blockquote { margin: 0 0 var(--s-5); font-weight: 800; color: var(--c-ink); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); line-height: 1.3; letter-spacing: -0.01em; color: var(--c-ink); text-wrap: balance; }
.welcome blockquote::before { content: "\201C"; display: block; height: 0.55em; font-size: 3em; line-height: 1; color: var(--c-green); }
.signature { margin-bottom: var(--s-6); }
.signature strong { display: block; font-size: 1.25rem; font-weight: 800; color: var(--c-ink); }
.signature span { font-size: var(--t-sm); color: var(--c-ink-mute); }

/* ---- Home: what's on + blog ---- */
.news-grid { display: grid; gap: var(--s-8) var(--s-7); }
@media (min-width: 1000px) { .news-grid { grid-template-columns: 1fr 1fr; } }
.news-grid h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); }

.event-list { margin: 0 0 var(--s-5); padding: 0; list-style: none; border-top: 1px solid var(--c-line); }
.event-list li { margin: 0; display: grid; grid-template-columns: 4.25rem 1fr; gap: var(--s-4); align-items: center; padding: var(--s-4) 0; border-bottom: 1px solid var(--c-line); }
.event-list h3 { margin: 0 0 0.15rem; font-size: 1.25rem; }
.event-list p { margin: 0; font-size: var(--t-sm); color: var(--c-ink-soft); }
.datechip { display: grid; place-items: center; width: 4.25rem; height: 4.25rem; border-radius: var(--r-md); background: var(--c-paper); border: 1px solid var(--c-line); line-height: 1; text-align: center; }
.datechip b { display: block; font-size: 1.625rem; font-weight: 800; color: var(--c-ink); }
.datechip span { display: block; margin-top: 0.2rem; font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-red-deep); }

.post-list { display: grid; gap: var(--s-4); margin: 0 0 var(--s-5); padding: 0; list-style: none; }
.post-list li { margin: 0; }
.post-teaser { display: grid; gap: var(--s-2); padding: var(--s-5); border-radius: var(--r-lg); background: var(--c-paper); color: var(--c-ink); text-decoration: none; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.post-teaser:hover { color: var(--c-ink); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.post-teaser__kicker { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-red-deep); }
.post-teaser__title { font-size: 1.3125rem; font-weight: 800; line-height: 1.25; color: var(--c-ink); }
.post-teaser__text { font-size: var(--t-sm); color: var(--c-ink-soft); }

/* ---- Classes & Staff page ---- */
.team-photo { margin: 0; }
.team-photo img { width: 100%; height: auto; border-radius: var(--r-sm); box-shadow: var(--shadow-md); } /* whole-staff photo: shown uncropped */
.team-photo figcaption { margin-top: var(--s-3); font-size: var(--t-sm); color: var(--c-ink-mute); }

.class-block { padding-block: clamp(3rem, 2rem + 4vw, 6rem); border-top: 1px solid var(--c-line); }
.class-block__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); margin-bottom: var(--s-6); }
.class-block__mascot { flex: none; width: 96px; height: 96px; padding: 12px; border-radius: 50%; background: var(--tint, var(--c-sand)); box-shadow: inset 0 0 0 5px rgb(255 255 255 / 0.55); }
.class-block__mascot img { width: 100%; height: 100%; object-fit: contain; }
.class-block__head h2 { margin: 0; font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem); }
.class-block__meta { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-2) 0 0; padding: 0; list-style: none; }
.class-block__meta li { margin: 0; padding: 0.2rem 0.7rem; border-radius: var(--r-sm); background: var(--tint, var(--c-sand)); font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 4px rgb(0 0 0 / 0.25); }
.class-block__grid { display: grid; gap: var(--s-7); }
.class-block__text { max-width: var(--w-text); }
.class-block__aside { display: grid; gap: var(--s-6); align-content: start; }
.class-block__features { padding: var(--s-5); border-radius: var(--r-lg); background: var(--c-paper); box-shadow: var(--shadow-sm); }
/* each class section takes a light tint of its own colour */
.class-block { background: color-mix(in srgb, var(--tint, var(--c-green)) 13%, white); }
.class-block__features h3 { font-size: 1.25rem; }
.class-block__features .ticks { margin: 0; font-size: var(--t-sm); }
.class-block__features .ticks li::before { background-color: var(--c-green-soft); }
.class-block__team { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.class-block__more { margin-top: var(--s-4); }
@media (min-width: 1000px) {
  .class-block__grid { grid-template-columns: 1.25fr 1fr; gap: var(--s-8); }
}

/* Principal */
.principal { display: grid; gap: var(--s-7); align-items: center; }
.principal__media { max-width: 400px; }
.principal__media .frame { aspect-ratio: 4 / 5; }
.principal__media .frame img { object-position: 50% 30%; }
@media (min-width: 900px) { .principal { grid-template-columns: 0.8fr 1.2fr; gap: var(--s-8); } }

/* Class tints */
.tint-lambs { --tint: var(--t-lambs); }
.tint-pals { --tint: var(--t-pals); }
.tint-sea { --tint: var(--t-sea); }
.tint-owls { --tint: var(--t-owls); }
.tint-furry { --tint: var(--t-furry); }
.tint-bugs { --tint: var(--t-bugs); }

/* ---- Grade R page ---- */
.highlights { display: grid; gap: var(--s-5); margin: 0; padding: 0; list-style: none; counter-reset: hl; }
.highlights li { margin: 0; padding: var(--s-5); border-radius: var(--r-lg); background: var(--c-paper); counter-increment: hl; }
.highlights h3 { font-size: 1.25rem; margin-bottom: var(--s-2); }
.highlights h3::before { content: counter(hl, decimal-leading-zero); display: block; margin-bottom: var(--s-2); font-family: var(--f-body); font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.1em; color: var(--c-red-deep); }
.highlights p { margin: 0; font-size: var(--t-sm); color: var(--c-ink-soft); }
@media (min-width: 640px) { .highlights { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .highlights { grid-template-columns: repeat(3, 1fr); } }

.quotes { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .quotes { grid-template-columns: 1fr 1fr; } }

/* ---- Gallery ---- */
.gallery-wrap { padding-bottom: var(--section); }
.gallery-group { padding-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.gallery-group__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-5); margin-bottom: var(--s-5); padding-bottom: var(--s-3); border-bottom: 1px solid var(--c-line); }
.gallery-group__head h2 { margin: 0; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem); }
.gallery-group__head p { margin: 0; font-size: var(--t-sm); color: var(--c-ink-mute); }

/* Justified rows: each photo grows in proportion to its aspect ratio (--ar), so every row
   shares one height and nothing is cropped. Order stays left-to-right, matching the lightbox. */
.gallery { --row-h: 150px; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.gallery::after { content: ""; flex-grow: 999; }
@media (min-width: 640px) { .gallery { --row-h: 200px; gap: var(--s-3); } }
@media (min-width: 1100px) { .gallery { --row-h: 250px; } }
.gallery__item { position: relative; display: block; flex-grow: calc(var(--ar) * 100); flex-basis: calc(var(--ar) * var(--row-h)); overflow: hidden; border-radius: var(--r-md); background: var(--c-sand-deep); }
.gallery__item img { width: 100%; height: auto; transition: transform 600ms var(--ease); }
.gallery__item:hover img { transform: scale(1.03); }
.gallery__item:focus-visible { outline-offset: 2px; }

/* Lightbox */
.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(18 26 16 / 0.94);
  color: var(--c-cream);
}
.lightbox::backdrop { background: rgb(18 26 16 / 0.6); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) var(--s-4); font-size: var(--t-sm); }
.lightbox__stage { position: relative; min-height: 0; }
.lightbox__stage img { position: absolute; inset: 0; margin: auto; max-width: calc(100% - 2 * var(--s-3)); max-height: 100%; width: auto; height: auto; border-radius: var(--r-sm); }
@media (min-width: 900px) { .lightbox__stage img { max-width: calc(100% - 9rem); } }
.lightbox__caption { margin: 0; padding: var(--s-3) var(--s-4) var(--s-5); text-align: center; font-size: var(--t-sm); color: var(--c-dark-ui); }
.lightbox__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.06);
  color: var(--c-cream);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.lightbox__btn:hover { background: rgb(255 255 255 / 0.16); }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: var(--s-3); }
.lightbox__nav--next { right: var(--s-3); }
.lightbox :focus-visible { outline-color: var(--c-yellow); }

/* ---- Events ---- */
.events-grid { display: grid; gap: var(--s-6) var(--s-5); margin: 0; padding: 0; list-style: none; }
.events-grid > li { margin: 0; }
@media (min-width: 640px) { .events-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .events-grid { grid-template-columns: repeat(3, 1fr); } }
.event-card { display: flex; flex-direction: column; height: 100%; margin: 0; }
.event-card__poster { display: block; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; background: var(--c-sand-deep); box-shadow: var(--shadow-sm); }
.event-card__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.event-card__poster:hover img { transform: scale(1.03); }
.event-card__body { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: start; padding-top: var(--s-4); }
.event-card h3 { margin: 0 0 0.2rem; font-size: 1.375rem; }
.event-card p { margin: 0; font-size: var(--t-sm); color: var(--c-ink-soft); }
.event-card__when { font-weight: 700; color: var(--c-ink) !important; }
.event-card__flag { display: inline-block; margin-bottom: var(--s-2); padding: 0.15rem 0.55rem; border-radius: var(--r-sm); background: var(--c-yellow); font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-ink); }
.event-card.is-past .event-card__poster { filter: saturate(0.6); opacity: 0.85; }
.events-past { margin-top: var(--s-8); }
.events-past[hidden] { display: none; }
.events-note { margin: var(--s-7) 0 0; }

/* ---- Blog ---- */
.article { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.article__head { max-width: 46rem; margin-bottom: var(--s-6); }
.article__kicker { display: inline-block; margin-bottom: var(--s-4); padding: 0.2rem 0.65rem; border-radius: var(--r-sm); background: var(--c-green-soft); font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-green-dark); }
.article__head h2 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.article .prose ol.numbered { list-style: none; padding: 0; counter-reset: n; }
.article .prose ol.numbered > li { position: relative; padding-left: 3rem; counter-increment: n; }
.article .prose ol.numbered > li + li { margin-top: var(--s-5); }
.article .prose ol.numbered > li::before { content: counter(n); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--c-red-soft); font-weight: 800; font-size: var(--t-sm); color: var(--c-red-deep); }
.article .prose ol.numbered h3 { margin-bottom: 0.3rem; font-size: 1.25rem; }
.article .quote { margin-top: var(--s-6); }
.article__cta { margin-top: var(--s-6); }
.milestone { margin-top: var(--s-6); padding: var(--s-5); border-radius: var(--r-lg); background: var(--c-paper); }
.milestone h3 { margin-bottom: 0.25rem; }
.milestone__goals { font-size: var(--t-sm); color: var(--c-ink-mute); }
.milestone ul { margin-bottom: 0; }

/* ---- Forms ---- */
.form-card { padding: clamp(1.5rem, 1rem + 2.5vw, 2.75rem); border-radius: var(--r-lg); background: var(--c-paper); box-shadow: var(--shadow-sm); }
.form-card h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); }
.form-grid { display: grid; gap: var(--s-5) var(--s-4); }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: 1 / -1; } }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--t-sm); font-weight: 700; color: var(--c-ink); }
.field label .opt { font-weight: 600; color: var(--c-ink-mute); }
.input {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid #B9CDBF;
  border-radius: 10px;
  background: var(--c-cream);
  font: inherit;
  font-size: 1rem; /* never below 16px: prevents iOS zoom */
  color: var(--c-ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
textarea.input { min-height: 140px; resize: vertical; }
select.input { appearance: none; padding-right: 2.5rem; background: var(--c-cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E4E43' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 0.8rem center / 18px no-repeat; }
.input::placeholder { color: #7A877E; }
.input:hover { border-color: #93AF9B; }
.input:focus { outline: none; border-color: var(--c-green-text); background-color: var(--c-paper); box-shadow: 0 0 0 4px rgb(10 190 103 / 0.25); }
.input[aria-invalid="true"] { border-color: var(--c-red-deep); background-color: #FFF8F4; }
.field__error { display: none; font-size: var(--t-sm); font-weight: 700; color: var(--c-red-deep); }
.input[aria-invalid="true"] ~ .field__error { display: block; }
.form-note { margin: var(--s-3) 0 0; text-align: center; font-size: var(--t-sm); color: var(--c-ink-mute); }
.form-status { margin-top: var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--c-red-soft); font-weight: 700; color: var(--c-red-deep); }
.form-status[hidden] { display: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Contact ---- */
.contact-grid { display: grid; gap: var(--s-7); align-items: start; }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; gap: var(--s-8); } }
.contact-list { display: grid; gap: var(--s-5); margin: 0 0 var(--s-6); padding: 0; list-style: none; }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; column-gap: var(--s-4); align-items: center; margin: 0; }
.contact-list__icon { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c-green-soft); color: var(--c-green-dark); }
.contact-list__icon svg { width: 20px; height: 20px; }
.contact-list .label { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-ink-mute); }
.contact-list a { font-weight: 700; overflow-wrap: anywhere; }
.map { overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--c-line); background: var(--c-sand); aspect-ratio: 4 / 3; }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---- Enrol ---- */
.downloads-title { margin-top: var(--s-7); font-size: 1.25rem; }
.steps { display: grid; gap: var(--s-5); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; margin: 0; padding: var(--s-6) var(--s-5) var(--s-5); border-radius: var(--r-lg); background: var(--c-paper); counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: var(--s-4); border-radius: 50%; background: var(--c-green); font-size: 1.25rem; font-weight: 800; color: #fff; }
.steps h3 { font-size: 1.25rem; margin-bottom: var(--s-2); }
.steps p { margin: 0; font-size: var(--t-sm); color: var(--c-ink-soft); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ---- Thank-you & 404 ---- */
.notice { padding-block: clamp(4rem, 3rem + 6vw, 9rem); text-align: center; }
.notice__art { width: 240px; margin: 0 auto var(--s-5); }
.notice h1 { margin-inline: auto; max-width: 14ch; }
.notice .lede { margin-inline: auto; margin-bottom: var(--s-6); }
.notice .btn-row { justify-content: center; }

/* 10. MOTION & UTILITIES --------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Jungle leaves peeking in from the top-right corner of heroes (sit between the blobs and the content) */
.jungle-corner {
  position: absolute;
  top: 0;
  right: 0;
  z-index: -1;
  width: clamp(120px, 21vw, 320px);
  height: auto;
  pointer-events: none;
  transform-origin: 100% 0;
}
.hero .jungle-corner { top: -24px; right: -56px; width: clamp(120px, 17vw, 270px); }
@media (max-width: 639.98px) { .jungle-corner, .hero .jungle-corner { width: 108px; top: -8px; right: -14px; } }

/* --- Motion ------------------------------------------------------------------------------
   Everything below only runs when the visitor hasn't asked for reduced motion.
   Scroll effects use native scroll-driven animations where supported; browsers without them
   get an IntersectionObserver fallback (html.no-sda + .is-visible, from js/site.js). */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Hero entrance: words rise one by one, then the rest follows */
  .hero__title .w { opacity: 0; translate: 0 0.45em; animation: wordIn 900ms var(--ease) forwards; animation-delay: calc(80ms + var(--w, 0) * 70ms); }
  .hero__in { animation: fadeUp 900ms var(--ease) backwards; animation-delay: calc(var(--d, 0) * 110ms); }
  .hero__in--scale { animation-name: stageIn; }
  .page-hero h1::after, .notice h1::after { animation: stripeGrow 900ms 300ms var(--ease) both; }

  /* Living details */
  .jungle-corner { animation: leafSway 7s ease-in-out infinite alternate; }
  .site-footer::before { animation: rustle 6.5s ease-in-out infinite alternate; }
  .journey__mascot img, .class-block__mascot img { animation: bob 3.4s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -0.8s); }
  .journey__item:hover .journey__mascot img { animation: wiggle 700ms ease-in-out; }
  .visit-banner__art img { animation: floaty 5s ease-in-out infinite alternate; }

  /* Fallback reveals (no native scroll-driven animations) */
  .no-sda [data-reveal], .no-sda [data-stagger] > * { opacity: 0; translate: 0 28px; transition: opacity 800ms var(--ease), translate 800ms var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .no-sda [data-reveal].is-visible, .no-sda [data-stagger] > .is-visible { opacity: 1; translate: none; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    /* Content rises into place as it scrolls into view; grid items arrive one after another */
    [data-reveal], [data-stagger] > * {
      animation: revealUp linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 24%;
    }
    [data-stagger] > * { animation-range: entry calc(var(--i, 0) * 7%) cover calc(24% + var(--i, 0) * 4%); }

    /* Photos settle (zoom out slightly) as they come into view */
    .approach__media .frame img, .split > .frame img, .welcome__media .frame img, .principal__media .frame img,
    .mosaic .frame img, .event-card__poster img {
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 55%;
    }

    /* Section-heading colour stripe draws itself in */
    .section-head h2 { view-timeline: --head; }
    .section-head h2::after { animation: stripeGrow linear both; animation-timeline: --head; animation-range: entry 60% cover 45%; }

    /* Parallax: hero leaves drift down more slowly than the page scrolls */
    .jungle-corner {
      animation: leafSway 7s ease-in-out infinite alternate, leafParallax linear both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 90vh;
    }
    /* Scroll progress in the header */
    .scroll-progress { animation: scrollProgress linear both; animation-timeline: scroll(root); }
  }
}
.section-head h2::after, .page-hero h1::after, .notice h1::after { transform-origin: 0 50%; }
.section-head--center h2::after, .notice h1::after { transform-origin: 50% 50%; }

@keyframes wordIn { to { opacity: 1; translate: 0 0; } }
@keyframes fadeUp { from { opacity: 0; translate: 0 24px; } }
@keyframes stageIn { from { scale: 0.96; translate: 0 32px; } }
@keyframes revealUp { from { opacity: 0; translate: 0 40px; } }
@keyframes settle { from { scale: 1.14; } }
@keyframes stripeGrow { from { scale: 0 1; } }
@keyframes leafSway { from { rotate: -2.5deg; } to { rotate: 2deg; } }
@keyframes leafParallax { to { translate: 0 90px; } }
@keyframes rustle { from { translate: -10px 0; scale: 1 1; } to { translate: 10px 0; scale: 1 1.05; } }
@keyframes bob { from { translate: 0 2px; } to { translate: 0 -4px; } }
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -10deg; } 50% { rotate: 8deg; } 75% { rotate: -4deg; } }
@keyframes floaty { to { translate: 0 -8px; } }
@keyframes scrollProgress { to { clip-path: inset(0 0 0 0); } }

@media print {
  .site-header, .site-footer, .whatsapp-float, .visit-banner { display: none; }
  body { background: #fff; }
}
