/* ==========================================================================
   Laerskool Rustenburg-Noord (Noord Primary School) — Premium Landing Page
   Design system: maroon + navy + gold crest palette, playful yet premium.
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --maroon-900: #430E15;
  --maroon-800: #631A24;
  --maroon-700: #7E1F2B;
  --maroon-600: #962735;
  --maroon-100: #FBEAE9;

  --navy-900: #0B1533;
  --navy-800: #142251;
  --navy-700: #1C3170;
  --navy-600: #2A489C;
  --navy-100: #E9EEFC;

  --gold-800: #8A620A;
  --gold-700: #B9860B;
  --gold-600: #D9A315;
  --gold-500: #EFB62C;
  --gold-300: #F8D273;
  --gold-100: #FFF6DF;

  --cream: #FFFBF3;
  --paper: #FFF6E9;
  --ink: #241C18;
  --ink-soft: #5B4E45;
  --white: #ffffff;

  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-hand: 'Caveat', cursive;

  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 40px;
  --radius-blob: 62% 38% 55% 45% / 48% 45% 55% 52%;

  --shadow-sm: 0 4px 16px rgba(67, 14, 21, 0.08);
  --shadow-md: 0 12px 32px rgba(67, 14, 21, 0.14);
  --shadow-lg: 0 24px 60px rgba(67, 14, 21, 0.18);
  --shadow-gold: 0 12px 30px rgba(217, 163, 21, 0.35);

  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --ease-smooth: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset ---------- */
* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }
::selection { background: var(--gold-500); color: var(--maroon-900); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; font-weight: 700; color: var(--maroon-800); }
h2 { font-size: clamp(2rem, 4vw, 2.85rem); }
h3 { font-size: 1.35rem; }
p { color: var(--ink-soft); }
strong { color: var(--maroon-700); font-weight: 700; }
em { font-style: normal; color: var(--gold-700); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section { padding: 108px 0; position: relative; }
@media (max-width: 768px) { .section { padding: 76px 0; } }

.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin: 10px 0 16px; }
.lede { font-size: 1.08rem; }

.eyebrow, .eyebrow-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--maroon-700);
  background: var(--maroon-100); padding: 7px 18px; border-radius: 100px;
}
.eyebrow-light { background: rgba(255,255,255,.14); color: var(--gold-300); }
.text-gold { color: var(--gold-600); }

/* scroll reveal base */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease-smooth), transform .8s var(--ease-smooth); }
[data-reveal].in-view { opacity: 1; transform: translateY(0); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: 14px 26px; border-radius: 100px; position: relative;
  transition: transform .35s var(--ease-bounce), box-shadow .35s ease, background .3s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s ease; }
.btn:hover svg { transform: translateX(4px); }
.btn-lg { padding: 17px 32px; font-size: 1rem; }
.btn-primary { background: linear-gradient(135deg, var(--maroon-600), var(--maroon-800)); color: var(--white); box-shadow: var(--shadow-md); }
.btn-primary:hover { box-shadow: 0 16px 40px rgba(67,14,21,.32); transform: translateY(-3px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-500), var(--gold-700)); color: var(--maroon-900); box-shadow: var(--shadow-gold); }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(217,163,21,.45); }
.btn-ghost { background: rgba(126,31,43,.06); color: var(--maroon-700); border: 2px solid rgba(126,31,43,.18); }
.btn-ghost:hover { background: rgba(126,31,43,.12); transform: translateY(-3px); }
.play-ic { background: var(--maroon-700); color: var(--white); border-radius: 50%; padding: 4px; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999; background: var(--maroon-800);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
.preloader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { text-align: center; }
.preloader-crest { width: 90px; margin: 0 auto 20px; animation: pulseCrest 1.6s ease-in-out infinite; filter: drop-shadow(0 8px 20px rgba(0,0,0,.35)); }
.preloader-bar { width: 180px; height: 5px; background: rgba(255,255,255,.2); border-radius: 10px; overflow: hidden; margin: 0 auto; }
.preloader-bar span { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, var(--gold-500), var(--gold-300)); border-radius: 10px; animation: loadBar 1.1s ease-in-out infinite; }
.preloader-text { font-family: var(--font-display); color: var(--gold-300); letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; margin-top: 16px; }
@keyframes pulseCrest { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes loadBar { 0% { transform: translateX(-120%); } 100% { transform: translateX(340%); } }

/* ---------- Cursor Glow (desktop only) ---------- */
.cursor-glow {
  position: fixed; width: 340px; height: 340px; border-radius: 50%; pointer-events: none; z-index: 2;
  background: radial-gradient(circle, rgba(239,182,44,.10), transparent 70%);
  transform: translate(-50%,-50%); left: -400px; top: -400px;
  transition: left .12s linear, top .12s linear; display: none;
}
@media (hover:hover) and (pointer:fine) { .cursor-glow { display: block; } }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy-900); color: rgba(255,255,255,.85); font-size: .82rem; }
.topbar-inner { display: flex; align-items: center; gap: 26px; height: 40px; }
.topbar-item { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.topbar-item svg { width: 14px; height: 14px; color: var(--gold-500); }
.topbar-item a:hover { color: var(--gold-300); }
.topbar-address { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.topbar-social { margin-left: auto; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.1); border-radius: 50%; transition: background .3s, transform .3s; }
.topbar-social:hover { background: var(--gold-500); color: var(--navy-900); transform: translateY(-2px); }
.topbar-social svg { width: 13px; height: 13px; }
@media (max-width: 860px) { .topbar-address { display: none; } }
@media (max-width: 560px) { .topbar-item:nth-child(2) { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 500; background: rgba(255,251,243,.75);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(126,31,43,.08);
  transition: box-shadow .35s ease, padding .35s ease, background .35s ease;
}
.site-header.scrolled { box-shadow: 0 8px 30px rgba(67,14,21,.10); background: rgba(255,251,243,.94); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 92px; transition: height .35s ease; gap: 20px; }
.site-header.scrolled .header-inner { height: 74px; }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { height: 58px; width: auto; transition: height .35s ease; filter: drop-shadow(0 4px 10px rgba(67,14,21,.18)); }
.site-header.scrolled .brand-logo { height: 48px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--maroon-800); }
.brand-text em { font-family: var(--font-hand); font-size: 1rem; color: var(--gold-700); }

.main-nav ul { display: flex; gap: 6px; }
.nav-link { position: relative; padding: 10px 14px; font-weight: 600; font-size: .93rem; color: var(--ink); border-radius: 100px; transition: color .3s, background .3s; }
.nav-link:hover { color: var(--maroon-700); background: rgba(126,31,43,.06); }
.nav-link.active { color: var(--maroon-700); }
.nav-link.active::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 4px; height: 3px;
  background: var(--gold-500); border-radius: 10px;
}

.header-actions { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 34px; height: 26px; justify-content: center; }
.nav-toggle span { display: block; height: 3px; background: var(--maroon-800); border-radius: 4px; transition: transform .35s var(--ease-bounce), opacity .3s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 480; background: linear-gradient(160deg, var(--maroon-800), var(--navy-900));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  transform: translateY(-100%); opacity: 0; transition: transform .5s var(--ease-smooth), opacity .4s ease; pointer-events: none;
}
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: all; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 14px; text-align: center; }
.mobile-link { font-family: var(--font-display); font-size: 1.9rem; color: var(--white); font-weight: 600; transition: color .3s; }
.mobile-link:hover { color: var(--gold-400, var(--gold-500)); }
.mobile-contact { color: var(--gold-300); font-weight: 700; letter-spacing: .04em; border: 2px solid rgba(255,255,255,.25); padding: 12px 26px; border-radius: 100px; }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-primary { display: none; }
}
@media (min-width: 981px) { .mobile-menu { display: none; } }

/* ---------- Decorative shapes ---------- */
.blob { position: absolute; border-radius: var(--radius-blob); filter: blur(2px); animation: blobMorph 14s ease-in-out infinite, floaty 9s ease-in-out infinite; opacity: .55; }
@keyframes blobMorph {
  0%, 100% { border-radius: 62% 38% 55% 45% / 48% 45% 55% 52%; }
  33% { border-radius: 45% 55% 40% 60% / 60% 40% 60% 40%; }
  66% { border-radius: 55% 45% 65% 35% / 40% 62% 38% 60%; }
}
@keyframes floaty { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(14px,-22px) rotate(6deg); } }
@keyframes frameMorph {
  0%,100% { border-radius: 62% 38% 55% 45% / 48% 45% 55% 52%; }
  50% { border-radius: 45% 55% 62% 38% / 55% 45% 55% 45%; }
}

/* ---------- Hero (sticky photo, scrolling copy) ---------- */
.hero {
  position: relative;
  background: var(--navy-900);
}
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
}
.hero-scroll {
  position: relative;
  z-index: 1;
  margin-top: -100vh;
  pointer-events: none;
}
.hero-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 110px 0 90px;
}
.hero-travel { height: 85vh; }

.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 34%;
  opacity: 0; z-index: 0;
  transition: opacity 1.15s var(--ease-smooth);
}
.hero-slide.is-active { opacity: 1; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: opacity .35s ease; }
}
.hero-dots {
  position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%);
  z-index: 4; display: flex; gap: 8px;
}
.hero-dots button {
  width: 9px; height: 9px; border-radius: 50%; padding: 0;
  background: rgba(255,255,255,.45); border: 0; cursor: pointer;
  transition: width .3s ease, background .3s ease;
}
.hero-dots button.is-active { width: 28px; border-radius: 8px; background: var(--gold-500); }

.hero-inner { position: relative; z-index: 3; width: 100%; pointer-events: auto; }
.hero-copy {
  position: relative;
  isolation: isolate;
  max-width: 680px;
  padding: 28px 32px 32px;
  border-radius: 28px;
}
.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(16, 18, 32, .42);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 22px 56px rgba(11,21,51,.28), inset 0 1px 0 rgba(255,255,255,.28);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .hero-copy::before { background: rgba(16, 18, 32, .78); }
}
.eyebrow-badge { background: rgba(255,251,243,.94); box-shadow: var(--shadow-md); color: var(--maroon-700); }
.eyebrow-badge svg { width: 15px; height: 15px; color: var(--gold-600); }

.hero-title { font-size: clamp(3.1rem, 7.4vw, 5.6rem); letter-spacing: .01em; margin: 22px 0 20px; color: var(--white); text-shadow: 0 6px 34px rgba(11,21,51,.55); }
.hero-title .line { display: block; }
.hero-title-accent { color: transparent; background: linear-gradient(100deg, var(--gold-300), var(--gold-500) 55%, var(--gold-600)); -webkit-background-clip: text; background-clip: text; position: relative; text-shadow: none; filter: drop-shadow(0 6px 24px rgba(11,21,51,.5)); }
.hero-title .star { position: absolute; font-size: .4em; margin-left: 10px; color: var(--gold-500); animation: sparkle 2.4s ease-in-out infinite; -webkit-text-fill-color: var(--gold-500); }
@keyframes sparkle { 0%,100% { transform: scale(1) rotate(0deg); opacity: 1; } 50% { transform: scale(1.3) rotate(20deg); opacity: .6; } }

.hero-lede { font-size: 1.14rem; max-width: 560px; margin-bottom: 34px; color: rgba(255,255,255,.9); text-shadow: 0 2px 14px rgba(11,21,51,.45); }
.hero-lede strong { color: var(--gold-300); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 46px; }
.hero .btn-ghost {
  background: rgba(255,255,255,.1); color: var(--white); border: 2px solid rgba(255,255,255,.38);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero .btn-ghost:hover { background: rgba(255,255,255,.2); }
.hero .play-ic { background: var(--gold-500); color: var(--maroon-900); }

.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num, .stat-text { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--maroon-700); line-height: 1; }
.hero .stat-num, .hero .stat-text { color: var(--white); text-shadow: 0 3px 18px rgba(11,21,51,.5); }
.stat-label { font-size: .82rem; color: var(--ink-soft); margin-top: 6px; font-weight: 600; }
.hero .stat-label { color: rgba(255,255,255,.72); }

.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.55); border-radius: 20px; z-index: 3; transition: opacity .3s ease; }
.scroll-cue span { position: absolute; top: 7px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; background: var(--gold-300); border-radius: 50%; animation: scrollCue 1.8s ease-in-out infinite; }
@keyframes scrollCue { 0% { opacity: 1; top: 7px; } 80% { opacity: 0; top: 24px; } 100% { opacity: 0; top: 7px; } }

@media (max-width: 980px) {
  .hero-stage { padding: 96px 0 72px; }
  .hero-travel { height: 55vh; }
  .hero-copy { max-width: 100%; text-align: center; padding: 24px 20px 26px; }
  .hero-lede { margin-left: auto; margin-right: auto; }
  .hero-ctas, .hero-stats { justify-content: center; }
  .hero-dots { bottom: 68px; }
}

/* ---------- Marquee ---------- */
.marquee-strip { background: linear-gradient(90deg, var(--maroon-800), var(--navy-800)); overflow: hidden; padding: 16px 0; position: relative; z-index: 4; }
.marquee-track { display: flex; align-items: center; width: max-content; gap: 34px; animation: marquee 32s linear infinite; }
.marquee-track span { font-family: var(--font-display); color: var(--white); font-weight: 600; letter-spacing: .05em; font-size: .95rem; white-space: nowrap; }
.marquee-track i { color: var(--gold-500); font-style: normal; }
.marquee-strip:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: center; }
.about-visual { position: relative; }
.about-img-frame { border-radius: var(--radius-lg) 12px var(--radius-lg) 12px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/5; }
.about-img-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-smooth); }
.about-img-frame:hover img { transform: scale(1.06); }
.about-img-badge {
  position: absolute; bottom: -26px; right: -18px; background: var(--white); box-shadow: var(--shadow-md);
  border-radius: var(--radius-md); padding: 16px 22px; text-align: center; font-family: var(--font-display); color: var(--maroon-800);
}
.about-img-badge span { display: block; font-family: var(--font-body); font-size: .74rem; color: var(--ink-soft); font-weight: 600; margin-top: 4px; }
.squiggle-underline { position: absolute; width: 130px; top: -30px; left: -20px; color: var(--gold-500); }

.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 32px 0; }
.mini-card { background: var(--white); border-radius: var(--radius-sm); padding: 22px 18px; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease-bounce), box-shadow .35s ease; }
.mini-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.mini-card-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--maroon-100); color: var(--maroon-700); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.mini-card-ic svg { width: 22px; height: 22px; }
.mini-card h4 { font-size: 1rem; margin-bottom: 6px; }
.mini-card p { font-size: .84rem; }

.principal-quote { background: var(--maroon-100); border-left: 4px solid var(--gold-500); border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: 26px 28px; }
.principal-quote p { color: var(--maroon-900); font-style: italic; margin-bottom: 16px; font-size: 1.02rem; }
.principal-quote footer { display: flex; align-items: center; gap: 12px; }
.principal-quote footer strong { display: block; font-size: .92rem; }
.principal-quote footer span { font-size: .78rem; color: var(--ink-soft); }
.avatar-initials {
  width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--maroon-600), var(--maroon-800));
  color: var(--white); display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
  font-weight: 700; flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.avatar-photo {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  box-shadow: var(--shadow-sm); border: 2px solid var(--gold-500);
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 60px; }
  .mini-cards { grid-template-columns: 1fr; }
  .about-img-badge { right: 10px; }
}

/* ---------- Values ---------- */
.values { background: radial-gradient(120% 100% at 50% 0%, var(--navy-800), var(--navy-900) 70%); color: var(--white); }
.values h2, .values h3 { color: var(--white); }
.values .lede { color: rgba(255,255,255,.75); }
.values-layout { display: grid; grid-template-columns: 1.35fr .9fr; gap: 50px; align-items: center; margin-top: 20px; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm);
  padding: 26px 20px; transition: transform .4s var(--ease-bounce), background .35s ease, border-color .35s ease;
}
.value-card:hover { transform: translateY(-8px) rotate(-1deg); background: rgba(255,255,255,.1); border-color: var(--gold-500); }
.value-ic { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--gold-500), var(--gold-700)); color: var(--maroon-900); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.value-ic svg { width: 24px; height: 24px; }
.value-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.value-card p { font-size: .84rem; color: rgba(255,255,255,.68); }

.values-visual { position: relative; }
.values-img-frame { border-radius: var(--radius-blob); overflow: hidden; aspect-ratio: 3/4; box-shadow: var(--shadow-lg); animation: frameMorph 18s ease-in-out infinite; }
.values-img-frame img { width: 100%; height: 100%; object-fit: cover; }
.handwritten-tag { position: absolute; top: -18px; right: 6%; font-family: var(--font-hand); font-size: 1.6rem; color: var(--gold-400, var(--gold-500)); transform: rotate(-6deg); }

@media (max-width: 980px) {
  .values-layout { grid-template-columns: 1fr; }
  .values-visual { order: -1; max-width: 340px; margin: 0 auto; }
}
@media (max-width: 620px) { .values-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Academics ---------- */
.phase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.phase-card {
  background: var(--white); border-radius: var(--radius-md); padding: 30px 24px; box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--gold-500); transition: transform .4s var(--ease-bounce), box-shadow .35s ease;
}
.phase-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.phase-tag { display: inline-block; font-family: var(--font-display); font-size: .78rem; font-weight: 700; color: var(--maroon-700); background: var(--maroon-100); padding: 5px 14px; border-radius: 100px; margin-bottom: 14px; }
.phase-card h3 { margin-bottom: 10px; }
.phase-card p { font-size: .88rem; }

.academics-strip { margin-top: 70px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; align-items: center; background: var(--paper); border-radius: var(--radius-lg); padding: 40px; }
.academics-strip-img { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--shadow-md); }
.academics-strip-img img { width: 100%; height: 100%; object-fit: cover; }
.academics-strip-copy h3 { margin-bottom: 14px; font-size: 1.6rem; }
.check-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; font-size: .95rem; color: var(--ink-soft); font-weight: 500; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: -2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold-500); color: var(--maroon-900); font-size: .7rem; display: flex; align-items: center; justify-content: center; font-weight: 700;
}

@media (max-width: 980px) { .phase-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .academics-strip { grid-template-columns: 1fr; padding: 26px; } }
@media (max-width: 560px) { .phase-grid { grid-template-columns: 1fr; } }

/* ---------- Student Life / Tabs ---------- */
.tabs-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.tab-btn {
  font-family: var(--font-display); font-weight: 600; padding: 12px 24px; border-radius: 100px;
  background: var(--white); color: var(--ink-soft); box-shadow: var(--shadow-sm); transition: all .35s var(--ease-bounce);
}
.tab-btn.active, .tab-btn:hover { background: linear-gradient(135deg, var(--maroon-600), var(--maroon-800)); color: var(--white); transform: translateY(-3px); }
.tab-panels { position: relative; }
.tab-panel {
  display: none; background: var(--white); border-radius: var(--radius-lg); padding: 48px; text-align: center; max-width: 780px; margin: 0 auto;
  box-shadow: var(--shadow-md); animation: panelIn .5s var(--ease-smooth);
}
.tab-panel.active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.tab-media { margin: -48px -48px 28px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; aspect-ratio: 16/9; }
.tab-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-smooth); }
.tab-panel:hover .tab-media img { transform: scale(1.05); }
.tab-panel h3 { margin-bottom: 14px; }
@media (max-width: 640px) {
  .tab-panel { padding: 32px 22px; }
  .tab-media { margin: -32px -22px 22px; border-radius: var(--radius-md) var(--radius-md) 0 0; }
}

/* ---------- Achievements ---------- */
.achievements { background: var(--paper); }
.achievements-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: center; }
.achievements-visual { position: relative; }
.achievements-img-frame { border-radius: var(--radius-lg) 12px var(--radius-lg) 12px; overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-lg); }
.achievements-img-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.achievements-counter-badge {
  position: absolute; bottom: -22px; left: -22px; background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  color: var(--maroon-900); border-radius: var(--radius-md); padding: 18px 22px; box-shadow: var(--shadow-gold); text-align: center;
}
.achievements-counter-badge span:first-child { display: block; font-size: 1.9rem; }
.achievements-counter-badge span:last-child { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

.timeline { margin-top: 30px; display: flex; flex-direction: column; gap: 26px; }
.timeline-item { display: flex; gap: 20px; align-items: flex-start; }
.timeline-dot { width: 48px; height: 48px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.timeline-content h4 { font-size: 1.05rem; margin-bottom: 4px; color: var(--maroon-800); font-family: var(--font-display); }
.timeline-content p { font-size: .92rem; }

@media (max-width: 900px) { .achievements-grid { grid-template-columns: 1fr; gap: 60px; } }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 18px; }
.gallery-item { position: relative; border-radius: var(--radius-md); overflow: hidden; grid-column: span 1; grid-row: span 1; cursor: zoom-in; }
.gallery-item.span-2 { grid-column: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-smooth); }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(67,14,21,.55)); opacity: 0; transition: opacity .35s ease; }
.gallery-item:hover::after { opacity: 1; }
.gallery-zoom {
  position: absolute; bottom: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--gold-500);
  color: var(--maroon-900); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700;
  opacity: 0; transform: scale(.6); transition: all .35s var(--ease-bounce);
}
.gallery-item:hover .gallery-zoom { opacity: 1; transform: scale(1); }

@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; } .gallery-item.span-2 { grid-column: span 2; } }
@media (max-width: 520px) { .gallery-grid { grid-template-columns: 1fr; } .gallery-item.span-2 { grid-column: span 1; } }

/* ---------- Testimonials ---------- */
.testimonials { background: linear-gradient(180deg, var(--maroon-100), var(--cream)); }
.testi-carousel { max-width: 760px; margin: 0 auto; }
.testi-track { position: relative; min-height: 260px; }
.testi-card {
  position: absolute; inset: 0; background: var(--white); border-radius: var(--radius-lg); padding: 46px 50px;
  box-shadow: var(--shadow-md); text-align: center; opacity: 0; transform: translateX(40px) scale(.96);
  transition: opacity .55s var(--ease-smooth), transform .55s var(--ease-smooth); pointer-events: none;
}
.testi-card.active { opacity: 1; transform: translateX(0) scale(1); pointer-events: all; position: relative; }
.stars { color: var(--gold-500); letter-spacing: 4px; margin-bottom: 16px; font-size: 1.1rem; }
.testi-card p { font-size: 1.08rem; font-style: italic; color: var(--ink); margin-bottom: 22px; }
.testi-author { display: flex; align-items: center; justify-content: center; gap: 12px; }
.testi-author div { text-align: left; }
.testi-author strong { display: block; font-size: .92rem; color: var(--maroon-800); }
.testi-author span { font-size: .78rem; color: var(--ink-soft); }

.testi-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 30px; }
.testi-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; color: var(--maroon-700); transition: all .3s var(--ease-bounce); }
.testi-btn:hover { background: var(--maroon-700); color: var(--white); transform: scale(1.1); }
.testi-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.testi-dots { display: flex; gap: 8px; }
.testi-dots button { width: 9px; height: 9px; border-radius: 50%; background: rgba(126,31,43,.25); transition: all .3s ease; }
.testi-dots button.active { background: var(--maroon-700); width: 26px; border-radius: 6px; }

@media (max-width: 600px) { .testi-card { padding: 34px 26px; } }

/* ---------- Admissions ---------- */
.admissions { background: linear-gradient(155deg, var(--navy-800), var(--maroon-900)); color: var(--white); overflow: hidden; }
.admissions h2, .admissions h3 { color: var(--white); }
.admissions .lede { color: rgba(255,255,255,.75); }
.admissions-shapes { position: absolute; inset: 0; overflow: hidden; }
.blob-3 { width: 520px; height: 520px; right: -180px; top: -120px; background: var(--gold-500); opacity: .12; }

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; z-index: 2; }
.step-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-md); padding: 30px 24px; transition: transform .4s var(--ease-bounce); }
.step-card:hover { transform: translateY(-8px); background: rgba(255,255,255,.12); }
.step-num { font-family: var(--font-display); font-size: 2.2rem; color: var(--gold-500); font-weight: 700; display: block; margin-bottom: 10px; }
.step-card h3 { color: var(--white); margin-bottom: 8px; font-size: 1.1rem; }
.step-card p { color: rgba(255,255,255,.7); font-size: .87rem; }

.admissions-cta {
  margin-top: 60px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius-lg);
  padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; position: relative; z-index: 2;
}
.admissions-cta h3 { color: var(--white); font-size: 1.4rem; margin-bottom: 8px; }
.admissions-cta p { color: rgba(255,255,255,.72); }

@media (max-width: 980px) { .steps-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } .admissions-cta { text-align: center; justify-content: center; } }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; }
.accordion-item { border-bottom: 1px solid rgba(126,31,43,.15); }
.accordion-head { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 22px 4px; text-align: left; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--maroon-800); }
.accordion-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--maroon-100); color: var(--maroon-700); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; transition: transform .35s var(--ease-bounce), background .3s; }
.accordion-item.active .accordion-icon { transform: rotate(135deg); background: var(--gold-500); color: var(--maroon-900); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .45s var(--ease-smooth); }
.accordion-item.active .accordion-body { max-height: 200px; }
.accordion-body p { padding: 0 4px 22px; font-size: .95rem; }

@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Contact ---------- */
.contact { background: var(--paper); }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; margin-bottom: 50px; }
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-card { background: var(--white); border-radius: var(--radius-md); padding: 22px; display: flex; gap: 16px; align-items: flex-start; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease-bounce); }
.contact-card:hover { transform: translateX(6px); }
.contact-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--maroon-100); color: var(--maroon-700); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-ic svg { width: 22px; height: 22px; }
.contact-card h4 { font-size: .98rem; margin-bottom: 4px; }
.contact-card p { font-size: .9rem; }
.contact-card a:hover { color: var(--maroon-700); text-decoration: underline; }
.contact-fb { justify-content: center; margin-top: 6px; }

.contact-form-wrap { background: var(--white); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-md); }
.contact-form h3 { margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 7px; }
.form-field label { font-size: .82rem; font-weight: 700; color: var(--maroon-800); }
.form-field input, .form-field select, .form-field textarea {
  padding: 13px 16px; border: 2px solid rgba(126,31,43,.14); border-radius: var(--radius-sm); background: var(--paper);
  transition: border-color .3s ease, box-shadow .3s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(239,182,44,.18);
}
.form-submit { width: 100%; justify-content: center; margin-top: 6px; }
.form-note { margin-top: 14px; text-align: center; font-weight: 600; font-size: .9rem; min-height: 1.2em; color: var(--maroon-700); }

.map-frame { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); height: 380px; }
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.15) contrast(1.05); }

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } .contact-form-wrap { padding: 28px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.72); padding-top: 90px; position: relative; overflow: hidden; }
.footer-shapes { position: absolute; inset: 0; overflow: hidden; }
.blob-4 { width: 420px; height: 420px; left: -140px; bottom: -160px; background: var(--maroon-700); opacity: .25; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; position: relative; z-index: 2; padding-bottom: 60px; }
.brand-footer img { height: 56px; }
.brand-footer .brand-text strong { color: var(--white); }
.footer-brand p { margin: 18px 0; font-size: .88rem; line-height: 1.7; }
.footer-social { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); align-items: center; justify-content: center; transition: all .3s var(--ease-bounce); }
.footer-social svg { width: 17px; height: 17px; }
.footer-social:hover { background: var(--gold-500); color: var(--maroon-900); transform: translateY(-4px); }
.footer-col h5 { font-family: var(--font-display); color: var(--white); font-size: 1rem; margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; font-size: .89rem; }
.footer-col a:hover { color: var(--gold-400, var(--gold-500)); }
.footer-contact li { line-height: 1.5; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); position: relative; z-index: 2; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; font-size: .82rem; flex-wrap: wrap; gap: 10px; }
.footer-motto { font-family: var(--font-hand); font-size: 1.2rem; color: var(--gold-400, var(--gold-500)); }

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; text-align: center; } .footer-brand { display: flex; flex-direction: column; align-items: center; } }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 26px; bottom: 26px; width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--maroon-600), var(--maroon-800)); color: var(--white); box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center; z-index: 400; opacity: 0; transform: translateY(20px) scale(.8);
  pointer-events: none; transition: all .4s var(--ease-bounce);
}
.back-to-top.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.back-to-top:hover { transform: translateY(-6px) scale(1.05); }
.back-to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(11,21,51,.92); z-index: 900; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s ease; flex-direction: column; padding: 40px;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(900px, 90vw); max-height: 74vh; border-radius: var(--radius-md); box-shadow: 0 30px 80px rgba(0,0,0,.5); transform: scale(.92); transition: transform .4s var(--ease-bounce); }
.lightbox.open img { transform: scale(1); }
.lightbox-caption { color: var(--white); margin-top: 18px; font-family: var(--font-display); font-size: 1rem; }
.lightbox-close { position: absolute; top: 26px; right: 32px; font-size: 2.2rem; color: var(--white); line-height: 1; transition: transform .3s ease; }
.lightbox-close:hover { transform: rotate(90deg); color: var(--gold-500); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.12); color: var(--white); display: flex; align-items: center; justify-content: center; transition: background .3s ease; }
.lightbox-nav:hover { background: var(--gold-500); color: var(--maroon-900); }
.lightbox-prev { left: 24px; } .lightbox-next { right: 24px; }
@media (max-width: 640px) { .lightbox-nav { width: 40px; height: 40px; } .lightbox-prev { left: 8px; } .lightbox-next { right: 8px; } }

/* ---------- Grid/flex overflow safety net ----------
   Grid tracks & flex items default to min-width:auto (their content size),
   which can force layouts wider than the viewport on small screens.
   Forcing min-width:0 lets text wrap normally inside these containers. */
.hero-inner > *, .about-grid > *, .values-layout > *, .academics-strip > *,
.achievements-grid > *, .contact-grid > *, .faq-grid > *, .footer-grid > *,
.mini-cards > *, .phase-grid > *, .steps-grid > *, .values-grid > *,
.gallery-grid > *, .form-row > *, .hero-ctas > *, .hero-stats > *,
.tabs-nav > *, .admissions-cta > * {
  min-width: 0;
}
.eyebrow-badge { max-width: 100%; flex-wrap: wrap; row-gap: 4px; }
.eyebrow-badge span { white-space: normal; }

/* ---------- Interior pages (academic layout) ---------- */
.page-hero {
  position: relative;
  color: var(--white);
  background-color: var(--navy-900);
}
.page-hero-sticky {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 128px 0 64px;
  overflow: hidden;
  background: var(--navy-900);
}
.page-hero-travel { height: 50vh; }
.page-hero-media { position: absolute; inset: 0; z-index: 0; }
.page-hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 32%;
  filter: saturate(1.08) contrast(1.05);
}
.page-hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(46,9,14,.48) 0%, rgba(67,14,21,.28) 46%, rgba(11,21,51,.16) 100%),
    linear-gradient(180deg, rgba(11,21,51,.10) 0%, rgba(43,10,20,.36) 100%);
}
.page-hero-inner { position: relative; z-index: 2; max-width: 760px; pointer-events: auto; }
.page-hero h1 { color: var(--white); font-size: clamp(2.1rem, 4.5vw, 3.2rem); margin: 14px 0 14px; text-shadow: 0 6px 28px rgba(11,21,51,.45); }
.page-hero-lede { color: rgba(255,255,255,.88); font-size: 1.08rem; max-width: 560px; }
.page-hero-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; font-size: .84rem; font-weight: 600; color: rgba(255,255,255,.7); margin-bottom: 18px; }
.breadcrumbs a:hover { color: var(--gold-300); }

.page-section { background: var(--cream); position: relative; z-index: 4; }
.page-layout { display: grid; grid-template-columns: 1.35fr .75fr; gap: 48px; align-items: start; }
.page-prose h2 { margin-bottom: 16px; }
.page-prose > p { margin-bottom: 16px; }
.page-mini-cards { margin: 28px 0 32px; }
.page-aside { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 100px; }
.page-aside-card { background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.page-aside-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.page-aside-card--soft img { aspect-ratio: 3/4; }
.page-aside-caption { padding: 14px 16px; }
.page-aside-caption strong { display: block; font-family: var(--font-display); color: var(--maroon-800); }
.page-aside-caption span { font-size: .8rem; color: var(--ink-soft); }

.page-values { margin-top: 0; }
.page-values-grid { grid-template-columns: repeat(3, 1fr); }
.page-feature-strip { margin-top: 56px; }
.page-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.page-media-card { background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease-bounce), box-shadow .35s ease; }
.page-media-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.page-media-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.page-media-card-body { padding: 22px 24px 26px; }
.page-media-card-body h3 { margin-bottom: 10px; }
.page-media-card-body p { font-size: .94rem; }
.page-achievements { align-items: start; }
.page-admissions { padding-top: 72px; }

@media (max-width: 980px) {
  .page-layout, .page-card-grid { grid-template-columns: 1fr; }
  .page-aside { position: static; }
  .page-values-grid { grid-template-columns: 1fr 1fr; }
  .page-hero-sticky { padding: 110px 0 44px; }
  .page-hero-travel { height: 36vh; }
}
@media (max-width: 560px) {
  .page-values-grid { grid-template-columns: 1fr; }
}

.page-layout > *, .page-card-grid > *, .page-aside > * { min-width: 0; }

/* ---------- Misc / Accessibility ---------- */
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero-travel, .page-hero-travel { height: 0; }
}
