/* ============================================================
   Green Valley Public School — styles.css  (editorial revision)
   Palette: forest green · warm cream · charcoal · muted sage
   Type: Newsreader (display serif) + Manrope (grotesque)
   Design language: editorial / magazine — hairline rules, small
   radii, asymmetric grids, generous white space. Deliberately
   NOT the bubbly, pill-buttoned card system of design-01.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --forest: #1e3a28;
  --forest-deep: #14251a;
  --forest-700: #2c5639;
  --sage: #6f8168;
  --sage-400: #8b9a84;
  --sage-300: #b9c6b2;
  --sage-200: #d7e0d1;
  --cream: #f7f3ea;
  --cream-2: #efe8d8;
  --cream-3: #e5ddca;
  --charcoal: #20241f;
  --ink: #23271f;
  --muted: #6b7367;
  --line: #e2ddcf;
  --line-strong: #cfc8b6;
  --white: #ffffff;
  --danger: #b23b2e;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --r: 3px;
  --container: 1180px;
  --header-h: 68px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* overflow-x: clip (not hidden) stops the off-canvas menu from creating a
   horizontal scrollbar WITHOUT turning the root into a scroll container,
   so the sticky header keeps working. */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 18px); overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.66;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Guard: any [hidden] element stays hidden even if a class sets display. */
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--charcoal);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.35rem, 5vw, 4rem); font-weight: 500; line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 3vh + 1.2vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--forest-700); text-decoration: none; }
a:hover { color: var(--forest); }
img { max-width: 100%; display: block; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }
em { font-style: italic; }

::selection { background: var(--sage-200); color: var(--forest-deep); }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding: clamp(64px, 8vw, 116px) 0; }

/* Editorial kicker: uppercase label with a leading hairline (no pill, no dot). */
.kicker {
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--font-body); font-weight: 600; font-size: .72rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--sage);
  margin: 0 0 1.1rem;
}
.kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .75; }
.kicker.light { color: var(--sage-300); }

.section-intro { max-width: 640px; margin-bottom: clamp(34px, 4vw, 56px); }
.section-intro h2 { margin: 0; }
.section-intro.split { max-width: none; display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; align-items: end; }
.intro-text { margin: 0; color: var(--muted); font-size: .98rem; padding-bottom: .25rem; }

.fine-print { font-size: .78rem; color: var(--sage); text-align: center; margin-top: 26px; }

/* ---------- Buttons (rectangular, letterspaced — not pills) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-body); font-weight: 600; font-size: .74rem;
  letter-spacing: .12em; text-transform: uppercase; line-height: 1;
  padding: .95rem 1.5rem; border-radius: var(--r); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn-solid { background: var(--forest); color: var(--cream); border-color: var(--forest); }
.btn-solid:hover { background: var(--forest-deep); border-color: var(--forest-deep); color: var(--cream); transform: translateY(-2px); }
.btn-cream { background: var(--cream); color: var(--forest-deep); border-color: var(--cream); }
.btn-cream:hover { background: #fff; border-color: #fff; transform: translateY(-2px); }
.btn-block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--forest); padding-bottom: .3rem; border-bottom: 1px solid currentColor;
}
.link-arrow span { transition: transform .2s var(--ease); }
.link-arrow:hover { color: var(--forest-deep); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 16px; top: -70px; z-index: 200;
  background: var(--forest); color: var(--cream); padding: .7rem 1.1rem; border-radius: 0 0 var(--r) var(--r);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; color: var(--cream); }

/* ---------- Header (compact, hairline) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 243, 234, .88);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead { display: flex; align-items: center; gap: 1.4rem; min-height: var(--header-h); }

.wordmark { display: inline-flex; align-items: center; gap: .6rem; margin-right: auto; }
.wordmark-mark { width: 26px; height: 26px; color: var(--forest); flex: none; }
.wordmark-mark svg { width: 100%; height: 100%; fill: currentColor; }
.wordmark-text { display: flex; flex-direction: column; line-height: 1; }
.wordmark-text strong { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -.01em; color: var(--charcoal); }
.wordmark-text span { font-size: .58rem; letter-spacing: .28em; text-transform: uppercase; color: var(--sage); margin-top: 2px; font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: 1.7rem; }
.nav-list { display: flex; align-items: center; gap: 1.45rem; }
.nav-link { font-size: .84rem; font-weight: 500; color: var(--ink); position: relative; padding: .35rem 0; }
.nav-link:hover { color: var(--forest); }
.nav-link.is-active { color: var(--forest); }
.nav-link.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--forest); }
.nav-cta { padding: .62rem 1.05rem; font-size: .68rem; }

.nav-toggle {
  display: none; width: 42px; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: transparent; cursor: pointer; position: relative; flex: none;
}
.nav-toggle-bar { position: absolute; left: 50%; width: 18px; height: 1.6px; background: var(--charcoal); transform: translateX(-50%); transition: transform .26s var(--ease), top .26s var(--ease); }
.nav-toggle-bar:nth-child(1) { top: 15px; }
.nav-toggle-bar:nth-child(2) { top: 21px; }
.nav-open .nav-toggle-bar:nth-child(1) { top: 18px; transform: translateX(-50%) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { top: 18px; transform: translateX(-50%) rotate(-45deg); }

.nav-backdrop { position: fixed; inset: 0; background: rgba(20, 37, 26, .5); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
body.nav-open { overflow: hidden; }

/* ---------- Hero (split: text left, medium photo right) ---------- */
.hero { padding: clamp(48px, 6vw, 88px) 0 clamp(52px, 6vw, 84px); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: clamp(34px, 5vw, 76px); align-items: center; }
.hero-copy { max-width: 620px; }
.hero h1 { margin: 0 0 1.3rem; }
.hero h1 em { color: var(--forest-700); }
.hero-lead { font-size: 1.08rem; color: var(--muted); max-width: 520px; margin-bottom: 2rem; }
.hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 1.6rem; margin-bottom: 2.4rem; }
.hero-values { display: flex; flex-wrap: wrap; gap: 1.7rem; }
.hero-values li { position: relative; padding-left: 1.15rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sage); }
.hero-values li::before { content: ""; position: absolute; left: 0; top: 50%; width: 9px; height: 1px; background: var(--sage); }

.hero-figure { width: min(460px, 100%); margin: 0; justify-self: end; }
.hero-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line-strong); }
.hero-figure figcaption { margin-top: .8rem; padding-top: .6rem; border-top: 1px solid var(--line); font-size: .74rem; letter-spacing: .05em; color: var(--sage); }

/* ---------- Ethos strip ---------- */
.ethos { background: var(--cream-2); border-bottom: 1px solid var(--line); }
.ethos-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.ethos-grid p { margin: 0; padding: 1.5rem .5rem; text-align: center; font-family: var(--font-display); font-size: 1.18rem; color: var(--forest); border-right: 1px solid var(--line-strong); }
.ethos-grid p:last-child { border-right: 0; }
.ethos-grid p em { color: var(--sage); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(34px, 5vw, 76px); }
.about-rail h2 { margin-bottom: 2rem; }
.rail-figure { width: min(320px, 100%); margin: 0; }
.rail-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line-strong); }
.rail-figure figcaption { margin-top: .7rem; padding-top: .55rem; border-top: 1px solid var(--line); font-size: .74rem; color: var(--sage); }
.about-lead { font-family: var(--font-display); font-size: 1.32rem; line-height: 1.42; color: var(--charcoal); margin-bottom: 1.2rem; }
.about-body > p { color: var(--muted); }
.about-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 2.2rem; border-top: 1px solid var(--line); }
.about-col { padding: 1.6rem 1.6rem 0 0; }
.about-col:last-child { border-left: 1px solid var(--line); padding: 1.6rem 0 0 1.6rem; }
.about-col h3 { font-size: 1.04rem; font-weight: 600; margin-bottom: .4rem; }
.about-col p { margin: 0; font-size: .92rem; color: var(--muted); }

/* ---------- Academics (horizontal stage list) ---------- */
.academics { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stage-list { border-top: 1px solid var(--line-strong); }
.stage {
  display: grid;
  grid-template-columns: 104px 54px minmax(0, .92fr) minmax(0, 1.5fr) 108px;
  gap: 24px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.stage-thumb { margin: 0; width: 104px; height: 78px; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line-strong); }
.stage-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.stage:hover .stage-thumb img { transform: scale(1.06); }
.stage-num { font-family: var(--font-display); font-size: 1.02rem; color: var(--sage); }
.stage-name { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; margin: 0; color: var(--charcoal); }
.stage:hover .stage-name { color: var(--forest-700); }
.stage-desc { margin: 0; color: var(--muted); font-size: .94rem; }
.stage-meta { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); text-align: right; }

/* ---------- Facilities (icons + compact text, ledger grid) ---------- */
.facilities { background: var(--cream-2); }
.facility-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line-strong); border: 1px solid var(--line-strong);
  border-radius: var(--r); overflow: hidden;
}
.facility { background: var(--cream-2); padding: 30px 28px 34px; margin: 0; }
.facility-icon { display: inline-flex; width: 26px; height: 26px; color: var(--forest-700); margin-bottom: 1.05rem; }
.facility-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.facility h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; margin: 0 0 .35rem; }
.facility p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- Faculty (compact, consistent portraits) ---------- */
.faculty-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.member-photo { margin: 0 0 1.05rem; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line-strong); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.16); transition: filter .35s var(--ease), transform .5s var(--ease); }
.member:hover .member-photo img { filter: grayscale(0); transform: scale(1.03); }
.member h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.16rem; margin: 0 0 .18rem; }
.member-role { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sage); margin: 0 0 .6rem; }
.member-note { margin: 0; color: var(--muted); font-size: .88rem; }

/* ---------- Gallery (controlled asymmetry) ---------- */
.gallery { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; align-items: start; }
.g-item { position: relative; padding: 0; border: 1px solid var(--line-strong); background: none; cursor: pointer; overflow: hidden; border-radius: var(--r); display: block; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.g-item:hover img { transform: scale(1.05); }
.g-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; text-align: left; color: #fff; font-family: var(--font-display); font-weight: 500; font-size: 1rem; background: linear-gradient(to top, rgba(20, 37, 26, .72), rgba(20, 37, 26, 0)); }
.g-a { grid-column: span 5; height: 300px; }
.g-b { grid-column: span 4; height: 220px; margin-top: 44px; }
.g-c { grid-column: span 3; height: 272px; }
.g-d { grid-column: span 4; height: 248px; }
.g-e { grid-column: span 5; height: 208px; margin-top: 24px; }
.g-f { grid-column: span 3; height: 252px; }

/* ---------- Admissions (timeline on forest) ---------- */
.admissions { background: var(--forest); color: var(--cream); }
.admissions-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(36px, 5vw, 76px); }
.admissions-head h2 { color: var(--cream); margin-bottom: 1rem; }
.admissions-head > p { color: rgba(247, 243, 234, .72); margin-bottom: 1.9rem; max-width: 460px; }
.admissions-fine { font-size: .78rem; color: rgba(247, 243, 234, .52); margin-top: 1.1rem; max-width: 440px; }

.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 10px; bottom: 26px; width: 1px; background: rgba(247, 243, 234, .22); }
.timeline-step { position: relative; padding: 0 0 30px 54px; }
.timeline-step:last-child { padding-bottom: 0; }
.tl-num {
  position: absolute; left: 0; top: 0; width: 31px; height: 31px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-size: .8rem;
  color: var(--cream); background: var(--forest); border: 1px solid rgba(247, 243, 234, .4);
}
.timeline-step h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.16rem; margin: .15rem 0 .3rem; color: var(--cream); }
.timeline-step p { margin: 0; color: rgba(247, 243, 234, .68); font-size: .92rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(34px, 5vw, 76px); }
.contact-lead { color: var(--muted); max-width: 440px; }
.contact-list { margin: 2rem 0; border-top: 1px solid var(--line); }
.contact-row { display: grid; grid-template-columns: 160px 1fr; gap: 18px; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-row dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sage); }
.contact-row dt span { display: block; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .7rem; margin-top: 3px; }
.contact-row dd { margin: 0; color: var(--charcoal); font-size: .98rem; }
.contact-note { font-size: .85rem; color: var(--muted); border-left: 2px solid var(--sage-300); padding-left: 14px; }
.contact-note strong { color: var(--charcoal); }

/* ---------- Forms (underline / editorial) ---------- */
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: clamp(24px, 3vw, 40px); }
.field { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field label { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sage); font-weight: 600; margin-bottom: .5rem; }
.req { color: var(--forest-700); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--charcoal);
  background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  padding: .5rem 0; transition: border-color .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 84px; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b7367' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center;
}
.field input::placeholder, .field textarea::placeholder { color: #a7ad9f; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--forest); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-bottom-color: var(--danger); }
.field-error { color: var(--danger); font-size: .78rem; margin: .45rem 0 0; }
.form-status { margin: 18px 0 0; padding: 12px 14px; font-size: .86rem; border-radius: var(--r); }
.form-status.success { background: #e9f0e4; color: var(--forest-700); border-left: 2px solid var(--forest-700); }
.form-status.error { background: #f6e7e4; color: #8f2d22; border-left: 2px solid var(--danger); }

/* ---------- Footer (dark forest, oversized wordmark) ---------- */
.site-footer { background: var(--forest-deep); color: rgba(247, 243, 234, .72); padding-top: clamp(48px, 5vw, 76px); }
.footer-masthead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid rgba(247, 243, 234, .15); }
.footer-word { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.6rem, 9vw, 5.4rem); line-height: .88; letter-spacing: -.02em; color: var(--cream); }
.footer-top-link { flex: none; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(247, 243, 234, .72); padding-bottom: .4rem; border-bottom: 1px solid transparent; white-space: nowrap; }
.footer-top-link:hover { color: var(--cream); border-color: var(--cream); }
.footer-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: clamp(30px, 5vw, 64px); padding: 42px 0; }
.footer-tagline { margin: 0; max-width: 330px; font-family: var(--font-display); font-size: 1.1rem; line-height: 1.5; color: rgba(247, 243, 234, .72); }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.footer-col h4 { font-family: var(--font-body); font-weight: 600; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sage-300); margin: 0 0 1rem; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a, .footer-col li { color: rgba(247, 243, 234, .72); font-size: .9rem; }
.footer-col a:hover { color: var(--cream); }
.footer-col a[data-open-admission] { cursor: pointer; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 30px; justify-content: space-between; padding: 22px 0 32px; border-top: 1px solid rgba(247, 243, 234, .15); }
.footer-legal p { margin: 0; font-size: .76rem; color: rgba(247, 243, 234, .5); }
.footer-legal a { color: rgba(247, 243, 234, .72); text-decoration: underline; }

/* ---------- Modal (admission form) ---------- */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 37, 26, .86); backdrop-filter: blur(3px); }
.modal-dialog { position: relative; z-index: 2; width: min(660px, 100%); max-height: 90vh; overflow-y: auto; background: var(--cream); border-radius: var(--r); padding: clamp(26px, 3.6vw, 42px); box-shadow: 0 40px 90px rgba(0, 0, 0, .35); }
.modal-close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--r); background: transparent; color: var(--charcoal); cursor: pointer; display: grid; place-items: center; transition: background .18s var(--ease); }
.modal-close:hover { background: var(--cream-2); }
.modal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.modal-header { margin-bottom: 22px; padding-right: 46px; }
.modal-header h2 { margin: .2rem 0 .4rem; }
.modal-header p { color: var(--muted); margin: 0; font-size: .94rem; }
.modal-form { background: transparent; border: 0; padding: 0; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(20, 37, 26, .93); backdrop-filter: blur(3px); }
.lightbox-content { position: relative; z-index: 2; width: min(960px, 100%); display: grid; place-items: center; }
.lightbox-figure { margin: 0; background: #fff; border-radius: var(--r); overflow: hidden; max-width: 100%; }
.lightbox-figure img { width: 100%; max-height: 72vh; object-fit: contain; background: var(--forest-deep); }
.lightbox-figure figcaption { padding: 14px 18px; font-family: var(--font-display); font-weight: 500; color: var(--charcoal); text-align: center; }
.lightbox-btn { position: absolute; z-index: 3; width: 46px; height: 46px; border: 1px solid rgba(255, 255, 255, .38); border-radius: var(--r); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .2s var(--ease); }
.lightbox-btn:hover { background: rgba(255, 255, 255, .22); }
.lightbox-btn svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-close { top: -1px; right: -1px; }
.lightbox-prev { left: -1px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: -1px; top: 50%; transform: translateY(-50%); }
.lightbox-counter { position: absolute; bottom: -34px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .7); font-size: .78rem; letter-spacing: .12em; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1040px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; top: 0; right: 0; height: 100dvh; width: min(84vw, 340px);
    background: var(--cream); flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: calc(var(--header-h) + 26px) 26px 34px; gap: 0; z-index: 60;
    display: none;
    box-shadow: -30px 0 60px rgba(20, 37, 26, .18); border-left: 1px solid var(--line); overflow-y: auto;
  }
  .nav-open .main-nav { display: flex; animation: navSlide .32s var(--ease); }
  @keyframes navSlide { from { transform: translateX(100%); } to { transform: none; } }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { padding: .95rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-link.is-active::after { display: none; }
  .nav-cta { display: inline-flex; width: 100%; margin-top: 26px; }

  .faculty-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-figure { width: min(460px, 100%); justify-self: start; }
  .hero-copy { max-width: 640px; }

  .about-grid { grid-template-columns: 1fr; gap: 44px; }
  .section-intro.split { grid-template-columns: 1fr; gap: 16px; }

  .stage { grid-template-columns: 92px 1fr; grid-template-rows: auto auto auto auto; gap: 4px 22px; align-items: start; }
  .stage-thumb { grid-row: 1 / span 4; width: 92px; height: 92px; align-self: center; }
  .stage-num { grid-column: 2; font-size: .72rem; letter-spacing: .12em; color: var(--sage); }
  .stage-name { grid-column: 2; font-size: 1.35rem; }
  .stage-desc { grid-column: 2; }
  .stage-meta { grid-column: 2; text-align: left; }

  .facility-list { grid-template-columns: repeat(2, 1fr); }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .g-item { grid-column: auto !important; height: auto !important; aspect-ratio: 4 / 3; margin-top: 0 !important; }

  .admissions-grid { grid-template-columns: 1fr; gap: 44px; }
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }

  .footer-body { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 600px) {
  .container { padding-inline: 20px; }
  .hero-values { gap: 1.2rem; }
  .facility-list { grid-template-columns: 1fr; }
  .faculty-grid { grid-template-columns: 1fr; }
  .about-pair { grid-template-columns: 1fr; }
  .about-col { padding: 1.4rem 0 0 0; }
  .about-col:last-child { border-left: 0; border-top: 1px solid var(--line); padding: 1.4rem 0 0 0; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .contact-row { grid-template-columns: 1fr; gap: 4px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .footer-masthead { flex-direction: column; align-items: flex-start; gap: 14px; }
  .nav-cta, .btn-block { width: 100%; }
}

@media (max-width: 420px) {
  .hero-cta { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .btn { width: 100%; }
  .link-arrow { width: 100%; justify-content: space-between; }
  .footer-nav { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
