/* ==========================================================================
   Kagira Memorial Academy — Stylesheet
   Colour system: institutional blue / white / grey, gold used sparingly
   Type: serif display (Georgia stack) + system sans body
   ========================================================================== */

:root {
  /* Colour */
  --navy:        #142d55;
  --navy-deep:   #0d2040;
  --blue:        #2c5ea6;
  --blue-soft:   #e8eef7;
  --white:       #ffffff;
  --paper:       #f6f5f1;
  --grey-line:   #dcdad2;
  --grey:        #6a6f76;
  --ink:         #1c1d1f;
  --gold:        #b8922e;

  /* Type */
  --font-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --fs-h1: clamp(2.3rem, 4.2vw + 1rem, 4.6rem);
  --fs-h2: clamp(1.8rem, 2.6vw + 1rem, 3.1rem);
  --fs-h3: clamp(1.35rem, 1.2vw + 1rem, 1.8rem);
  --fs-lead: clamp(1.1rem, 0.6vw + 1rem, 1.35rem);
  --fs-body: 1.05rem;
  --fs-small: 0.9rem;

  /* Layout */
  --container-w: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 3px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.12; margin: 0; }
p { margin: 0; }
button { font-family: inherit; }

.container {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* visually-hidden but accessible */
.vh {
  position: absolute; 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: 1rem; top: -3rem;
  background: var(--navy); color: var(--white);
  padding: 0.6rem 1rem; z-index: 200; transition: top 0.2s var(--ease);
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  min-height: 44px;
}
.btn-primary { background: var(--gold); color: var(--navy-deep); }
.btn-primary:hover { background: #cda23e; }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.65); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); }
.btn-line { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-line:hover { background: var(--navy); color: var(--white); }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--grey-line);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 0.6rem;
}
.brand {
  display: flex; align-items: center; gap: 0.7rem;
  min-height: 44px;
}
.brand img { height: 52px; width: auto; }
.brand-text {
  display: flex; flex-direction: column; line-height: 1.15;
}
.brand-text .name {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 1.08rem; color: var(--navy-deep);
}
.brand-text .motto {
  font-size: 0.68rem; letter-spacing: 0.06em; color: var(--grey);
}

.main-nav ul { display: flex; gap: 0.4rem; }
.main-nav a {
  display: inline-block; padding: 0.6rem 0.85rem;
  font-size: 0.95rem; font-weight: 500; color: var(--ink);
  border-radius: var(--radius);
  position: relative;
}
.main-nav a:hover { color: var(--blue); }
.main-nav a[aria-current="page"] { color: var(--navy-deep); font-weight: 700; }
.main-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.35rem;
  height: 2px; background: var(--gold);
}

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: ""; display: block; width: 24px; height: 2px; background: var(--navy-deep);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle span { margin: 6px 0; }
.nav-toggle[aria-expanded="true"]::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 340px);
    background: var(--white); box-shadow: -8px 0 30px rgba(0,0,0,0.15);
    transform: translateX(100%); transition: transform 0.3s var(--ease);
    padding: 5.5rem 1.75rem 2rem; overflow-y: auto;
    z-index: 95;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 0.2rem; }
  .main-nav a { display: block; padding: 0.9rem 0.5rem; font-size: 1.05rem; border-bottom: 1px solid var(--grey-line); }
  .nav-backdrop {
    position: fixed; inset: 0; background: rgba(10,20,40,0.35);
    opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease);
    z-index: 90;
  }
  .nav-backdrop.open { opacity: 1; pointer-events: auto; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(92vh, 780px);
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: var(--navy-deep);
}
.hero-media {
  position: absolute; inset: 0;
  overflow: hidden;
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  transition: transform 1.6s var(--ease);
}
.hero.is-loaded .hero-media img { transform: scale(1); }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,32,64,0.15) 0%, rgba(13,32,64,0.25) 45%, rgba(9,20,40,0.88) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  color: var(--white);
  padding-block: clamp(2.5rem, 8vh, 5rem) clamp(2.75rem, 9vh, 5.5rem);
  width: 100%;
}
.hero-eyebrow {
  font-size: 0.85rem; letter-spacing: 0.14em; color: #dfe6f2;
  opacity: 0; transform: translateY(14px);
}
.hero h1 {
  font-size: var(--fs-h1); color: var(--white); max-width: 16ch;
  margin-top: 0.5rem;
  opacity: 0; transform: translateY(18px);
}
.hero-motto {
  margin-top: 0.9rem; font-size: var(--fs-lead); color: #e9dfba;
  font-family: var(--font-serif); font-style: italic;
  opacity: 0; transform: translateY(18px);
}
.hero-meta {
  margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem;
  font-size: 0.95rem; color: #cfd8e8;
  opacity: 0; transform: translateY(18px);
}
.hero-actions {
  margin-top: 2.1rem; display: flex; gap: 0.9rem; flex-wrap: wrap;
  opacity: 0; transform: translateY(18px);
}
.hero.is-loaded .hero-eyebrow,
.hero.is-loaded h1,
.hero.is-loaded .hero-motto,
.hero.is-loaded .hero-meta,
.hero.is-loaded .hero-actions {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.hero.is-loaded .hero-eyebrow { transition-delay: 0.15s; }
.hero.is-loaded h1 { transition-delay: 0.28s; }
.hero.is-loaded .hero-motto { transition-delay: 0.42s; }
.hero.is-loaded .hero-meta { transition-delay: 0.54s; }
.hero.is-loaded .hero-actions { transition-delay: 0.66s; }

/* Page (interior) hero — shorter banner used on non-home pages */
.page-hero {
  position: relative; overflow: hidden;
  min-height: 46vh;
  display: flex; align-items: flex-end;
  background: var(--navy-deep);
}
.page-hero img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,32,64,0.35) 0%, rgba(9,20,40,0.86) 100%);
}
.page-hero-content { position: relative; z-index: 2; color: var(--white); padding-block: 3rem 3rem; width: 100%; }
.page-hero-content .eyebrow { font-size: 0.85rem; letter-spacing: 0.12em; color: #dfe6f2; }
.page-hero-content h1 { color: var(--white); font-size: var(--fs-h2); margin-top: 0.5rem; max-width: 24ch; }
.page-hero-content .lede { margin-top: 0.9rem; max-width: 56ch; color: #d7dfec; font-size: var(--fs-lead); }
.breadcrumb { font-size: 0.85rem; color: #b9c4d8; }
.breadcrumb a:hover { color: var(--white); }

/* ==========================================================================
   Section scaffolding & reveal
   ========================================================================== */
section { position: relative; }
.section-pad { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-pad-sm { padding-block: clamp(2.5rem, 5vw, 4rem); }

.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1.in-view { transition-delay: 0.1s; }
.reveal-delay-2.in-view { transition-delay: 0.2s; }

.eyebrow {
  font-size: 0.8rem; letter-spacing: 0.1em; color: var(--gold);
  font-weight: 600;
}
.section-head { max-width: 62ch; }
.section-head h2 { margin-top: 0.5rem; }
.section-head .lede { margin-top: 1rem; font-size: var(--fs-lead); color: var(--grey); max-width: 58ch; }

.rule {
  height: 1px; background: var(--grey-line); border: 0; margin: 0;
}

/* ==========================================================================
   Home: Introduction band
   ========================================================================== */
.intro {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.intro-copy p { font-size: var(--fs-lead); color: var(--ink); }
.intro-copy p + p { margin-top: 1.1rem; }
.intro-facts {
  display: flex; flex-direction: column; gap: 1.4rem;
  border-left: 2px solid var(--grey-line);
  padding-left: 1.6rem;
}
.intro-fact .num { font-family: var(--font-serif); font-size: 1.9rem; color: var(--navy-deep); display: block; }
.intro-fact .label { font-size: 0.88rem; color: var(--grey); }
@media (max-width: 800px) {
  .intro { grid-template-columns: 1fr; }
  .intro-facts { border-left: none; border-top: 2px solid var(--grey-line); padding-left: 0; padding-top: 1.4rem; flex-direction: row; flex-wrap: wrap; gap: 1.6rem 2.4rem; }
}

/* ==========================================================================
   History / Foundation split
   ========================================================================== */
.history {
  display: grid; grid-template-columns: 0.95fr 1.05fr;
  background: var(--paper);
}
.history-media { position: relative; overflow: hidden; min-height: 380px; }
.history-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.history-media .clip {
  position: absolute; inset: 0;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s var(--ease);
}
.history-media.in-view .clip { clip-path: inset(0 0 0 0); }
.history-copy {
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4.5rem);
  position: relative;
}
.history-year {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(4rem, 9vw, 7.5rem);
  color: var(--blue-soft);
  line-height: 1; position: absolute; top: 0.5rem; right: 1.5rem; z-index: 0;
  -webkit-user-select: none; user-select: none;
}
.history-copy .inner { position: relative; z-index: 1; }
.history-copy h2 { max-width: 18ch; }
.history-copy p { margin-top: 1.1rem; font-size: 1.03rem; color: var(--ink); max-width: 52ch; }
.history-stats {
  margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1.8rem 2.6rem;
  padding-top: 1.6rem; border-top: 1px solid var(--grey-line);
}
.history-stats .stat .num {
  font-family: var(--font-serif); font-size: 2rem; color: var(--navy-deep);
  display: inline-block;
}
.history-stats .stat .label { display: block; font-size: 0.82rem; color: var(--grey); margin-top: 0.15rem; }
@media (max-width: 860px) {
  .history { grid-template-columns: 1fr; }
  .history-media { min-height: 300px; }
}

/* ==========================================================================
   Academics teaser band (photo w/ overlay panel)
   ========================================================================== */
.academics-band { position: relative; overflow: hidden; min-height: 620px; display: flex; align-items: flex-end; }
.academics-band .bg { position: absolute; inset: 0; }
.academics-band .bg img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12); transition: transform 1.3s var(--ease);
}
.academics-band.in-view .bg img { transform: scale(1); }
.academics-band .bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,22,44,0.92) 0%, rgba(10,22,44,0.72) 38%, rgba(10,22,44,0.1) 75%);
}
.academics-panel {
  position: relative; z-index: 2; color: var(--white);
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
  max-width: 640px;
}
.academics-panel .eyebrow { color: #e9dfba; }
.academics-panel h2 { color: var(--white); margin-top: 0.6rem; }
.academics-panel p { margin-top: 1.1rem; color: #dbe2ee; font-size: var(--fs-lead); max-width: 54ch; }
.level-chips { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.level-chips span {
  border: 1px solid rgba(255,255,255,0.4); border-radius: 40px;
  padding: 0.35rem 0.9rem; font-size: 0.82rem; color: #eef1f6;
}
.academics-panel .btn { margin-top: 2rem; }

/* ==========================================================================
   Values band
   ========================================================================== */
.values-band { background: var(--navy-deep); color: var(--white); }
.values-band .section-head .eyebrow { color: #e9dfba; }
.values-band .section-head h2 { color: var(--white); }
.values-band .section-head .lede { color: #c8d1e0; }
.values-list { margin-top: 2.5rem; }
.value-row {
  display: grid; grid-template-columns: 3rem 1fr 2fr;
  gap: 1.5rem; align-items: baseline;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.16);
}
.values-list .value-row:last-child { border-bottom: 1px solid rgba(255,255,255,0.16); }
.value-row .idx { font-family: var(--font-serif); color: var(--gold); font-size: 1.1rem; }
.value-row .term { font-family: var(--font-serif); font-size: clamp(1.4rem, 2vw, 2rem); color: var(--white); }
.value-row .desc { color: #c8d1e0; font-size: 1rem; max-width: 46ch; }
@media (max-width: 700px) {
  .value-row { grid-template-columns: 2rem 1fr; }
  .value-row .desc { grid-column: 2 / 3; margin-top: 0.3rem; }
}

/* ==========================================================================
   Facilities / School life — asymmetric photo composition
   ========================================================================== */
.facilities-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.1rem;
}
.fac-media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--paper); }
.fac-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.fac-media:hover img { transform: scale(1.04); }
.fac-main { grid-row: 1 / 3; min-height: 460px; }
.fac-sub { min-height: 220px; }
.fac-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1rem 1.2rem;
  background: linear-gradient(0deg, rgba(9,20,40,0.82), rgba(9,20,40,0));
  color: var(--white); font-size: 0.92rem;
}
.facilities-list {
  margin-top: 2.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem 2rem;
  padding-top: 2rem; border-top: 1px solid var(--grey-line);
}
.facilities-list li { font-size: 0.98rem; color: var(--ink); display: flex; gap: 0.6rem; }
.facilities-list li::before { content: "—"; color: var(--gold); flex-shrink: 0; }
@media (max-width: 860px) {
  .facilities-grid { grid-template-columns: 1fr; }
  .fac-main { grid-row: auto; min-height: 320px; }
  .facilities-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .facilities-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Co-curricular full-bleed band
   ========================================================================== */
.cocurricular { position: relative; overflow: hidden; min-height: 560px; display: flex; align-items: center; }
.cocurricular .bg { position: absolute; inset: 0; }
.cocurricular .bg img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.cocurricular .bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9,20,40,0.55) 0%, rgba(9,20,40,0.3) 40%, rgba(9,20,40,0.82) 100%);
}
.cocurricular-content {
  position: relative; z-index: 2; color: var(--white);
  margin-left: auto; max-width: 560px;
  padding-block: 3rem;
}
.cocurricular-content .eyebrow { color: #e9dfba; }
.cocurricular-content h2 { color: var(--white); margin-top: 0.6rem; }
.cocurricular-items { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 1.1rem; }
.cocurricular-items .item { display: flex; gap: 1rem; align-items: baseline; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 1rem; }
.cocurricular-items .item strong { font-family: var(--font-serif); min-width: 6.5rem; color: var(--white); font-size: 1.05rem; }
.cocurricular-items .item span { color: #dbe2ee; font-size: 0.98rem; }

/* ==========================================================================
   Achievements — big ordinal numerals
   ========================================================================== */
.achievements { }
.achieve-grid {
  margin-top: 2.8rem;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.achieve-item { border-top: 2px solid var(--navy-deep); padding-top: 1.2rem; }
.achieve-item .ord { font-family: var(--font-serif); font-size: clamp(3rem, 6vw, 4.6rem); color: var(--navy-deep); line-height: 1; }
.achieve-item .place { margin-top: 0.4rem; font-size: 1.05rem; font-weight: 600; }
.achieve-item .place small { display: block; font-weight: 400; color: var(--grey); font-size: 0.85rem; margin-top: 0.15rem; }
.achieve-note { margin-top: 2.5rem; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: center; }
.achieve-note p { color: var(--grey); font-size: 1.02rem; }
.achieve-note .achieve-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.achieve-note .achieve-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 800px) {
  .achieve-grid { grid-template-columns: 1fr 1fr; }
  .achieve-note { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .achieve-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Admissions teaser
   ========================================================================== */
.admissions-band { background: var(--paper); }
.admissions-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.admissions-media { position: relative; overflow: hidden; border-radius: var(--radius); min-height: 380px; }
.admissions-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.admission-steps { counter-reset: step; }
.admission-steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 2.6rem 1fr;
  gap: 1rem; padding-block: 0.95rem;
  border-top: 1px solid var(--grey-line);
}
.admission-steps li:last-child { border-bottom: 1px solid var(--grey-line); }
.admission-steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-serif); color: var(--gold); font-size: 1.15rem;
}
.admission-steps .step-title { font-weight: 600; }
.admission-steps .step-desc { font-size: 0.92rem; color: var(--grey); margin-top: 0.2rem; }
@media (max-width: 800px) { .admissions-split { grid-template-columns: 1fr; } .admissions-media { min-height: 280px; } }

/* ==========================================================================
   Contact / location band
   ========================================================================== */
.contact-band { background: var(--navy-deep); color: var(--white); }
.contact-band .section-head h2 { color: var(--white); }
.contact-band .eyebrow { color: #e9dfba; }
.contact-grid {
  margin-top: 2.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.18);
}
.contact-card .label { font-size: 0.8rem; letter-spacing: 0.06em; color: #9fb0cc; }
.contact-card .value { margin-top: 0.5rem; font-size: 1.15rem; font-family: var(--font-serif); }
.contact-card .value a { border-bottom: 1px solid rgba(255,255,255,0.35); }
.contact-card .value a:hover { border-color: var(--gold); color: var(--gold); }
.contact-actions { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy); color: #dbe2ee; }
.footer-top {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-block: 3.5rem 2.5rem;
}
.footer-brand { display: flex; gap: 0.9rem; }
.footer-brand img { height: 58px; width: auto; filter: brightness(1.05); }
.footer-brand .name { font-family: var(--font-serif); font-size: 1.15rem; color: var(--white); }
.footer-brand .motto { font-size: 0.72rem; letter-spacing: 0.08em; color: #a9b6cc; margin-top: 0.2rem; }
.footer-desc { margin-top: 1rem; font-size: 0.92rem; color: #b7c1d6; max-width: 32ch; }
.footer-col h3 { font-family: var(--font-sans); font-size: 0.82rem; letter-spacing: 0.08em; color: #9fb0cc; font-weight: 700; }
.footer-col ul { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a, .footer-col span { font-size: 0.95rem; color: #dbe2ee; }
.footer-col a:hover { color: var(--gold); }
.footer-social { margin-top: 1.2rem; display: flex; gap: 0.7rem; }
.footer-social .icon {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  display: flex; align-items: center; justify-content: center;
  color: #cfd8e8;
}
.footer-social .icon svg { width: 17px; height: 17px; fill: currentColor; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-block: 1.4rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  font-size: 0.82rem; color: #9fb0cc;
}
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
}

/* ==========================================================================
   Generic content page layout (About / Academics / Admissions)
   ========================================================================== */
.content-split {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.content-split.reverse { grid-template-columns: 0.9fr 1.1fr; }
.content-split.reverse .content-media { order: 2; }
.content-media { position: relative; overflow: hidden; border-radius: var(--radius); }
.content-media img { width: 100%; object-fit: cover; }
.prose h2 { margin-bottom: 0.9rem; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.6rem; font-size: var(--fs-h3); }
.prose p { color: var(--ink); font-size: 1.02rem; }
.prose p + p { margin-top: 1rem; }
.prose ul.plain { margin-top: 1rem; }
.prose ul.plain li { padding-left: 1.2rem; position: relative; margin-top: 0.5rem; }
.prose ul.plain li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
@media (max-width: 860px) {
  .content-split, .content-split.reverse { grid-template-columns: 1fr; }
  .content-split.reverse .content-media { order: 0; }
}

.placeholder-note {
  border: 1px dashed var(--grey-line);
  background: var(--paper);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem; color: var(--grey);
  margin-top: 1.2rem;
}

.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
  padding: 2rem 0; border-top: 1px solid var(--grey-line); border-bottom: 1px solid var(--grey-line);
  margin-block: 3rem;
}
.stat-strip .stat .num { font-family: var(--font-serif); font-size: clamp(1.9rem, 3vw, 2.6rem); color: var(--navy-deep); }
.stat-strip .stat .label { font-size: 0.85rem; color: var(--grey); margin-top: 0.25rem; }
@media (max-width: 760px) { .stat-strip { grid-template-columns: 1fr 1fr; } }

.two-col-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem 2.5rem;
  margin-top: 1.2rem;
}
.two-col-list .lvl {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--grey-line); padding-block: 0.55rem;
  font-size: 0.98rem;
}
.two-col-list .lvl .streams { font-size: 0.8rem; color: var(--grey); }
@media (max-width: 560px) { .two-col-list { grid-template-columns: 1fr; } }

/* Documents list on Admissions */
.doc-list { margin-top: 1.2rem; display: grid; gap: 0.8rem; }
.doc-list li {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.85rem 1rem; background: var(--paper); border-radius: var(--radius);
  font-size: 0.95rem;
}
.doc-list li .n { font-family: var(--font-serif); color: var(--gold); font-size: 1rem; min-width: 1.3rem; }

.fee-note {
  margin-top: 1.6rem; padding: 1.3rem 1.5rem; background: var(--navy-deep); color: var(--white);
  border-radius: var(--radius);
}
.fee-note strong { display: block; font-family: var(--font-serif); font-size: 1.05rem; margin-bottom: 0.3rem; }
.fee-note a { text-decoration: underline; }

/* ==========================================================================
   Fee tables
   ========================================================================== */
.fee-group-title {
  margin-top: 2.6rem; margin-bottom: 0.2rem;
  font-family: var(--font-serif); font-size: 1.25rem; color: var(--navy-deep);
}
.fee-group-sub { color: var(--grey); font-size: 0.9rem; }
.fee-table-wrap { overflow-x: auto; margin-top: 1.2rem; border: 1px solid var(--grey-line); border-radius: var(--radius); }
table.fee-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 0.94rem; }
table.fee-table th, table.fee-table td { padding: 0.8rem 1.1rem; text-align: left; border-bottom: 1px solid var(--grey-line); white-space: nowrap; }
table.fee-table thead th { background: var(--paper); font-family: var(--font-serif); font-weight: 700; color: var(--navy-deep); }
table.fee-table tbody tr:last-child td { border-bottom: none; }
table.fee-table td.pending { color: var(--grey); font-style: italic; white-space: normal; }
table.fee-table tbody tr:hover { background: var(--blue-soft); }

.fee-breakdown {
  margin-top: 1.2rem; display: grid; gap: 0.55rem;
  max-width: 460px;
}
.fee-breakdown .row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px dashed var(--grey-line); font-size: 0.95rem; }
.fee-breakdown .row.total { border-bottom: none; border-top: 2px solid var(--navy-deep); margin-top: 0.3rem; padding-top: 0.7rem; font-weight: 700; }

.fee-misc { margin-top: 1.4rem; }
.fee-misc li { padding-left: 1.2rem; position: relative; margin-top: 0.6rem; font-size: 0.95rem; color: var(--ink); }
.fee-misc li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }

.payment-cards { margin-top: 1.2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.payment-card { background: var(--paper); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.payment-card h4 { font-family: var(--font-serif); font-size: 1.05rem; color: var(--navy-deep); margin: 0; }
.payment-card dl { margin: 0.9rem 0 0; }
.payment-card dt { font-size: 0.78rem; letter-spacing: 0.05em; color: var(--grey); margin-top: 0.6rem; }
.payment-card dd { margin: 0.15rem 0 0; font-family: var(--font-serif); font-size: 1.05rem; color: var(--ink); }
@media (max-width: 640px) { .payment-cards { grid-template-columns: 1fr; } }

/* ==========================================================================
   Accordion (School Requirements)
   ========================================================================== */
.accordion { margin-top: 1.5rem; border-top: 1px solid var(--grey-line); }
.accordion details { border-bottom: 1px solid var(--grey-line); }
.accordion summary {
  padding: 1.1rem 0.2rem; cursor: pointer; font-weight: 600;
  font-family: var(--font-serif); font-size: 1.08rem; color: var(--navy-deep);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .ic { font-size: 1.3rem; color: var(--gold); flex-shrink: 0; transition: transform 0.2s var(--ease); }
.accordion details[open] summary .ic { transform: rotate(45deg); }
.accordion .acc-body { padding: 0 0.2rem 1.3rem; color: var(--ink); font-size: 0.95rem; }
.accordion .acc-body h4 { font-size: 0.95rem; margin-top: 1rem; margin-bottom: 0.4rem; color: var(--navy-deep); }
.accordion .acc-body h4:first-child { margin-top: 0; }
.accordion .acc-body ul { display: grid; gap: 0.4rem; }
.accordion .acc-body li { padding-left: 1.1rem; position: relative; }
.accordion .acc-body li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }

/* ==========================================================================
   Staff / Director
   ========================================================================== */
.people-grid {
  margin-top: 2.2rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem;
}
.person-card { text-align: left; }
.person-photo {
  aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden;
  background: var(--paper); border: 1px solid var(--grey-line);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo.placeholder { color: var(--grey); }
.person-photo.placeholder svg { width: 34%; height: 34%; opacity: 0.35; }
.person-name { margin-top: 0.7rem; font-family: var(--font-serif); font-size: 1rem; color: var(--navy-deep); }
.person-role { font-size: 0.82rem; color: var(--grey); margin-top: 0.1rem; }
@media (max-width: 860px) { .people-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .people-grid { grid-template-columns: 1fr 1fr; gap: 1rem; } }

.director-split { display: grid; grid-template-columns: 0.55fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.director-photo { max-width: 260px; }
@media (max-width: 700px) { .director-split { grid-template-columns: 1fr; } .director-photo { max-width: 220px; } }

/* ==========================================================================
   Map embed
   ========================================================================== */
.map-embed { position: relative; width: 100%; padding-top: 62%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--grey-line); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   Gallery page
   ========================================================================== */
.gallery-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }
.gallery-filters button {
  background: transparent; border: 1px solid var(--grey-line); border-radius: 40px;
  padding: 0.6rem 1.1rem; font-size: 0.88rem; color: var(--ink); cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
  min-height: 44px; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none; appearance: none;
}
.gallery-filters button.active { background: var(--navy-deep); color: var(--white); border-color: var(--navy-deep); }
@media (hover: hover) {
  .gallery-filters button:hover { background: var(--navy-deep); color: var(--white); border-color: var(--navy-deep); }
}

.masonry {
  margin-top: 2.5rem;
  column-count: 3; column-gap: 0.9rem;
}
.masonry figure {
  break-inside: avoid; margin: 0 0 0.9rem; position: relative;
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  background: var(--paper);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.masonry figure figcaption { pointer-events: none; }
.masonry figure img { width: 100%; display: block; transition: transform 0.5s var(--ease); }
.masonry figure:hover img { transform: scale(1.035); }
.masonry figure figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.6rem 0.8rem; font-size: 0.78rem; color: var(--white);
  background: linear-gradient(0deg, rgba(9,20,40,0.82), rgba(9,20,40,0));
  opacity: 0; transition: opacity 0.25s var(--ease);
}
.masonry figure:hover figcaption, .masonry figure:focus-within figcaption { opacity: 1; }
.masonry figure.hidden { display: none; }

@media (max-width: 900px) { .masonry { column-count: 2; } }
@media (max-width: 540px) { .masonry { column-count: 1; } }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8,15,30,0.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease);
  padding: 1.5rem;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 82vh; object-fit: contain; border-radius: 2px; }
.lightbox figcaption { color: #dbe2ee; text-align: center; margin-top: 0.9rem; font-size: 0.9rem; max-width: 60ch; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.3);
  color: var(--white); width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-size: 1.3rem;
}
.lightbox-close { top: 1.2rem; right: 1.2rem; }
.lightbox-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }
}

/* ==========================================================================
   Contact page specifics
   ========================================================================== */
.contact-page-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  margin-top: 2.5rem;
}
.contact-block { padding: 2rem; background: var(--paper); border-radius: var(--radius); }
.contact-block h3 { font-size: 1.1rem; }
.contact-block .value-lg { margin-top: 0.9rem; font-family: var(--font-serif); font-size: 1.35rem; }
.contact-block .value-lg + .value-lg { margin-top: 0.4rem; }
.contact-block .btn { margin-top: 1.4rem; }
.contact-hours { margin-top: 0.8rem; color: var(--grey); font-size: 0.92rem; }
@media (max-width: 760px) { .contact-page-grid { grid-template-columns: 1fr; } }

.location-note { display: flex; gap: 1rem; align-items: flex-start; margin-top: 1rem; }
.location-note svg { flex-shrink: 0; margin-top: 0.2rem; }

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center { text-align: center; }
.mt-lg { margin-top: 3rem; }

/* Spacing utilities (replace one-off inline styles) */
.mt-0  { margin-top: 0; }
.mt-06 { margin-top: 0.6rem; }
.mt-08 { margin-top: 0.8rem; }
.mt-09 { margin-top: 0.9rem; }
.mt-1  { margin-top: 1rem; }
.mt-12 { margin-top: 1.2rem; }
.mt-14 { margin-top: 1.4rem; }
.mt-15 { margin-top: 1.5rem; }
.mt-16 { margin-top: 1.6rem; }
.mt-18 { margin-top: 1.8rem; }
.mt-2  { margin-top: 2rem; }
.mt-22 { margin-top: 2.2rem; }
.mt-25 { margin-top: 2.5rem; }
.mt-26 { margin-top: 2.6rem; }
.mb-1  { margin-bottom: 1rem; }
.pt-7  { padding-top: 7rem; }

/* Font-size utilities */
.fs-82  { font-size: 0.82rem; }
.fs-85  { font-size: 0.85rem; }
.fs-88  { font-size: 0.88rem; }
.fs-9   { font-size: 0.9rem; }
.fs-95  { font-size: 0.95rem; }
.fs-1   { font-size: 1rem; }
.fs-105 { font-size: 1.05rem; }
.fs-h3sz { font-size: var(--fs-h3); }

/* Colour utilities */
.c-inherit  { color: inherit; }
.c-white    { color: var(--white); }
.c-grey     { color: var(--grey); }
.c-bodyalt  { color: #dbe2ee; }

/* Background utilities */
.bg-paper     { background: var(--paper); }
.bg-navydeep  { background: var(--navy-deep); color: var(--white); }

/* Max-width utilities */
.max-60ch { max-width: 60ch; }
.max-70ch { max-width: 70ch; }

/* Composite */
.center-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
