/* ============================================================
   STYLE.CSS — Ashraf Islamia Model Public Secondary School
   Core design system, layout, all section styles
   ============================================================ */

/* ─── Google Fonts ───────────────────────────────────── */
/* Fonts loaded via <link rel="stylesheet"> in each page's <head>
   (replaced from @import to avoid render-blocking on initial load) */

/* ─── Design Tokens ──────────────────────────────────── */

:root {
  /* Core palette */
  --primary:        #1a3a5c;
  --primary-light:  #2a5298;
  --primary-dark:   #0f2340;
  --gold:           #c9a84c;
  --gold-light:     #e8c96e;
  --gold-dark:      #a07c2e;
  --cream:          #faf8f3;
  --cream-dark:     #f0ece1;

  /* Text */
  --text-dark:      #1a1a2e;
  --text-body:      #3d4a5c;
  --text-muted:     #7a8899;
  --text-light:     #b8c5d0;
  --text-white:     #ffffff;

  /* Surfaces */
  --surface:        #ffffff;
  --surface-alt:    #f4f1ea;
  --surface-card:   #ffffff;

  /* Shadows */
  --shadow-sm:      0 1px 4px rgba(26,58,92,0.07), 0 2px 8px rgba(26,58,92,0.05);
  --shadow-md:      0 4px 16px rgba(26,58,92,0.10), 0 8px 32px rgba(26,58,92,0.07);
  --shadow-lg:      0 8px 32px rgba(26,58,92,0.14), 0 16px 48px rgba(26,58,92,0.08);
  --shadow-gold:    0 4px 24px rgba(201,168,76,0.25);

  /* Borders */
  --border:         rgba(26,58,92,0.10);
  --border-gold:    rgba(201,168,76,0.35);

  /* Radius */
  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      32px;

  /* Typography scale */
  --font-display:   'Playfair Display', Georgia, serif;
  --font-accent:    'Cormorant Garamond', Georgia, serif;
  --font-body:      'Inter', system-ui, sans-serif;

  /* Transitions */
  --ease-smooth:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:         0.18s;
  --t-med:          0.35s;
  --t-slow:         0.6s;

  /* Spacing — defined here as a base; overridden per-breakpoint below */
  --section-py:     clamp(40px, 10vw, 56px);
  --section-py-sm:  clamp(28px, 7vw, 40px);
  --container-max:  1200px;
  --container-px:   16px;

  /* Navbar height — used for sticky offsets (gallery filter bar, etc.) */
  --navbar-height:  72px;
}

/* ─── Reset & Base ───────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  scroll-padding-top: var(--navbar-height, 72px);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  /* Prevent any horizontal bleed on any viewport */
  max-width: 100vw;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background-color: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

address {
  font-style: normal;
}

/* Footer contact links — inherit color, no underline */
.footer-contact-item a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ─── Accessibility Utilities ────────────────────────── */

/* Skip to main content link — visually hidden until focused */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary-dark);
  color: var(--gold-light);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.2s ease;
  white-space: nowrap;
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Screen-reader-only utility — content hidden visually but read by AT */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Global focus-visible styles — keyboard navigation indicators */
/* Applied only via :focus-visible so mouse users are unaffected */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Override for elements that already have a border-radius */
.btn:focus-visible,
.nav-cta:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 50px;
}

.nav-link:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.footer-social-link:focus-visible,
.footer-link:focus-visible,
.footer-logo:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Form controls — focus ring */
.form-control:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 0;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(26,58,92,0.15);
}

/* FAQ & filter buttons */
.faq-question:focus-visible,
.filter-btn:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Lightbox & dialog buttons */
#lb-prev:focus-visible,
#lb-next:focus-visible,
#lb-close:focus-visible,
#vm-close:focus-visible,
#back-to-gallery:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}

/* Dark-bg sections — lighter focus ring for visibility */
#principal :focus-visible,
.nav-drawer :focus-visible,
#intro-overlay :focus-visible {
  outline-color: var(--gold-light);
}

/* Minimum touch target sizes (WCAG 2.5.5) */
.footer-social-link {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-social-link svg {
  width: 20px;
  height: 20px;
}

.nav-hamburger {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Utility ────────────────────────────────────────── */

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
  /* Notch support in landscape mode on mobile/tablet devices */
  padding-left: calc(var(--container-px) + env(safe-area-inset-left, 0px));
  padding-right: calc(var(--container-px) + env(safe-area-inset-right, 0px));
}

.section-py {
  padding-block: var(--section-py);
}

.section-py-sm {
  padding-block: var(--section-py-sm);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Spacing Utilities */
.mb-28 { margin-bottom: 28px !important; }
.mb-40 { margin-bottom: 40px !important; }
.mt-8 { margin-top: 8px !important; }
.mt-24 { margin-top: 24px !important; }
.pt-0 { padding-top: 0 !important; }

/* Typography & Visual Utilities */
.font-normal { font-style: normal !important; }
.text-white-dim { color: rgba(255, 255, 255, 0.8) !important; }

/* Aspect Ratio Utilities (replacing inline styles) */
.aspect-16-9 { aspect-ratio: 16/9; width: 100%; object-fit: cover; }
.aspect-4-3 { aspect-ratio: 4/3; width: 100%; object-fit: cover; }
.aspect-1-6 { aspect-ratio: 1.6; width: 100%; object-fit: cover; }

/* Reveal-stagger delay utility classes (replacing transition-delay inline styles) */
.delay-50  { transition-delay:  50ms !important; }
.delay-80  { transition-delay:  80ms !important; }
.delay-100 { transition-delay: 100ms !important; }
.delay-150 { transition-delay: 150ms !important; }
.delay-160 { transition-delay: 160ms !important; }
.delay-200 { transition-delay: 200ms !important; }
.delay-240 { transition-delay: 240ms !important; }
.delay-300 { transition-delay: 300ms !important; }
.delay-320 { transition-delay: 320ms !important; }

/* ─── Section Headers ────────────────────────────────── */

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 18px;
}

.section-title em {
  color: var(--gold);
  font-style: normal;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.8;
}

.section-header {
  margin-bottom: 64px;
}

.section-header.mb-40 {
  margin-bottom: 40px;
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-subtitle {
  margin-inline: auto;
}

/* Gold divider */
.gold-rule {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  margin-bottom: 20px;
  display: block;
}

.section-header.centered .gold-rule {
  margin-inline: auto;
}

/* ─── Section Header Variants for Dark Backgrounds ─── */

/* Used in Principal's Message section (dark navy background) */
.section-label--light {
  color: rgba(201, 168, 76, 0.85);
}

.section-title--light {
  color: var(--text-white);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

/* ─── Buttons ────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  transition:
    transform var(--t-fast) var(--ease-smooth),
    box-shadow var(--t-fast) var(--ease-smooth),
    background var(--t-med) var(--ease-smooth);
  white-space: nowrap;
  text-decoration: none;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,0.12);
  opacity: 0;
  transition: opacity var(--t-fast);
}

.btn:hover::after { opacity: 1; }
.btn:hover  { transform: translateY(-2px); }
.btn:active,
.btn[data-pressed] { transform: translateY(1px); box-shadow: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(201,168,76,0.35);
}

.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(201,168,76,0.5);
}

.btn-primary:active,
.btn-primary[data-pressed] {
  box-shadow: 0 2px 8px rgba(201,168,76,0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.7);
  color: var(--text-white);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,1);
}

.btn-outline-dark {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline-dark:hover {
  background: var(--primary);
  color: var(--text-white);
}

.btn-outline-light {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: var(--text-white);
}

.btn-outline-light:hover {
  border-color: var(--text-white);
  background: rgba(255, 255, 255, 0.1);
}

.btn-whatsapp {
  background: transparent;
  border: 2px solid #25d366;
  color: #128c7e;
}

.btn-whatsapp:hover {
  background: #25d366;
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-solid {
  background: #25d366;
  color: var(--text-white);
  border: 2px solid #25d366;
}

.btn-whatsapp-solid:hover {
  background: #20ba5a;
  border-color: #20ba5a;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp svg,
.btn-whatsapp-solid svg {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

/* ─── INTRO OVERLAY — Cinematic Brand Reveal ─────────── */

body.prologue-active {
  overflow-y: scroll !important;
  overflow-x: hidden !important;
}

/* Prologue Scroll Spacer */
#prologue-spacer {
  display: none;
  pointer-events: none;
}

body.prologue-active #prologue-spacer {
  display: block;
  height: 150vh;
}

/* ── Base Overlay ── */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  will-change: opacity;
  transform: translateZ(0);
}

/* Smooth fade out on .fade-out class */
#intro-overlay.fade-out {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Layer 1: Deep Navy Base (implicit via background in #intro-overlay/intro-layer-navy) */
.intro-layer-navy {
  position: absolute;
  inset: 0;
  background-color: #01040a;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  will-change: opacity;
}

/* Layer 2: Dark Charcoal Gradient */
.intro-layer-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 42%,
    rgba(15, 18, 24, 0.6) 0%,
    #010307 100%
  );
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  will-change: opacity;
}

/* Layer 3: Ambient Radial Glow */
.intro-bg-ambient {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 42%,
    rgba(224, 151, 26, 0.18) 0%,
    rgba(201, 168, 76, 0.05) 45%,
    transparent 70%
  );
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
  z-index: 2;
  will-change: opacity, transform;
}

/* Layer 3: Warm illumination behind candles */
.intro-candles-glow {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 480px;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(230, 155, 28, 0.22) 0%,
    rgba(200, 140, 40, 0.06) 42%,
    transparent 72%
  );
  pointer-events: none;
  z-index: 2;
  opacity: 0.15;
  will-change: opacity;
}

/* Layer 4: Vignette (Edges) */
.intro-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 50%,
    transparent 45%,
    rgba(0, 1, 4, 0.72) 75%,
    #000103 100%
  );
  pointer-events: none;
  z-index: 5;
  opacity: 1;
  will-change: opacity;
}

/* Layer 5: Barely-visible Golden Dust particles */
#intro-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* ── Central Stage ── */
.intro-center-stage {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  transform: translateY(-2vh); /* Visual center balancing */
}

/* ── Logo Wrap ── */
.intro-logo-wrap {
  width: min(310px, 75vw);
  height: min(310px, 75vw);
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid rgba(201, 168, 76, 0);
  box-shadow: none;
  will-change: transform, opacity;
}

.intro-logo-wrap.show-bg {
  border-color: rgba(201, 168, 76, 0.75);
  background-color: #030611;
  box-shadow:
    0 0 0 4px rgba(201, 168, 76, 0.10),
    0 0 28px rgba(201, 168, 76, 0.28),
    0 0 65px rgba(201, 168, 76, 0.12);
  transition: border-color 0.6s ease, background-color 0.6s ease, box-shadow 0.6s ease;
}

/* ── Logo woodcut bg ── */
.intro-logo-bg-image {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  opacity: 0;
  will-change: opacity, transform;
}

.intro-logo-bg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.intro-logo-wrap.show-bg .intro-logo-bg-image {
  opacity: 0.95;
}

/* ── Golden Bloom Burst ── */
.intro-bloom-burst {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 42%,
    rgba(255, 210, 80, 0.95) 0%,
    rgba(230, 160, 40, 0.4) 40%,
    rgba(15, 18, 24, 0) 70%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  mix-blend-mode: screen;
  will-change: opacity, transform;
}

.intro-bloom-burst.active {
  animation: bloom-flash 1.4s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes bloom-flash {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  15% {
    opacity: 1;
    transform: scale(1.8);
  }
  100% {
    opacity: 0;
    transform: scale(3.5);
  }
}

/* ── SVG Candle Wrapper ── */
.intro-candles-wrap {
  position: absolute;
  width: 82%;
  height: 68%;
  transform: translateY(-2%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
  will-change: transform, opacity;
}

.intro-candles-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ── Candle groups ── */
.candle-g {
  opacity: 1;
  will-change: opacity, transform;
}

.candle-body-base {
  transition: fill 0.8s ease;
}

/* ── Floor reflection (V3 Grounding) ── */
.floor-scene {
  opacity: 0.05; /* soft 5% grounding */
  will-change: opacity;
  transition: opacity 0.6s ease;
}

.floor-glow-main {
  transform-origin: 133px 164px;
  mix-blend-mode: screen;
}

.floor-spot {
  mix-blend-mode: screen;
}

/* Warm reflection overlay — visible only when lit */
.candle-reflection {
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.candle-g.lit .candle-reflection {
  opacity: 0.8;
}

/* ── Flame groups ── */
.flame-g {
  opacity: 0;
  transform: scale(0);
  will-change: transform, opacity;
  /* transitions handled by JS inline styles for scroll precision */
}

.candle-g.igniting .flame-g {
  opacity: 0.65;
  transform: scale(0.5);
}

.candle-g.lit .flame-g {
  opacity: 1;
  transform: scale(1);
}

/* Candle 5 — diagonal, tilted left */
.candle-5 {
  transform: rotate(-32deg);
}

/* ── Flame flicker animations ── */
.candle-g.lit .flame-outer {
  animation: flame-flicker-outer var(--flame-outer-dur, 2.4s) ease-in-out var(--flame-outer-delay, 0s) infinite;
}

.candle-g.lit .flame-inner {
  animation: flame-flicker-inner var(--flame-inner-dur, 1.6s) ease-in-out var(--flame-inner-delay, 0s) infinite;
}

/* Unique unsynchronised flicker timing per candle */
.candle-1 { --flame-outer-dur: 2.05s; --flame-outer-delay: -0.3s;  --flame-inner-dur: 1.35s; --flame-inner-delay: -0.6s; }
.candle-2 { --flame-outer-dur: 2.65s; --flame-outer-delay: -1.1s;  --flame-inner-dur: 1.75s; --flame-inner-delay: -0.25s; }
.candle-3 { --flame-outer-dur: 2.25s; --flame-outer-delay: -1.55s; --flame-inner-dur: 1.55s; --flame-inner-delay: -0.9s; }
.candle-4 { --flame-outer-dur: 2.85s; --flame-outer-delay: -0.5s;  --flame-inner-dur: 1.9s;  --flame-inner-delay: -1.35s; }
.candle-5 { --flame-outer-dur: 2.45s; --flame-outer-delay: -1.9s;  --flame-inner-dur: 1.62s; --flame-inner-delay: -0.15s; }

/* ── Text Group ── */
.intro-text-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  will-change: opacity, transform;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* 1 — Urdu Motto */
.intro-motto {
  font-family: 'Noto Nastaliq Urdu', 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.35rem, 3.4vw, 2.05rem);
  font-weight: 400;
  color: var(--gold);
  /* Refined glow — subtle warmth, not a bloom */
  text-shadow:
    0 0 8px rgba(201, 168, 76, 0.12),
    0 2px 12px rgba(201, 168, 76, 0.08);
  margin-top: 28px;
  letter-spacing: 0.04em;
  direction: rtl;
  text-align: center;
  line-height: 1.55;
  opacity: 1;
  will-change: opacity, transform;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* 2 — Decorative divider */
.intro-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
  width: 240px;
}

.intro-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(201, 168, 76, 0.55),
    transparent
  );
}

.intro-divider-ornament {
  font-size: 0.6rem;
  color: rgba(201, 168, 76, 0.75);
  letter-spacing: 0;
  line-height: 1;
  flex-shrink: 0;
}

/* 3 — English quote */
.intro-instruction {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(0.95rem, 2vw, 1.35rem);
  font-weight: 500;
  color: #eae4d8;
  text-align: center;
  letter-spacing: 0.035em;
  line-height: 1.6;
  max-width: 480px;
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* 4 — Scroll indicator block */
.intro-scroll-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 36px;
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* Mouse icon */
.intro-mouse-indicator {
  width: 18px;
  height: 28px;
  border: 1.5px solid rgba(201, 168, 76, 0.45);
  border-radius: 9px;
  position: relative;
  display: inline-block;
  animation: mouse-breath 3s ease-in-out infinite;
}

.intro-mouse-wheel {
  width: 3px;
  height: 6px;
  background: var(--gold);
  border-radius: 2px;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes mouse-breath {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 1;    }
}

/* ── Phase-based display ── */

#intro-overlay[data-phase="lighting"] #intro-particles,
#intro-overlay[data-phase="stable"]  #intro-particles {
  opacity: 0.7;
}

#intro-overlay[data-phase="stable"] .intro-bg-ambient {
  animation: ambient-breathe 4.5s ease-in-out infinite;
}

/* ── Exiting phase ── */
#intro-overlay[data-phase="exiting"] {
  pointer-events: none;
}

#intro-overlay[data-phase="exiting"] .intro-scroll-block {
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* ══════════════════════════════════════════════════════
   HERO SECTION — Post-Intro Cascade
   Body gets class 'intro-complete' after intro exits
   ══════════════════════════════════════════════════════ */

/* Homepage elements start hidden until intro completes */
body:not(.intro-complete):not(.intro-skip) #main-content {
  opacity: 0;
  visibility: hidden;
}

body:not(.intro-complete):not(.intro-skip) #navbar {
  opacity: 0;
  transform: translateY(-100%);
}

/* Cascade reveal on intro-complete */
body.intro-complete #hero .hero-slideshow {
  animation: hero-slide-in 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.intro-complete #hero .hero-overlay {
  animation: hero-overlay-reveal 1.0s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

body.intro-complete #hero .hero-label {
  animation: hero-label-cascade 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

body.intro-complete #hero .hero-headline {
  animation: hero-text-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

body.intro-complete #hero .hero-sub {
  animation: hero-text-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.58s both;
}

body.intro-complete #hero .hero-ctas {
  animation: hero-text-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.72s both;
}

body.intro-complete #hero .hero-indicators {
  animation: hero-overlay-reveal 0.7s ease 0.9s both;
}

body.intro-complete #hero .hero-scroll-hint {
  animation: hero-overlay-reveal 0.6s ease 1.1s both;
}

/* When intro is skipped — immediate reveal */
body.intro-skip #hero .hero-slideshow,
body.intro-skip #hero .hero-overlay,
body.intro-skip #hero .hero-label,
body.intro-skip #hero .hero-headline,
body.intro-skip #hero .hero-sub,
body.intro-skip #hero .hero-ctas,
body.intro-skip #hero .hero-indicators,
body.intro-skip #hero .hero-scroll-hint {
  opacity: 1;
  animation: none;
  transform: none;
}

/* ─── NAVIGATION ─────────────────────────────────────── */



#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  /* padding set per breakpoint */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* Visible by default — hidden during intro via body selector below;
     this ensures navbar is accessible even if JS fails */
  opacity: 1;
  transform: translateY(0);
  transition:
    padding var(--t-med) var(--ease-smooth),
    background var(--t-med) var(--ease-smooth),
    box-shadow var(--t-med) var(--ease-smooth);
}

/* Nav slides in after intro completes */
body.intro-complete #navbar,
body.intro-skip #navbar {
  animation: nav-slide-down 0.6s var(--ease-smooth) 0.1s both;
}

#navbar.scrolled {
  background: rgba(15, 35, 64, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.25);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: none;
  transition: transform var(--t-med) var(--ease-smooth);
}

.nav-logo:hover .nav-logo-icon {
  transform: scale(1.06);
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-school-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.nav-school-tagline {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--gold-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Nav links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--t-fast), background var(--t-fast);
  position: relative;
  letter-spacing: 0.02em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 70%;
  height: 1.5px;
  background: var(--gold);
  transform-origin: center;
  transition: transform var(--t-med) var(--ease-smooth);
  border-radius: 1px;
}

.nav-link:hover {
  color: var(--text-white);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
  color: var(--gold-light);
}

/* Admissions button */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--primary-dark);
  cursor: pointer;
  border: none;
  transition:
    transform var(--t-fast) var(--ease-smooth),
    box-shadow var(--t-fast) var(--ease-smooth);
  box-shadow: 0 3px 12px rgba(201,168,76,0.4);
  text-decoration: none;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.55);
}

.nav-cta:active,
.nav-cta[data-pressed] {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(201,168,76,0.3);
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast);
}

.nav-hamburger:hover { background: rgba(255,255,255,0.1); }

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-white);
  border-radius: 2px;
  transition: transform var(--t-med) var(--ease-smooth), opacity var(--t-fast);
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--primary-dark);
  padding: 80px 32px 40px;
  transform: translateX(100%);
  transition: transform var(--t-med) var(--ease-smooth);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: -8px 0 40px rgba(0,0,0,0.4);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-drawer.open {
  transform: translateX(0);
}

.nav-drawer .nav-link {
  font-size: 1rem;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
}

.nav-drawer .nav-link::after {
  display: none;
}

.nav-drawer .nav-cta {
  margin-top: 16px;
  text-align: center;
  justify-content: center;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med);
}

.nav-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ─── HERO SECTION ───────────────────────────────────── */

#hero {
  position: relative;
  /* height/align-items set per breakpoint in responsive section */
  overflow: hidden;
  display: flex;
}

/* Slideshow */
.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  will-change: opacity;
  /* Delay visibility:hidden until after the 1.4s fade-out completes */
  transition: opacity 1.4s ease, visibility 0s linear 1.4s;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  /* Make visible immediately when becoming active */
  transition: opacity 1.4s ease, visibility 0s linear 0s;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-ken-burns 8s var(--ease-smooth) both;
}

/* Multi-layer overlay for depth and readability */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(10,25,47,0.75) 0%, rgba(10,25,47,0.30) 60%, transparent 100%),
    linear-gradient(to top, rgba(10,25,47,0.70) 0%, transparent 50%);
  z-index: 1;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  /* padding-inline and padding-bottom set per breakpoint */
  margin-inline: auto;
  width: 100%;
}

/* .hero-inner layout is set entirely per breakpoint in the responsive section */

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 22px;
}

.hero-label::before {
  content: '';
  display: block;
  width: 32px;
  height: 1.5px;
  background: var(--gold);
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.hero-headline em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.82);
  line-height: 1.75;
  margin-bottom: 38px;
  max-width: 520px;
  font-weight: 300;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  /* flex-direction, gap, width set per breakpoint */
}

/* Slide indicators */
.hero-indicators {
  position: absolute;
  /* bottom, gap set per breakpoint */
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
}

.hero-dot {
  /* width, height, padding set per breakpoint */
  border-radius: 2px;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  touch-action: manipulation;
  transition: background var(--t-fast), width var(--t-med) var(--ease-smooth);
  border: none;
  min-width: 20px;
  min-height: 20px; /* ensures tap target */
}

.hero-dot.active {
  background: var(--gold);
}

/* Scroll indicator */
.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  right: var(--container-px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.45);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-mouse {
  width: 22px;
  height: 34px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 12px;
  position: relative;
}

.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 6px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  animation: scroll-dot 1.8s ease infinite;
}

@keyframes scroll-dot {
  0%   { transform: translateX(-50%) translateY(0); opacity: 1; }
  80%  { transform: translateX(-50%) translateY(10px); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0); opacity: 0; }
}

/* ─── STATS BANNER ───────────────────────────────────── */

#stats {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  /* padding-block set per breakpoint */
  position: relative;
  overflow: hidden;
}

#stats::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(201,168,76,0.05);
  pointer-events: none;
}

#stats::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  pointer-events: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
  padding: 28px 20px;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(255,255,255,0.12);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
  display: block;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.stat-suffix {
  color: var(--gold);
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ─── WHY CHOOSE US ──────────────────────────────────── */

#why-choose {
  background: var(--surface);
  padding-block: var(--section-py);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.why-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
  transition:
    transform var(--t-med) var(--ease-smooth),
    box-shadow var(--t-med) var(--ease-smooth),
    border-color var(--t-med);
  cursor: default;
}

.why-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease-smooth);
}

.why-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-gold);
}

.why-card:hover::before {
  transform: scaleX(1);
}

.why-card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(26,58,92,0.06) 0%, rgba(201,168,76,0.10) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: background var(--t-med);
  flex-shrink: 0;
}

.why-card:hover .why-card-icon {
  background: linear-gradient(135deg, rgba(26,58,92,0.10) 0%, rgba(201,168,76,0.18) 100%);
}

.why-card-icon svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
  transition: color var(--t-fast);
}

.why-card:hover .why-card-icon svg {
  color: var(--gold-dark);
}

.why-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

.why-card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ─── VISION & MISSION ───────────────────────────────── */

#vision {
  background: var(--cream);
  padding-block: var(--section-py);
  overflow: hidden;
}

.vision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.vision-image-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.vision-image-wrap img {
  width: 100%;
  height: 540px;
  object-fit: cover;
  transition: transform 0.8s var(--ease-smooth);
}

.vision-image-wrap:hover img {
  transform: scale(1.04);
}

.vision-image-badge {
  position: absolute;
  bottom: 28px;
  left: 28px;
  max-width: calc(100% - 56px);
  background: rgba(15,35,64,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  border: 1px solid rgba(201,168,76,0.3);
}

.vision-image-badge p {
  font-family: var(--font-accent);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--gold-light);
  line-height: 1.5;
}


.vision-block {
  margin-bottom: 44px;
}

.vision-block:last-child {
  margin-bottom: 0;
}

.vision-block-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.vision-block-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 28px;
  background: linear-gradient(to bottom, var(--gold), var(--gold-light));
  border-radius: 2px;
  flex-shrink: 0;
}

.vision-block-text {
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.85;
  padding-left: 18px;
}

/* ─── PRINCIPAL'S MESSAGE ────────────────────────────── */

#principal {
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding-block: var(--section-py);
  position: relative;
  overflow: hidden;
}

#principal::before {
  content: '\201C';
  position: absolute;
  top: -30px;
  left: 5%;
  font-family: var(--font-display);
  font-size: 28rem;
  color: rgba(201,168,76,0.06);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.principal-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.principal-portrait {
  flex-shrink: 0;
}

.principal-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 4px solid var(--gold);
  overflow: hidden;
  box-shadow: 0 0 0 8px rgba(201,168,76,0.15), var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.principal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.principal-avatar-svg {
  width: 120px;
  height: 120px;
  opacity: 0.6;
}


.principal-quote {
  font-family: var(--font-accent);
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-style: italic;
  font-weight: 400;
  color: rgba(255,255,255,0.92);
  line-height: 1.65;
  margin-bottom: 32px;
  position: relative;
  padding-left: 32px;
  border-left: 3px solid var(--gold);
}

.principal-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
}

.principal-title {
  font-size: 0.85rem;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ─── ADMISSIONS CTA STRIP ───────────────────────────── */

#admissions-cta {
  background: var(--cream-dark);
  /* padding-block set per breakpoint */
  text-align: center;
  position: relative;
  overflow: hidden;
}

#admissions-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.admissions-cta-inner {
  position: relative;
  z-index: 1;
}

.admissions-cta-badge {
  display: inline-block;
  background: rgba(201,168,76,0.12);
  border: 1px solid var(--border-gold);
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 24px;
}

.admissions-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 18px;
  max-width: 620px;
  margin-inline: auto;
}

.admissions-cta-title em {
  color: var(--primary);
  font-style: normal;
}

.admissions-cta-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: 40px;
  line-height: 1.75;
}

.admissions-cta-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── FOOTER ─────────────────────────────────────────── */

#footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding-top: 72px;
  /* Safe-area bottom inset — iPhone home bar (X, 11, 12, 13, 14, 15 series) */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 56px;
}


.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  text-decoration: none;
}

.footer-logo-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: none;
}

.footer-school-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.3;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.55);
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social-link {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  /* Added transform for subtle scale on hover */
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast), transform var(--t-fast);
  text-decoration: none;
}

.footer-social-link:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(201,168,76,0.08);
  transform: scale(1.10);
}

.footer-social-link svg {
  width: 16px;
  height: 16px;
}

.footer-col-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  /* Use transform instead of padding-left to avoid layout thrash */
  transition: color var(--t-fast), transform var(--t-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-link:hover {
  color: var(--text-white);
  transform: translateX(4px);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
}

.footer-contact-item svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact-item a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

.footer-contact-item a:hover {
  color: var(--text-white);
}

address {
  font-style: normal;
}


.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-block: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.footer-copy a {
  color: var(--gold-light);
  transition: color var(--t-fast);
}

.footer-copy a:hover {
  color: var(--gold);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  transition: color var(--t-fast);
}

.footer-bottom-links a:hover {
  color: rgba(255,255,255,0.7);
}

/* ─── FOCUS VISIBLE — canonical rule is at line 173; no redefinition needed here ─── */

/* ─── SKIP LINK — canonical rule at top of file (line 132) ─── */

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE SYSTEM — Mobile-First, 8 Breakpoints
   Built from scratch. Every breakpoint recalculates layout independently.
   NO zoom, NO transform:scale(), NO shrinking.

   Breakpoint scale:
     Base   280px+   Extra-small phones (Galaxy Fold, iPhone SE)
     sm     360px+   Standard phones (Galaxy S, Pixel, Nothing)
     md     480px+   Large phones (iPhone Plus/Pro Max, Samsung Ultra)
     lg     768px+   Small tablets (iPad Mini, Galaxy Tab) — NAV SWITCH
     xl     992px+   Large tablets (iPad Pro, Surface Go)
     2xl    1200px+  Laptop
     3xl    1440px+  Desktop
     4k     1920px+  Large Desktop / 4K
═══════════════════════════════════════════════════════════════════ */


/* ───────────────────────────────────────────────────────
   BASE STYLES — 280px and up (mobile-first foundation)
   Everything here is designed FOR small phones, not
   shrunk from desktop.
─────────────────────────────────────────────────────── */

/* ── Stat-item stagger delays (avoids inline style attributes in HTML) ── */
.stats-grid .stat-item:nth-child(2) { transition-delay: 100ms; }
.stats-grid .stat-item:nth-child(3) { transition-delay: 200ms; }
.stats-grid .stat-item:nth-child(4) { transition-delay: 300ms; }

/* ── Navbar — mobile base ── */
#navbar {
  padding: 14px var(--container-px);
}

.nav-menu,
.nav-cta {
  display: none;
}

.nav-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* Logo — mobile */
.nav-logo {
  gap: 10px;
}

.nav-logo-icon {
  width: 40px;
  height: 40px;
}

.nav-school-name {
  font-size: 0.82rem;
  max-width: 180px;
  white-space: normal;
  line-height: 1.3;
}

.nav-school-tagline {
  display: none;
}

/* ── Mobile Drawer — Full Screen ── */
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 22, 45, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 9990;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* Prevents scroll from leaking to background page on iOS/Android */
  overscroll-behavior: contain;
}

.nav-drawer.open {
  transform: translateX(0);
}

/* Drawer inner layout */
.nav-drawer-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0 var(--container-px) 40px;
}

/* Drawer header — logo + close */
.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 24px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  margin-bottom: 32px;
  flex-shrink: 0;
}

.nav-drawer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-drawer-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
}

.nav-drawer-school-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.25;
  max-width: 160px;
}

.nav-drawer-close {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-white);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background var(--t-fast), color var(--t-fast);
  flex-shrink: 0;
  line-height: 1;
}

.nav-drawer-close:hover {
  background: rgba(201, 168, 76, 0.2);
  color: var(--gold-light);
}

/* Drawer navigation links */
.nav-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-drawer .nav-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  transition: color var(--t-fast), transform var(--t-fast);
  letter-spacing: 0.02em;
}

.nav-drawer .nav-link::after {
  display: none;
}

.nav-drawer .nav-link::before {
  display: none;
}

.nav-drawer .nav-link-arrow {
  color: var(--gold);
  font-size: 1rem;
  opacity: 0.7;
}

.nav-drawer .nav-link:hover {
  color: var(--gold-light);
  /* Use transform instead of padding-left to avoid layout thrash */
  transform: translateX(6px);
}

/* Drawer CTA button */
.nav-drawer-cta-wrap {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(201, 168, 76, 0.2);
}

.nav-drawer .nav-cta {
  display: flex;
  width: 100%;
  justify-content: center;
  padding: 16px 24px;
  font-size: 0.95rem;
  /* Keep pill shape consistent with desktop CTA (50px) */
  border-radius: 50px;
  margin-top: 0;
  min-height: 56px;
}

/* Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9989;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med);
}

.nav-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Hero Section — mobile ── */
#hero {
  height: 100vh;   /* fallback for browsers without svh support (Safari <15.5, FF <101) */
  height: 100svh;  /* svh excludes mobile browser chrome; preferred on modern browsers */
  min-height: 580px;
  align-items: flex-end;
}

.hero-overlay {
  background:
    linear-gradient(to top, rgba(5, 15, 35, 0.92) 0%, rgba(5, 15, 35, 0.65) 40%, rgba(5, 15, 35, 0.25) 100%);
}

.hero-content {
  padding-inline: var(--container-px);
  padding-bottom: clamp(80px, 14vw, 100px);
  width: 100%;
}

.hero-inner {
  max-width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  margin-bottom: 14px;
  justify-content: center;
}

.hero-label::before {
  width: 20px;
}

.hero-headline {
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: clamp(0.88rem, 3.5vw, 1rem);
  margin-bottom: 28px;
  max-width: 100%;
  text-align: center;
  line-height: 1.7;
}

/* Buttons — stacked, full width, large touch targets */
.hero-ctas {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 360px;
  gap: 12px;
}

.hero-ctas .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 14px 20px;
  font-size: 0.9rem;
}

/* Slide indicators — centered, larger tap area */
.hero-indicators {
  bottom: clamp(30px, 6vw, 44px);
  left: 50%;
  transform: translateX(-50%);
  gap: 8px;
}

.hero-dot {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  /* Invisible tap target padding */
  padding-block: 8px;
  background-clip: content-box;
}

.hero-dot.active {
  width: 36px;
  background: var(--gold);
  background-clip: content-box;
}

/* Scroll hint — hidden on mobile (swipe replaces it) */
.hero-scroll-hint {
  display: none;
}

/* ── Stats — 2×2 grid on mobile ── */
.stats-grid {
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.stat-item {
  padding: 24px 16px;
}

.stat-item:not(:last-child)::after {
  display: none;
}

.stat-item:nth-child(odd) {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-item:nth-child(1),
.stat-item:nth-child(2) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-number {
  font-size: clamp(2rem, 9vw, 2.8rem);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

/* ── Section header — mobile ── */
.section-header {
  margin-bottom: 40px;
}

.section-title {
  font-size: clamp(1.7rem, 6vw, 2.2rem);
}

.section-subtitle {
  font-size: 0.92rem;
  max-width: 100%;
}

/* ── Why Choose — 1 column ── */
.why-grid {
  grid-template-columns: 1fr;
  gap: 20px;
}

.why-card {
  padding: 28px 22px;
}

.why-card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
}

.why-card-icon svg {
  width: 24px;
  height: 24px;
}

.why-card-title {
  font-size: 1.1rem;
}

.why-card-desc {
  font-size: 0.88rem;
}

/* ── Vision — stacked ── */
.vision-grid {
  grid-template-columns: 1fr;
  gap: 36px;
}

.vision-image-wrap img {
  height: clamp(240px, 60vw, 320px);
  object-fit: cover;
  object-position: center 30%;
}

.vision-block {
  margin-bottom: 28px;
}

.vision-block-title {
  font-size: 1.25rem;
}

.vision-block-text {
  font-size: 0.92rem;
}

/* ── Principal — stacked, centered ── */
.principal-inner {
  grid-template-columns: 1fr;
  gap: 32px;
  text-align: center;
}

.principal-portrait {
  display: flex;
  justify-content: center;
}

/* ── Admissions CTA — mobile ── */
#admissions-cta {
  padding-block: clamp(48px, 10vw, 64px);
}

.admissions-cta-title {
  font-size: clamp(1.65rem, 6.5vw, 2.2rem);
  max-width: 100%;
}

.admissions-cta-sub {
  font-size: 0.92rem;
  max-width: 100%;
  margin-bottom: 28px;
}

.admissions-cta-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  max-width: 360px;
  margin-inline: auto;
}

.admissions-cta-actions .btn {
  width: 100%;
  justify-content: center;
  min-height: 52px;
}

/* ── Footer — 1 column ── */
.footer-grid {
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 40px;
}

.footer-bottom {
  flex-direction: column;
  text-align: center;
  gap: 12px;
  padding-block: 20px;
}

.footer-bottom-links {
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Intro Overlay — mobile ── */

/* Logo wrap proportional */
.intro-logo-wrap {
  width: min(250px, 68vw);
  height: min(250px, 68vw);
}

.intro-candles-wrap {
  width: 82%;
  height: 68%;
  transform: translateY(-2%);
}

/* Remove upward offset — center properly on mobile */
.intro-center-stage {
  transform: none;
  padding: 0 var(--container-px);
  width: 100%;
}

/* Motto — Urdu text */
.intro-motto {
  font-size: clamp(1.1rem, 5vw, 1.5rem);
  margin-top: 24px;
  max-width: 90vw;
  line-height: 1.6;
}

/* Divider — proportional */
.intro-divider {
  width: min(240px, 80vw);
  margin: 12px 0 10px;
}

/* English line */
.intro-instruction {
  font-size: clamp(0.82rem, 3vw, 1rem);
  max-width: min(480px, 90vw);
  line-height: 1.65;
}

/* Mouse indicator — hidden on phones, replaced by swipe hint */
.intro-scroll-block {
  margin-top: 28px;
}

.intro-mouse-indicator {
  display: none;
}

/* Swipe indicator — phones only */
.intro-swipe-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
  animation: swipe-pulse 2.5s ease-in-out infinite;
}

.intro-swipe-hint-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.intro-swipe-hint-text {
  font-size: 0.62rem;
  font-family: var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.7);
}

@keyframes swipe-pulse {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50%       { opacity: 0.8; transform: translateY(4px); }
}

/* ── Section padding — mobile ── */
.section-py {
  padding-block: var(--section-py);
}

#stats {
  padding-block: clamp(40px, 8vw, 56px);
}


/* ───────────────────────────────────────────────────────
   SM — 360px and up (Standard phones)
   Galaxy S series, Pixel, OnePlus, Nothing Phone
─────────────────────────────────────────────────────── */

@media (min-width: 360px) {
  :root {
    --container-px: 18px;
  }

  .nav-logo-icon {
    width: 42px;
    height: 42px;
  }

  .nav-school-name {
    font-size: 0.86rem;
  }

  .hero-headline {
    font-size: clamp(2rem, 7.5vw, 2.6rem);
  }

  .hero-ctas {
    max-width: 380px;
  }

  .hero-ctas .btn {
    font-size: 0.92rem;
  }

  .intro-motto {
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);
  }

  .intro-logo-wrap {
    width: min(210px, 50vw);
    height: min(210px, 50vw);
  }

  .intro-candles-wrap {
    width: 82%;
    height: 68%;
    transform: translateY(-2%);
  }

  .stat-number {
    font-size: clamp(2.1rem, 8vw, 2.8rem);
  }
}


/* ───────────────────────────────────────────────────────
   MD — 480px and up (Large phones)
   iPhone Plus, iPhone Pro Max, Samsung Ultra
─────────────────────────────────────────────────────── */

@media (min-width: 480px) {
  :root {
    --container-px: 22px;
    --section-py: clamp(50px, 9vw, 72px);
  }

  /* Nav */
  .nav-logo-icon {
    width: 44px;
    height: 44px;
  }

  .nav-school-name {
    font-size: 0.9rem;
  }

  .nav-school-tagline {
    display: block;
    font-size: 0.58rem;
  }

  /* Hero — still centered but more breathing room */
  .hero-content {
    padding-bottom: clamp(90px, 15vw, 110px);
  }

  .hero-headline {
    font-size: clamp(2.2rem, 6.5vw, 2.9rem);
    margin-bottom: 16px;
  }

  .hero-sub {
    font-size: clamp(0.92rem, 2.8vw, 1.05rem);
    max-width: 440px;
  }

  .hero-ctas {
    max-width: 400px;
    gap: 14px;
  }

  .hero-ctas .btn {
    min-height: 54px;
    font-size: 0.95rem;
  }

  .hero-indicators {
    gap: 10px;
  }

  /* Stats — still 2×2 but more padding */
  .stat-item {
    padding: 28px 20px;
  }

  .stat-number {
    font-size: clamp(2.2rem, 7vw, 3rem);
  }

  /* Why grid — 2 column on large phones */
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  /* Intro */
  .intro-logo-wrap {
    width: min(270px, 62vw);
    height: min(270px, 62vw);
  }

  .intro-candles-wrap {
    width: 82%;
    height: 68%;
    transform: translateY(-2%);
  }

  .intro-motto {
    font-size: clamp(1.25rem, 3.8vw, 1.6rem);
    margin-top: 28px;
  }

  .intro-instruction {
    font-size: clamp(0.88rem, 2.4vw, 1.05rem);
  }

  /* Vision image */
  .vision-image-wrap img {
    height: clamp(280px, 55vw, 380px);
  }

  /* Principal */
  .principal-avatar {
    width: 175px;
    height: 175px;
  }

  /* Admissions */
  .admissions-cta-actions {
    max-width: 400px;
  }

  /* Section header */
  .section-header {
    margin-bottom: 48px;
  }

  .section-title {
    font-size: clamp(1.85rem, 5.5vw, 2.4rem);
  }
}


/* ───────────────────────────────────────────────────────
   LG — 768px and up (Small tablets)
   iPad Mini, Galaxy Tab, Surface Duo
   KEY TRANSITION: Desktop nav replaces hamburger
─────────────────────────────────────────────────────── */

@media (min-width: 768px) {
  :root {
    --container-px: 32px;
    --section-py: clamp(64px, 9vw, 88px);
    --section-py-sm: clamp(44px, 6vw, 60px);
  }

  /* ── Navbar — desktop nav returns ── */
  .nav-menu {
    display: flex;
    gap: 4px;
  }

  .nav-cta {
    display: inline-flex;
  }

  .nav-hamburger {
    display: none;
  }

  .nav-school-tagline {
    display: block;
    font-size: 0.62rem;
  }

  .nav-school-name {
    font-size: 0.9rem;
  }

  .nav-logo-icon {
    width: 44px;
    height: 44px;
  }

  #navbar {
    padding: 18px var(--container-px);
  }

  /* ── Hero — tablet: left-aligned, premium ── */
  #hero {
    align-items: center;
  }

  .hero-overlay {
    background:
      linear-gradient(to right, rgba(5, 15, 35, 0.80) 0%, rgba(5, 15, 35, 0.45) 55%, transparent 100%),
      linear-gradient(to top, rgba(5, 15, 35, 0.60) 0%, transparent 55%);
  }

  .hero-content {
    padding-bottom: 0;
    padding-inline: var(--container-px);
  }

  .hero-inner {
    max-width: 600px;
    text-align: left;
    align-items: flex-start;
  }

  .hero-label {
    font-size: 0.72rem;
    justify-content: flex-start;
    margin-bottom: 18px;
  }

  .hero-label::before {
    width: 28px;
  }

  .hero-headline {
    font-size: clamp(2.4rem, 5.2vw, 3.4rem);
    margin-bottom: 18px;
    line-height: 1.12;
  }

  .hero-sub {
    font-size: clamp(0.98rem, 2.2vw, 1.1rem);
    margin-bottom: 32px;
    max-width: 480px;
    text-align: left;
  }

  /* Buttons — horizontal again */
  .hero-ctas {
    flex-direction: row;
    align-items: center;
    width: auto;
    max-width: 100%;
    gap: 14px;
  }

  .hero-ctas .btn {
    width: auto;
    min-height: 48px;
    padding: 13px 28px;
  }

  /* Scroll hint — visible on tablet+ */
  .hero-scroll-hint {
    display: flex;
    right: var(--container-px);
    bottom: 36px;
  }

  /* Stats — 4 column */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
  }

  .stat-item {
    padding: 32px 20px;
  }

  .stat-item:not(:last-child)::after {
    display: block;
  }

  .stat-item:nth-child(odd) {
    border-right: none;
  }

  .stat-item:nth-child(1),
  .stat-item:nth-child(2) {
    border-bottom: none;
  }

  .stat-number {
    font-size: clamp(2.4rem, 4.5vw, 3.2rem);
    margin-bottom: 10px;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  /* Section header */
  .section-header {
    margin-bottom: 56px;
  }

  .section-title {
    font-size: clamp(2rem, 4.2vw, 2.8rem);
  }

  .section-subtitle {
    font-size: 1rem;
    max-width: 520px;
  }

  /* Why grid — 2 columns */
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .why-card {
    padding: 34px 28px;
  }

  /* Vision — still stacked but better */
  .vision-image-wrap img {
    height: clamp(320px, 45vw, 440px);
  }

  .vision-block {
    margin-bottom: 36px;
  }

  .vision-block-title {
    font-size: 1.35rem;
  }

  /* Principal */
  .principal-inner {
    grid-template-columns: auto 1fr;
    gap: 48px;
    text-align: left;
  }

  .principal-portrait {
    display: block;
  }

  .principal-avatar {
    width: 180px;
    height: 180px;
  }

  .principal-quote {
    font-size: clamp(1.1rem, 2.5vw, 1.45rem);
    padding-left: 24px;
    border-left-width: 3px;
  }

  /* Admissions */
  .admissions-cta-actions {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    max-width: 100%;
  }

  .admissions-cta-actions .btn {
    width: auto;
    min-height: 50px;
  }

  .admissions-cta-title {
    font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  }

  /* Footer — 2 column */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 40px;
    padding-bottom: 48px;
  }

  .footer-bottom {
    flex-direction: row;
    text-align: left;
  }

  /* Intro — tablet */
  .intro-logo-wrap {
    width: min(290px, 40vw);
    height: min(290px, 40vw);
  }

  .intro-candles-wrap {
    width: 82%;
    height: 68%;
    transform: translateY(-2%);
  }

  .intro-center-stage {
    transform: translateY(-2vh);
    padding: 0;
  }

  .intro-motto {
    font-size: clamp(1.3rem, 2.8vw, 1.8rem);
    margin-top: 28px;
  }

  .intro-instruction {
    font-size: clamp(0.95rem, 1.8vw, 1.25rem);
    max-width: 460px;
  }

  .intro-divider {
    width: 240px;
    margin: 14px 0 12px;
  }

  /* Mouse indicator returns on tablet */
  .intro-mouse-indicator {
    display: inline-block;
  }

  .intro-swipe-hint {
    display: none;
  }

  .intro-scroll-block {
    margin-top: 36px;
  }
}


/* ───────────────────────────────────────────────────────
   XL — 992px and up (Large tablets)
   iPad Pro, Surface Go, large Android tablets
─────────────────────────────────────────────────────── */

@media (min-width: 992px) {
  :root {
    --container-px: 40px;
    --section-py: clamp(72px, 9vw, 96px);
  }

  .nav-logo-icon {
    width: 46px;
    height: 46px;
  }

  .nav-school-name {
    font-size: 0.95rem;
  }

  #navbar {
    padding: 20px var(--container-px);
  }

  /* Hero */
  .hero-inner {
    max-width: 640px;
  }

  .hero-headline {
    font-size: clamp(2.8rem, 4.8vw, 3.8rem);
    margin-bottom: 20px;
  }

  .hero-sub {
    font-size: clamp(1rem, 2vw, 1.12rem);
    margin-bottom: 36px;
    max-width: 520px;
  }

  .hero-ctas .btn {
    padding: 14px 30px;
  }

  /* Stats */
  .stat-item {
    padding: 36px 24px;
  }

  .stat-number {
    font-size: clamp(2.6rem, 4vw, 3.4rem);
  }

  /* Section header */
  .section-header {
    margin-bottom: 60px;
  }

  .section-title {
    font-size: clamp(2.2rem, 3.8vw, 2.9rem);
  }

  .section-subtitle {
    font-size: 1.02rem;
  }

  /* Why grid — 3 columns */
  .why-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
  }

  .why-card {
    padding: 38px 30px;
  }

  /* Vision — 2 columns */
  .vision-grid {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
  }

  .vision-image-wrap img {
    height: 480px;
    object-position: center;
  }

  .vision-block {
    margin-bottom: 38px;
  }

  .vision-block-title {
    font-size: 1.4rem;
  }

  /* Principal */
  .principal-inner {
    gap: 56px;
  }

  .principal-avatar {
    width: 190px;
    height: 190px;
  }

  .principal-quote {
    font-size: clamp(1.15rem, 2.3vw, 1.6rem);
  }

  /* Admissions */
  .admissions-cta-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
  }

  /* Footer — 3 column */
  .footer-grid {
    grid-template-columns: 2fr 1fr 1.4fr;
    gap: 48px;
  }

  /* Intro */
  .intro-logo-wrap {
    width: min(305px, 36vw);
    height: min(305px, 36vw);
  }

  .intro-candles-wrap {
    width: 82%;
    height: 68%;
    transform: translateY(-2%);
  }

  .intro-motto {
    font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  }

  .intro-instruction {
    font-size: clamp(1rem, 1.6vw, 1.32rem);
  }
}


/* ───────────────────────────────────────────────────────
   2XL — 1200px and up (Laptop)
─────────────────────────────────────────────────────── */

@media (min-width: 1200px) {
  :root {
    --container-px: 48px;
    --section-py: clamp(80px, 9vw, 100px);
  }

  /* Navbar */
  .nav-menu {
    gap: 6px;
  }

  .nav-link {
    font-size: 0.85rem;
    padding: 6px 12px;
  }

  #navbar {
    padding: 20px var(--container-px);
  }

  /* Hero */
  .hero-inner {
    max-width: 680px;
  }

  .hero-headline {
    font-size: clamp(3.2rem, 4.5vw, 4.2rem);
    margin-bottom: 22px;
  }

  .hero-sub {
    font-size: clamp(1.02rem, 1.8vw, 1.15rem);
    margin-bottom: 38px;
  }

  /* Stats */
  .stat-item {
    padding: 40px 24px;
  }

  .stat-number {
    font-size: clamp(2.8rem, 3.8vw, 3.5rem);
  }

  /* Section header */
  .section-header {
    margin-bottom: 64px;
  }

  .section-title {
    font-size: clamp(2.3rem, 3.5vw, 3rem);
  }

  /* Why card */
  .why-card {
    padding: 40px 32px;
  }

  .why-card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 24px;
  }

  .why-card-icon svg {
    width: 28px;
    height: 28px;
  }

  .why-card-title {
    font-size: 1.2rem;
  }

  /* Vision */
  .vision-grid {
    gap: 72px;
  }

  .vision-image-wrap img {
    height: 520px;
  }

  .vision-block {
    margin-bottom: 42px;
  }

  .vision-block-title {
    font-size: 1.5rem;
  }

  /* Principal */
  .principal-inner {
    gap: 64px;
  }

  .principal-avatar {
    width: 200px;
    height: 200px;
  }

  .principal-avatar-svg {
    width: 120px;
    height: 120px;
  }

  /* Admissions */
  .admissions-cta-actions {
    gap: 16px;
  }

  /* Footer — 3 column */
  .footer-grid {
    grid-template-columns: 2fr 1fr 1.4fr;
    gap: 48px;
    padding-bottom: 56px;
  }

  /* Intro */
  .intro-logo-wrap {
    width: min(315px, 30vw);
    height: min(315px, 30vw);
  }

  .intro-candles-wrap {
    width: 82%;
    height: 68%;
    transform: translateY(-2%);
  }

  .intro-motto {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    margin-top: 28px;
  }

  .intro-instruction {
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    max-width: 480px;
  }

  .intro-scroll-block {
    margin-top: 36px;
  }
}


/* ───────────────────────────────────────────────────────
   3XL — 1440px and up (Desktop)
─────────────────────────────────────────────────────── */

@media (min-width: 1440px) {
  :root {
    --container-px: 60px;
    --section-py: clamp(88px, 8vw, 110px);
  }

  #navbar {
    padding: 22px var(--container-px);
  }

  .nav-logo-icon {
    width: 48px;
    height: 48px;
  }

  .nav-school-name {
    font-size: 1rem;
  }

  .nav-school-tagline {
    font-size: 0.66rem;
  }

  .nav-link {
    font-size: 0.88rem;
  }

  .nav-cta {
    padding: 11px 24px;
    font-size: 0.84rem;
  }

  /* Hero */
  .hero-headline {
    font-size: clamp(3.8rem, 4.2vw, 4.6rem);
    margin-bottom: 24px;
  }

  .hero-sub {
    font-size: 1.15rem;
    margin-bottom: 42px;
    max-width: 540px;
  }

  .hero-ctas {
    gap: 16px;
  }

  .hero-ctas .btn {
    min-height: 50px;
    padding: 14px 34px;
  }

  .hero-indicators {
    bottom: 40px;
    gap: 12px;
  }

  .hero-dot {
    width: 32px;
    height: 3px;
  }

  .hero-dot.active {
    width: 52px;
  }

  /* Stats */
  .stat-item {
    padding: 44px 28px;
  }

  .stat-number {
    font-size: clamp(3rem, 3.5vw, 3.8rem);
  }

  /* Section */
  .section-header {
    margin-bottom: 72px;
  }

  .section-title {
    font-size: clamp(2.4rem, 3.2vw, 3.2rem);
  }

  /* Why */
  .why-grid {
    gap: 28px;
  }

  /* Vision */
  .vision-grid {
    gap: 80px;
  }

  .vision-image-wrap img {
    height: 540px;
  }

  /* Principal */
  .principal-inner {
    gap: 72px;
  }

  /* Intro */
  .intro-logo-wrap {
    width: 325px;
    height: 325px;
  }

  .intro-candles-wrap {
    width: 82%;
    height: 68%;
    transform: translateY(-2%);
  }

  .intro-motto {
    font-size: clamp(1.55rem, 2vw, 2.05rem);
    margin-top: 30px;
  }

  .intro-instruction {
    font-size: clamp(1.1rem, 1.4vw, 1.38rem);
    max-width: 480px;
  }

  .intro-center-stage {
    transform: translateY(-2vh);
  }
}


/* ───────────────────────────────────────────────────────
   4K — 1920px and up (Large Desktop / 4K)
─────────────────────────────────────────────────────── */

@media (min-width: 1920px) {
  :root {
    --section-py: clamp(100px, 7vw, 130px);
    --section-py-sm: clamp(70px, 5vw, 90px);
    --container-max: 1400px;
    --container-px: 72px;
  }

  .nav-logo-icon {
    width: 52px;
    height: 52px;
  }

  .nav-school-name {
    font-size: 1.05rem;
  }

  .nav-link {
    font-size: 0.92rem;
    padding: 8px 14px;
  }

  .nav-cta {
    padding: 12px 28px;
    font-size: 0.88rem;
  }

  /* Hero */
  .hero-inner {
    max-width: 780px;
  }

  .hero-headline {
    font-size: clamp(4.2rem, 3.8vw, 5.2rem);
    margin-bottom: 26px;
  }

  .hero-sub {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 48px;
  }

  /* Stats */
  .stat-item {
    padding: 52px 36px;
  }

  .stat-number {
    font-size: clamp(3.5rem, 3.2vw, 4.2rem);
  }

  /* Intro */
  .intro-logo-wrap {
    width: 340px;
    height: 340px;
  }

  .intro-candles-wrap {
    width: 82%;
    height: 68%;
    transform: translateY(-2%);
  }

  .intro-motto {
    font-size: 2.2rem;
    margin-top: 36px;
  }

  .intro-instruction {
    font-size: 1.45rem;
    max-width: 540px;
  }
}


/* ───────────────────────────────────────────────────────
   LANDSCAPE — Short screens in landscape orientation
   Handles phones rotated sideways
─────────────────────────────────────────────────────── */

@media (max-height: 560px) and (orientation: landscape) {
  /* Intro — compact for landscape phones */
  .intro-logo-wrap {
    width: min(150px, 30vh);
    height: min(150px, 30vh);
  }

  .intro-candles-wrap {
    width: 82%;
    height: 68%;
    transform: translateY(-2%);
  }

  .intro-center-stage {
    transform: none;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    padding: 0 32px;
    justify-content: center;
  }

  .intro-text-group {
    align-items: flex-start;
    text-align: left;
    gap: 6px;
  }

  .intro-motto {
    font-size: clamp(0.9rem, 2.5vh, 1.2rem);
    margin-top: 0;
    text-align: right;
    direction: rtl;
  }

  .intro-divider {
    width: min(200px, 30vw);
    margin: 8px 0;
  }

  .intro-instruction {
    font-size: clamp(0.78rem, 2vh, 0.95rem);
    max-width: 36vw;
  }

  .intro-scroll-block {
    margin-top: 10px;
  }

  .intro-swipe-hint {
    display: none;
  }

  .intro-mouse-indicator {
    display: inline-block;
    width: 16px;
    height: 26px;
  }

  /* Hero — landscape phone */
  #hero {
    min-height: 100vh;   /* svh fallback */
    min-height: 100svh;
  }

  .hero-content {
    padding-bottom: 0;
    padding-inline: 24px;
  }

  .hero-inner {
    max-width: 55%;
    text-align: left;
    align-items: flex-start;
  }

  .hero-headline {
    font-size: clamp(1.6rem, 5vh, 2.4rem);
    margin-bottom: 10px;
  }

  .hero-sub {
    font-size: clamp(0.8rem, 2.2vh, 0.95rem);
    margin-bottom: 18px;
    max-width: 100%;
    text-align: left;
  }

  .hero-ctas {
    flex-direction: row;
    width: auto;
    max-width: 100%;
  }

  .hero-ctas .btn {
    width: auto;
    min-height: 44px;
    padding: 10px 20px;
    font-size: 0.82rem;
  }

  .hero-indicators {
    bottom: 14px;
  }
}


/* ───────────────────────────────────────────────────────
   REDUCED MOTION — Accessibility override
─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .intro-candles-svg .flame-g {
    animation: none !important;
  }

  .hero-slide img {
    animation: none !important;
  }

  .intro-swipe-hint {
    animation: none !important;
    opacity: 0.5;
  }
}


