/* ---------- Design tokens ---------- */
:root {
  --green: #1f4d2b;
  --green-2: #2f6b3d;
  --sage: #dfe8d8;
  --sage-2: #a9bfa0;
  --ivory: #faf6ec;
  --white: #ffffff;
  --gold: #b8923a;
  --gold-light: #e3c274;
  --ink: #1b2a20;
  --muted: #5b6b5f;
  --line: #e4e0d2;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --petal: 6px 70px 6px 70px;
  --header-h: 78px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font: 400 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(34px, 4.6vw, 54px); color: var(--green); }
h3 { font-size: 26px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; }
.section-head { margin-bottom: 46px; }
.lead { max-width: 560px; color: var(--muted); margin-top: 14px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--green); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px;
  border-radius: 999px; font: 600 15px var(--sans); border: 1.5px solid transparent;
  cursor: pointer; transition: transform 0.25s, background 0.25s, color 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #a37f2c; }
.btn-green { background: var(--green); color: #fff; }
.btn-outline { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn-outline:hover { background: #fff; color: var(--green); }
.link-more { font-weight: 600; color: var(--green); border-bottom: 1.5px solid var(--gold); padding-bottom: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 236, 0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: none; height: var(--header-h); gap: 20px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 3vw, 48px);
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-mark { height: 60px; width: auto; mix-blend-mode: multiply; }
.logo-name { height: 34px; width: auto; mix-blend-mode: multiply; }
.main-nav {
  display: flex; align-items: center; gap: clamp(14px, 1.6vw, 26px);
  font-size: 14px; font-weight: 600; margin-left: auto; white-space: nowrap;
}
.main-nav a { position: relative; padding: 6px 0; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--gold); transition: width 0.3s;
}
.main-nav a:hover::after { width: 100%; }
.header-cta { flex-shrink: 0; white-space: nowrap; }
.menu-toggle {
  display: none; background: none; border: 1.5px solid var(--line); border-radius: 10px;
  width: 44px; height: 44px; color: var(--ink); font-size: 22px; cursor: pointer;
}
@media (max-width: 1300px) {
  .menu-toggle { display: block; }
  .header-cta { display: none; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--ivory); flex-direction: column; align-items: stretch;
    padding: 12px 24px 22px; border-bottom: 1px solid var(--line); gap: 0; margin-left: 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .logo-mark { height: 48px; }
  .logo-name { height: 24px; }
}


/* ---------- Hero ---------- */
.hero {
  position: relative; display: flex; align-items: center; overflow: hidden;
  min-height: min(78vh, 680px); background: #10281a; color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("../images/hero/hero-bg.jpg") center 25% / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(14, 38, 22, 0.88) 0%, rgba(14, 38, 22, 0.6) 50%, rgba(14, 38, 22, 0.25) 100%);
}
.hero-grid {
  position: relative; z-index: 2; max-width: none; margin: 0;
  padding: 96px 24px 96px clamp(24px, 5vw, 72px);
}
.hero-text { max-width: 620px; }
.hero h1 { font-size: clamp(46px, 7vw, 88px); letter-spacing: -0.02em; animation: rise 0.9s 0.1s both; }
.hero h1 em { display: block; font-style: italic; font-weight: 500; color: var(--gold-light); }
.hero-sub { max-width: 520px; margin: 24px 0 34px; font-size: 18px; color: #e6eee3; animation: rise 0.9s 0.3s both; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; animation: rise 0.9s 0.5s both; }
.hero-tags {
  list-style: none; padding: 0; margin: 38px 0 0; display: flex; gap: 10px; flex-wrap: wrap;
  animation: rise 0.9s 0.7s both;
}
.hero-tags li {
  border: 1px solid rgba(255, 255, 255, 0.35); padding: 7px 16px; border-radius: 999px;
  font-size: 13px; background: rgba(255, 255, 255, 0.08);
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }

/* ---------- Footer ---------- */
.site-footer { background: #10281a; color: #cddccd; padding: 72px 0 28px; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-logo { height: 64px; width: auto; background: var(--white); border-radius: 10px; padding: 3px 8px; margin-bottom: 16px; }
.site-footer h4 { font-size: 20px; color: var(--gold-light); margin-bottom: 14px; }
.site-footer a { display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--gold-light); }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a { border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px; padding: 5px 14px; }
.footer-bottom {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px;
}
.footer-bottom a { display: inline; }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 70; width: 58px; height: 58px;
  border-radius: 50%; background: #1fa855; display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3); transition: transform 0.25s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; fill: #fff; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Introduction ---------- */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: center; }
.about-media { position: relative; }
.about-media::after {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; z-index: -1;
  border: 2px solid var(--gold); border-radius: var(--petal);
}
.about-photo {
  aspect-ratio: 1 / 1; width: 100%; border-radius: var(--petal);
  background: url("../images/about/intro.jpg") center / cover no-repeat, var(--sage-2);
}
.about-text p { margin-top: 18px; color: var(--muted); }
.vision-mission { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 30px 0 34px; }
.vision-mission > div { background: var(--sage); border-radius: 18px; padding: 22px; }
.vision-mission h3 { font-size: 24px; color: var(--green); margin-bottom: 6px; }
.vision-mission p { margin: 0; font-size: 14.5px; line-height: 1.6; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 56px; }
  .vision-mission { grid-template-columns: 1fr; }
}

/* ---------- Academic programmes ---------- */
.section-sage { background: var(--sage); }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.programme-card {
  min-width: 0; background: var(--white); border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform 0.35s, box-shadow 0.35s;
}
.programme-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(31, 77, 43, 0.16); }
.programme-card img {
  display: block; width: 100%; height: 260px; object-fit: cover;
  object-position: center 30%; background: var(--sage-2);
}
.programme-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.programme-body h3 { color: var(--green); }
.programme-body p { font-size: 15px; color: var(--muted); flex: 1; }
@media (max-width: 900px) { .cards-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cards-3 { grid-template-columns: 1fr; } }

/* ---------- Why choose us ---------- */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.highlight {
  background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 32px 28px;
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
}
.highlight:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(31, 77, 43, 0.12); border-color: var(--gold); }
.highlight-icon {
  width: 62px; height: 62px; margin-bottom: 20px; display: grid; place-items: center;
  background: var(--sage); border-radius: 6px 26px 6px 26px;
}
.highlight svg {
  width: 32px; height: 32px; fill: none; stroke: var(--green);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.highlight h3 { font-size: 25px; color: var(--green); margin-bottom: 8px; }
.highlight p { font-size: 15px; color: var(--muted); }
@media (max-width: 900px) { .highlights { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .highlights { grid-template-columns: 1fr; } }

/* ---------- Facilities ---------- */
.facility-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; gap: 18px; }
.facility {
  position: relative; border-radius: 20px; overflow: hidden; color: #fff;
  display: flex; align-items: flex-end; padding: 20px; min-width: 0;
}
.facility-big { grid-column: span 2; grid-row: span 2; }
.facility img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s;
}
.facility:hover img { transform: scale(1.06); }
.facility::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(10, 30, 16, 0.82), transparent 62%);
}
.facility h3 { position: relative; z-index: 2; font-size: 25px; }
.facility-empty { background: linear-gradient(135deg, var(--green), var(--green-2)); }
.facility-badge {
  position: absolute; z-index: 2; top: 14px; right: 14px; background: rgba(255, 255, 255, 0.9);
  color: var(--green); border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 600;
}
.facility-link { margin-top: 34px; text-align: center; }
@media (max-width: 900px) { .facility-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; } }
@media (max-width: 520px) {
  .facility-grid { grid-template-columns: 1fr; }
  .facility-big { grid-column: auto; grid-row: auto; }
}

/* ---------- Campus life ---------- */
.marquee { overflow: hidden; }
.marquee-track { display: flex; width: max-content; animation: marquee var(--dur, 60s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; gap: 20px; padding-right: 20px; }
.moment {
  flex: 0 0 min(78vw, 360px); position: relative; overflow: hidden;
  border-radius: 22px; aspect-ratio: 3 / 4; color: #fff; display: flex; align-items: flex-end;
  background: var(--sage-2);
}
.moment img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.moment::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(10, 30, 16, 0.85), transparent 55%);
}
.moment-text { position: relative; z-index: 2; padding: 22px; }
.moment-text p { font-size: 14px; color: #e6eee3; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee { overflow-x: auto; } }

/* ---------- Achievements ---------- */
.section-green { background: var(--green); color: #fff; }
.section-green h2 { color: #fff; }
.section-green .lead { color: #cddccd; }

.achievements { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); min-height: 720px; }
.achievements-text { align-self: center; padding: 104px clamp(24px, 5vw, 72px) 104px clamp(32px, 4vw, 64px); }
.achievements-text h2 { font-size: clamp(40px, 5vw, 64px); }
.achievements-text .lead { max-width: 520px; font-size: 17px; }

.achievement-points { list-style: none; padding: 0; margin: 34px 0 38px; display: grid; gap: 24px; }
.achievement-points li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: start; }
.achievement-points .num {
  width: 48px; height: 48px; display: grid; place-items: center; background: var(--gold); color: #fff;
  border-radius: 6px 20px 6px 20px; font: 700 22px var(--serif);
}
.achievement-points h3 { font-size: 26px; color: var(--gold-light); margin-bottom: 2px; }
.achievement-points p { color: #d3e0d3; font-size: 15px; }
.achievement-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Moving photo reel */
.reel {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
}
.reel-col { position: absolute; top: 0; bottom: 0; left: 0; width: calc(50% - 7px); }
.reel-col + .reel-col { left: calc(50% + 7px); width: auto; right: 0; }
.reel-track { display: flex; flex-direction: column; animation: reel-up var(--dur, 120s) linear infinite; }
.reel-reverse .reel-track { animation-direction: reverse; }
.reel:hover .reel-track { animation-play-state: paused; }
.reel-group img {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 18px; margin-bottom: 14px; background: var(--green-2);
}
.reel-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #cddccd; font-size: 14px; padding: 20px; text-align: center;
}
@keyframes reel-up { to { transform: translateY(-50%); } }

@media (max-width: 900px) {
  .achievements { grid-template-columns: 1fr; min-height: 0; }
  .reel { height: 460px; }
  .achievements-text { padding: 56px 24px 72px; }
}

/* ---------- Programme popup ---------- */
button.link-more {
  align-self: flex-start; background: none; border: 0; border-bottom: 1.5px solid var(--gold);
  padding: 0 0 2px; font: 600 16px var(--sans); color: var(--green); cursor: pointer;
}
body:has(dialog[open]) { overflow: hidden; }
.programme-modal {
  width: min(720px, 92vw); max-height: 88vh; padding: 0; border: 0; border-radius: 24px;
  background: var(--ivory); color: var(--ink); overflow: auto; margin: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.programme-modal[open] { animation: modal-in 0.3s ease; }
.programme-modal::backdrop { background: rgba(10, 30, 16, 0.65); backdrop-filter: blur(3px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.modal-inner { position: relative; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, 0.92); color: var(--green); font-size: 26px; line-height: 1; cursor: pointer;
}
.modal-img { display: block; width: 100%; height: 230px; object-fit: cover; }
.modal-body { padding: 32px 36px 38px; }
.modal-classes { color: var(--gold); font-weight: 700; font-size: 14px; }
.modal-body h3 { font-size: 40px; color: var(--green); margin: 4px 0 10px; }
.modal-tagline { color: var(--muted); }
.modal-body h4 { font-size: 22px; color: var(--green); margin: 26px 0 10px; }
.stage-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.stage-list li { background: var(--sage); border-radius: 14px; padding: 14px 18px; display: grid; gap: 2px; }
.stage-list span, .modal-note { color: var(--muted); font-size: 15px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips span { background: var(--green); color: #fff; border-radius: 999px; padding: 5px 16px; font-size: 14px; }
.modal-body .btn { margin-top: 30px; }
@media (max-width: 560px) { .modal-body { padding: 24px 22px 30px; } .modal-img { height: 170px; } }



/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-info { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 18px; }
.contact-info b { display: block; color: var(--green); }
.btn-whatsapp { background: #1fa855; color: #fff; }
.map-frame, .map-placeholder { display: block; width: 100%; height: 260px; margin-top: 26px; border: 0; border-radius: 20px; }
.map-placeholder {
  display: grid; place-items: center; text-align: center; padding: 20px; color: var(--green); font-weight: 600;
  background: repeating-linear-gradient(45deg, var(--sage-2) 0 14px, #b8ccb0 14px 28px);
}
.enquiry-form { background: var(--white); border-radius: 24px; padding: 34px; display: grid; gap: 14px; }
.enquiry-form label { font-size: 14px; font-weight: 600; }
.enquiry-form input, .enquiry-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 13px 16px; border-radius: 12px;
  border: 1.5px solid var(--line); font: inherit; background: var(--ivory); color: var(--ink);
}
.hp { position: absolute; left: -9999px; }
.flash { margin: 0; padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14.5px; }
.flash-success { background: #e1f0e0; color: var(--green); }
.flash-error { background: #fbe4e1; color: #a1291d; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Our story page ---------- */
.page-hero { background: var(--green); color: #fff; padding: 88px 0 72px; }
.page-hero h1 { font-size: clamp(44px, 6vw, 76px); }
.page-hero p { margin-top: 14px; color: #cddccd; max-width: 520px; }
.person:nth-of-type(even) { background: var(--sage); }
.person-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 72px; align-items: center; }
.person-alt .person-grid { grid-template-columns: 1.2fr 0.8fr; }
.person-alt .person-photo { order: 2; }
.person-photo { position: relative; aspect-ratio: 4 / 5; }
.person-photo::after {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; z-index: 0;
  border: 2px solid var(--gold); border-radius: var(--petal);
}
.person-photo img {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--petal); background: var(--sage-2);
}
.person-role { color: var(--gold); font-weight: 700; font-size: 14px; }
.person-text h2 { margin: 4px 0 18px; }
.person-text p + p { margin-top: 16px; }
.person-text p:not(.person-role) { color: var(--muted); }
.story-cta { text-align: center; }
.story-cta .lead { margin: 14px auto 28px; }
@media (max-width: 900px) {
  .person-grid, .person-alt .person-grid { grid-template-columns: 1fr; gap: 48px; }
  .person-alt .person-photo { order: 0; }
  .person-photo { max-width: 420px; }
}
.person-text p.person-line {
  margin: 0 0 18px; padding-left: 16px; border-left: 3px solid var(--gold);
  font: 600 26px/1.25 var(--serif); color: var(--green);
}
.person-text .chips { margin-top: 22px; }

/* Wide photo layout (faculty group photo) */
.person-wide .person-grid, .person-wide.person-alt .person-grid { grid-template-columns: 1fr; gap: 56px; }
.person-wide .person-photo { aspect-ratio: auto; }
.person-wide .person-photo img {
  height: auto; max-height: 680px; object-fit: cover; object-position: center 25%;
}
.person-wide .person-text { max-width: 760px; margin: 0 auto; text-align: center; }
.person-wide .chips { justify-content: center; }

/* ---------- Events ---------- */
.event-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; grid-auto-flow: dense; gap: 16px; }
.event { position: relative; overflow: hidden; margin: 0; border-radius: 20px; color: #fff; background: var(--sage-2); }
.event img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.event:hover img { transform: scale(1.05); }
.pos-top img { object-position: center 20%; }
.event::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 30, 16, 0.8), transparent 55%);
}
.event figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px; font: 600 22px/1.15 var(--serif); }
.event-big { grid-column: span 2; grid-row: span 2; }
.event-wide { grid-column: span 2; }
.event-tall { grid-row: span 2; }
@media (max-width: 900px) { .event-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 190px; } }
@media (max-width: 520px) {
  .event-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .event-big, .event-wide { grid-column: auto; }
  .event-big, .event-tall { grid-row: auto; }
}