/* ==========================================================================
   Victory Primary School — design system
   Built from the school crest: maroon shield, gold rim, the ribbon that
   carries "In God We Trust". Mobile-first: base styles are for phones,
   larger screens are layered on with min-width queries.
   ========================================================================== */

/* ---- Fonts (self-hosted, so they load fast and never depend on Google) -- */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ---- Tokens ------------------------------------------------------------- */
:root {
  /* Sampled from the crest */
  --maroon: #5f2230;       /* ribbon and shield border */
  --maroon-deep: #3a1119;  /* header, footer */
  --shield: #22090e;       /* darkest shield fill */
  --gold: #b39557;         /* coin rim */
  --gold-light: #dcc794;   /* gold on dark backgrounds */
  --gold-ink: #6f5321;     /* gold for text on light backgrounds */

  --paper: #f8f4ec;        /* warm off-white, like the crest's book pages */
  --paper-2: #efe7d7;
  --white: #ffffff;
  --ink: #211618;
  --muted: #5d4f51;
  --line: #ddd1bc;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: 1.25rem;
  --max: 72rem;
  --radius: 4px;
  --header-h: 4.5rem;
}

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); text-underline-offset: 0.18em; }
a:hover { color: var(--shield); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
  font-variation-settings: "SOFT" 30;
}
/* Big headings are set in spaced capitals, like the lettering on the crest */
h1, h2 { font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
h1 { font-size: clamp(2.3rem, 9vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 5.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 4vw, 1.45rem); }
p  { margin: 0 0 1em; max-width: 62ch; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 3.5rem; }
.section--tint { background: var(--paper-2); }
.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;
}
.skip-link {
  position: absolute; left: 0.75rem; top: -3rem; z-index: 200;
  background: var(--gold-light); color: var(--shield); padding: 0.6rem 1rem; font-weight: 700;
}
.skip-link:focus { top: 0.75rem; }

/* ---- Crest motifs -------------------------------------------------------- */

/* The ribbon: echoes the banner on the badge. Used as a section label. */
.ribbon {
  display: inline-block;
  position: relative;
  background: var(--maroon);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.38rem 1.35rem;
  margin-bottom: 1rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.6rem) 50%, 100% 100%, 0 100%, 0.6rem 50%);
}
.ribbon--gold { background: var(--gold-light); color: var(--shield); }

/* The rim: a thin-and-thick gold rule, like the edge of the coin. */
.rim {
  height: 7px; border: 0; margin: 0;
  background:
    linear-gradient(var(--gold), var(--gold)) top / 100% 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom / 100% 3px no-repeat;
}
.rim--short { width: 4.5rem; margin-block: 0 1.25rem; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: 700 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn--gold { background: var(--gold-light); color: var(--shield); }
.btn--gold:hover { background: var(--white); color: var(--shield); }
.btn--maroon { background: var(--maroon); color: var(--white); }
.btn--maroon:hover { background: var(--shield); color: var(--white); }
.btn--line-light { border-color: rgba(220, 199, 148, 0.7); color: var(--white); }
.btn--line-light:hover { border-color: var(--gold-light); background: rgba(255, 255, 255, 0.08); color: var(--white); }
.btn--line { border-color: var(--maroon); color: var(--maroon); }
.btn--line:hover { background: var(--maroon); color: var(--white); }
.btn-row { display: flex; flex-direction: column; gap: 0.75rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-weight: 700; text-decoration: none; color: var(--maroon);
}
.link-arrow::after { content: "→"; transition: transform 0.15s; }
.link-arrow:hover::after { transform: translateX(3px); }

/* Section label with a gold rim above it */
.label {
  display: inline-block;
  margin: 0 0 1.25rem;
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--maroon);
}
.label::before {
  content: ""; display: block; width: 100%; min-width: 4.5rem; height: 7px; margin-bottom: 0.9rem;
  background:
    linear-gradient(var(--gold), var(--gold)) top / 100% 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom / 100% 3px no-repeat;
}

/* ---- Top bar: phone, email, motto ------------------------------------------ */
.topbar { background: var(--shield); color: rgba(255, 255, 255, 0.8); font-size: 0.85rem; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar__contact { display: flex; gap: 1.5rem; }
.topbar a {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem;
  color: var(--white); text-decoration: none;
}
.topbar a:hover { color: var(--gold-light); }
.topbar svg { width: 0.95rem; height: 0.95rem; flex: none; color: var(--gold-light); }
.topbar .topbar__email, .topbar__motto { display: none; }
/* The email fits beside the phone number on all but the narrowest phones */
@media (min-width: 24em) { .topbar .topbar__email { display: inline-flex; } }
.topbar__motto { margin: 0; font-family: var(--font-display); font-style: italic; color: var(--gold-light); }

/* ---- Header ---------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(34, 9, 14, 0.07);
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; min-width: 0; }
.brand img { width: 3rem; height: 3rem; flex: none; }
.brand__name {
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--maroon);
}
.brand__sub {
  display: block; margin-top: 0.3rem;
  font-family: var(--font-body); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.24em; color: var(--gold-ink);
}

.menu-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 0.9rem;
  background: transparent; color: var(--maroon);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: 700 0.8rem var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
}
.menu-toggle__icon, .menu-toggle__icon::before, .menu-toggle__icon::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform 0.2s;
}
.menu-toggle__icon::before, .menu-toggle__icon::after { content: ""; position: absolute; left: 0; }
.menu-toggle__icon::before { top: -6px; }
.menu-toggle__icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after { transform: translateY(-6px) rotate(-45deg); }

/* Phone menu: a full-width panel under the header */
.site-nav {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white);
  border-bottom: 3px solid var(--maroon);
  box-shadow: 0 12px 24px rgba(34, 9, 14, 0.12);
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0.5rem var(--gutter) 1.25rem; }
.site-nav li + li { border-top: 1px solid var(--line); }
.site-nav a {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 3.25rem;
  color: var(--ink); text-decoration: none;
  font-size: 0.95rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.site-nav a[aria-current="page"] { color: var(--maroon); }
.site-nav a[aria-current="page"]::after { content: ""; width: 0.5rem; height: 0.5rem; transform: rotate(45deg); background: var(--gold); }
.site-nav .nav-apply {
  margin-top: 0.75rem; justify-content: center;
  background: var(--maroon); color: var(--white); border-radius: var(--radius);
}
.site-nav .nav-apply:hover { background: var(--shield); color: var(--white); }
/* On the Admissions page itself the button keeps its white text */
.site-nav .nav-apply[aria-current="page"] { color: var(--white); }
.site-nav .nav-apply[aria-current="page"]::after { display: none; }
.site-nav li:has(.nav-apply) { border-top: 0; }
body.nav-open { overflow: hidden; }

/* ---- Hero: one big photo of the school ------------------------------------- */
.hero {
  position: relative; isolation: isolate;
  display: flex; align-items: flex-end;
  min-height: 34rem;
  min-height: min(46rem, calc(100svh - var(--header-h) - 2.75rem));
  background: var(--shield); color: var(--white);
}
.hero__media, .hero__media img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(34, 9, 14, 0.94) 0%, rgba(34, 9, 14, 0.62) 42%, rgba(34, 9, 14, 0.08) 78%);
}
.hero__text { padding-block: 7rem 2.75rem; }
.hero .ribbon { background: var(--gold-light); color: var(--shield); }
.hero h1 {
  color: var(--white); margin-bottom: 0.4em;
  font-size: clamp(2.5rem, 11vw, 5rem); font-weight: 500; line-height: 1.02;
  letter-spacing: 0.05em; text-transform: uppercase;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.35);
}
.hero h1 span { display: block; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--gold-light); text-transform: none; letter-spacing: 0.01em; }
.hero__lead { font-size: 1.12rem; color: rgba(255, 255, 255, 0.9); margin-bottom: 1.6rem; max-width: 34rem; }

/* ---- Scroll reveals (homepage), after Chelsea Prep -------------------------
   Parts of the page slide, zoom or fade in once as they scroll into view.
   The "reveal-on" class is only added when the script can run and the visitor
   hasn't asked for reduced motion, so nothing is ever left hidden. */
main { overflow-x: clip; } /* sections sliding in from the side mustn't cause sideways scroll */
.reveal-on [data-reveal] {
  opacity: 0;
  transition: opacity var(--dur, 1s) ease-in-out, transform var(--dur, 1s) ease-in-out;
  transition-delay: var(--delay, 0s);
}
.reveal-on [data-reveal="left"] { transform: translateX(-14%); }
.reveal-on [data-reveal="right"] { transform: translateX(14%); }
.reveal-on [data-reveal="up"] { transform: translateY(2.5rem); }
.reveal-on [data-reveal="zoom"] { transform: scale(0.85); }
.reveal-on [data-reveal].is-revealed { opacity: 1; transform: none; }

/* ---- Principal's welcome --------------------------------------------------- */
.section--white { background: var(--white); }
.welcome { display: grid; gap: 1.5rem; }
.welcome__portrait {
  margin: 0; width: 11rem; padding: 5px; background: var(--gold);
  border-radius: 6px 6px 50% 50% / 6px 6px 22% 22%;
}
.welcome__portrait img {
  width: 100%; aspect-ratio: 8 / 9; object-fit: cover;
  border-radius: 3px 3px 50% 50% / 3px 3px 22% 22%;
}
.welcome h2 { font-style: italic; font-weight: 500; text-transform: none; letter-spacing: 0; }
.welcome__quote {
  margin: 0 0 1.25rem; padding-left: 1rem; border-left: 3px solid var(--gold);
  font-family: var(--font-display); font-size: 1.25rem; line-height: 1.4; color: var(--maroon);
}
.welcome__quote p { margin: 0; }
.sign-off { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.15rem; color: var(--maroon); }

/* ---- Photo bands: a full-width photo with a text panel --------------------- */
.band { background: var(--shield); color: var(--white); }
.band__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.band__panel { padding-block: 2.25rem 2.75rem; }
.band h2 { color: var(--white); }
.band p { color: rgba(255, 255, 255, 0.86); }
.band__meta {
  display: block; margin-bottom: 0.75rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-light);
}
.band--light { background: var(--paper-2); color: var(--ink); }
.band--light h2 { color: var(--maroon); }
.band--light p { color: var(--muted); }
.band--light .band__meta { color: var(--gold-ink); }

/* ---- Values (numbered, no icon boxes) ------------------------------------- */
.values { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0; counter-reset: v; }
.values li { padding: 1.4rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 3rem 1fr; gap: 0 0.75rem; counter-increment: v; }
.values li:last-child { border-bottom: 1px solid var(--line); }
.values li::before {
  content: counter(v, upper-roman);
  grid-row: span 2;
  font-family: var(--font-display); font-style: italic; font-size: 1.6rem; color: var(--gold-ink); line-height: 1.2;
}
.values h3 { margin-bottom: 0.3rem; }
.values p { margin: 0; color: var(--muted); }

/* ---- Scripture ----------------------------------------------------------- */
.scripture { text-align: center; }
.scripture__crest { width: 4rem; height: 4rem; margin: 0 auto 1.25rem; }
.scripture blockquote { margin: 0 auto; max-width: 34rem; }
.scripture blockquote p {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.35rem, 5vw, 2rem); line-height: 1.35; color: var(--maroon); margin: 0 auto 1rem;
}
.scripture cite { font-style: normal; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-ink); }

/* ---- Quick links: three ways in ------------------------------------------- */
.quick { display: grid; list-style: none; margin: 0; padding: 0; }
.quick li + li { border-top: 1px solid var(--line); }
.quick a {
  display: block; padding: 2rem 0.5rem; text-align: center;
  color: inherit; text-decoration: none;
}
.quick svg { width: 2.6rem; height: 2.6rem; margin: 0 auto 1rem; color: var(--maroon); }
.quick h2 { font-size: 1.3rem; margin-bottom: 0.5rem; color: var(--maroon); }
.quick p { margin: 0 auto; max-width: 22rem; color: var(--muted); font-size: 0.98rem; }
.quick a:hover h2 { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }

/* ---- School life stories ------------------------------------------------- */
.section-head { margin-bottom: 1.75rem; }
.section-head p { color: var(--muted); }
.stories { display: grid; gap: 1.75rem; }
.story { margin: 0; }
.story a { color: inherit; text-decoration: none; display: block; }
.story img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.story__meta {
  display: block; margin: 0.9rem 0 0.25rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-ink);
}
.story h3 { margin-bottom: 0.3rem; }
.story p { color: var(--muted); margin: 0; }
.story a:hover h3 { color: var(--maroon); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.section-foot { margin-top: 2rem; }

/* ---- Admissions band ----------------------------------------------------- */
.apply-band { background: var(--maroon); color: var(--white); }
.apply-band .wrap { padding-block: 3rem; }
.apply-band h2 { color: var(--white); }
.apply-band p { color: rgba(255, 255, 255, 0.84); }

/* ---- Footer: over a darkened photo of the school -------------------------- */
.site-footer {
  color: rgba(255, 255, 255, 0.8); font-size: 0.95rem;
  background-color: var(--shield);
  background-image:
    linear-gradient(rgba(34, 9, 14, 0.9), rgba(34, 9, 14, 0.94)),
    url("../_images/web/footer-lineup-960.jpg");
  background-image:
    linear-gradient(rgba(34, 9, 14, 0.9), rgba(34, 9, 14, 0.94)),
    image-set(url("../_images/web/footer-lineup-960.webp") type("image/webp"), url("../_images/web/footer-lineup-960.jpg") type("image/jpeg"));
  background-size: cover; background-position: center;
}
.site-footer > .wrap { padding-block: 3rem 2.5rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); text-decoration: underline; }
.footer-grid { display: grid; gap: 2.25rem; }
.footer-brand img { width: 4rem; height: 4rem; margin-bottom: 0.9rem; }
.footer-brand__name {
  margin: 0; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--white);
}
.footer-brand__motto { margin: 0.2rem 0 0.9rem; font-family: var(--font-display); font-style: italic; color: var(--gold-light); }
.site-footer h2 {
  font-size: 0.95rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold-light); margin-bottom: 0.9rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.1rem; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.site-footer .footer-contact { margin-bottom: 1.25rem; }
.footer-contact li { display: flex; gap: 0.6rem; align-items: center; min-height: 2.75rem; }
.footer-contact svg { width: 1rem; height: 1rem; flex: none; color: var(--gold-light); }
.site-footer .btn { color: var(--shield); }
.site-footer .btn:hover { color: var(--shield); text-decoration: none; }
.footer-bottom { background: var(--shield); border-top: 1px solid rgba(220, 199, 148, 0.25); }
.footer-bottom p {
  margin: 0; max-width: none; padding-block: 1rem;
  font-size: 0.82rem; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.6); text-align: center;
}

/* ==========================================================================
   Inner pages
   ========================================================================== */

/* ---- Page banner: a shorter photo hero with the page title ----------------- */
.page-hero {
  position: relative; isolation: isolate;
  display: flex; align-items: flex-end;
  min-height: 19rem;
  background: var(--shield); color: var(--white);
}
.page-hero__media, .page-hero__media img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(34, 9, 14, 0.94) 0%, rgba(34, 9, 14, 0.6) 55%, rgba(34, 9, 14, 0.25) 100%);
}
.page-hero__text { padding-block: 4rem 2.25rem; }
.page-hero h1 {
  color: var(--white); margin-bottom: 0.35em;
  font-size: clamp(2.1rem, 8vw, 3.6rem); line-height: 1.05;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.35);
}
.page-hero__lead { margin: 0; font-size: 1.08rem; color: rgba(255, 255, 255, 0.88); max-width: 36rem; }
.crumbs { margin-bottom: 0.9rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--gold-light); }
.crumbs a { color: var(--gold-light); text-decoration: none; display: inline-block; padding-block: 0.75rem; margin-block: -0.75rem; }
.crumbs a:hover { color: var(--white); text-decoration: underline; }
.crumbs [aria-current] { color: rgba(255, 255, 255, 0.85); }

/* Intro text under a section heading */
.intro { color: var(--muted); max-width: 40rem; }
.section-head .intro { margin-bottom: 0; }

/* ---- Two side-by-side statements (mission and vision) ---------------------- */
.pair { display: grid; gap: 2rem; margin-top: 2rem; }
.pair__item { padding-top: 1.25rem; border-top: 3px solid var(--gold); }
.pair__item h3 { color: var(--maroon); text-transform: uppercase; letter-spacing: 0.08em; font-size: 1.1rem; }
.pair__item p { margin: 0; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.5; color: var(--ink); }

/* ---- Timeline: the gold line runs to today, with a light travelling along it */
.timeline {
  --x: 0.6rem;               /* centre of the line */
  position: relative;
  margin: 2.5rem 0 0; padding: 0 0 0 2.75rem; max-width: 46rem;
}
.timeline ol { list-style: none; margin: 0; padding: 0; }
.timeline__track {
  position: absolute; left: calc(var(--x) - 1.5px); width: 3px;
  top: var(--track-top, 0.85rem); height: var(--track-h, calc(100% - 5rem));
  background: linear-gradient(var(--gold-light), var(--gold) 40%, var(--maroon));
  border-radius: 3px; overflow: hidden;
}
/* The light: a short bright streak that runs down the line, then starts again */
.timeline__spark {
  position: absolute; left: 0; width: 100%; height: 5rem; top: -5rem;
  background: linear-gradient(transparent, #fff8e4 70%, #fff);
  animation: spark-run 3.2s cubic-bezier(0.45, 0, 0.75, 1) infinite;
}
@keyframes spark-run {
  0% { top: -5rem; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.timeline li { position: relative; padding-bottom: 2.25rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; top: 0.45rem; left: calc(var(--x) - 2.75rem - 0.5rem);
  width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px var(--white);
}
.timeline__year {
  display: block; margin-bottom: 0.2rem;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--gold-ink); line-height: 1.2;
}
.timeline h3 { margin-bottom: 0.4rem; }
.timeline p { margin: 0; color: var(--muted); }

/* Where we are now: a bigger maroon dot sending out rings, and a live tag */
.timeline .is-now .timeline__dot {
  width: 1.4rem; height: 1.4rem; top: 0.3rem; left: calc(var(--x) - 2.75rem - 0.7rem);
  background: var(--maroon); box-shadow: 0 0 0 3px var(--gold-light), 0 0 0 6px var(--white);
}
.timeline .is-now .timeline__dot::before,
.timeline .is-now .timeline__dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--gold);
  animation: ring-out 2.4s ease-out infinite;
}
.timeline .is-now .timeline__dot::after { animation-delay: 1.2s; }
@keyframes ring-out {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(3); opacity: 0; }
}
.timeline .is-now .timeline__year { color: var(--maroon); }
.timeline__here {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.6rem; padding: 0.3rem 0.75rem 0.3rem 0.6rem;
  background: var(--maroon); color: var(--gold-light); border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.timeline__here::before {
  content: ""; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: #ffd76a; box-shadow: 0 0 6px 1px #ffd76a;
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.2; box-shadow: none; } }
/* The road ahead: a dotted line fading out below today */
.timeline .is-now::after {
  content: ""; position: absolute; left: calc(var(--x) - 2.75rem - 1px); top: 2.4rem; width: 2px; height: calc(100% - 1rem);
  background: repeating-linear-gradient(var(--gold) 0 4px, transparent 4px 10px);
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent);
}
@media (prefers-reduced-motion: reduce) { .timeline__spark { display: none; } }

/* ---- Team ------------------------------------------------------------------ */
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem 1.25rem; list-style: none; margin: 2rem 0 0; padding: 0; }
.team img { width: 100%; aspect-ratio: 8 / 9; object-fit: cover; border-radius: var(--radius); border-bottom: 3px solid var(--gold); }
.team h3 { margin: 0.8rem 0 0.15rem; font-size: 1.1rem; }
.team__role { display: block; margin-bottom: 0.4rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-ink); }
.team p { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* ---- Subjects by phase ------------------------------------------------------ */
.phases { display: grid; gap: 1.5rem; margin-top: 2rem; }
.phase { background: var(--white); border-top: 3px solid var(--maroon); padding: 1.5rem 1.5rem 1.75rem; }
.phase h3 { margin-bottom: 0.2rem; color: var(--maroon); text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.15rem; }
.phase__grades { display: block; margin-bottom: 1rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-ink); }

/* Diamond-bullet list, used for subjects and checklists */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; }
.checklist li { display: flex; gap: 0.75rem; align-items: baseline; }
.checklist li::before {
  content: ""; flex: none; width: 0.5rem; height: 0.5rem; transform: translateY(-0.12em) rotate(45deg);
  background: var(--gold);
}
.checklist--boxed li { padding: 0.9rem 1rem; background: var(--white); border-left: 3px solid var(--gold); font-weight: 600; }

/* ---- Features: short titled paragraphs under a gold rule ------------------- */
.features { display: grid; gap: 1.75rem; list-style: none; margin: 2rem 0 0; padding: 0; }
.features li { padding-top: 1rem; border-top: 1px solid var(--line); }
.features h3 { color: var(--maroon); }
.features p { margin: 0; color: var(--muted); }

/* ---- Notice box -------------------------------------------------------------- */
.notice {
  padding: 1.25rem 1.4rem; background: var(--white);
  border: 1px solid var(--line); border-left: 4px solid var(--maroon);
}
.notice h2, .notice h3 { font-size: 1.15rem; margin-bottom: 0.35rem; color: var(--maroon); }
.notice p { margin: 0; color: var(--muted); }
.notice--gold { border-left-color: var(--gold); }

/* ---- Numbered steps ------------------------------------------------------- */
.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.5rem; counter-reset: s; }
.steps li { counter-increment: s; padding: 1.5rem; background: var(--white); border-top: 3px solid var(--gold); }
.steps li::before {
  content: counter(s, upper-roman); display: block; margin-bottom: 0.5rem;
  font-family: var(--font-display); font-style: italic; font-size: 1.8rem; line-height: 1; color: var(--gold-ink);
}
.steps h3 { font-size: 1.15rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* ---- Download card ---------------------------------------------------------- */
.download {
  display: grid; gap: 1rem; align-items: center;
  margin-top: 2rem; padding: 1.5rem; background: var(--paper);
  border: 1px solid var(--line); border-top: 3px solid var(--maroon);
}
.download svg { width: 3rem; height: 3rem; color: var(--maroon); }
.download h3 { margin-bottom: 0.3rem; font-size: 1.15rem; }
.download p { margin: 0; color: var(--muted); }
.help-line { margin-top: 1.25rem; color: var(--muted); }
.help-line a { font-weight: 700; }

/* ---- Tables ------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin-top: 1.75rem; }
.table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 0.98rem; }
.table th {
  text-align: left; padding: 0.85rem 1rem; background: var(--maroon); color: var(--white);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
.table tr:nth-child(even) td { background: var(--paper); }
.table td:first-child { font-weight: 600; }

/* ---- Contact ------------------------------------------------------------------ */
.contact-layout { display: grid; gap: 3rem; }
.contact-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0; }
.contact-list li { display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.25rem 0.75rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list svg { width: 1.4rem; height: 1.4rem; margin-top: 0.2rem; color: var(--maroon); grid-row: span 2; }
.contact-list h3 { margin: 0; font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-ink); }
.contact-list p { margin: 0; }
.contact-list a { font-weight: 700; display: inline-block; padding-block: 0.5rem; margin-block: -0.5rem; }
.contact-list small { display: block; color: var(--muted); font-size: 0.88rem; }
.map { margin-top: 2rem; border: 1px solid var(--line); border-top: 3px solid var(--gold); background: var(--paper-2); }
.map iframe { display: block; width: 100%; height: 18rem; border: 0; }

.form { background: var(--white); border-top: 3px solid var(--maroon); padding: 1.75rem 1.25rem; box-shadow: 0 6px 24px rgba(34, 9, 14, 0.06); }
.form h2 { font-size: 1.5rem; }
.form__row { display: grid; gap: 0 1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: 0.35rem; font-size: 0.92rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.7rem 0.85rem;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid #cdbfa6; border-radius: var(--radius);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--maroon); background: var(--white); }
.form .btn { width: 100%; }
.form__status { margin: 1rem 0 0; font-weight: 700; }
.form__status--ok { color: #2f6b33; }
.form__status--error { color: #a3261c; }
.form__note { margin: 1rem 0 0; font-size: 0.85rem; color: var(--muted); font-style: italic; text-align: center; max-width: none; }

/* ---- Questions and answers ------------------------------------------------ */
.faq { margin-top: 1.75rem; max-width: 46rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 3.5rem; padding: 0.9rem 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--maroon);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.5rem; font-weight: 400; color: var(--gold-ink); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.2rem; color: var(--muted); }

/* ---- Events calendar ----------------------------------------------------------- */
.terms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; list-style: none; margin: 2rem 0 0; padding: 0; }
.terms a {
  position: relative; display: block; height: 100%; padding: 1.1rem 1rem 1.25rem;
  background: var(--white); border-top: 3px solid var(--gold); color: inherit; text-decoration: none;
}
.terms a:hover { border-top-color: var(--maroon); }
.terms strong { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--maroon); }
.terms span { display: block; font-size: 0.92rem; }
.terms small { display: block; margin-top: 0.25rem; color: var(--muted); }
.terms .is-current a { background: var(--maroon); border-top-color: var(--gold-light); color: var(--white); }
.terms .is-current strong { color: var(--gold-light); }
.terms .is-current small { color: rgba(255, 255, 255, 0.75); }
.live-tag {
  display: inline-flex !important; align-items: center; gap: 0.4rem; margin-top: 0.6rem;
  font-size: 0.7rem !important; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-light);
}
.live-tag::before {
  content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%;
  background: #ffd76a; box-shadow: 0 0 6px 1px #ffd76a; animation: blink 1.2s ease-in-out infinite;
}

.term-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; }
.term-head h2 { margin-bottom: 0.2rem; }
.term-head p { margin: 0; font-weight: 600; color: var(--gold-ink); }
.events { list-style: none; margin: 1.75rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.event { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.event time {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 4rem; background: var(--maroon); color: var(--white); line-height: 1;
}
.event time b { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.event time span { margin-top: 0.2rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-light); }
.event__tag { display: inline-block; margin-bottom: 0.25rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-ink); }
.event h3 { margin-bottom: 0.25rem; font-size: 1.15rem; }
.event p { margin: 0; color: var(--muted); font-size: 0.98rem; }
/* Set by the script from today's date */
.event.is-past { opacity: 0.55; }
.event.is-past time { background: var(--muted); }
.event.is-past .event__tag::after { content: " · Done"; }
.event.is-next { position: relative; background: var(--white); box-shadow: inset 4px 0 0 var(--gold); padding-inline: 0.75rem; margin-inline: -0.75rem; }
.event.is-next .event__tag { color: var(--maroon); }
.event.is-next .event__tag::before {
  content: "Next up · "; color: var(--maroon);
}

/* ---- Gallery ------------------------------------------------------------------ */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.filters button {
  min-height: 2.75rem; padding: 0 1.1rem; cursor: pointer;
  background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  font: 700 0.78rem var(--font-body); letter-spacing: 0.12em; text-transform: uppercase;
}
.filters button:hover { border-color: var(--maroon); color: var(--maroon); }
.filters button[aria-pressed="true"] { background: var(--maroon); border-color: var(--maroon); color: var(--white); }
.filters button span { font-weight: 400; opacity: 0.7; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.gallery[hidden], .gallery li[hidden] { display: none; }
.gallery a { display: block; position: relative; overflow: hidden; background: var(--paper-2); }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.3s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery a:focus-visible { outline-offset: -3px; }

.lightbox {
  width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(20, 5, 8, 0.96); color: var(--white);
}
.lightbox::backdrop { background: rgba(20, 5, 8, 0.96); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.5rem var(--gutter); }
.lightbox__count { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-light); }
.lightbox figure { margin: 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 0.5rem; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__nav { display: flex; justify-content: center; gap: 1rem; padding: 0.75rem var(--gutter) 1.25rem; }
.lightbox button {
  min-width: 2.75rem; min-height: 2.75rem; padding: 0 1rem; cursor: pointer;
  background: transparent; color: var(--white); border: 1px solid rgba(220, 199, 148, 0.6); border-radius: var(--radius);
  font: 700 0.8rem var(--font-body); letter-spacing: 0.12em; text-transform: uppercase;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--gold-light); }
body.lightbox-open { overflow: hidden; }

/* ---- Inner pages on larger screens -------------------------------------------- */
@media (min-width: 40em) {
  .page-hero { min-height: 22rem; }
  .pair { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .team { grid-template-columns: repeat(3, 1fr); gap: 2.25rem 1.75rem; max-width: 50rem; }
  .features { grid-template-columns: 1fr 1fr; gap: 2rem 3rem; }
  .steps { grid-template-columns: 1fr 1fr; }
  .checklist--boxed { grid-template-columns: 1fr 1fr; }
  .download { grid-template-columns: auto 1fr auto; gap: 1.5rem; padding: 1.75rem 2rem; }
  .form { padding: 2.25rem 2rem; }
  .form__row { grid-template-columns: 1fr 1fr; }
  .terms { grid-template-columns: repeat(4, 1fr); }
  .event { grid-template-columns: 4.5rem 1fr; gap: 1.5rem; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
}
@media (min-width: 64em) {
  .page-hero { min-height: 26rem; }
  .page-hero__text { padding-block: 5rem 3rem; }
  .phases { grid-template-columns: repeat(3, 1fr); }
  .story-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 4rem; align-items: start; }
  .story-layout__head { position: sticky; top: calc(var(--header-h) + 2rem); }
  .story-layout .timeline { margin-top: 0.5rem; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .contact-layout { grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: start; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .lightbox figure { padding: 0 2rem; }
}

/* ==========================================================================
   Larger screens
   ========================================================================== */
@media (min-width: 40em) {
  :root { --gutter: 2rem; }
  .btn-row { flex-direction: row; flex-wrap: wrap; }
  .topbar__motto { display: block; }
  .welcome__portrait { width: 13rem; }
  .quick { grid-template-columns: repeat(3, 1fr); }
  .quick li + li { border-top: 0; border-left: 1px solid var(--line); }
  .quick a { padding: 1rem 1.5rem; }
  .stories { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 64em) {
  :root { --header-h: 6rem; }
  .section { padding-block: 5.5rem; }

  .brand img { width: 4.25rem; height: 4.25rem; }
  .brand__name { font-size: 1.85rem; }
  .brand__sub { font-size: 0.68rem; }

  /* Desktop nav sits inline */
  .menu-toggle { display: none; }
  .site-nav { display: block; position: static; background: none; border: 0; box-shadow: none; max-height: none; overflow: visible; }
  .site-nav ul { display: flex; align-items: center; gap: 0.1rem; padding: 0; }
  .site-nav li + li { border-top: 0; }
  .site-nav a {
    min-height: 2.75rem; padding: 0 0.7rem;
    font-size: 0.78rem; color: var(--ink);
    border-bottom: 2px solid transparent;
  }
  .site-nav a:hover { color: var(--maroon); border-bottom-color: var(--gold); }
  .site-nav a[aria-current="page"] { color: var(--maroon); border-bottom-color: var(--maroon); }
  .site-nav a[aria-current="page"]::after { display: none; }
  .site-nav .nav-apply { margin: 0 0 0 0.9rem; min-height: 3rem; padding: 0 1.4rem; border-bottom: 0; }
  .site-nav .nav-apply:hover { border-bottom: 0; }
  body.nav-open { overflow: auto; }

  .hero { align-items: center; }
  .hero::before {
    background:
      linear-gradient(90deg, rgba(34, 9, 14, 0.9) 0%, rgba(34, 9, 14, 0.66) 38%, rgba(34, 9, 14, 0) 72%),
      linear-gradient(to top, rgba(34, 9, 14, 0.45), rgba(34, 9, 14, 0) 40%);
  }
  .hero__text { padding-block: 5rem; }
  .hero__text > * { max-width: 38rem; }

  .welcome { grid-template-columns: 17rem 1fr; gap: 5rem; align-items: start; }
  .welcome__body { max-width: 44rem; }

  .band { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 36rem; }
  .band__media, .band__media img {
    position: absolute; inset: 0; z-index: -1;
    width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover;
    object-position: var(--focus, 50% 50%);
  }
  .band__inner { display: flex; }
  .band--low { align-items: flex-end; }
  .band--right .band__inner { justify-content: flex-end; }
  .band__panel {
    max-width: 28rem; padding: 2.75rem 2.5rem;
    background: rgba(58, 17, 25, 0.9);
    border-top: 3px solid var(--gold);
  }
  .band--light { background: var(--shield); }
  .band--light .band__panel { background: rgba(248, 244, 236, 0.95); }

  .quick a { padding: 1.25rem 2.5rem; }

  .values-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 4rem; align-items: start; }
  .values { margin-top: 0; }

  .stories { grid-template-columns: repeat(3, 1fr); gap: 2rem; }

  .apply-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 3rem; padding-block: 4rem; }
  .apply-band .wrap > div:first-child { max-width: 36rem; }
  .apply-band p { margin-bottom: 0; }
  .apply-band .btn-row { flex: none; }

  .site-footer > .wrap { padding-block: 4.5rem 3.5rem; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1.2fr; gap: 4rem; }
  .footer-brand { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
