/* =========================================================
   Narayana International School, Loha — site styles
   Colours live in :root. --brand (deep green) and --accent
   (clay) can be swapped for the school's official colours.
   Motion lives in assets/js/motion.js and is skipped for
   visitors who prefer reduced motion.
   ========================================================= */
:root {
  --paper: #f3f0e9;
  --paper-2: #e9e5da;
  --ink: #141414;
  --ink-2: #45463f;
  --muted: #7b7c72;
  --line: rgba(20, 20, 20, .14);
  --brand: #1f3527;          /* deep green */
  --brand-2: #2c4a37;
  --sage: #9aa68e;
  --mist: #dfe3d4;
  --sand: #e8cfae;
  --accent: #c0582f;         /* clay */
  --on-dark: #eceadf;
  --on-dark-2: #aeb4a3;
  --line-dark: rgba(236, 234, 223, .16);
  --wrap: 1360px;
  --gutter: clamp(16px, 3vw, 40px);
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; font-weight: 400;
  color: var(--ink); background: var(--paper); overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 400; }
h1, h2 { font-family: var(--serif); line-height: .95; letter-spacing: -.02em; }
h1 { font-size: clamp(3.2rem, 9vw, 9.5rem); }
h2 { font-size: clamp(2.5rem, 5.6vw, 5.4rem); }
h1 em, h2 em { font-style: italic; }
h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -.02em; font-weight: 500; }
p { margin: 0 0 1em; }
::selection { background: var(--brand); color: var(--paper); }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 400; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* Labels: small mono uppercase, used everywhere for metadata */
.label, .eyebrow, .crumbs, .fact .k, th, .stat .year, .news-meta, .contact-item .k, .brand-sub, .nav-clock {
  font-family: var(--mono); font-size: .72rem; font-weight: 400; letter-spacing: .06em; text-transform: uppercase;
}
main { counter-reset: sec; }
.eyebrow { display: inline-flex; gap: .9em; align-items: baseline; color: var(--ink-2); margin-bottom: 28px; }
main .eyebrow { counter-increment: sec; }
main .eyebrow::before { content: "(" counter(sec, decimal-leading-zero) ")"; color: var(--accent); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--ink-2); letter-spacing: -.01em; }

/* ---------- Lenis ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Preloader / page curtain ---------- */
.curtain { display: none; }
html.motion .curtain {
  display: block; position: fixed; inset: 0; z-index: 300; pointer-events: none;
  background: var(--brand); color: var(--on-dark);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1s var(--ease);
}
.curtain-inner {
  position: absolute; inset: auto var(--gutter) var(--gutter); display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
}
.curtain-name { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 3.4rem); line-height: 1; }
.curtain-count { font-family: var(--serif); font-size: clamp(4rem, 14vw, 13rem); line-height: .8; font-variant-numeric: tabular-nums; }
html.motion.is-loading .curtain { clip-path: inset(0 0 0 0); transition: none; }
html.motion.is-leaving .curtain { clip-path: inset(0 0 0 0); transition: clip-path .8s var(--ease); pointer-events: all; }
html.motion.is-leaving .curtain-count { visibility: hidden; }

/* ---------- Split text ---------- */
.sw { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .16em; margin: 0 -.04em -.16em; }
.sw > .si { display: inline-block; will-change: transform; }
html.motion .hero-title, html.motion .page-hero h1 { visibility: hidden; }
html.motion .split-ready { visibility: visible !important; }
html.motion [data-intro] { opacity: 0; }

/* ---------- Cursor (mouse only, built by motion.js) ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 250; pointer-events: none;
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--paper); mix-blend-mode: difference;
  transition: width .4s var(--ease), height .4s var(--ease), margin .4s var(--ease);
}
.cursor.is-link { width: 56px; height: 56px; margin: -28px 0 0 -28px; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: .7em;
  padding: 1em 1.6em; border-radius: 999px; border: 1px solid transparent;
  font: 500 .92rem/1.2 var(--sans); letter-spacing: -.005em;
  text-decoration: none; cursor: pointer;
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
.btn::before {
  content: ""; position: absolute; left: 50%; top: 100%; z-index: -1;
  width: 140%; aspect-ratio: 1; border-radius: 50%; background: var(--fill, var(--accent));
  transform: translate(-50%, 0) scale(0); transition: transform .7s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translate(-50%, -50%) scale(1.2); }
.btn svg { width: 16px; height: 16px; transition: transform .6s var(--ease); }
.btn:hover svg { transform: translateX(3px) rotate(-45deg); }
.btn-primary { background: var(--ink); color: var(--paper); --fill: var(--brand); }
.btn-accent { background: var(--paper); color: var(--ink); --fill: var(--sand); }
.btn-ghost { border-color: var(--ink); color: var(--ink); --fill: var(--ink); }
.btn-ghost:hover, .btn-ghost:focus-visible { color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); --fill: var(--sand); }
.btn-outline-light { border-color: var(--line-dark); color: var(--on-dark); --fill: var(--paper); }
.btn-outline-light:hover { color: var(--ink); }

/* Text link with sliding underline */
.link-line { text-decoration: none; background: linear-gradient(currentColor, currentColor) 100% 100% / 100% 1px no-repeat; padding-bottom: 3px; transition: background-size .6s var(--ease); }
.link-line:hover { background-size: 0 1px; background-position: 100% 100%; animation: line-in .9s var(--ease) .15s forwards; }
@keyframes line-in { from { background-position: 0 100%; background-size: 0 1px; } to { background-position: 0 100%; background-size: 100% 1px; } }

/* ---------- Draft banner ---------- */
.draft-banner { display: none; background: var(--sand); color: #5c3a10; font-size: .85rem; padding: .6em 0; }
html.draft .draft-banner { display: block; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; transition: transform .8s var(--ease); }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--paper);
  border-bottom: 1px solid transparent; transition: border-color .4s ease;
}
.site-header.scrolled::before { border-bottom-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header:has(.nav.open) { transform: none; }
.header-inner {
  width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; position: relative; z-index: 2; }
.brand-mark {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand); color: var(--paper);
  font-family: var(--serif); font-size: 1.35rem; line-height: 1; padding-top: 2px;
  transition: transform .8s var(--ease), background .4s ease;
}
.brand:hover .brand-mark { transform: rotate(-12deg); background: var(--accent); }
/* School crest (assets/img/logo.webp, transparent background) */
.brand-logo {
  flex: none; display: block; width: auto; height: 54px; object-fit: contain;
  transition: transform .8s var(--ease), background-color .4s ease, padding .4s ease;
}
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.05); }
@media (max-width: 420px) { .brand-logo { height: 46px; } }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font-weight: 500; font-size: 1rem; letter-spacing: -.02em; }
.brand-sub { color: var(--muted); font-size: .64rem; margin-top: 2px; }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); }
.nav a:not(.btn) {
  position: relative; text-decoration: none; color: var(--ink);
  font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; padding: .4em 0;
}
.nav a:not(.btn)::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%;
  background: var(--accent); transform: scale(0); transition: transform .5s var(--ease);
}
.nav a:not(.btn):hover::before, .nav a[aria-current="page"]::before { transform: scale(1); }
.nav-clock { color: var(--muted); padding-left: clamp(8px, 2vw, 28px); border-left: 1px solid var(--line); white-space: nowrap; }
.nav-clock:empty { display: none; }
.nav .btn { padding: .8em 1.3em; }
.nav-toggle {
  display: none; position: relative; z-index: 2; background: none; border: 1px solid var(--ink); border-radius: 999px;
  height: 44px; padding: 0 18px; cursor: pointer; color: var(--ink);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; align-items: center; gap: 10px;
}
.burger { display: grid; gap: 5px; width: 16px; }
.burger span { display: block; height: 1.5px; background: currentColor; transition: transform .6s var(--ease); }
.nav-toggle[aria-expanded="true"] { border-color: var(--on-dark); color: var(--on-dark); }
.nav-toggle[aria-expanded="true"] .burger span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 1100px) { .nav-clock { display: none; } }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 0; z-index: 1; counter-reset: nav;
    flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 0;
    background: var(--brand); padding: 110px var(--gutter) 32px;
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .9s var(--ease), visibility 0s linear .9s;
  }
  .nav.open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .9s var(--ease), visibility 0s; }
  .site-header:has(.nav.open) .brand { color: var(--on-dark); }
  .site-header:has(.nav.open) .brand-sub { color: var(--on-dark-2); }
  .site-header:has(.nav.open) .brand-mark { background: var(--paper); color: var(--brand); }
  .site-header:has(.nav.open) .brand-logo { background: var(--paper); border-radius: 12px; padding: 4px; }
  .site-header:has(.nav.open)::before { background: transparent; border-color: transparent; }
  .nav a:not(.btn) {
    counter-increment: nav; display: flex; justify-content: space-between; align-items: baseline;
    color: var(--on-dark); font-family: var(--serif); text-transform: none; letter-spacing: -.02em;
    font-size: clamp(2.8rem, 12vw, 4.6rem); line-height: 1; padding: .14em 0; border-top: 1px solid var(--line-dark);
    opacity: 0; transform: translateY(30px); transition: opacity .5s ease, transform .9s var(--ease), color .3s;
  }
  .nav a:not(.btn)::before { display: none; }
  .nav a:not(.btn)::after { content: "(0" counter(nav) ")"; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--on-dark-2); }
  .nav a[aria-current="page"] { font-style: italic; color: var(--sand); }
  .nav-clock { display: block; order: 10; border: 0; padding: 22px 0 0; color: var(--on-dark-2); }
  .nav .btn { margin-top: 24px; justify-content: center; background: var(--paper); color: var(--ink); --fill: var(--sand); opacity: 0; transform: translateY(30px); transition: opacity .5s ease, transform .9s var(--ease); }
  .nav.open a { opacity: 1 !important; transform: none !important; }
  .nav.open a:nth-child(1) { transition-delay: .2s; } .nav.open a:nth-child(2) { transition-delay: .26s; }
  .nav.open a:nth-child(3) { transition-delay: .32s; } .nav.open a:nth-child(4) { transition-delay: .38s; }
  .nav.open a:nth-child(5) { transition-delay: .44s; }
}
@media (max-width: 420px) { .brand-name { font-size: .9rem; } .brand-sub { font-size: .58rem; } }

/* ---------- Sections & grid ---------- */
section { padding: clamp(80px, 12vw, 180px) 0; position: relative; }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--brand); color: var(--on-dark); }
.section-dark h2, .section-dark h3 { color: var(--on-dark); }
.section-dark .eyebrow { color: var(--on-dark-2); }
.section-dark .eyebrow::before { color: var(--sand); }
.section-head { max-width: 900px; margin-bottom: clamp(48px, 7vw, 96px); }
.section-head p { color: var(--ink-2); font-size: 1.08rem; max-width: 34em; margin-top: 24px; }
.section-dark .section-head p { color: var(--on-dark-2); }
.head-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; max-width: none; }
.head-row h2 { margin: 0; }
.grid { display: grid; gap: clamp(28px, 3vw, 48px); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.two-col { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* Cards are editorial blocks: a hairline on top, no box */
.card { position: relative; padding-top: 26px; border-top: 1px solid var(--ink); }
.section-dark .card { border-color: var(--line-dark); }
.card p { color: var(--ink-2); font-size: .98rem; }
.section-dark .card p { color: var(--on-dark-2); }
.card p:last-child { margin-bottom: 0; }
.card .icon {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--brand); margin-bottom: 28px;
  transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease), transform .8s var(--ease);
}
.card:hover .icon { background: var(--brand); color: var(--paper); border-color: var(--brand); transform: rotate(-20deg); }
.card .icon.accent { color: var(--accent); }
.card:hover .icon.accent { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.card .icon svg { width: 20px; height: 20px; stroke-width: 1.5; }
.values { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  display: inline-flex; padding: .45em 1em; border-radius: 999px; border: 1px solid var(--ink);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
  transition: background .4s ease, color .4s ease;
}
.chip:hover { background: var(--ink); color: var(--paper); }

/* ---------- Top contact bar (all pages) ---------- */
.topbar { background: var(--brand); color: var(--on-dark-2); font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; min-height: 38px; flex-wrap: wrap; padding: 6px 0; }
.topbar-group { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; }
.topbar-item { display: inline-flex; align-items: center; gap: 7px; color: inherit; text-decoration: none; transition: color .3s ease; }
a.topbar-item:hover { color: var(--on-dark); }
.topbar-item svg { width: 13px; height: 13px; flex: none; }
.topbar-cta { color: var(--sand); text-decoration: none; }
.topbar-cta:hover { color: var(--paper); }
html.draft .topbar .tbc { background: rgba(232, 207, 174, .2); }
@media (max-width: 700px) {
  .topbar-inner { justify-content: space-between; }
  .topbar-group:last-child > span { display: none; }
  .topbar-group:first-child > a { display: none; }
}

/* ---------- Floating WhatsApp button (all pages, appears once a number is set) ---------- */
.wa-float {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 70;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px;
  background: #1f8f4e; color: #fff; text-decoration: none; font: 500 .9rem/1 var(--sans);
  box-shadow: 0 10px 30px rgba(20, 20, 20, .22); transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(20, 20, 20, .28); }
.wa-float svg { width: 24px; height: 24px; }
@media (max-width: 600px) { .wa-float span { display: none; } .wa-float { padding: 14px; } }

/* ---------- Home hero: full-bleed illustrated scene ---------- */
.hero { padding: 0; position: relative; overflow: hidden; }
.scene { position: absolute; inset: 0; overflow: hidden; background: var(--brand); }
.hero { min-height: max(560px, calc(100svh - var(--header-h) - 38px)); display: flex; }
.scene-sky {
  position: absolute; inset: -10% 0 0;
  background: linear-gradient(180deg, #1f3527 0%, #3e5c47 30%, #8d9c84 58%, #e3c9a3 82%, #efd9b8 100%);
}
.scene-photo { position: absolute; inset: -10% 0 0; background: url("../img/campus.jpg") center / cover no-repeat; }
.scene-sun {
  position: absolute; left: 50%; top: 40%; width: clamp(150px, 20vw, 300px); aspect-ratio: 1; transform: translateX(-50%);
}
.scene-sun span {
  position: absolute; inset: 0; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 clamp(14px, 2vw, 28px) rgba(192, 88, 47, .16), 0 0 0 clamp(30px, 4.2vw, 60px) rgba(192, 88, 47, .08);
}
.scene-clouds { position: absolute; inset: 0; }
.cloud { position: absolute; fill: #f3f0e9; opacity: .9; height: auto; animation: drift linear infinite; }
.cloud-1 { width: clamp(120px, 14vw, 220px); top: 22%; left: 6%; animation-duration: 60s; }
.cloud-2 { width: clamp(90px, 10vw, 160px); top: 34%; right: 8%; opacity: .7; animation-duration: 80s; animation-direction: reverse; }
.cloud-3 { width: clamp(70px, 8vw, 120px); top: 48%; left: 22%; opacity: .55; animation-duration: 95s; }
@media (max-width: 700px) {
  .cloud-1 { top: 50%; left: -4%; }
  .cloud-2 { top: 40%; }
  .cloud-3 { display: none; }
}
@keyframes drift { 0% { transform: translateX(0); } 50% { transform: translateX(6vw); } 100% { transform: translateX(0); } }
.scene-layer { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
.layer-far { height: 104%; }
.scene-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 31, 24, .45) 0%, rgba(20, 31, 24, 0) 45%); pointer-events: none; }
/* Real photo: hide the drawing, darken the top for the headline */
.scene.has-photo .scene-sky, .scene.has-photo .scene-sun, .scene.has-photo .scene-clouds, .scene.has-photo .scene-layer { display: none; }
.scene.has-photo .scene-shade { background: linear-gradient(180deg, rgba(20, 31, 24, .7) 0%, rgba(20, 31, 24, .2) 60%, rgba(20, 31, 24, .5) 100%); }

.scene-content {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-top: clamp(40px, 7vh, 90px); padding-bottom: clamp(120px, 16vh, 180px);
}
.badge {
  display: inline-flex; align-items: center; gap: 10px; padding: .55em 1.1em; border-radius: 999px;
  background: rgba(243, 240, 233, .14); border: 1px solid rgba(243, 240, 233, .3); backdrop-filter: blur(6px);
  color: var(--paper); font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #7fd18f; box-shadow: 0 0 0 0 rgba(127, 209, 143, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(127, 209, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 209, 143, 0); } }
html.draft .badge .tbc { background: rgba(232, 207, 174, .3); }
.hero-title {
  font-size: clamp(3.2rem, 10vw, 10.5rem); line-height: .88; letter-spacing: -.035em; margin: clamp(20px, 3vw, 36px) 0 0;
  color: var(--paper); text-shadow: 0 2px 40px rgba(20, 31, 24, .25);
}
.hero-title em { color: var(--sand); }

/* Admissions card rises out of the scene */
.admit { padding: 0 0 clamp(64px, 8vw, 120px); position: relative; z-index: 3; }
.admit-card {
  margin-top: clamp(-110px, -9vw, -64px); background: var(--paper); border-radius: clamp(24px, 3vw, 40px);
  padding: clamp(28px, 4vw, 56px); display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 5vw, 80px); align-items: end;
  box-shadow: 0 30px 60px -30px rgba(20, 31, 24, .35);
}
.admit-copy .eyebrow { margin-bottom: 18px; }
.admit-copy .lead { margin-bottom: 22px; max-width: 32em; }
.admit-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.highlights { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--ink); }
.hl { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.hl .num { font-family: var(--serif); font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: 1; color: var(--brand); }
.hl .lbl { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: right; }
@media (max-width: 900px) {
  .admit-card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .admit-card { padding: 24px 20px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 3fr 9fr; gap: clamp(28px, 4vw, 64px); }
.about-lead { font-family: var(--serif); font-size: clamp(1.8rem, 3.4vw, 3.2rem); line-height: 1.08; letter-spacing: -.015em; color: var(--ink); margin: 40px 0; }
.about-body { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
.about-body p { color: var(--ink-2); }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); margin-top: clamp(64px, 9vw, 120px); }
.pillars h3, .facility-row h3 { font-family: var(--serif); font-size: clamp(1.8rem, 2.6vw, 2.5rem); line-height: 1; letter-spacing: -.01em; }
@media (max-width: 860px) {
  .about-grid, .about-body, .pillars { grid-template-columns: 1fr; }
}

/* ---------- Principal ---------- */
.message { display: grid; grid-template-columns: 3fr 9fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.portrait {
  aspect-ratio: 3 / 4; border-radius: 999px 999px 0 0; display: grid; place-items: center;
  background: var(--mist); color: var(--brand); font-family: var(--serif); font-size: 5rem; overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.message blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.4rem); line-height: 1.15; letter-spacing: -.01em; }
.message blockquote p:first-child::before { content: "\201C"; color: var(--accent); }
.signoff { margin-top: 32px; display: grid; gap: 2px; }
.signoff strong { font-weight: 500; }
@media (max-width: 760px) { .message { grid-template-columns: 1fr; } .portrait { max-width: 200px; } }

/* ---------- People ---------- */
.leadership { margin-top: clamp(72px, 10vw, 140px); }
.leadership .grid-3 { grid-template-columns: 1fr; gap: 0; }
.person { display: grid; grid-template-columns: 72px 1fr; gap: 20px; align-items: center; padding: 22px 0; border-top: 1px solid var(--ink); overflow: hidden; }
.leadership .grid-3 > :last-child { border-bottom: 1px solid var(--ink); }
.person > div:last-child { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--mist); color: var(--brand); font-family: var(--serif); font-size: 1.3rem;
  transition: transform .8s var(--ease), background .4s, color .4s;
}
.person:hover .avatar { transform: rotate(-20deg); background: var(--brand); color: var(--paper); }
.leadership .person { grid-template-columns: 96px 1fr; }
.leadership .avatar { justify-self: center; }
.avatar-photo { width: 96px; height: 96px; object-fit: cover; object-position: 50% 12%; background: var(--mist); }
.person:hover .avatar-photo { transform: scale(1.06); }
.person .name { font-family: var(--serif); font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1; transition: transform .8s var(--ease); }
.person:hover .name { transform: translateX(12px); font-style: italic; }
.person .role { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- Facilities: index rows with sticky intro ---------- */
.facilities-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
.sticky-col { position: sticky; top: calc(var(--header-h) + 32px); }
.sticky-col .section-head { margin-bottom: 40px; }
.seal { width: 132px; height: 132px; color: var(--brand); }
.seal svg { width: 100%; height: 100%; overflow: visible; }
.seal text { font-family: var(--mono); font-size: 8.6px; letter-spacing: .2em; text-transform: uppercase; fill: currentColor; }
.facility-list { border-top: 1px solid var(--ink); counter-reset: fac; }
.facility-row {
  counter-increment: fac; position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 56px 1fr 44px; gap: 6px 20px; align-items: start;
  padding: 28px 0; border-bottom: 1px solid var(--ink);
}
.facility-row::before { content: counter(fac, decimal-leading-zero); font-family: var(--mono); font-size: .72rem; color: var(--accent); padding-top: .5em; grid-row: span 2; }
.facility-row::after {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--brand);
  transform: scaleY(0); transform-origin: 50% 100%; transition: transform .7s var(--ease);
}
.facility-row h3 { margin: 0; transition: transform .7s var(--ease), color .4s; }
.facility-row p { margin: 0; color: var(--ink-2); max-width: 32em; grid-column: 2; transition: color .4s; }
.facility-row .icon { grid-column: 3; grid-row: 1; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--brand); transition: color .4s, border-color .4s, transform .8s var(--ease); }
.facility-row .icon svg { width: 20px; height: 20px; stroke-width: 1.5; }
@media (hover: hover) {
  .facility-row:hover::after { transform: scaleY(1); }
  .facility-row:hover h3 { color: var(--on-dark); transform: translateX(14px); font-style: italic; }
  .facility-row:hover p { color: var(--on-dark-2); }
  .facility-row:hover .icon { color: var(--sand); border-color: var(--line-dark); transform: rotate(-30deg); }
}
@media (max-width: 860px) { .facilities-grid { grid-template-columns: 1fr; } .sticky-col { position: static; } .seal { display: none; } .facility-row { grid-template-columns: 40px 1fr 44px; } }

/* ---------- Results ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-dark); }
.stat { padding: 28px clamp(16px, 2.4vw, 36px) 0; border-left: 1px solid var(--line-dark); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .year { color: var(--on-dark-2); }
.stat .num { font-family: var(--serif); font-size: clamp(3.6rem, 9vw, 9rem); line-height: .9; letter-spacing: -.03em; margin: 40px 0 28px; font-variant-numeric: tabular-nums; color: var(--on-dark); }
.meter { height: 1px; background: var(--line-dark); }
.meter span { display: block; height: 100%; background: var(--sand); transform-origin: 0 50%; }
.stat .note { font-size: .92rem; color: var(--on-dark-2); margin-top: 16px; }
.results-link { margin: 56px 0 0; }
.results-link a { font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--sand); padding-bottom: 4px; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr; }
  .stat, .stat:first-child { border-left: 0; padding: 24px 0; border-bottom: 1px solid var(--line-dark); }
  .stat .num { margin: 16px 0; }
}

/* ---------- News ---------- */
.news-card { display: flex; flex-direction: column; gap: 16px; min-height: 260px; padding-bottom: 8px; transition: transform .8s var(--ease); }
.news-card:hover { transform: translateY(-6px); }
.news-card h3 { margin: auto 0 0; font-family: var(--serif); font-size: clamp(1.9rem, 2.5vw, 2.4rem); line-height: 1; letter-spacing: -.01em; }
.news-card p { margin: 0; }
.news-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.tag.results::before { background: var(--sage); }
.tag.admissions::before { background: var(--accent); }
.tag.event::before { background: var(--sand); }
.tag.sports::before { background: var(--brand-2); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; }
.filters button {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  padding: .7em 1.2em; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  transition: background .4s ease, color .4s ease;
}
.filters button:hover { background: var(--paper-2); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.events { display: grid; border-top: 1px solid var(--ink); }
.event-row {
  display: grid; grid-template-columns: 90px 1fr; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--ink);
  position: relative; transition: padding .7s var(--ease);
}
.event-row:hover { padding-left: 12px; }
.datebox { text-align: left; line-height: 1; }
.datebox .d { font-family: var(--serif); font-size: 3rem; color: var(--brand); }
.datebox .m { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.event-row h3 { margin: 4px 0 4px; font-family: var(--serif); font-size: 1.9rem; line-height: 1; }
.event-row p { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* ---------- Inner page hero ---------- */
.page-hero { padding: clamp(24px, 4vw, 48px) 0 clamp(72px, 10vw, 140px); }
.page-hero h1 { font-size: clamp(3rem, 8.4vw, 8.6rem); line-height: .9; letter-spacing: -.03em; max-width: 12.5em; margin-bottom: clamp(36px, 5vw, 64px); }
.page-hero .lead { max-width: 30em; margin-left: auto; margin-right: 0; }
.crumbs { color: var(--muted); }
.crumbs a { color: var(--ink); }

/* ---------- Academics ---------- */
.stage { display: flex; flex-direction: column; min-height: 340px; }
.stage .num-badge { font-family: var(--serif); font-size: clamp(4rem, 6vw, 6rem); line-height: .8; color: var(--brand); margin-bottom: auto; padding-bottom: 48px; transition: transform .8s var(--ease), color .4s; }
.stage:hover .num-badge { transform: translateX(10px); font-style: italic; color: var(--accent); }
.stage .classes { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.stage h3, .step h3, #junior-college .card h3, .two-col .card h3 { font-family: var(--serif); font-size: clamp(1.9rem, 2.4vw, 2.4rem); line-height: 1; letter-spacing: -.01em; }
.code-num { font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--brand); margin: 0 0 12px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-top: 1px solid currentColor; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.section-dark th, .section-dark td { border-color: var(--line-dark); }
th { color: var(--muted); }
.section-dark th { color: var(--on-dark-2); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .4s ease; }
tbody tr:hover { background: rgba(20, 20, 20, .04); }
.section-dark tbody tr:hover { background: rgba(236, 234, 223, .05); }
td.num { font-family: var(--serif); font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- Admissions ---------- */
.notice {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap; justify-content: space-between;
  background: var(--brand); color: var(--on-dark); border-radius: 999px; padding: 16px 16px 16px 32px; position: relative;
}
.notice strong { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; line-height: 1; }
.notice p { margin: 4px 0 0; color: var(--on-dark-2); }
@media (max-width: 600px) { .notice { border-radius: 28px; padding: 24px; } }
.steps { counter-reset: step; display: grid; gap: clamp(28px, 3vw, 48px); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { counter-increment: step; }
.step::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--serif); font-size: clamp(4rem, 6vw, 6rem); line-height: .8; color: var(--brand); margin-bottom: 56px; }
.checklist { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); counter-reset: doc; }
.checklist li { counter-increment: doc; display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); transition: padding .6s var(--ease); }
.checklist li:hover { padding-left: 10px; }
.checklist li::before { content: counter(doc, decimal-leading-zero); font-family: var(--mono); font-size: .72rem; color: var(--accent); padding-top: .35em; }

/* ---------- Contact & form ---------- */
.contact-list { display: grid; gap: 0; padding-top: 0; }
.contact-item { display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-item:last-child { border-bottom: 0; }
.contact-item .icon { margin: 0; }
.contact-item .k { color: var(--muted); margin-bottom: 4px; }
.contact-item .v { font-family: var(--serif); font-size: 1.5rem; line-height: 1.15; }
.contact-item .small { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.map { overflow: hidden; background: var(--mist); min-height: 300px; border-radius: 999px 999px 0 0; }
.map iframe { display: block; width: 100%; height: 400px; border: 0; filter: grayscale(1) contrast(1.05) sepia(.15); }
.enquiry-card { background: var(--paper-2); border: 0; padding: clamp(24px, 4vw, 48px); }
.enquiry-card h3 { font-family: var(--serif); }
form.enquiry { display: grid; gap: 22px; margin-top: 12px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
label { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
input, select, textarea {
  font: inherit; font-size: 1.05rem; color: var(--ink); width: 100%;
  padding: .6em 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent;
  transition: border-color .3s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
textarea { min-height: 100px; resize: vertical; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-family: var(--sans); font-size: .88rem; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.consent input { width: auto; margin-top: 4px; accent-color: var(--brand); }
.form-status { font-size: .92rem; min-height: 1.4em; margin: 0; }
.form-status.ok { color: var(--brand); }
.form-status.warn { color: var(--accent); }

/* ---------- CTA ---------- */
.cta-section { padding: 0; }
.cta { background: var(--brand); color: var(--on-dark); padding: clamp(96px, 14vw, 200px) 0; position: relative; overflow: hidden; }
.cta-inner { display: grid; grid-template-columns: 8fr 4fr; gap: 40px; align-items: end; }
.cta h2 { color: var(--on-dark); font-size: clamp(3rem, 8.4vw, 9rem); line-height: .88; margin: 0; }
.cta p { color: var(--on-dark-2); margin: 0 0 28px; font-size: 1.1rem; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-seal { position: absolute; right: var(--gutter); top: clamp(32px, 5vw, 64px); width: clamp(110px, 12vw, 160px); color: var(--sand); }
.cta-seal svg { width: 100%; height: auto; overflow: visible; }
.cta-seal text { font-family: var(--mono); font-size: 8.6px; letter-spacing: .2em; text-transform: uppercase; fill: currentColor; }
@media (max-width: 860px) { .cta-inner { grid-template-columns: 1fr; } .cta-seal { display: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-2); padding: clamp(72px, 10vw, 140px) 0 24px; font-size: .95rem; overflow: hidden; }
.site-footer a { color: var(--on-dark); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease); }
.site-footer a:hover { background-size: 100% 1px; }
.site-footer a.brand { background: none; }
.footer-grid { display: grid; grid-template-columns: 6fr 3fr 3fr; gap: 40px; }
.site-footer h4 { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-2); margin-bottom: 20px; font-weight: 400; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .brand { color: var(--on-dark); margin-bottom: 24px; }
.site-footer .brand-mark { background: var(--paper); color: var(--ink); }
.site-footer .brand { gap: 18px; }
.site-footer .brand-logo { height: 96px; background: var(--paper); border-radius: 18px; padding: 10px; }
.site-footer .brand-sub { color: var(--on-dark-2); }
.site-footer p { max-width: 30em; }
.footer-mark {
  font-family: var(--serif); font-size: min(26.5vw, 400px); line-height: .78; letter-spacing: -.04em; color: var(--on-dark);
  margin: clamp(56px, 9vw, 120px) 0 0; padding-bottom: .16em; white-space: nowrap; text-align: center;
}
.footer-mark em { color: var(--accent); }
.footer-mark .sw { padding-bottom: .22em; margin-bottom: -.22em; }
.footer-bottom {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(236, 234, 223, .12);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 36px; } }

/* =========================================================
   DRAFT MODE — remove class="draft" from <html> on every
   page once all highlighted items are confirmed/replaced.
   ========================================================= */
html.draft .tbc { background: #fbe7c4; box-shadow: 0 0 0 1.5px #d99a2b; border-radius: 3px; padding: 0 3px; cursor: help; color: inherit; }
html.draft .site-footer .tbc, html.draft .cta .tbc, html.draft .notice .tbc, html.draft .section-dark .tbc { background: rgba(232, 207, 174, .2); }
html.draft .tbc-block { outline: 2px dashed #d99a2b; outline-offset: 6px; }
html.draft .tbc-block::before {
  content: attr(data-note); position: absolute; top: -14px; right: 12px; z-index: 3;
  background: #d99a2b; color: #2e1d00; font-family: var(--mono); font-size: .62rem; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px; max-width: calc(100% - 24px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: none;
}
.tbc-block { position: relative; }
html.draft ul.tbc-block { margin-top: 18px; }

/* =========================================================
   UNFINISHED CONTENT — anything marked data-unfinished is
   hidden on the live site and shown (highlighted) in draft
   mode. To publish a section, delete its data-unfinished
   attribute. Items with data-needs="…" appear automatically
   once that value is filled in assets/js/config.js.
   ========================================================= */
[hidden] { display: none !important; }
html:not(.draft) [data-unfinished] { display: none !important; }
html:not(.draft) .message[data-unfinished] + .leadership { margin-top: 0; }
html:not(.draft) .contact-wrap:has(> .enquiry-card[data-unfinished]) { grid-template-columns: 1fr; }
@media (min-width: 861px) {
  html:not(.draft) .contact-wrap:has(> .enquiry-card[data-unfinished]) .contact-stack { grid-template-columns: 1fr 1fr; align-items: start; }
}

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