/* =========================================================
   AMALTAS NIKETAN — Main stylesheet
   ---------------------------------------------------------
   1. Design tokens (colours, fonts, spacing)
   2. Base / reset
   3. Reusable pieces (container, buttons, headings)
   4. Header & navigation
   5. Hero
   6. Page sections (in the order they appear)
   7. Footer
   8. Lightbox & dialogs
   9. Disclosure page
   10. Animations & responsive rules
   ========================================================= */


/* ---------- 1. DESIGN TOKENS ----------
   Change a colour here and it updates across the whole site. */
:root {
  /* Amaltas gold (the flower) */
  --gold: #F2B705;
  --gold-deep: #D69A00;
  --gold-soft: #FBE7A1;
  --gold-50: #FDF7E4;

  /* Forest green (the leaves) */
  --green-950: #0C1D15;
  --green-900: #12291F;
  --green-800: #1A3A2B;
  --green-600: #2F6B4F;
  --green-200: #CFE0CF;

  /* Neutrals: warm ivory page, deeper sand for alternating sections,
     a soft warm card colour instead of pure white */
  --paper: #F8F3E8;
  --sand: #F0E8D7;
  --card: #FDFAF3;
  --white: #FFFFFF;
  --ink: #18201B;
  --muted: #5B655E;
  --line: rgba(18, 41, 31, 0.12);

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Shape & motion */
  --radius-sm: 12px;
  --radius: 22px;
  --radius-lg: 32px;
  --shadow: 0 1px 2px rgba(12, 29, 21, .06), 0 12px 32px -12px rgba(12, 29, 21, .18);
  --shadow-lg: 0 30px 60px -20px rgba(12, 29, 21, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --header-h: 76px;
}


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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

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

[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--green-950);
  padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 16px; }


/* ---------- 3. REUSABLE PIECES ---------- */
.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--gold); border-radius: 2px;
}
.eyebrow-light { color: var(--gold-soft); }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 120;
  margin-bottom: 22px;
  max-width: 18ch;
}

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 40px; margin-bottom: 44px;
}
.section-head .section-title { margin-bottom: 0; }
.section-intro { max-width: 380px; color: var(--muted); margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700; font-size: 15px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: .1s; }
.btn svg { transition: transform .35s var(--ease); }
.btn:hover svg, .btn:focus-visible svg { transform: translateX(3px); }
.btn-dark { background: var(--green-900); color: var(--white); }
.btn-dark:hover { background: var(--green-800); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: var(--green-950); }
.btn-gold:hover { background: #FFC81F; box-shadow: 0 10px 24px -10px rgba(214, 154, 0, .7); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--green-900); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  --hl: var(--gold-soft);
  display: inline-block; font-weight: 700; text-decoration: none;
  border-bottom: 2px solid var(--gold); padding: 0 2px 2px;
  background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 100% / 0 45%;
  transition: background-size .45s var(--ease), color .2s;
}
.link-arrow:hover, .link-arrow:focus-visible { background-size: 100% 45%; }
.link-arrow .arr { display: inline-block; transition: transform .35s var(--ease); }
.link-arrow:hover .arr, .link-arrow:focus-visible .arr, a:hover > .link-arrow .arr { transform: translateX(4px); }


/* ---------- 4. HEADER & NAV ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(248, 243, 232, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(12, 29, 21, .4); }

.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
/* Official logo. Shown exactly as supplied, inside a white circle so its
   white background blends in on any section colour. Never recolour or crop it. */
.logo-badge {
  flex: none;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #F7FFFD; /* matches the logo file's own background colour */
  padding: 3px;
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px var(--line), 0 4px 12px -6px rgba(12, 29, 21, .35);
}
.logo-badge img {
  width: 100%; height: 100%; object-fit: contain;
  /* Hides only the empty background corners of the JPEG. 52.5% is measured to sit
     just outside the emblem, so no part of the logo itself is cut. */
  clip-path: circle(52.5% at 50% 50%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.brand-text small { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a:not(.btn) {
  text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 12px; border-radius: 999px; color: var(--ink);
  white-space: nowrap;
  transition: background .2s;
}
.main-nav a:not(.btn) { position: relative; }
.main-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 1.5px;
  background: var(--gold-deep); border-radius: 2px;
  transform: scaleX(0); transform-origin: left center; transition: transform .35s var(--ease);
}
.main-nav a:not(.btn):hover::after, .main-nav a:not(.btn):focus-visible::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { background: rgba(18, 41, 31, .07); }
.main-nav a[aria-current="page"]::after { display: none; }
.nav-cta { margin-left: 10px; padding: 11px 20px; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--white);
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 13px; right: 13px; height: 2px; background: var(--ink);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child { top: 26px; }
.nav-open .nav-toggle span:first-child { top: 22px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 22px; transform: rotate(-45deg); }


/* ---------- 5. HERO ---------- */
.hero { position: relative; padding: 64px 0 0; overflow: hidden; }

.hero-top {
  display: grid; grid-template-columns: 1.35fr 1fr;
  gap: 48px; align-items: end;
  margin-bottom: 48px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144;
}
.hero-title em, .vision-quote em {
  font-style: italic; color: var(--green-600);
  background: linear-gradient(transparent 68%, var(--gold-soft) 68%, var(--gold-soft) 92%, transparent 92%);
  padding: 0 .06em;
}

.hero-side .lede { font-size: 18px; color: var(--muted); margin-bottom: 28px; }

.hero-media {
  position: relative; margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1280 / 461;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.6s var(--ease); }
.hero-media.in-view img { transform: scale(1); }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(12, 29, 21, .35));
  pointer-events: none;
}

.hero-badge {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow);
}
.hero-badge-top { top: 20px; right: 20px; }
.hero-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: #2FA36B; box-shadow: 0 0 0 4px rgba(47, 163, 107, .2); }

.hero-card {
  position: absolute; z-index: 2; left: 24px; bottom: 24px;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 22px;
  border-radius: var(--radius);
  background: rgba(12, 29, 21, .72);
  backdrop-filter: blur(12px);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .14);
}
.hero-card strong { font-family: var(--font-display); font-size: 40px; font-weight: 500; color: var(--gold); line-height: 1; }
.hero-card span { font-size: 14px; line-height: 1.4; opacity: .9; }

/* Hanging amaltas decoration */
.raceme { position: absolute; pointer-events: none; color: var(--gold); }
.raceme-hero { top: -6px; right: 3%; width: 190px; z-index: 0; opacity: .95; }
.hero-top, .hero .container { position: relative; z-index: 1; }
.sway { transform-box: fill-box; transform-origin: top center; animation: sway 6s ease-in-out infinite; }
.sway-2 { animation-duration: 7.5s; animation-delay: -2s; }
.sway-3 { animation-duration: 5.5s; animation-delay: -1s; }
@keyframes sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }

/* Scrolling strip */
.marquee {
  margin-top: 72px;
  background: var(--gold);
  color: var(--green-950);
  overflow: hidden;
  padding: 16px 0;
}
.marquee-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: marquee 40s linear infinite; }
.marquee span { font-family: var(--font-display); font-size: 22px; font-weight: 500; white-space: nowrap; }
.marquee i { width: 10px; height: 10px; border-radius: 50%; background: var(--green-900); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }


/* ---------- 6. SECTIONS ---------- */

/* At a glance */
.glance { padding: 72px 0 8px; }
.glance-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.glance-item { padding: 28px 24px 0 0; }
.glance-item + .glance-item { padding-left: 24px; border-left: 1px solid var(--line); }
.glance-item strong {
  display: block;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem); letter-spacing: -0.03em; line-height: 1.1;
  color: var(--green-900);
}
.glance-item span { color: var(--muted); font-size: 15px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 72px; align-items: center; }
.about-media { position: relative; }
.about-media > img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 40% center;
  border-radius: 240px 240px var(--radius) var(--radius); /* arch shape, like the school gateway */
  box-shadow: var(--shadow-lg);
}
.about-stamp.logo-badge {
  position: absolute; right: -28px; bottom: 48px;
  width: 136px; height: 136px; padding: 10px;
  box-shadow: 0 0 0 6px var(--paper), var(--shadow-lg);
}

.about-copy > p { color: var(--muted); font-size: 17.5px; }
.about-copy strong { color: var(--ink); }

.timeline { list-style: none; padding: 0; margin: 32px 0 0; border-left: 2px solid var(--gold-soft); }
.timeline li { position: relative; padding: 0 0 18px 26px; color: var(--muted); font-size: 15.5px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2.5px solid var(--gold-deep);
}
.timeline li span { display: block; font-weight: 700; color: var(--green-900); font-size: 14px; letter-spacing: .04em; }

.founders { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 56px; }
.founder {
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px;
}
.founder h3 { font-family: var(--font-display); font-weight: 500; font-size: 26px; }
.founder .role { font-size: 13px; font-weight: 700; color: var(--gold-deep); letter-spacing: .06em; text-transform: uppercase; margin: 6px 0 10px; }
.founder p:last-child { color: var(--muted); margin: 0; font-size: 15.5px; }
.monogram {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  background: var(--gold-50); color: var(--green-900); border: 1.5px solid var(--gold-soft);
}
.founder + .founder .monogram { background: var(--green-900); color: var(--gold); border-color: var(--green-900); }

/* Learning — "More than marks": one composition of linked feature cards,
   each with its own weight (photo, gold, sand, wide photo, typographic coda) */
.learning { background: var(--sand); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.learning .section-intro .link-arrow { display: inline-block; margin-top: 14px; color: var(--ink); }

.feature-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 236px 236px minmax(210px, auto); gap: 16px;
}
.feat-rail { display: contents; } /* becomes a swipeable row on phones */
.feat-lead    { grid-column: 1 / 7;  grid-row: 1 / 3; }
.feat-culture { grid-column: 7 / 10; grid-row: 1 / 3; }
.feat-gold    { grid-column: 10 / 13; grid-row: 1; }
.feat-sand    { grid-column: 10 / 13; grid-row: 2; }
.feat-sport   { grid-column: 1 / 6;  grid-row: 3; }
.feat-coda    { grid-column: 6 / 13; grid-row: 3; }

.feat {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px 26px 24px; border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  transition: border-color .45s var(--ease), background-color .45s var(--ease);
}
/* Soft light that follows the pointer (position set by js/main.js) */
.feat::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 70%) var(--my, 20%), rgba(255, 255, 255, .16), transparent 65%);
  opacity: 0; transition: opacity .5s var(--ease);
}
.feat:hover::before { opacity: 1; }
.feat > * { position: relative; z-index: 2; }

.feat-kicker {
  display: block; margin-bottom: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green-600); transition: color .4s var(--ease);
}
.feat-title {
  width: fit-content; max-width: 100%;
  font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 1.12; letter-spacing: -0.01em;
  /* gold underline that draws in on hover */
  background: linear-gradient(var(--gold), var(--gold)) no-repeat 0 100% / 0 2px;
  padding-bottom: 3px; transition: background-size .55s var(--ease);
}
.feat-text { margin: 8px 52px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); max-width: 42ch; }

/* Arrow chip: points up-right at rest, turns to face forward and fills gold on hover */
.feat-arrow {
  position: absolute; bottom: 20px; right: 20px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid currentColor; color: inherit; opacity: .75;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), opacity .35s, transform .5s var(--ease);
}
.feat-arrow svg { width: 17px; height: 17px; transform: rotate(-45deg); transition: transform .5s var(--ease); }
.feat:hover .feat-arrow, .feat:focus-visible .feat-arrow {
  background: var(--gold); border-color: var(--gold); color: var(--green-950); opacity: 1;
}
.feat:hover .feat-arrow svg, .feat:focus-visible .feat-arrow svg { transform: rotate(0deg) translateX(1px); }
.feat:hover .feat-title, .feat:focus-visible .feat-title { background-size: 100% 2px; }

/* Photo cards */
.feat-photo { color: var(--white); border: 0; background: var(--green-900); }
.feat-photo .feat-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02); transition: transform 1.2s var(--ease), filter .8s var(--ease);
  filter: saturate(.92);
}
.feat-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 29, 21, 0) 22%, rgba(12, 29, 21, .5) 55%, rgba(12, 29, 21, .88) 100%);
  transition: opacity .6s var(--ease);
}
.feat-photo:hover .feat-img, .feat-photo:focus-visible .feat-img { transform: scale(1.07) translateY(-1.5%); filter: saturate(1.05); }
.feat-photo .feat-kicker { color: var(--gold); }
.feat-photo .feat-text { color: rgba(255, 255, 255, .82); }
.feat-photo .feat-arrow { color: var(--white); }

.feat-lead { padding: 34px; }
.feat-lead .feat-title { font-size: clamp(1.8rem, 2.8vw, 2.5rem); line-height: 1.06; }
.feat-lead .feat-text { font-size: 15.5px; }
.feat-lead .feat-img { object-position: center 30%; }
.feat-culture .feat-img { object-position: 38% center; }
.feat-sport .feat-img { object-position: 30% 80%; }
.feat-sport::after { background: linear-gradient(90deg, rgba(12, 29, 21, .88) 0%, rgba(12, 29, 21, .55) 50%, rgba(12, 29, 21, .1) 100%); }

/* Graphic cards: an oversized line drawing drifts slightly on hover */
.feat-icon {
  position: absolute; z-index: 0; top: -30px; right: -34px;
  width: 150px; height: 150px; opacity: .16;
  transition: transform 1s var(--ease), opacity .5s var(--ease);
}
.feat:hover .feat-icon, .feat:focus-visible .feat-icon { transform: translate(-10px, 10px) rotate(-6deg); opacity: .26; }
.feat-gold { background: var(--gold); border-color: var(--gold); }
.feat-gold:hover { background-color: #F7C21A; }
.feat-gold .feat-kicker { color: var(--green-900); }
.feat-gold .feat-text { color: rgba(12, 29, 21, .74); }
.feat-gold .feat-title { background-image: linear-gradient(var(--green-900), var(--green-900)); }
.feat-gold .feat-icon { color: var(--green-950); }
.feat-gold:hover .feat-arrow, .feat-gold:focus-visible .feat-arrow { background: var(--green-900); border-color: var(--green-900); color: var(--gold); }
.feat-sand { background: var(--card); }
.feat-sand:hover { border-color: rgba(214, 154, 0, .45); }
.feat-sand .feat-icon { color: var(--green-600); }

/* Typographic coda (not a link) */
.feat-coda {
  background: var(--green-900); border-color: var(--green-900); color: var(--white);
  flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 28px 32px;
}
.feat-coda::before { display: none; }
.feat-coda h3 { font-family: var(--font-display); font-weight: 500; font-size: 22px; margin-bottom: 6px; }
.feat-coda p { margin: 0; color: rgba(255, 255, 255, .7); font-size: 14.5px; max-width: 30ch; }
.feat-coda .story-words {
  margin: 0; text-align: right; flex: none;
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.9rem, 3.3vw, 2.9rem); line-height: 1; letter-spacing: -0.03em;
  color: var(--gold-soft);
}
.feat-coda .story-words span { color: var(--gold); }

/* Campus — dark green section */
.campus {
  background:
    radial-gradient(800px 400px at 90% 0%, rgba(242, 183, 5, .14), transparent 60%),
    var(--green-900);
  color: var(--white);
}
.campus-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.campus-copy > p { color: rgba(255, 255, 255, .75); font-size: 17.5px; }
.facility-list {
  list-style: none; padding: 0; margin: 28px 0 32px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.facility-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  font-size: 15px; font-weight: 600;
}
.facility-list li::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312291F' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.campus .link-arrow, .contact .link-arrow, .fee-more .link-arrow { --hl: rgba(242, 183, 5, .22); }
.campus .link-arrow { color: var(--gold-soft); }
.campus-media { margin: 0; position: relative; }
.campus-media img { width: 100%; height: auto; border-radius: var(--radius-lg); aspect-ratio: 16 / 11; object-fit: cover; box-shadow: var(--shadow-lg); }
.campus-media figcaption {
  position: absolute; left: 20px; bottom: 20px;
  background: rgba(12, 29, 21, .7); backdrop-filter: blur(8px);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 170px;
  gap: 14px;
}
.g-item {
  position: relative; padding: 0; border: 0; overflow: hidden;
  border-radius: var(--radius); background: var(--green-200);
}
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .4s; }
.g-item::after {
  content: attr(data-caption);
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  text-align: left; color: var(--white); font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 12px; background: rgba(12, 29, 21, .65); backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(8px); transition: .35s var(--ease);
}
.g-item:hover img, .g-item:focus-visible img { transform: scale(1.06); }
.g-item:hover::after, .g-item:focus-visible::after { opacity: 1; transform: none; }
.g-a { grid-column: span 4; grid-row: span 2; }
.g-b { grid-column: span 2; grid-row: span 2; }
.g-c { grid-column: span 3; grid-row: span 2; }
.g-d { grid-column: span 3; grid-row: span 2; }
.g-d img { object-position: center 35%; }
.g-e { grid-column: span 6; grid-row: span 2; }
.g-e img { object-position: center 60%; }

/* Vision */
.vision { background: var(--gold-50); position: relative; overflow: hidden; padding: 80px 0; }
.vision-quote {
  margin: 0 auto 52px; max-width: 980px; text-align: center;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.2; letter-spacing: -0.02em;
}
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1000px; margin: 0 auto; }
.vm-card { background: var(--card); border-radius: var(--radius); padding: 36px; border: 1px solid rgba(214, 154, 0, .2); }
.vm-card p { margin: 0; font-size: 17px; color: var(--muted); }
.vm-label {
  display: inline-block; margin-bottom: 14px;
  font-family: var(--font-display); font-style: italic; font-size: 28px; color: var(--green-900);
}

/* Fees */
.fee-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.fee-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px;
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.fee-card:hover { border-color: rgba(214, 154, 0, .5); box-shadow: var(--shadow); }
.fee-more:hover { border-color: var(--green-800); background: var(--green-800); }
.fee-card h3 { font-size: 15px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green-600); }
.fee-total {
  font-family: var(--font-display); font-size: 46px; font-weight: 500; letter-spacing: -0.03em;
  margin: 14px 0 22px; line-height: 1;
}
.fee-total span { font-size: 26px; vertical-align: top; margin-right: 2px; color: var(--gold-deep); }
.fee-total small { font-family: var(--font-body); font-size: 14px; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.fee-card dl { margin: 0; border-top: 1px dashed var(--line); padding-top: 16px; }
.fee-card dl div { display: flex; justify-content: space-between; font-size: 15px; padding: 4px 0; }
.fee-card dt { color: var(--muted); }
.fee-card dd { margin: 0; font-weight: 700; }
.fee-more { background: var(--green-900); color: var(--white); text-decoration: none; border-color: var(--green-900); }
.fee-more h3 { color: var(--gold); }
.fee-more p { color: rgba(255, 255, 255, .75); margin: 14px 0 auto; padding-bottom: 20px; }
.fee-more .link-arrow { align-self: flex-start; }

/* Disclosure teaser */
.disclosure-teaser { padding-top: 0; }
.teaser-box {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
  background: var(--green-900); color: var(--white);
  border-radius: var(--radius-lg); padding: 64px;
  position: relative; overflow: hidden;
}
.teaser-box .eyebrow { color: var(--gold-soft); }
.teaser-box p { color: rgba(255, 255, 255, .75); max-width: 48ch; margin-bottom: 28px; }
.paper-stack { position: relative; height: 280px; }
.paper {
  position: absolute; width: 36%; max-width: 190px; height: 240px;
  background: var(--white); color: var(--ink);
  border-radius: 14px; padding: 22px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; justify-content: flex-end;
  background-image: repeating-linear-gradient(var(--white) 0 18px, #EEF0EC 18px 20px);
  background-size: 100% 100px; background-position: 0 50px; background-repeat: no-repeat;
  transition: transform .5s var(--ease);
}
.paper span { position: absolute; top: 18px; left: 18px; background: #D93B30; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.paper b { font-family: var(--font-display); font-weight: 500; font-size: 18px; line-height: 1.2; }
/* Each card only overlaps the next one a little, so every title stays readable */
.paper:nth-child(1) { left: 0; top: 24px; transform: rotate(-7deg); }
.paper:nth-child(2) { left: 32%; top: 0; transform: rotate(2deg); z-index: 1; }
.paper:nth-child(3) { left: 64%; top: 30px; transform: rotate(8deg); z-index: 2; }
.teaser-box:hover .paper:nth-child(1) { transform: rotate(-12deg) translateX(-10px); }
.teaser-box:hover .paper:nth-child(3) { transform: rotate(14deg) translateX(10px); }

/* SMC */
.smc { padding-top: 40px; }
.smc-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.smc-grid li {
  padding: 22px 24px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
  transition: background .25s;
}
.smc-grid li:hover { background: var(--card); }
.smc-grid b { font-family: var(--font-display); font-weight: 500; font-size: 19px; }
.smc-grid span { font-size: 13.5px; color: var(--gold-deep); font-weight: 700; }

/* Home: compact previews (full detail lives on the inner pages) */
.about-compact .about-grid { grid-template-columns: .9fr 1.1fr; }
.about-compact .about-media > img { aspect-ratio: 1 / 1; object-position: 50% 38%; }
.campus-compact .campus-media img { aspect-ratio: 16 / 10; }
.campus-links { display: flex; flex-wrap: wrap; gap: 14px 30px; margin-top: 30px; }

/* Home: admissions preview */
.admit { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: end; }
.vision-link { text-align: center; margin: -20px 0 0; }
.admit-copy p { color: var(--muted); max-width: 42ch; }
.fee-line { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.fee-line li { padding: 22px 20px 0 0; }
.fee-line li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.fee-line b { display: block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green-600); margin-bottom: 6px; }
.fee-line strong {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 3.6vw, 2.9rem);
  letter-spacing: -0.03em; line-height: 1;
}
.fee-line strong span { font-size: .55em; vertical-align: top; color: var(--gold-deep); margin-right: 2px; }
.fee-line small { display: block; color: var(--muted); font-size: 14px; margin-top: 6px; }
.admit-links { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }

/* Home: contact panel (no map — the map lives on contact.html) */
.contact-home .contact-cards { margin-top: 0; }
.contact-home .link-arrow { color: var(--gold-soft); margin-top: 8px; }

/* ---------- INNER PAGES (shared patterns) ---------- */
.page-hero .lede { font-size: 19px; }
.page-hero h1 em {
  font-style: italic; color: var(--green-600);
  background: linear-gradient(transparent 68%, var(--gold-soft) 68%, var(--gold-soft) 92%, transparent 92%);
  padding: 0 .06em;
}
.page-hero-split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: end; }
.page-hero-split > p { margin-bottom: 8px; }
.page-hero .btn-row { margin-top: 28px; }

/* Wide photo directly under a page heading */
.page-media {
  margin: 0; position: relative;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 21 / 8;
}
.page-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease); }
.page-media:hover img { transform: scale(1.025); }
.page-media figcaption {
  position: absolute; left: 20px; bottom: 20px; color: var(--white);
  background: rgba(12, 29, 21, .7); backdrop-filter: blur(8px);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
}

.section-tight { padding: 72px 0; }
.bg-sand { background: var(--sand); }

/* Two-column text + image block, flips with .split-flip */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split-flip > :first-child { order: 2; }
.split-media { margin: 0; position: relative; }
.split-media img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.split-media figcaption { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.split-copy > p:not(.eyebrow) { color: var(--muted); font-size: 17.5px; }
.split-copy .rows > li { grid-template-columns: 44px 1fr; gap: 6px 16px; padding: 20px 0; }
.split-copy .rows > li > :not(h3) { grid-column: 2; }

/* Numbered editorial rows (facilities, approach, steps) */
.rows { list-style: none; padding: 0; margin: 0; counter-reset: row; border-top: 1px solid var(--line); }
.rows > li {
  counter-increment: row;
  display: grid; grid-template-columns: 70px 1fr 1.2fr; gap: 24px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.rows > li::before {
  content: counter(row, decimal-leading-zero);
  font-family: var(--font-display); font-style: italic; font-size: 17px; color: var(--gold-deep);
}
.rows h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: -0.01em; }
.rows p { margin: 0; color: var(--muted); font-size: 15.5px; }
.rows-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; border-top: 0; }
.rows-two > li { grid-template-columns: 54px 1fr; border-top: 0; }
.rows-two > li:nth-child(-n+2) { border-top: 1px solid var(--line); }
.campus .rows-two > li, .campus .rows-two > li:nth-child(-n+2) { border-color: rgba(255, 255, 255, .14); }
.rows-two > li > :not(h3) { grid-column: 2; }
.campus .rows > li::before { color: var(--gold); }
.campus .rows p { color: rgba(255, 255, 255, .7); }

/* Class stages (academics) */
.stages { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.stage { padding: 30px 28px 0 0; }
.stage + .stage { padding-left: 28px; border-left: 1px solid var(--line); }
.stage-label { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green-600); }
.stage strong {
  display: block; margin: 10px 0 12px;
  font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 3.3vw, 2.8rem);
  letter-spacing: -0.03em; line-height: 1.02; color: var(--green-900);
}
.stage p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* Clearly-marked placeholder for content the school still has to supply */
.placeholder {
  border: 1.5px dashed rgba(214, 154, 0, .55); border-radius: var(--radius);
  background: repeating-linear-gradient(-45deg, transparent 0 12px, rgba(242, 183, 5, .05) 12px 24px);
  padding: 22px 26px; color: var(--muted); font-size: 15px;
}
.placeholder::before {
  content: "Content placeholder"; display: block; margin-bottom: 6px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep);
}
.placeholder p { margin: 0; }
.placeholder p + p { margin-top: 6px; }
.campus .placeholder, .contact .placeholder { color: rgba(255, 255, 255, .7); border-color: rgba(242, 183, 5, .45); }
.campus .placeholder::before, .contact .placeholder::before { color: var(--gold); }

/* Document links that point into disclosure.html */
.doc-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 32px; }
.doc-links a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; font-weight: 600; transition: color .2s, padding .25s var(--ease);
}
.doc-links a::after { content: "→"; color: var(--gold-deep); }
.doc-links a:hover { color: var(--green-600); padding-left: 6px; }
.doc-links small { display: block; font-weight: 500; font-size: 13px; color: var(--muted); }

/* Quiet facts list (about, contact) */
.fact-list { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.fact-list div { padding: 20px 20px 0 0; }
.fact-list div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.fact-list dt { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.fact-list dd { margin: 0; font-weight: 600; word-break: break-word; }

/* Closing call-to-action panel on inner pages (re-uses .teaser-box) */
.cta-panel .btn-row { justify-content: flex-end; }
.cta-panel .btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, .3); }
.cta-panel .btn-ghost:hover { border-color: var(--gold); }

/* Gallery page grid */
.gallery-page { grid-auto-rows: 190px; }
.gallery-note { margin-top: 40px; }

/* Contact */
.contact { background: var(--green-950); color: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.contact-copy > p { color: rgba(255, 255, 255, .72); }
.contact-cards { display: grid; gap: 14px; margin-top: 30px; }
.contact-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 22px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
  text-decoration: none; transition: background .25s, border-color .25s;
}
a.contact-card:hover { background: rgba(242, 183, 5, .12); border-color: rgba(242, 183, 5, .4); }
.contact-card svg { flex: none; width: 24px; height: 24px; color: var(--gold); margin-top: 2px; }
.contact-card small { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); font-weight: 700; }
.contact-card span { font-size: 18px; font-weight: 600; line-height: 1.45; }
.map-wrap { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3.2; background: var(--green-800); box-shadow: var(--shadow-lg); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.25) contrast(1.05); }


/* ---------- 7. FOOTER ---------- */
.site-footer { background: var(--green-950); color: rgba(255, 255, 255, .7); padding: 0 0 32px; font-size: 15px; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1fr; gap: 40px;
  border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 64px; padding-bottom: 48px;
}
.site-footer .brand { color: var(--white); margin-bottom: 18px; gap: 16px; }
.site-footer .logo-badge { width: 76px; height: 76px; padding: 4px; box-shadow: none; }
.site-footer .brand-text small { color: rgba(255, 255, 255, .55); }
.site-footer h4 { color: var(--white); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.facts li span { display: block; font-size: 12px; color: rgba(255, 255, 255, .45); }
.facts li { color: var(--white); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px;
}
.footer-bottom p { margin: 0; }


/* ---------- 8. LIGHTBOX & DIALOGS ---------- */
dialog { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(8, 18, 13, .9); backdrop-filter: blur(4px); }

.lightbox[open] { width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; max-width: min(1200px, 86vw); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: var(--radius-sm); }
.lightbox figcaption { color: var(--white); text-align: center; margin-top: 14px; font-weight: 600; }
.lightbox-close, .lightbox-nav {
  position: fixed; border: 0; color: var(--white);
  background: rgba(255, 255, 255, .1); border-radius: 50%;
  width: 52px; height: 52px; font-size: 30px; line-height: 1;
  transition: background .2s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: var(--gold); color: var(--green-950); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-nav.prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: 20px; top: 50%; transform: translateY(-50%); }


/* ---------- 9. DISCLOSURE PAGE ---------- */
.page-hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.page-hero .raceme-hero { width: 150px; }
.page-hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem); letter-spacing: -0.03em; line-height: 1.05;
  max-width: 15ch; margin-bottom: 20px;
}
.page-hero p { max-width: 60ch; color: var(--muted); font-size: 18px; }
.page-hero p.eyebrow { font-size: 13px; color: var(--green-600); max-width: none; }

.info-table {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.info-table div { padding: 20px 24px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.info-table dt { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.info-table dd { margin: 0; font-weight: 600; font-size: 16px; word-break: break-word; }

.doc-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 72px 0 32px;
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 5;
  background: rgba(248, 243, 232, .92); backdrop-filter: blur(10px);
  padding: 10px; border-radius: 999px; border: 1px solid var(--line);
}
.doc-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.doc-tabs button {
  border: 0; background: transparent; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--muted);
}
.doc-tabs button[aria-pressed="true"] { background: var(--green-900); color: var(--white); }
.doc-search {
  flex: 1; max-width: 300px; min-width: 180px;
  border: 1px solid var(--line); background: var(--card);
  padding: 10px 18px; border-radius: 999px; font: inherit; font-size: 15px;
}

.doc-group { margin-bottom: 64px; }
.doc-group h2 { font-family: var(--font-display); font-weight: 500; font-size: 32px; margin-bottom: 6px; }
.doc-group > p { color: var(--muted); margin-bottom: 26px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }

.doc-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s;
}
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.doc-thumb {
  position: relative; height: 170px; background: var(--gold-50);
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
}
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* Drawn "paper" preview, used when no thumbnail image is given */
.doc-sheet {
  width: 62%; height: 84%; background: var(--white);
  border-radius: 8px 8px 0 0; box-shadow: 0 -4px 20px -8px rgba(12, 29, 21, .25);
  padding: 18px 16px; position: relative;
  transition: transform .4s var(--ease);
}
.doc-card:hover .doc-sheet { transform: translateY(-6px); }
.doc-sheet::before { content: ""; display: block; height: 8px; width: 60%; background: var(--green-900); border-radius: 4px; margin-bottom: 12px; }
.doc-sheet::after {
  content: ""; display: block; height: 70px;
  background: repeating-linear-gradient(#E8ECE6 0 5px, transparent 5px 13px);
}
.doc-type { position: absolute; top: 14px; right: 14px; background: #D93B30; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; z-index: 1; }
.doc-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.doc-body h3 { font-family: var(--font-display); font-weight: 500; font-size: 20px; margin-bottom: 6px; }
.doc-body p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.doc-actions { margin-top: auto; display: flex; gap: 8px; }
.doc-actions a {
  flex: 1; text-align: center; text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 10px 12px; border-radius: 999px; border: 1.5px solid var(--line);
  transition: background .2s, border-color .2s, color .2s;
}
.doc-actions a:first-child { background: var(--green-900); color: var(--white); border-color: var(--green-900); }
.doc-actions a:first-child:hover { background: var(--green-800); }
.doc-actions a:last-child:hover { border-color: var(--green-900); }
.doc-empty { color: var(--muted); padding: 40px 0; text-align: center; }

.pdf-viewer[open] { width: min(1100px, 94vw); height: 92vh; display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.pdf-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px 12px 22px; border-bottom: 1px solid var(--line); }
.pdf-bar h3 { font-family: var(--font-display); font-weight: 500; font-size: 20px; }
.pdf-bar div { display: flex; gap: 8px; }
.pdf-bar .btn { padding: 9px 16px; font-size: 14px; }
.pdf-viewer iframe { flex: 1; width: 100%; border: 0; background: #F1F1EF; }


/* ---------- 10. ANIMATIONS & RESPONSIVE ---------- */

/* Scroll reveal: only hidden when JavaScript is running (html.js) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Eight nav links: tighten them before the container starts to shrink */
@media (max-width: 1240px) {
  .main-nav a:not(.btn) { padding: 8px 9px; font-size: 14.5px; }
  .main-nav a:not(.btn)::after { left: 9px; right: 9px; }
}

/* Mobile navigation kicks in (earlier than the layout breakpoint, so the
   eight links never wrap) */
@media (max-width: 1140px) {
  .nav-toggle { display: block; z-index: 2; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); padding: 16px 24px 28px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 40px -20px rgba(12, 29, 21, .3);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: .3s var(--ease);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav-open .main-nav { transform: none; opacity: 1; visibility: visible; }
  .main-nav a:not(.btn) { padding: 13px 12px; font-size: 18px; border-radius: 12px; }
  .main-nav a:not(.btn)::after { display: none; }
  .main-nav a:not(.btn):hover { background: rgba(18, 41, 31, .05); }
  .nav-cta { margin: 12px 0 0; }
}

/* Tablet */
@media (max-width: 1080px) {
  .fee-grid { grid-template-columns: repeat(2, 1fr); }
  .smc-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: repeat(6, 1fr); grid-template-rows: 220px 220px 210px minmax(190px, auto); }
  .feat-lead    { grid-column: 1 / 5; grid-row: 1 / 3; }
  .feat-culture { grid-column: 5 / 7; grid-row: 1 / 3; }
  .feat-gold    { grid-column: 1 / 4; grid-row: 3; }
  .feat-sand    { grid-column: 4 / 7; grid-row: 3; }
  .feat-sport   { grid-column: 1 / 4; grid-row: 4; }
  .feat-coda    { grid-column: 4 / 7; grid-row: 4; flex-direction: column; align-items: flex-start; }
  .feat-coda .story-words { text-align: left; }
  .admit { grid-template-columns: 1fr; gap: 32px; }
  .split { gap: 48px; }
  .fact-list { grid-template-columns: 1fr 1fr; }
  .fact-list div:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* Small tablet */
@media (max-width: 960px) {
  .hero-top, .about-grid, .campus-grid, .contact-grid, .teaser-box { grid-template-columns: 1fr; }
  .about-compact .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-top { gap: 24px; }
  .raceme-hero { width: 120px; right: 0; opacity: .55; }
  .about-media { max-width: 520px; }
  .about-stamp.logo-badge { right: 12px; width: 112px; height: 112px; }
  .glance-grid { grid-template-columns: 1fr 1fr; }
  .glance-item:nth-child(3) { padding-left: 0; border-left: 0; }
  .paper-stack { height: 240px; }
  .teaser-box { padding: 44px 32px; }
  .info-table { grid-template-columns: 1fr 1fr; }

  .page-hero-split, .split { grid-template-columns: 1fr; gap: 36px; }
  .split-flip > :first-child { order: 0; }
  .page-media { aspect-ratio: 16 / 8; }
  .stages { grid-template-columns: 1fr; }
  .stage, .stage + .stage { padding: 24px 0; border-left: 0; }
  .stage + .stage { border-top: 1px solid var(--line); }
  .stage strong { margin: 6px 0 8px; }
  .rows > li { grid-template-columns: 54px 1fr; }
  .rows > li > :not(h3) { grid-column: 2; } /* text, links or a placeholder sit beside the number, never under it */
  .rows-two { grid-template-columns: 1fr; }
  .rows-two > li:nth-child(2) { border-top: 0; }
  .cta-panel .btn-row { justify-content: flex-start; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 60px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
  .hero { padding-top: 40px; }
  .hero-media { aspect-ratio: 4 / 3.4; border-radius: var(--radius); }
  .hero-media img { object-position: 62% center; }
  .hero-card { left: 12px; right: 12px; bottom: 12px; padding: 12px 16px; }
  .hero-card strong { font-size: 32px; }
  .hero-badge-top { top: 12px; right: 12px; font-size: 12.5px; padding: 8px 12px; }
  .marquee { margin-top: 48px; }
  .marquee span { font-size: 18px; }
  .glance { padding-top: 60px; }
  .glance-item { padding: 22px 12px 0 0; }
  .glance-item + .glance-item { padding-left: 14px; }
  .glance-item:nth-child(3) { padding-left: 0; }
  .founders { grid-template-columns: 1fr; margin-top: 56px; }
  .founder { flex-direction: column; padding: 24px; }
  .facility-list { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; gap: 10px; }
  .g-a, .g-e { grid-column: span 2; }
  .g-b, .g-c { grid-column: span 1; }
  .g-d { grid-column: span 2; }
  .vm-grid { grid-template-columns: 1fr; }
  .vm-card { padding: 26px; }
  .fee-grid { grid-template-columns: 1fr; }
  .smc-grid { grid-template-columns: 1fr 1fr; }
  .smc-grid li { padding: 16px; }
  .smc-grid b { font-size: 16.5px; }
  .teaser-box { padding: 36px 22px; border-radius: var(--radius); }
  .paper { width: 150px; height: 190px; padding: 16px; }
  .paper b { font-size: 15px; }
  .paper-stack { height: 210px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .info-table { grid-template-columns: 1fr; }
  .doc-toolbar { border-radius: var(--radius); position: static; }
  .doc-search { max-width: none; }
  .lightbox-nav { top: auto; bottom: 20px; transform: none; }
  .lightbox-nav.prev { transform: none; }
  .lightbox-nav.next { transform: none; }

  /* Feature cards: lead card on top, the four smaller cards as a swipeable row */
  .feature-grid { display: flex; flex-direction: column; gap: 12px; }
  .feat-lead { min-height: 300px; padding: 24px; }
  .feat-rail {
    display: flex; gap: 12px;
    margin: 0 -16px; padding: 0 16px 4px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .feat-rail::-webkit-scrollbar { display: none; }
  .feat-rail .feat { flex: 0 0 74%; min-height: 236px; scroll-snap-align: start; padding: 22px; }
  .feat-icon { width: 130px; height: 130px; }
  .feat-coda { flex-direction: column; align-items: flex-start; gap: 14px; padding: 24px; }
  .feat-coda .story-words { text-align: left; font-size: 2.1rem; }
  .about-compact .about-media > img { aspect-ratio: 4 / 3.3; border-radius: 180px 180px var(--radius) var(--radius); }
  .campus-links { margin-top: 22px; }
  .fee-line { grid-template-columns: 1fr 1fr 1fr; }
  .fee-line li { padding: 18px 8px 0 0; }
  .fee-line li + li { padding-left: 10px; }
  .fee-line b { font-size: 11.5px; letter-spacing: .06em; }
  .fee-line strong { font-size: 1.6rem; }
  .fee-line small { font-size: 12.5px; }
  .page-hero { padding: 44px 0 36px; }
  .page-hero .lede { font-size: 17px; }
  .page-media { aspect-ratio: 4 / 3; border-radius: var(--radius); }
  .section-tight { padding: 56px 0; }
  .split-media img { aspect-ratio: 4 / 3; border-radius: var(--radius); }
  .rows > li { grid-template-columns: 40px 1fr; gap: 6px 14px; padding: 20px 0; }
  .fact-list { grid-template-columns: 1fr; }
  .fact-list div, .fact-list div + div { padding: 16px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .gallery-page { grid-auto-rows: 150px; }
}
