/* ============================================================================
   site.css — bands, section heads, split, pillars, stats, schools, people,
   careers, contact form, CTA band
   ========================================================================== */

.band { padding: clamp(64px, 9vw, 120px) var(--gutter); }
.band--alt { background: var(--paper-alt); }
.band--navy { background: var(--navy); color: var(--on-dark-soft); }
.band--navy h2, .band--navy h3 { color: var(--white); }
.band--navy .eyebrow { color: var(--frost); }
.wrap { max-width: var(--maxw); margin: 0 auto; }
.wrap--narrow { max-width: 820px; }

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2 { margin-top: 12px; }
.section-head .lede { margin-top: 18px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* --- statement: big opening line ------------------------------------------- */
.statement { display: grid; grid-template-columns: 1fr 1.25fr; column-gap: clamp(32px, 6vw, 96px); row-gap: 16px; align-items: start; }
/* The eyebrow spans both columns so the heading and the body copy start on the
   same line. Aligning the copy to the eyebrow looked top-heavy (Iris, 5 Oct). */
.statement__eyebrow { grid-column: 1 / -1; }
.statement__body { padding-top: 4px; }   /* optical: match the heading cap height */
.statement h2 { font-size: clamp(28px, 3.4vw, 40px); }
.statement__body p { font-size: 18px; }
@media (max-width: 860px) { .statement { grid-template-columns: 1fr; row-gap: 12px; } .statement__body { padding-top: 8px; } }

/* --- split: image one side, copy the other ---------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--flip .split__media { order: 2; }
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
/* the triangle device, tucked behind one corner of the photo */
.split__media::after {
  content: ""; position: absolute; z-index: -1;
  right: -22px; bottom: -22px; width: 46%; aspect-ratio: 1;
  background: var(--frost);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.split--flip .split__media::after {
  right: auto; left: -22px;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}
.split__media { isolation: isolate; }
.split__copy h2 { margin-top: 12px; }
.split__copy p { margin-top: 18px; }
.split__copy .te-btn { margin-top: 28px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .split__media::after { right: -12px; bottom: -12px; }
  .split--flip .split__media::after { left: -12px; }
}

/* --- stats ------------------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 40px; }
.stats > div { padding: 4px 28px; border-left: 3px solid var(--frost); }
.stats strong {
  display: block; font-family: var(--font-head); font-weight: 900;
  font-size: clamp(40px, 5vw, 60px); line-height: 1; color: var(--ink); letter-spacing: -.03em;
}
.stats span { display: block; margin-top: 8px; font-size: 15px; }
.band--navy .stats strong { color: var(--white); }
@media (max-width: 640px) {
  .stats > div { padding: 2px 0 2px 12px; }
  .stats strong { font-size: 30px; }
  .stats span { font-size: 13px; line-height: 1.35; }
}

/* --- pillars: three numbered cards ------------------------------------------ */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: pillar; }
.pillar {
  position: relative; overflow: hidden;
  background: var(--white); padding: 36px 30px 34px; border-radius: var(--radius);
  box-shadow: var(--shadow); counter-increment: pillar;
}
.pillar::before {
  content: counter(pillar, decimal-leading-zero);
  display: block; font-family: var(--font-sub); font-weight: 700; font-size: 14px;
  color: var(--accent-ink); letter-spacing: .1em; margin-bottom: 26px;
}
.pillar::after {
  content: ""; position: absolute; top: 0; right: 0; width: 64px; aspect-ratio: 1;
  background: var(--frost); clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.pillar p { margin-top: 12px; font-size: 16px; }
.band--navy .pillar { background: rgba(255, 255, 255, .05); box-shadow: none; border: 1px solid rgba(255, 255, 255, .12); }
.band--navy .pillar::before { color: var(--frost); }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* --- video facade: loads YouTube only when clicked --------------------------- */
.video {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  border: 0; padding: 0; cursor: pointer; overflow: hidden; border-radius: var(--radius);
  background: var(--navy);
}
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s, transform .4s; }
.video:hover img { opacity: 1; transform: scale(1.02); }
.video__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--frost); display: grid; place-items: center;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5);
}
.video__play svg { width: 30px; height: 30px; margin-left: 4px; fill: var(--white); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- schools grid ----------------------------------------------------------- */
.schools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.school {
  display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.school:hover { transform: translateY(-3px); color: inherit; box-shadow: 0 1px 2px rgba(24, 26, 77, .06), 0 22px 48px -22px rgba(24, 26, 77, .45); }
.school__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.school__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.school:hover .school__media img { transform: scale(1.04); }
.school__media::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 72px; aspect-ratio: 1;
  background: var(--frost); clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.school__tag {
  position: absolute; left: 14px; top: 14px; z-index: 1;
  background: var(--peach); color: var(--navy);
  font-family: var(--font-sub); font-size: 12px; font-weight: 700; letter-spacing: .06em;
  padding: 6px 10px; border-radius: 3px;
}
.school__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.school__place { margin-top: 6px; font-size: 15px; color: var(--ink-mute); }
.school__link {
  margin-top: auto; padding-top: 18px;
  font-size: 14px; font-weight: 700; color: var(--accent-ink);
  display: inline-flex; align-items: center; gap: 6px;
}
.school__link svg { width: 14px; height: 14px; transition: transform .2s; }
.school:hover .school__link svg { transform: translate(2px, -2px); }
@media (max-width: 1000px) { .schools { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .schools { grid-template-columns: 1fr; } }

/* --- region filter (learning communities) ------------------------------------ */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter button {
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  padding: 9px 16px; border-radius: 999px;
  background: var(--white); color: var(--ink); border: 1px solid var(--line);
}
.filter button[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.school[hidden] { display: none; }

/* --- people ----------------------------------------------------------------- */
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.person {
  background: var(--white); padding: 34px 32px; border-radius: var(--radius);
  box-shadow: var(--shadow); border-top: 4px solid var(--frost);
}
.person__role { margin-top: 6px; font-size: 15px; font-weight: 500; color: var(--accent-ink); }
.person p { margin-top: 16px; font-size: 16px; }
@media (max-width: 760px) { .people { grid-template-columns: 1fr; } }

/* --- careers ---------------------------------------------------------------- */
.jobs { display: grid; gap: 16px; }
.job {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  scroll-margin-top: 100px;
}
.job summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center;
  padding: 24px 28px;
}
.job summary::-webkit-details-marker { display: none; }
.job summary h3 { font-size: 20px; }
.job__meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-mute); }
.job__chev {
  grid-column: 2; grid-row: 1 / span 2;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; transition: transform .2s, background .2s;
}
.job__chev svg { width: 16px; height: 16px; }
.job[open] .job__chev { transform: rotate(180deg); background: var(--grey); }
.job:target, .job[open] { border-color: var(--frost); }
.job__body { padding: 0 28px 28px; border-top: 1px solid var(--line); }
.job__body p, .job__body ol { margin-top: 16px; }
.job__body ol { padding-left: 20px; }
.job__body li + li { margin-top: 6px; }
.job__body .te-btn { margin-top: 24px; }
.note {
  margin-top: 28px; padding: 18px 22px; border-left: 3px solid var(--frost);
  background: var(--paper-alt); font-size: 15px;
}

/* --- contact ----------------------------------------------------------------
   Email only, no form (Iris, 5 Oct 2026): head office gets little traffic and
   parents and job seekers are routed elsewhere. */
.contact { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact__email { margin-top: 22px; }
.contact__email a {
  font-family: var(--font-head); font-weight: 900; letter-spacing: -.02em;
  font-size: clamp(28px, 4vw, 44px); color: var(--ink); text-decoration: none;
  background-image: linear-gradient(var(--frost), var(--frost)); background-size: 100% 3px;
  background-position: 0 100%; background-repeat: no-repeat; padding-bottom: 4px;
  overflow-wrap: anywhere;
}
.contact__email a:hover { color: var(--accent-ink); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.contact__actions [hidden] { display: none; }
.contact__address { margin: 40px 0 0; }
.contact__address dt, .contact__routes strong {
  display: block; font-family: var(--font-sub); font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink);
}
.contact__address dd { margin: 6px 0 0; }
.contact__routes {
  background: var(--white); padding: clamp(26px, 4vw, 40px); border-radius: var(--radius);
  box-shadow: var(--shadow); border-top: 4px solid var(--frost);
}
.contact__routes ul { list-style: none; margin: 20px 0 0; padding: 0; }
.contact__routes li { padding: 18px 0; border-top: 1px solid var(--line); }
.contact__routes li:last-child { padding-bottom: 0; }
.contact__routes p { margin-top: 6px; font-size: 16px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* --- CTA band: photo with navy wash ----------------------------------------- */
.cta {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(80px, 12vw, 150px) var(--gutter);
  background: var(--navy); color: var(--white); text-align: center;
}
.cta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(24, 26, 77, .78); }
.cta::after {
  content: ""; position: absolute; left: 0; top: 0; width: clamp(90px, 14vw, 200px); aspect-ratio: 1;
  background: var(--frost); clip-path: polygon(0 0, 100% 0, 0 100%);
}
.cta h2 { color: var(--white); max-width: 18ch; margin: 0 auto; }
.cta .lede { color: var(--on-dark-soft); margin: 18px auto 0; max-width: 54ch; }
.cta .te-hero__actions { justify-content: center; }

/* --- reveal on scroll (scripts/chrome.js adds .is-in) ------------------------ */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* --- films stage (home) ------------------------------------------------------
   One large film centred, its neighbours peeking in at the sides, arrows sitting
   on the edges of the frame. A scroll-snap track underneath, so touch,
   trackpad and keyboard work without JS; scripts/chrome.js adds arrows, dots,
   click-a-neighbour-to-bring-it-in, and stop-on-move. */
.films-band { padding-left: 0; padding-right: 0; overflow: hidden; }
.films-head { padding: 0 var(--gutter); margin-bottom: clamp(28px, 4vw, 48px); text-align: center; }
.films-head h2 { margin-top: 12px; }

.films-stage {
  --card: min(84vw, 900px);
  position: relative;
}
.films {
  position: relative; /* so card offsetLeft is measured from the track */
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--card); gap: clamp(14px, 2.2vw, 28px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 4px calc((100% - var(--card)) / 2) 8px;
  scrollbar-width: none;
}
.films::-webkit-scrollbar { display: none; }
.films:focus-visible { outline-offset: -3px; }
.film { scroll-snap-align: center; min-width: 0; transition: opacity .35s, transform .35s; }
.js .film { opacity: .38; transform: scale(.94); }
.js .film.is-active { opacity: 1; transform: none; }
.js .film:not(.is-active) .video { cursor: pointer; }
.js .film:not(.is-active) .video__play { opacity: 0; }
.film .video { border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.film .video::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 16%; aspect-ratio: 1; pointer-events: none;
  background: var(--frost); clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.film__cap { padding: 20px 2px 0; text-align: center; }
.film__school { font-family: var(--font-sub); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--frost); }
.film__school span { color: var(--on-dark-soft); font-weight: 500; letter-spacing: .04em; text-transform: none; }
.film__cap h3 { margin-top: 6px; font-size: clamp(20px, 2.2vw, 28px); }

/* arrows ride on the left and right edges of the centred frame, at its middle */
.films-arrow {
  position: absolute; z-index: 3;
  top: calc(4px + var(--card) * 9 / 32);
  transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .94); color: var(--navy);
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .6);
  transition: opacity .2s, background .15s, color .15s, transform .15s;
}
.films-arrow[hidden] { display: none; }
.films-arrow svg { width: 22px; height: 22px; }
.films-arrow:hover { background: var(--frost); color: var(--white); transform: translateY(-50%) scale(1.06); }
.films-arrow--prev { left: calc(50% - var(--card) / 2 - 28px); }
.films-arrow--next { right: calc(50% - var(--card) / 2 - 28px); }
.films-arrow:disabled { opacity: 0; pointer-events: none; }

.films-dots { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.films-dots[hidden] { display: none; }
.films-dots button {
  width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .3); transition: width .25s, background .25s;
}
.films-dots button[aria-current="true"] { width: 28px; background: var(--frost); }

@media (max-width: 700px) {
  .films-stage { --card: 84vw; }
  .films-arrow { width: 42px; height: 42px; }
  .films-arrow svg { width: 18px; height: 18px; }
  .films-arrow--prev { left: calc(50% - var(--card) / 2 - 12px); }
  .films-arrow--next { right: calc(50% - var(--card) / 2 - 12px); }
}

/* people with portraits */
.person { display: grid; grid-template-columns: 180px 1fr; gap: 26px; align-items: start; }
.person__photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 1000px) { .person { grid-template-columns: 150px 1fr; gap: 22px; padding: 28px 24px; } }
@media (max-width: 760px)  { .person { grid-template-columns: 170px 1fr; } }
/* Phones: photo beside the name and title, bio full width underneath, so the
   portrait can stay a decent size (Iris: at 92px they looked tiny). */
@media (max-width: 560px) {
  .person {
    grid-template-columns: 136px 1fr;
    grid-template-areas: "photo name" "photo role" "bio bio";
    grid-template-rows: 1fr 1fr auto;
    column-gap: 18px; row-gap: 0; padding: 24px 20px;
  }
  .person__body { display: contents; }
  .person__photo { grid-area: photo; }
  .person h3 { grid-area: name; align-self: end; font-size: 21px; }
  .person__role { grid-area: role; align-self: start; }
  .person p:not(.person__role) { grid-area: bio; margin-top: 20px; }
}

/* --- photo mosaic (home) -------------------------------------------------------
   Two portrait tiles bracketing two landscape tiles. Placement is by grid area
   so each photo keeps an orientation that suits it at every width. */
.mosaic {
  display: grid; gap: clamp(10px, 1.6vw, 18px);
  grid-template-columns: 1fr 1.35fr 1fr;
  grid-template-rows: repeat(2, clamp(200px, 22vw, 290px));
  grid-template-areas: "rugby pool doorway" "rugby chapel doorway";
}
.mosaic__tile { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--grey); }
.mosaic__tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.mosaic__tile:hover img { transform: scale(1.04); }
.mosaic__tile:nth-child(1) { grid-area: rugby; }
.mosaic__tile:nth-child(2) { grid-area: pool; }
.mosaic__tile:nth-child(3) { grid-area: chapel; }
.mosaic__tile:nth-child(4) { grid-area: doorway; }
.mosaic__tile:nth-child(1) img { object-position: 50% 35%; }
.mosaic__tile:nth-child(4) img { object-position: 50% 30%; }
.mosaic__tile:nth-child(2)::after {
  content: ""; position: absolute; right: 0; top: 0; width: 64px; aspect-ratio: 1;
  background: var(--frost); clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.mosaic figcaption {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(24, 26, 77, .82); color: var(--white);
  font-family: var(--font-sub); font-size: 12px; font-weight: 700; letter-spacing: .06em;
  padding: 6px 10px; border-radius: 3px;
}
@media (max-width: 760px) {
  .mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 150px repeat(2, 170px);
    grid-template-areas: "pool chapel" "rugby doorway" "rugby doorway";
  }
  .mosaic figcaption { left: 8px; bottom: 8px; font-size: 11px; padding: 5px 8px; }
}
