/* Premese Schools & Colleges: colours from the crest (plum, magenta, sky blue) with a gold accent. */
:root {
  --plum: #5b1a6e;
  --plum-800: #43114f;
  --plum-900: #2c0a35;
  --magenta: #b0207e;
  --sky: #1d93cf;
  --gold: #f2b322;
  --gold-600: #d99a0b;
  --ink: #1e1a24;
  --text: #3a3442;
  --muted: #6b6476;
  --line: #e9e2ee;
  --soft: #f7f2f9;
  --cream: #fffaf2;
  --white: #fff;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(44, 10, 53, .06), 0 8px 24px rgba(44, 10, 53, .08);
  --shadow-lg: 0 24px 60px rgba(44, 10, 53, .18);
  --serif: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; font: 400 1.0625rem/1.7 var(--sans); color: var(--text); background: var(--white); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-underline-offset: .18em; }
a:hover { color: var(--magenta); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }
.ic { flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); }
.center { text-align: center; }
.upper { text-transform: uppercase; letter-spacing: .04em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.4em; border-radius: 999px; font: 600 .98rem/1.2 var(--sans); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--plum); color: var(--white); box-shadow: 0 8px 20px rgba(91, 26, 110, .25); }
.btn-primary:hover { background: var(--plum-800); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--plum-900); }
.btn-gold:hover { background: #ffc53d; color: var(--plum-900); }
.btn-outline { border-color: var(--plum); color: var(--plum); background: transparent; }
.btn-outline:hover { background: var(--plum); color: var(--white); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .55); color: var(--white); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
.btn-lg { padding: 1em 1.7em; font-size: 1.05rem; }
.btn-sm { padding: .55em 1.1em; font-size: .9rem; }
.btn-block { width: 100%; }

/* Top bar + header */
.topbar { background: var(--plum-900); color: #e9dcef; font-size: .86rem; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.topbar-note { margin: 0; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--gold); }
.topbar-links { display: flex; align-items: center; gap: 18px; }
.topbar-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.topbar-sep { opacity: .45; margin: 0 2px; }
@media (max-width: 1080px) { .hide-md { display: none !important; } }
.pill-live { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; background: var(--gold); color: var(--plum-900); font-weight: 700; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.pill-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: auto; height: 54px; }
.brand-light img { background: #fff; border-radius: 12px; padding: 4px; height: 62px; }
/* The school name and motto beside the crest, styled after the school letterhead. */
.brand-text { display: flex; flex-direction: column; gap: 4px; line-height: 1; }
.brand-name { font: 800 1.12rem/1 var(--serif); text-transform: uppercase; letter-spacing: 0; white-space: nowrap;
  background: linear-gradient(92deg, var(--plum-800) 0%, var(--plum) 35%, var(--magenta) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-motto { display: flex; align-items: center; font: 800 .6rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--magenta); white-space: nowrap; }
.brand-light .brand-name { background: none; color: var(--white); }
.brand-light .brand-motto { color: var(--gold); }
/* The letterhead's contact and website lines, under the motto on wide screens. */
.brand-lines { display: none; flex-direction: column; gap: 3px; margin-top: 3px; font: 600 .62rem/1.2 var(--sans); letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
@media (min-width: 1480px) { .header .brand-lines { display: flex; } .header-in { min-height: 88px; } .header .brand img { height: 66px; } }
.footer .brand-name { white-space: normal; font-size: 1.12rem; line-height: 1.15; }
.footer .brand-motto { white-space: normal; line-height: 1.3; }
.footer-contact a { white-space: nowrap; }
.footer-brand .muted-light { margin-top: 18px; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav-cta { white-space: nowrap; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 10px; font: 500 .96rem/1 var(--sans); color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; }
.nav-link:hover, .nav-link.is-active, .nav-link[aria-expanded="true"] { color: var(--plum); background: var(--soft); }
.nav-link .ic { transition: transform .2s; }
.nav-link[aria-expanded="true"] .ic { transform: rotate(180deg); }
.sub { position: absolute; top: calc(100% + 8px); left: -12px; min-width: 330px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 10px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease; }
.sub ul { list-style: none; margin: 0; padding: 0; }
.sub a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.sub a strong { font-weight: 600; font-size: .95rem; }
.sub a span { font-size: .8rem; color: var(--muted); }
.sub a:hover { background: var(--soft); color: var(--plum); }
.has-sub.is-open .sub { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 1081px) { .has-sub:hover .sub { opacity: 1; visibility: visible; transform: none; } }
.nav-toggle { display: none; background: none; border: 0; color: var(--plum); padding: 8px; cursor: pointer; border-radius: 10px; }
.crumbs { padding-top: 16px; font-size: .85rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #c7bfd0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--plum); }

/* Hero */
.hero { position: relative; isolation: isolate; color: var(--white); min-height: min(86vh, 760px); display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(44, 10, 53, .92) 0%, rgba(67, 17, 79, .78) 38%, rgba(67, 17, 79, .2) 75%), linear-gradient(0deg, rgba(44, 10, 53, .55), transparent 40%); }
.hero-in { padding: 120px 20px 72px; }
.hero h1 { color: var(--white); max-width: 15ch; margin-bottom: .35em; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero .lead { color: #f0e6f4; max-width: 56ch; font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--magenta); margin: 0 0 14px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.eyebrow.light { color: var(--gold); }
.lead { font-size: 1.15rem; color: var(--muted); }
.page-hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(176, 32, 126, .14), transparent), radial-gradient(900px 400px at -10% 120%, rgba(29, 147, 207, .12), transparent), var(--soft); padding: 56px 0 64px; border-bottom: 1px solid var(--line); }
.page-hero.slim { padding: 48px 0; }
.page-hero h1 { max-width: 22ch; }
.page-hero .lead { max-width: 64ch; }
.page-hero-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.page-hero-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
/* Portraits (people) are shown whole, never cropped to a landscape box. */
.page-hero-media.portrait { display: flex; justify-content: center; }
.page-hero-media.portrait img { aspect-ratio: auto; width: auto; max-width: 100%; max-height: 600px; object-fit: contain; }

/* Stats strip */
.stats { position: relative; z-index: 2; margin-top: -48px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.stat { padding: 26px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font: 700 2.1rem/1 var(--serif); color: var(--plum); margin-bottom: 6px; }
.stat span { font-size: .9rem; color: var(--muted); line-height: 1.4; display: block; }

/* Sections */
.section { padding: 88px 0; }
.section.tight { padding: 56px 0; }
.section.soft { background: var(--soft); }
.section.cream { background: var(--cream); }
.section.dark { background: var(--plum-900); color: #e9dcef; }
.section.dark h2, .section.dark h3 { color: var(--white); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.wide-text { grid-template-columns: 1.15fr .85fr; }
.media-stack { position: relative; }
.media-stack img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.media-stack .media-badge { position: absolute; left: -18px; bottom: -22px; background: var(--gold); color: var(--plum-900); border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow); max-width: 240px; font-weight: 600; line-height: 1.35; font-size: .95rem; }
.media-badge strong { display: block; font: 600 1.9rem/1 var(--serif); }
.prose { max-width: 72ch; }
.prose p, .prose li { color: var(--text); }
.prose h2 { margin-top: 1.4em; }
.prose blockquote { margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--gold); background: var(--cream); border-radius: 0 12px 12px 0; font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.callout { background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--magenta); border-radius: 14px; padding: 22px 24px; box-shadow: var(--shadow); }
.callout h3 { margin-bottom: .4em; }
.callout.gold { border-left-color: var(--gold); background: var(--cream); }
.motto-banner { font-family: var(--serif); font-weight: 700; font-size: clamp(1.3rem, 2.8vw, 1.9rem); color: var(--plum); text-align: center; padding: 38px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--cream); margin: 0; }

/* Cards */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--plum); margin-bottom: 16px; }
.school-card { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
.school-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: inherit; }
.school-card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.school-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.school-card-media.tall { aspect-ratio: 4 / 3; }
/* Card summaries end after four lines; the full text is on the school page. */
.clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.school-card-body .link-arrow { margin-top: 6px; }
.school-card-body p.clamp-4 { margin-bottom: 14px; }
.school-card:hover .school-card-media img { transform: scale(1.05); }
.school-card-tag { position: absolute; left: 14px; top: 14px; background: rgba(255, 255, 255, .94); color: var(--plum); font-size: .76rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; letter-spacing: .02em; }
.school-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.school-card-body h3 { font-size: 1.22rem; }
.school-card-body p { font-size: .96rem; color: var(--muted); }
.school-card-meta { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--magenta); font-weight: 600; margin-bottom: 8px; }
.link-arrow { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--plum); text-decoration: none; }
.link-arrow .ic { transition: transform .2s; }
a:hover .link-arrow .ic, .link-arrow:hover .ic { transform: translateX(4px); }

/* Values, steps, lists */
.values { counter-reset: v; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.values li { counter-increment: v; position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 24px 22px 22px 70px; box-shadow: var(--shadow); font-weight: 500; color: var(--ink); line-height: 1.55; }
.values li::before { content: counter(v, decimal-leading-zero); position: absolute; left: 20px; top: 20px; font: 600 1.4rem/1 var(--serif); color: var(--magenta); }
.section.dark .values li { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: #f3eaf6; box-shadow: none; }
.section.dark .values li::before { color: var(--gold); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--white); border-radius: 16px; padding: 26px 22px; border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--plum); color: var(--white); font-weight: 700; margin-bottom: 14px; }
.steps h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; letter-spacing: .02em; }
.steps p { font-size: .95rem; margin: 0; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li .ic { color: var(--magenta); margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.chips li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: .92rem; font-weight: 500; color: var(--ink); }
.quote-card { background: linear-gradient(135deg, var(--plum) 0%, var(--magenta) 100%); color: var(--white); border-radius: var(--radius); padding: 40px; position: relative; overflow: hidden; }
.quote-card::before { content: "“"; position: absolute; right: 24px; top: -30px; font: 600 12rem/1 var(--serif); color: rgba(255, 255, 255, .12); }
.quote-card p { font: 500 1.35rem/1.5 var(--serif); margin: 0 0 14px; color: var(--white); }
.quote-card cite { font-style: normal; font-weight: 600; color: var(--gold); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 124px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--magenta), var(--sky)); }
.timeline > li { display: grid; grid-template-columns: 124px 1fr; gap: 32px; padding: 0 0 34px; position: relative; }
.timeline > li::after { content: ""; position: absolute; left: 118px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 3px solid var(--magenta); }
.timeline-body ul { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; }
.timeline-body ul li { padding: 0; }
.timeline-year { font: 700 1.4rem/1.2 var(--serif); color: var(--plum); padding-right: 22px; overflow-wrap: break-word; }
.timeline-body { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); }
.timeline-body p { margin: 0; }

/* People */
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.person { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-columns: 220px 1fr; align-items: start; }
.person-photo { padding: 22px 0 22px 22px; }
.person-photo img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 6px 18px rgba(44, 10, 53, .15); }
.person-body { padding: 26px; }
.person-body h3 { margin-bottom: .2em; }
.person-role { color: var(--magenta); font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.person-aka { font-family: var(--serif); font-style: italic; color: var(--muted); margin-bottom: 12px; }
.person-body p { font-size: .97rem; }
.directors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.director { display: flex; gap: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.monogram { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font: 600 1.4rem/1 var(--serif); color: var(--white); background: linear-gradient(135deg, var(--plum), var(--magenta)); }
.director h3 { font-size: 1.1rem; margin-bottom: 2px; }
.director .person-role { margin-bottom: 8px; }
.director p { font-size: .95rem; margin: 0; }

/* Tables and the results chart */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
th { background: var(--soft); color: var(--ink); font-weight: 600; font-size: .88rem; letter-spacing: .02em; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 700; background: var(--cream); }
.bars { display: grid; gap: 18px; }
.bar-label { display: flex; justify-content: space-between; gap: 12px; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.bar-label b { color: var(--plum); }
.bar { height: 14px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--plum), var(--magenta)); }
.bar.b2 span { background: linear-gradient(90deg, var(--magenta), var(--gold)); }
.bar.b3 span { background: linear-gradient(90deg, var(--sky), #66c2ec); }

/* Gallery + lightbox */
.gallery { columns: 3 280px; column-gap: 18px; }
.gallery figure { break-inside: avoid; margin: 0 0 18px; border-radius: 14px; overflow: hidden; background: var(--soft); position: relative; }
.gallery button { all: unset; display: block; cursor: zoom-in; width: 100%; }
.gallery button:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.gallery img { width: 100%; transition: transform .4s ease; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { padding: 10px 14px 12px; font-size: .88rem; color: var(--text); background: var(--white); border-top: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter { border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 999px; padding: 8px 16px; font: 500 .92rem/1 var(--sans); cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--plum); color: var(--white); border-color: var(--plum); }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20, 6, 26, .93); display: none; align-items: center; justify-content: center; padding: 60px 20px 30px; }
.lightbox.is-open { display: flex; }
.lightbox figure { margin: 0; max-width: min(1200px, 100%); text-align: center; }
.lightbox img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox figcaption { color: #eadff0; margin-top: 14px; font-size: .95rem; }
.lb-btn { position: absolute; background: rgba(255, 255, 255, .12); border: 0; color: var(--white); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .24); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%) rotate(90deg); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.photo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.photo-row figure { margin: 0; }
.photo-row img { border-radius: 14px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photo-row figcaption { font-size: .86rem; color: var(--muted); margin-top: 8px; }

/* Books */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px; }
.book { text-align: left; }
.book img { border-radius: 6px 12px 12px 6px; box-shadow: 0 2px 0 #ddd, 8px 14px 30px rgba(44, 10, 53, .22); aspect-ratio: 3 / 4.2; object-fit: cover; width: 100%; background: var(--soft); transition: transform .25s ease; }
.book:hover img { transform: translateY(-4px) rotate(-1deg); }
.book h3 { font-family: var(--sans); font-size: .98rem; font-weight: 600; margin-top: 16px; line-height: 1.4; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .2s; }
.news-card:hover { transform: translateY(-3px); color: inherit; }
.news-card-media { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--plum), var(--magenta)); display: grid; place-items: center; color: rgba(255, 255, 255, .85); overflow: hidden; }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; }
.news-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.news-meta { display: flex; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.tag { background: var(--soft); color: var(--plum); font-weight: 600; padding: 3px 10px; border-radius: 999px; font-size: .76rem; }
.news-card h3 { font-size: 1.15rem; }
.news-card p { font-size: .95rem; color: var(--muted); }
.attachment { display: inline-flex; align-items: center; gap: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; text-decoration: none; font-weight: 600; }
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 36px; }

/* Forms */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-lg); }
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--ink); }
.field small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=number], input[type=url], select, textarea { width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--ink); background: var(--white); border: 1.5px solid #d9cfe0; border-radius: 12px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--plum); box-shadow: 0 0 0 4px rgba(91, 26, 110, .14); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; font-weight: 400; color: var(--text); }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--plum); }
.alert { padding: 14px 16px; border-radius: 12px; font-size: .95rem; }
.alert-ok { background: #e9f8ef; color: #135a32; border: 1px solid #bfe6cd; }
.alert-err { background: #fdecef; color: #8a1630; border: 1px solid #f5c2cd; }
.tiny { font-size: .82rem; }

/* Contact */
.campus-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.campus { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.campus h3 { font-size: 1.12rem; }
.campus p { font-size: .95rem; margin-bottom: .6em; }
.contact-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .95rem; }
.contact-lines li { display: flex; gap: 10px; align-items: flex-start; }
.contact-lines .ic { color: var(--magenta); margin-top: 4px; }

/* CTA band + footer */
.cta-band { background: linear-gradient(120deg, var(--plum-900) 0%, var(--plum) 55%, var(--magenta) 120%); color: #f1e7f5; padding: 64px 0; }
.cta-band-in { display: grid; grid-template-columns: 1.3fr .7fr; gap: 32px; align-items: center; }
.cta-band h2 { color: var(--white); margin-bottom: .3em; }
.cta-band p { margin: 0; max-width: 62ch; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.footer { background: #1d0723; color: #cbb9d3; padding: 64px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; }
.footer a { color: #e7dcec; text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer-h { font: 700 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-contact { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 12px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .ic { color: var(--gold); margin-top: 4px; }
.footer-motto { font-family: var(--serif); font-size: 1.15rem; color: var(--white); margin: 18px 0 8px; }
.muted-light { color: #a993b3; }
.socials { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.socials a:hover { background: var(--gold); color: var(--plum-900); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 48px; padding: 22px 20px 28px; font-size: .85rem; color: #9c86a6; }
.footer-base p { margin: 0; }

/* Reveal on scroll (only when JavaScript runs and motion is welcome) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 1360px) and (min-width: 1081px) {
  .brand-name { font-size: .94rem; }
  .nav-link { padding: 10px 9px; }
  .nav { gap: 12px; }
}
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: fixed; inset: 0 0 0 auto; width: min(380px, 92vw); background: var(--white); flex-direction: column; align-items: stretch; gap: 0; padding: 88px 20px 28px; box-shadow: var(--shadow-lg); transform: translateX(105%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; overflow-y: auto; z-index: 60; }
  .nav.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-link { width: 100%; justify-content: space-between; padding: 14px 12px; font-size: 1.05rem; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 8px; min-width: 0; display: none; }
  .has-sub.is-open .sub { display: block; }
  .nav-cta { margin-top: 18px; }
  .nav-toggle[aria-expanded="true"] { position: fixed; right: 16px; top: 18px; z-index: 70; }
  body.nav-open { overflow: hidden; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(20, 6, 26, .45); z-index: 55; }
  .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .split, .split.wide-text, .page-hero-split, .cta-band-in { grid-template-columns: 1fr; gap: 36px; }
  .grid-3, .news-grid, .values { grid-template-columns: repeat(2, 1fr); }
  .people, .directors, .campus-list { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section { padding: 64px 0; }
  .media-stack .media-badge { left: 12px; }
}
@media (max-width: 620px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4, .news-grid, .values, .steps, .form-row { grid-template-columns: 1fr; }
  .person { grid-template-columns: 1fr; }
  .person-photo { padding: 20px 20px 0; }
  .person-photo img { max-width: 320px; margin: 0 auto; }
  .hero { min-height: 640px; }
  .hero-in { padding: 96px 16px 80px; }
  .hide-sm { display: none !important; }
  .topbar-note { font-size: .72rem; gap: 7px; }
  .pill-live { font-size: .62rem; padding: 3px 8px; }
  .topbar-links { gap: 12px; }
  .brand-name { font-size: .84rem; }
  .brand-motto { font-size: .5rem; letter-spacing: .06em; gap: 5px; }
  .brand img { height: 44px; }
  .timeline::before { left: 8px; }
  .timeline > li { grid-template-columns: 1fr; gap: 8px; padding-left: 34px; }
  .timeline > li::after { left: 2px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-card { padding: 22px; }
  .quote-card { padding: 28px; }
}
@media print {
  .topbar, .header, .cta-band, .footer, .nav-toggle { display: none !important; }
  .hero { min-height: 0; color: var(--ink); }
  .hero::after, .hero-media { display: none; }
  .hero h1, .hero .lead { color: var(--ink); }
}

/* School flyers: shown whole, side by side, tap to enlarge. */
.flyers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; align-items: center; }
.flyers figure { margin: 0 auto; width: 100%; max-width: 380px; }
.flyers button { all: unset; display: block; cursor: zoom-in; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); transition: transform .2s ease; }
.flyers button:hover { transform: translateY(-4px); }
.flyers button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.flyers img { width: 100%; height: auto; }

/* Drop-downs: wide enough for the full school names on one line. */
@media (min-width: 1081px) {
  .sub { min-width: 0; width: max-content; max-width: min(720px, 90vw); }
  .sub a strong { white-space: nowrap; }
}
/* Desktop widths where the full letterhead and seven menu items would collide. */
@media (min-width: 1081px) and (max-width: 1680px) {
  .header .brand-lines { display: none; }
  .header-in { min-height: 76px; }
  .nav { gap: 10px; }
  .nav-link { padding: 10px 8px; font-size: .92rem; }
  .nav-cta { padding: .7em 1.1em; font-size: .9rem; }
}
@media (min-width: 1081px) and (max-width: 1240px) {
  .brand-name { font-size: .82rem; }
  .brand-motto { font-size: .5rem; }
  .header .brand img { height: 46px; }
  .nav-link { padding: 10px 6px; font-size: .88rem; }
}
@media (min-width: 1081px) and (max-width: 1360px) {
  .sub { max-width: 440px; }
  .sub a strong { white-space: normal; }
}

/* Admission page: the official contacts, made the main call to action. */
.admit-panel { background: linear-gradient(120deg, var(--plum-900) 0%, var(--plum) 60%, var(--magenta) 130%); color: #f1e7f5; border-radius: 24px; padding: clamp(28px, 4vw, 48px); box-shadow: var(--shadow-lg); }
.admit-head h2 { color: #fff; margin-bottom: .3em; }
.admit-head p { max-width: 68ch; margin: 0 0 28px; }
.admit-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.admit-big { display: flex; align-items: center; gap: 14px; background: #fff; color: var(--ink); text-decoration: none; border-radius: 16px; padding: 18px 20px; transition: transform .15s ease, box-shadow .2s ease; min-width: 0; }
.admit-big:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, .25); color: var(--ink); }
.admit-ic { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--plum-900); }
.admit-big small { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.admit-big strong { display: block; font-size: 1.25rem; font-weight: 800; color: var(--plum); white-space: nowrap; }
.admit-big.is-mail strong { font-size: clamp(.95rem, 1.35vw, 1.1rem); }
.campus-phones { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.campus-phones li { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.campus-phones li > a { font-weight: 700; color: var(--ink); text-decoration: none; }
.campus-phones span { font-size: .95rem; }
@media (max-width: 1000px) { .admit-actions { grid-template-columns: 1fr; } }

/* Home: "Life at Premese" photo strip. */
.life-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.life-strip figure { margin: 0; }
.life-strip button { all: unset; display: block; cursor: zoom-in; border-radius: 14px; overflow: hidden; }
.life-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }
.life-strip button:hover img { transform: scale(1.05); }
.life-strip button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.rounded-photo { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* Home: two portrait flyers side by side, the wide banner centred beneath. */
.home-flyers { display: grid; grid-template-columns: repeat(2, minmax(0, 290px)); gap: 24px; justify-content: center; }
.home-flyers figure { margin: 0; }
.home-flyers figure.wide { grid-column: 1 / -1; max-width: 604px; width: 100%; justify-self: center; }
.home-flyers button { all: unset; display: block; cursor: zoom-in; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); }
.home-flyers img { width: 100%; height: auto; }
/* Phones: call and e-mail always one tap away. */
.mobile-bar { display: none; }
@media (max-width: 760px) {
  .life-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .home-flyers { grid-template-columns: 1fr; }
  .mobile-bar { display: grid; grid-template-columns: 1.4fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; box-shadow: 0 -6px 20px rgba(44, 10, 53, .2); }
  .mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 10px calc(14px + env(safe-area-inset-bottom)); font-weight: 700; font-size: .95rem; text-decoration: none; }
  .mobile-bar a:first-child { background: var(--gold); color: var(--plum-900); }
  .mobile-bar a:last-child { background: var(--plum); color: #fff; }
  body { padding-bottom: 60px; }
  body.nav-open .mobile-bar { display: none; }
}

/* Phones: the top bar as two centred lines (intake, then phone + e-mail), all visible. */
.show-sm { display: none; }
@media (max-width: 620px) {
  .topbar-in { flex-wrap: wrap; justify-content: center; gap: 4px 14px; padding-top: 7px; padding-bottom: 7px; min-height: 0; }
  .topbar-note, .topbar-links { width: 100%; justify-content: center; }
  .topbar-links { gap: 16px; font-size: .8rem; }
  .show-sm { display: inline; }
}
/* Mobile menu: no frosted-glass effect on the header (it traps the fixed menu inside the header box),
   and the header sits above the dark overlay while the menu is open. */
@media (max-width: 1080px) {
  .header { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.nav-open .header { z-index: 80; }
  .nav { height: 100vh; height: 100dvh; }
}
