/* =========================================================
   Southbourne Primary School
   ========================================================= */

:root {
  --paper: #f7f2eb;
  --paper-2: #efe6da;
  --ink: #1d1517;
  --ink-2: #463a3d;
  --muted: #7a6d70;
  --maroon: #8a1538;
  --maroon-2: #ad2150;
  --deep: #2a0712;
  --gold: #e3a83b;
  --line: rgba(29, 21, 23, 0.12);
  --line-light: rgba(255, 255, 255, 0.14);

  --ff-d: "Fraunces", Georgia, "Times New Roman", serif;
  --ff-b: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pad: clamp(20px, 4.5vw, 64px);
  --max: 1320px;
  --r: 22px;
  --r-lg: 32px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 76px;
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ff-b);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

::selection { background: var(--maroon); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

/* Subtle paper grain */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 150; pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section--tight { padding: clamp(56px, 8vw, 100px) 0; }

/* ---------- Type ---------- */

.display,
.h1, .h2, .h3 {
  font-family: var(--ff-d);
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  letter-spacing: -0.025em;
  line-height: 1;
}
.display { font-size: clamp(3.2rem, 9.5vw, 9.5rem); line-height: 0.92; letter-spacing: -0.04em; }
.h1 { font-size: clamp(3.2rem, 8.2vw, 7.6rem); line-height: 0.95; letter-spacing: -0.035em; }
.h2 { font-size: clamp(2.5rem, 5.6vw, 5rem); line-height: 1.02; }
.h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.12; letter-spacing: -0.015em; }
.display em, .h1 em, .h2 em, .h3 em {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  color: var(--maroon);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: clamp(1rem, 1.3vw, 1.2rem); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--maroon);
}
.eyebrow::before {
  content: ""; width: 11px; height: 11px; border-radius: 50%; background: currentColor;
}
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }

/* SplitText line masks */
.line-mask { overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }

/* ---------- Buttons ---------- */

.btn {
  --bg: var(--maroon); --fg: #fff;
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 24px; border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em;
  overflow: hidden; isolation: isolate;
  transition: transform 0.5s var(--ease), color 0.4s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink); border-radius: inherit;
  transform: translateY(101%); transition: transform 0.5s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn:active { transform: scale(0.97); }
.arr { width: 18px; height: 18px; flex: none; transition: transform 0.5s var(--ease); }
.phase__go .arr { width: 22px; height: 22px; }
.btn:hover .arr { transform: translateX(4px); }

.btn--ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: #fff; }
.btn--light { --bg: #fff; --fg: var(--maroon); }
.btn--light::before { background: var(--gold); }
.btn--light:hover { color: var(--deep); }

.link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size 0.5s var(--ease);
}
.link:hover { background-size: 100% 1.5px; }
.link:hover .arr { transform: translateX(4px); }

/* ---------- Announcement ---------- */

.announce {
  position: relative; z-index: 101;
  background: var(--deep); color: #f3e7dc;
  font-size: 0.85rem; text-align: center; padding: 10px var(--pad);
}
.announce a { color: var(--gold); font-weight: 700; }
.announce .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); margin-right: 10px; vertical-align: 1px;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  transition: transform 0.5s var(--ease), background 0.4s, box-shadow 0.4s;
}
.nav.is-scrolled {
  background: rgba(247, 242, 235, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand__name { font-family: var(--ff-d); font-size: 1.2rem; line-height: 1; letter-spacing: -0.01em; }
.brand__name small {
  display: block; font-family: var(--ff-b); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 4px;
}

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  position: relative; padding: 8px 14px; border-radius: 999px;
  font-size: 0.92rem; font-weight: 600; color: var(--ink-2);
  transition: color 0.3s, background 0.3s;
}
.nav__links a:hover { color: var(--ink); background: rgba(29, 21, 23, 0.05); }
.nav__links a[aria-current="page"] { color: var(--maroon); }
.nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--maroon); transform: translateX(-50%);
}
.nav__cta { padding: 11px 20px; font-size: 0.88rem; }

.burger { display: none; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); position: relative; z-index: 120; }
.burger span {
  position: absolute; left: 14px; right: 14px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}
.burger span:nth-child(1) { top: 19px; }
.burger span:nth-child(2) { top: 25px; }
.menu-open .burger span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

.mmenu {
  position: fixed; inset: 0; z-index: 110;
  background: var(--deep); color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  padding: 100px var(--pad) 40px;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}
.mmenu a.mlink {
  display: block; font-family: var(--ff-d); font-size: clamp(2.2rem, 9vw, 3.6rem);
  line-height: 1.15; letter-spacing: -0.03em;
}
.mmenu a.mlink span { display: inline-block; }
.mmenu__foot { margin-top: 40px; font-size: 0.9rem; color: rgba(255,255,255,0.6); }
.mmenu__foot a { color: var(--gold); }

@media (max-width: 1080px) {
  .nav__links, .nav__cta { display: none; }
  .burger { display: block; }
}

/* ---------- Home hero ---------- */

.hero { position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 110px); }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 80px); align-items: center;
}
.hero__title { margin: 22px 0 28px; font-size: clamp(3rem, 6.4vw, 6.8rem); }
.hero__title .accent { color: var(--maroon); font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero__media { position: relative; aspect-ratio: 4 / 4.6; }
.hero__main {
  position: absolute; inset: 0 0 0 12%;
  border-radius: var(--r-lg); overflow: hidden; background: var(--paper-2);
}
.hero__main img { width: 100%; height: 115%; object-fit: cover; object-position: 60% 30%; }
.hero__float {
  position: absolute; left: 0; bottom: 8%; width: 42%;
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(42, 7, 18, 0.45);
  border: 6px solid var(--paper);
}
.hero__float img { aspect-ratio: 1 / 1.05; object-fit: cover; width: 100%; }
.badge {
  position: absolute; right: -16px; top: -32px; width: 250px; height: 250px;
  border-radius: 50%; background: var(--gold); color: var(--deep);
  display: grid; place-items: center;
}
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.badge text { font-family: var(--ff-b); font-size: 11.2px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; fill: var(--deep); }
.badge img { width: 114px; height: 114px; object-fit: contain; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { max-width: 560px; width: 100%; margin: 0 auto; }
  .badge { width: 188px; height: 188px; right: 4px; top: -22px; }
  .badge img { width: 86px; height: 86px; }
}

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden; border-block: 1px solid var(--line);
  padding: 22px 0; white-space: nowrap; user-select: none;
}
.marquee__track { display: inline-flex; gap: 0; will-change: transform; }
.marquee__item {
  display: inline-flex; align-items: center; gap: 36px; padding-right: 36px;
  font-family: var(--ff-d); font-size: clamp(1.6rem, 3vw, 2.6rem); letter-spacing: -0.02em;
}
.marquee__item::after {
  content: ""; width: 12px; height: 12px; background: var(--maroon);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.marquee__item:nth-child(even) { font-style: italic; color: var(--maroon); }

/* ---------- Intro / welcome ---------- */

.intro__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 100px); align-items: start; }
.intro__text p + p { margin-top: 1.1em; }
.intro__big {
  font-family: var(--ff-d); font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1.15; letter-spacing: -0.02em; color: var(--ink);
}
.intro__big em { color: var(--maroon); }
@media (max-width: 900px) { .intro__grid { grid-template-columns: 1fr; } }

/* ---------- Stats ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); margin-top: clamp(56px, 8vw, 100px); }
.stat { padding: 32px 24px 0 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat__num { font-family: var(--ff-d); font-size: clamp(2.8rem, 5.5vw, 4.8rem); line-height: 1; letter-spacing: -0.04em; color: var(--maroon); }
.stat__label { margin-top: 10px; font-size: 0.95rem; color: var(--ink-2); max-width: 22ch; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 32px; }
}

/* ---------- Values acrostic ---------- */

.values { background: var(--deep); color: #f6ebe1; overflow: hidden; }
.values__inner { min-height: 100vh; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding-block: clamp(80px, 10vw, 120px); }
.values .eyebrow { color: var(--gold); }
.values__intro p { margin-top: 22px; color: rgba(246, 235, 225, 0.7); max-width: 40ch; }
.values__list { display: flex; flex-direction: column; }
.value {
  display: grid; grid-template-columns: clamp(42px, 5vw, 72px) 1fr; align-items: baseline;
  font-family: var(--ff-d); font-size: clamp(1.25rem, 2.6vw, 2.35rem); line-height: 1.12;
  letter-spacing: -0.02em; opacity: 0.22;
}
.value b { font-weight: 400; font-style: italic; color: var(--gold); font-size: 1.15em; }
.value.is-on { opacity: 1; }
.no-anim .value { opacity: 1; }
@media (max-width: 900px) {
  .values__inner { grid-template-columns: 1fr; min-height: 0; }
}

/* ---------- Phases ---------- */

.phases__head { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 72px); }
.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.phase {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 460px; padding: 30px; border-radius: var(--r-lg);
  background: var(--paper-2); overflow: hidden; isolation: isolate;
  transition: color 0.5s var(--ease);
}
.phase::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--maroon);
  clip-path: circle(0% at 100% 0%); transition: clip-path 0.8s var(--ease);
}
.phase:hover { color: #fff; }
.phase:hover::before { clip-path: circle(150% at 100% 0%); }
.phase__num {
  font-family: var(--ff-d); font-size: clamp(5rem, 9vw, 8.5rem); line-height: 0.85;
  letter-spacing: -0.05em; color: var(--maroon); transition: color 0.5s var(--ease);
}
.phase:hover .phase__num { color: var(--gold); }
.phase__tag { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.phase h3 { margin: 10px 0 12px; }
.phase p { font-size: 0.98rem; opacity: 0.8; }
.phase__go {
  margin-top: 24px; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px currentColor;
  transition: transform 0.5s var(--ease), background 0.4s;
}
.phase:hover .phase__go { transform: rotate(-45deg); background: #fff; color: var(--maroon); box-shadow: none; }
@media (max-width: 900px) { .phases { grid-template-columns: 1fr; } .phase { min-height: 340px; } }

/* ---------- Horizontal gallery ---------- */

.hgallery { background: var(--paper-2); overflow: hidden; }
.hgallery__pin { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-block: clamp(70px, 9vw, 110px); }
.hgallery__head { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; margin-bottom: 48px; }
.hgallery__track { display: flex; gap: 20px; padding-left: var(--pad); width: max-content; }
.hcard { position: relative; flex: 0 0 auto; width: clamp(260px, 30vw, 420px); }
.hcard__img { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; background: #ddd; }
.hcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.hcard:hover .hcard__img img { transform: scale(1.06); }
.hcard--wide { width: clamp(320px, 44vw, 640px); }
.hcard--wide .hcard__img { aspect-ratio: 16 / 11; }
.hcard__cap { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; font-weight: 700; }
.hcard__cap span:last-child { color: var(--muted); font-weight: 500; }
.hcard--end {
  width: clamp(260px, 26vw, 360px); align-self: stretch; border-radius: var(--r);
  background: var(--maroon); color: #fff; padding: 32px; display: flex; flex-direction: column; justify-content: space-between;
}
.hcard--end .h3 { color: #fff; }

@media (max-width: 900px) {
  .hgallery__pin { min-height: 0; }
  .hgallery__scroller { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 8px; }
  .hgallery__scroller::-webkit-scrollbar { display: none; }
  .hcard { scroll-snap-align: start; width: 78vw; }
  .hcard--wide { width: 86vw; }
  .hgallery__track { padding-right: var(--pad); }
}

/* ---------- Vision / Mission ---------- */

.vm { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); }
.vm__col h2 { margin: 18px 0 36px; }
.vm__item { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 24px 0; border-top: 1px solid var(--line); }
.vm__item:last-child { border-bottom: 1px solid var(--line); }
.vm__n { font-family: var(--ff-d); font-style: italic; color: var(--maroon); font-size: 1.2rem; }
.vm__item h3 { font-family: var(--ff-d); font-weight: 400; font-size: 1.4rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.vm__item p { color: var(--ink-2); font-size: 0.98rem; }
@media (max-width: 900px) { .vm { grid-template-columns: 1fr; } }

/* ---------- Then & now ---------- */

.thennow { position: relative; height: 100vh; overflow: hidden; background: var(--ink); }
.thennow__img { position: absolute; inset: 0; }
.thennow__img img { width: 100%; height: 100%; object-fit: cover; }
.thennow__img--now { clip-path: inset(0 0 0 100%); }
.thennow__label {
  position: absolute; bottom: clamp(24px, 4vw, 48px); z-index: 3;
  font-family: var(--ff-d); color: #fff; font-size: clamp(3rem, 9vw, 8rem); line-height: 1; letter-spacing: -0.04em;
  text-shadow: 0 6px 40px rgba(0,0,0,0.35);
}
.thennow__label--then { left: var(--pad); }
.thennow__label--now { right: var(--pad); font-style: italic; color: var(--gold); }
.thennow__copy {
  position: absolute; top: calc(var(--nav-h) + 24px); left: var(--pad); z-index: 3; max-width: 440px;
  color: #fff; padding: 22px 24px; border-radius: var(--r);
  background: rgba(29, 21, 23, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.thennow__copy .eyebrow { color: var(--gold); }
.thennow__copy p { margin-top: 10px; font-size: 0.98rem; color: rgba(255,255,255,0.85); }
.thennow::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.45)); pointer-events: none; }

/* ---------- Quote ---------- */

.quote { text-align: center; }
.quote blockquote {
  font-family: var(--ff-d); font-size: clamp(1.8rem, 4.2vw, 3.6rem);
  line-height: 1.15; letter-spacing: -0.025em; max-width: 22ch; margin: 0 auto;
}
.quote cite { display: block; margin-top: 28px; font-style: normal; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; font-size: 0.9rem; }
.quote .qmark { font-family: var(--ff-d); font-size: 6rem; line-height: 0.6; color: var(--gold); display: block; margin-bottom: 10px; }

/* ---------- CTA ---------- */

.cta {
  position: relative; border-radius: var(--r-lg); overflow: hidden; isolation: isolate;
  background: var(--maroon); color: #fff;
  padding: clamp(40px, 7vw, 96px);
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: end;
}
.cta .h2 { color: #fff; }
.cta .h2 em { color: var(--gold); }
.cta p { color: rgba(255,255,255,0.78); margin-top: 18px; max-width: 46ch; }
.cta__crest { position: absolute; right: -6%; top: -18%; width: 46%; opacity: 0.08; z-index: -1; filter: grayscale(1) brightness(3); }
.cta__side { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cta__list { display: grid; gap: 10px; margin-bottom: 14px; font-size: 0.95rem; }
.cta__list li { display: flex; gap: 10px; align-items: center; color: rgba(255,255,255,0.88); }
.cta__list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
@media (max-width: 900px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Page hero (inner pages) ---------- */

.phero { padding: clamp(48px, 8vw, 110px) 0 clamp(40px, 6vw, 80px); }
.phero__top { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 40px; align-items: end; }
.phero h1 { margin-top: 22px; }
.phero__lead { padding-bottom: 10px; }
.phero__img { margin-top: clamp(40px, 6vw, 72px); border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 21 / 9; background: var(--paper-2); }
.phero__img img { width: 100%; height: 125%; object-fit: cover; }
.phero__img--wide { aspect-ratio: 16 / 5; }
@media (max-width: 900px) {
  .phero__top { grid-template-columns: 1fr; }
  .phero__img { aspect-ratio: 4 / 3; }
}

/* ---------- Generic split / content ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 100px); align-items: center; }
.split--top { align-items: start; }
.split__img { border-radius: var(--r-lg); overflow: hidden; background: var(--paper-2); }
.split__img img { width: 100%; height: 100%; object-fit: cover; }
.prose p + p { margin-top: 1.1em; }
.prose p { color: var(--ink-2); }
.prose h2 { margin: 18px 0 28px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.sticky { position: sticky; top: calc(var(--nav-h) + 24px); }

/* Pill lists */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  padding: 10px 18px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600; font-size: 0.95rem;
  transition: background 0.3s, color 0.3s, transform 0.4s var(--ease);
}
.pill:hover { background: var(--maroon); color: #fff; transform: translateY(-2px); }
.pill small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.pill:hover small { color: rgba(255,255,255,0.7); }

.pill--dark { background: rgba(255,255,255,0.1); color: #fff; box-shadow: none; }
.pill--dark:hover { background: var(--gold); color: var(--deep); }

/* Numbered list */
.nlist { counter-reset: n; }
.nlist li {
  counter-increment: n; display: grid; grid-template-columns: 48px 1fr; gap: 8px;
  padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink-2);
}
.nlist li:last-child { border-bottom: 1px solid var(--line); }
.nlist li::before { content: counter(n, decimal-leading-zero); font-family: var(--ff-d); font-style: italic; color: var(--maroon); }

/* Card */
.card { background: #fff; border-radius: var(--r-lg); padding: clamp(28px, 4vw, 48px); box-shadow: 0 1px 0 var(--line); }
.card--maroon { background: var(--maroon); color: #fff; }
.card--maroon .muted { color: rgba(255,255,255,0.7); }
.card--deep { background: var(--deep); color: #f6ebe1; }
.card--deep .nlist li, .card--maroon .nlist li { color: rgba(255,255,255,0.85); border-color: var(--line-light); }
.card--deep .nlist li::before, .card--maroon .nlist li::before { color: var(--gold); }

/* Sub nav (academics) */
.subnav {
  position: sticky; top: calc(var(--nav-h) + 10px); z-index: 50; display: flex; gap: 6px; width: max-content; max-width: 100%;
  margin: 0 auto; padding: 6px; border-radius: 999px;
  background: rgba(255,255,255,0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -12px rgba(42,7,18,0.25), inset 0 0 0 1px var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.subnav a { padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; white-space: nowrap; transition: background 0.3s, color 0.3s; }
.subnav a.is-active { background: var(--maroon); color: #fff; }

/* Phase block (academics page) */
.pblock { padding: clamp(72px, 10vw, 140px) 0; border-top: 1px solid var(--line); }
.pblock__head { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.pblock__num { font-family: var(--ff-d); font-size: clamp(6rem, 16vw, 15rem); line-height: 0.78; letter-spacing: -0.06em; color: var(--maroon); }
.pblock__quote { font-family: var(--ff-d); font-style: italic; font-size: clamp(1.2rem, 1.8vw, 1.55rem); line-height: 1.35; color: var(--ink-2); max-width: 40ch; }
.pblock__quote cite { display: block; margin-top: 10px; font-family: var(--ff-b); font-style: normal; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.pblock__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); }
.pblock h3 { margin-bottom: 18px; }
@media (max-width: 900px) {
  .pblock__head, .pblock__grid { grid-template-columns: 1fr; }
}

/* Highlight band */
.band {
  margin-top: clamp(40px, 5vw, 64px); border-radius: var(--r-lg); padding: clamp(28px, 4vw, 48px);
  background: var(--deep); color: #f6ebe1; display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
}
.band__big { font-family: var(--ff-d); font-size: clamp(4rem, 10vw, 8rem); line-height: 0.85; color: var(--gold); letter-spacing: -0.05em; }
.band p { color: rgba(246,235,225,0.78); }
.band h3 { color: #fff; margin-bottom: 10px; }
@media (max-width: 700px) { .band { grid-template-columns: 1fr; } }

/* Timeline (principals) */
.tl { position: relative; }
.tl__row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); align-items: baseline; }
.tl__row:last-child { border-bottom: 1px solid var(--line); }
.tl__years { font-size: 0.92rem; color: var(--muted); font-weight: 600; }
.tl__name { font-family: var(--ff-d); font-size: clamp(1.3rem, 2.2vw, 1.8rem); letter-spacing: -0.015em; }
.tl__row.is-current .tl__name { color: var(--maroon); font-style: italic; }
.tl__row.is-current .tl__years { color: var(--maroon); }
@media (max-width: 640px) { .tl__row { grid-template-columns: 1fr; gap: 4px; } }

/* History gallery */
.history { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.history figure { position: relative; }
.history .hi { border-radius: var(--r); overflow: hidden; background: var(--paper-2); }
.history img { width: 100%; height: 100%; object-fit: cover; }
.history figcaption { margin-top: 12px; display: flex; gap: 12px; align-items: baseline; font-weight: 600; font-size: 0.95rem; }
.history figcaption b { font-family: var(--ff-d); font-weight: 400; font-size: 1.6rem; color: var(--maroon); letter-spacing: -0.02em; }
.history .h1959 { grid-column: 1 / 8; } .history .h1959 .hi { aspect-ratio: 16/10; }
.history .h2013 { grid-column: 8 / 13; margin-top: 18%; } .history .h2013 .hi { aspect-ratio: 4/3; }
.history .h2017 { grid-column: 2 / 7; } .history .h2017 .hi { aspect-ratio: 4/3; }
.history .h2021 { grid-column: 7 / 13; margin-top: 0; } .history .h2021 .hi { aspect-ratio: 16/10; }
.history .hbus { grid-column: 1 / 13; } .history .hbus .hi { aspect-ratio: 2/1; }
.history .hsolar { grid-column: 1 / 13; } .hsolar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; } .hsolar-grid .hi { aspect-ratio: 4/3; }
@media (max-width: 700px) { .hsolar-grid { grid-template-columns: 1fr; } }
.history .hpair { grid-column: 1 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; } .hpair figure { grid-column: auto; } .hpair .hi { aspect-ratio: 3 / 2; }
@media (max-width: 900px) { .history .hpair { grid-column: auto; grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .history { grid-template-columns: 1fr; }
  .history figure { grid-column: auto !important; margin-top: 0 !important; }
}

/* Song */
.song { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.song__lyrics { columns: 2; column-gap: 40px; font-family: var(--ff-d); font-size: 1.12rem; line-height: 1.5; }
.song__lyrics p { break-inside: avoid; margin-bottom: 1.2em; }
.song__lyrics p.chorus { font-style: italic; color: var(--gold); }
@media (max-width: 900px) { .song { grid-template-columns: 1fr; } .song__lyrics { columns: 1; } }

/* Fees */
.fees { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.fee__amt { font-family: var(--ff-d); font-size: clamp(2.6rem, 4.6vw, 4rem); line-height: 1; letter-spacing: -0.035em; margin: 16px 0 8px; }
.fee__amt small { font-size: 0.4em; letter-spacing: 0; color: inherit; opacity: 0.6; }
.kv { display: grid; gap: 14px; margin-top: 16px; }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line-light); font-size: 0.95rem; }
.kv dt, .kv span:first-child { opacity: 0.7; }
.kv strong { font-weight: 700; text-align: right; }
.copy-btn { margin-left: 8px; font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,0.14); }
.copy-btn:hover { background: var(--gold); color: var(--deep); }
.fees__wide { grid-column: span 2; }
@media (max-width: 900px) { .fees { grid-template-columns: 1fr; } .fees__wide { grid-column: auto; } }

/* Feature (remedial) */
.feature { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 80px); padding: clamp(56px, 8vw, 100px) 0; border-top: 1px solid var(--line); }
.feature__title { font-family: var(--ff-d); font-size: clamp(3.5rem, 9vw, 8rem); line-height: 0.9; letter-spacing: -0.05em; color: var(--maroon); }
.feature__title em { color: var(--ink); }
.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.benefit { padding: 18px 20px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: 0.96rem; display: flex; gap: 12px; align-items: flex-start; }
.benefit svg { flex: none; width: 20px; height: 20px; color: var(--maroon); margin-top: 3px; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .benefits { grid-template-columns: 1fr; } }

/* Staff */
.mgmt { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.person {
  position: relative; padding: 28px; border-radius: var(--r-lg); background: #fff; box-shadow: 0 1px 0 var(--line);
  min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
}
.person__photo {
  width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 30%;
  border-radius: var(--r); background: var(--paper-2); margin-bottom: 24px;
}
.person h3 { font-family: var(--ff-d); font-weight: 400; font-size: 1.6rem; letter-spacing: -0.015em; line-height: 1.1; }
.person p { color: var(--muted); font-weight: 600; font-size: 0.92rem; margin-top: 6px; }
.person--lead { background: var(--maroon); color: #fff; }
.person--lead p { color: rgba(255,255,255,0.7); }
.staff-group { padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 280px 1fr; gap: 32px; }
.staff-group h2 { font-family: var(--ff-d); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.02em; line-height: 1.1; }
.staff-group h2 span { display: block; margin-top: 8px; font-family: var(--ff-b); font-size: 0.85rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.faces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; }
.faces img {
  width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 30%;
  border-radius: var(--r); background: var(--paper-2);
}
.faces div { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.faces strong { font-weight: 600; line-height: 1.3; }
.faces a { overflow-wrap: anywhere; font-size: 0.88rem; }
.faces span { color: var(--muted); font-weight: 500; font-size: 0.88rem; }
@media (max-width: 1000px) { .faces { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mgmt { grid-template-columns: 1fr; } .person { min-height: 0; gap: 24px; flex-direction: row; align-items: center; justify-content: flex-start; } .person__photo { width: 120px; flex: none; margin: 0; } }
@media (max-width: 760px) { .staff-group { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .faces { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.contact-grid > * { grid-column: span 4; }
.contact-grid .span-8 { grid-column: span 8; }
.contact-grid .span-6 { grid-column: span 6; }
.contact-grid .span-12 { grid-column: span 12; }
.clist { display: grid; gap: 0; margin-top: 18px; }
.clist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.clist li > :last-child { text-align: right; }
@media (max-width: 480px) { .clist li { grid-template-columns: 1fr; } .clist li > :last-child { text-align: left; } }
.card--maroon .clist li, .card--deep .clist li { border-color: var(--line-light); }
.clist li span:first-child { color: var(--muted); font-size: 0.92rem; }
.card--maroon .clist li span:first-child, .card--deep .clist li span:first-child { color: rgba(255,255,255,0.6); }
.clist a { font-weight: 700; }
.clist a:hover { text-decoration: underline; text-underline-offset: 3px; }
.big-contact { font-family: var(--ff-d); font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -0.03em; line-height: 1.05; display: block; }
.big-contact:hover { color: var(--gold); }
.docs { display: grid; gap: 10px; margin-top: 18px; }
.doc {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px;
  border-radius: 14px; background: var(--paper); font-weight: 700; transition: background 0.3s, color 0.3s, transform 0.4s var(--ease);
}
.doc:hover { background: var(--maroon); color: #fff; transform: translateX(4px); }
.doc small { font-weight: 600; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.1em; }
.doc:hover small { color: rgba(255,255,255,0.7); }
.map { border-radius: var(--r-lg); overflow: hidden; min-height: 420px; background: var(--paper-2); }
.map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; filter: grayscale(0.4) contrast(1.05); }
@media (max-width: 1000px) {
  .contact-grid > *, .contact-grid .span-8, .contact-grid .span-6 { grid-column: span 12; }
}

/* ---------- Footer ---------- */

.footer { background: var(--deep); color: #ecdfd4; padding: clamp(72px, 10vw, 120px) 0 32px; overflow: hidden; position: relative; }
.footer__big {
  font-family: var(--ff-d); font-size: clamp(3.4rem, 12vw, 12rem); line-height: 1.02; letter-spacing: -0.05em;
  color: #fff;
}
.footer__big em { color: var(--gold); font-variation-settings: "SOFT" 100, "WONK" 1; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; margin-top: clamp(56px, 8vw, 100px); padding-top: 40px; border-top: 1px solid var(--line-light); }
.footer h4 { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(236,223,212,0.5); margin-bottom: 16px; font-weight: 700; }
.footer li + li { margin-top: 8px; }
.footer a:hover { color: var(--gold); }
.footer address { font-style: normal; line-height: 1.7; }
.footer__crest { display: flex; gap: 14px; align-items: center; }
.footer__crest img { width: 56px; }
.footer__motto { font-family: var(--ff-d); font-style: italic; font-size: 1.15rem; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; font-size: 0.85rem; color: rgba(236,223,212,0.5); }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-light); transition: background 0.3s, color 0.3s; }
.socials a:hover { background: var(--gold); color: var(--deep); }
.socials svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Reveal defaults (JS sets these) ---------- */

.js [data-reveal],
.js [data-stagger] > * { opacity: 0; }
.js.no-anim [data-reveal],
.js.no-anim [data-stagger] > * { opacity: 1; }

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

/* Keep the header (and close button) above the open mobile menu */
.menu-open .nav { z-index: 130; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; transform: none; }
.menu-open .brand { color: #fff; }
.menu-open .brand__name small { color: rgba(255,255,255,0.6); }
.menu-open .burger { background: var(--gold); }
.menu-open .burger span { background: var(--deep); }

/* Gallery */
.gallery { columns: 3 280px; column-gap: 18px; }
.gallery figure { break-inside: avoid; margin: 0 0 18px; border-radius: var(--r); overflow: hidden; background: var(--paper-2); }
.gallery img { width: 100%; height: auto; display: block; transition: transform 0.6s var(--ease); }
.gallery figure:hover img { transform: scale(1.03); }

/* SBP eagle watermark (every page) */
body::before {
  content: "";
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 140; pointer-events: none;
  width: min(70vw, 620px); aspect-ratio: 1 / 1.14;
  background: url("../img/watermark.webp") no-repeat center / contain;
  opacity: 0.07;
}
@media print { body::before { display: none; } }

/* Sponsors */
.sponsors__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.sponsors__grid li { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; place-items: center; aspect-ratio: 3 / 2; }
.sponsors__grid img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
@media (max-width: 900px) { .sponsors__grid { grid-template-columns: repeat(2, 1fr); } }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--deep);
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  font-family: var(--ff-b);
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.cookie-banner.is-visible { opacity: 1; transform: none; }
.cookie-banner p { margin: 0; flex: 1 1 280px; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-btn {
  font: inherit;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--deep);
  cursor: pointer;
}
.cookie-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.cookie-btn:hover { filter: brightness(1.08); }
.cookie-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .cookie-banner { transition: none; } }
