/* ==========================================================================
   Young Scholars School — High-Impact Cinematic Motion System
   Includes: Opening Splash Curtain, Hero Interactive Canvas & Floating Badges,
   Kinetic Scroll Watermarks, Conic Glowing Borders, 3D Card Depth,
   Sliding Gallery Filter Pill, Clip-Path Reveals, Timeline Draw & Radar Sweep.
   ========================================================================== */

@property --border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

body {
  overflow-x: clip;
}

.section,
.hero,
.site-footer {
  overflow-x: clip;
  position: relative;
}

/* --------------------------------------------------------------------------
   1. Opening Brand Splash Curtain (Fast ~0.9s Cinematic Intro)
   -------------------------------------------------------------------------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 50% 42%, #0a6835 0%, #052e18 65%, #031d0f 100%);
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform 0.72s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.55s ease, visibility 0.72s ease;
}

.preloader.is-done {
  transform: translateY(-105%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
  padding: 1.5rem;
}

.preloader__crest-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  animation: preloaderPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.preloader__ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--gold-400);
  border-right-color: var(--gold-400);
  animation: preloaderSpin 1.1s linear infinite;
}

.preloader__crest {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  box-shadow: 0 0 36px rgba(231, 181, 90, 0.42);
}

.preloader__title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.preloader__motto {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.preloader__bar {
  width: 200px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  margin-top: 0.25rem;
}

.preloader__bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gold-400), #fff, var(--gold-400));
  transform-origin: left;
  animation: preloaderFill 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes preloaderPop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes preloaderSpin {
  to { transform: rotate(360deg); }
}

@keyframes preloaderFill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* --------------------------------------------------------------------------
   2. Top Scroll Progress Bar & Cursor Ambient Glow
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 1200;
  pointer-events: none;
}

.scroll-progress__bar {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--green-600) 0%, var(--gold-400) 50%, var(--crimson-600) 100%);
  box-shadow: 0 0 14px rgba(231, 181, 90, 0.7);
  transition: transform 0.08s linear;
}

.cursor-aura {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 900;
  top: 0;
  left: 0;
  opacity: 0;
  background: radial-gradient(circle, rgba(17, 148, 76, 0.12) 0%, rgba(231, 181, 90, 0.06) 40%, transparent 72%);
  transform: translate3d(-999px, -999px, 0);
  transition: opacity 0.35s ease;
  mix-blend-mode: multiply;
}

body.has-cursor-aura .cursor-aura {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   3. Navbar Sliding Underline & Mobile Drawer Choreography
   -------------------------------------------------------------------------- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.68rem;
  right: 0.68rem;
  bottom: 0.22rem;
  height: 2.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green-700), var(--gold-500));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.brand__logo {
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.brand:hover .brand__logo {
  transform: scale(1.1) rotate(12deg);
  filter: drop-shadow(0 6px 14px rgba(11, 122, 62, 0.35));
}

.nav-mobile.is-open .nav-mobile__panel {
  animation: drawerDrop 0.36s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.nav-mobile.is-open .nav-mobile__link {
  animation: drawerItemIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.nav-mobile.is-open .nav-mobile__link:nth-child(1) { animation-delay: 45ms; }
.nav-mobile.is-open .nav-mobile__link:nth-child(2) { animation-delay: 85ms; }
.nav-mobile.is-open .nav-mobile__link:nth-child(3) { animation-delay: 125ms; }
.nav-mobile.is-open .nav-mobile__link:nth-child(4) { animation-delay: 165ms; }
.nav-mobile.is-open .nav-mobile__link:nth-child(5) { animation-delay: 205ms; }
.nav-mobile.is-open .nav-mobile__link:nth-child(6) { animation-delay: 245ms; }
.nav-mobile.is-open .nav-mobile__link:nth-child(7) { animation-delay: 285ms; }

@keyframes drawerDrop {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drawerItemIn {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --------------------------------------------------------------------------
   4. Magnetic Glowing Buttons & Sheen Sweeps
   -------------------------------------------------------------------------- */
.btn--primary,
.btn--gold,
.btn--outline {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn--primary::after,
.btn--gold::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -80%;
  width: 55%;
  height: 200%;
  background: linear-gradient(110deg, transparent 15%, rgba(255, 255, 255, 0.48) 50%, transparent 85%);
  transform: skewX(-24deg);
  pointer-events: none;
  z-index: 1;
  transition: left 0.65s ease;
}

.btn--primary:hover::after,
.btn--gold:hover::after {
  left: 140%;
}

.hero__cta .btn--primary::after {
  animation: autoGlint 4.2s ease-in-out infinite 1s;
}

.hero__cta .btn--gold::after {
  animation: autoGlint 4.2s ease-in-out infinite 2.4s;
}

@keyframes autoGlint {
  0%, 66% { left: -80%; }
  92%, 100% { left: 140%; }
}

/* --------------------------------------------------------------------------
   5. Hero Interactive Particle Canvas, Aurora Mesh & Floating Elements
   -------------------------------------------------------------------------- */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.ambient-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hero > .container,
.section--emerald > .container,
.section > .container {
  position: relative;
  z-index: 1;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  will-change: transform;
}

.ambient-orb--emerald {
  width: 380px;
  height: 380px;
  top: -90px;
  right: 6%;
  background: radial-gradient(circle, rgba(17, 148, 76, 0.22) 0%, transparent 70%);
  animation: orbFloatA 12s ease-in-out infinite alternate;
}

.ambient-orb--gold {
  width: 300px;
  height: 300px;
  bottom: 2%;
  left: -5%;
  background: radial-gradient(circle, rgba(209, 147, 46, 0.20) 0%, transparent 72%);
  animation: orbFloatB 14s ease-in-out infinite alternate;
}

.ambient-star {
  position: absolute;
  color: rgba(11, 122, 62, 0.11);
  animation: starSpinDrift 22s linear infinite;
}

.ambient-star--hero-1 {
  width: 155px;
  height: 155px;
  top: 8%;
  left: 43%;
}

.ambient-star--hero-2 {
  width: 105px;
  height: 105px;
  bottom: 20%;
  right: 2%;
  color: rgba(209, 147, 46, 0.18);
  animation-duration: 18s;
  animation-direction: reverse;
}

/* Aurora Waves inside Dark Emerald Islamic Section */
.emerald-aurora {
  position: absolute;
  inset: -30% -20%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(231, 181, 90, 0.16) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(17, 148, 76, 0.28) 0%, transparent 52%),
    radial-gradient(ellipse at 50% 10%, rgba(255, 255, 255, 0.08) 0%, transparent 45%);
  animation: auroraDrift 14s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes auroraDrift {
  0% { transform: translate3d(-2%, -2%, 0) scale(1); }
  50% { transform: translate3d(2%, 3%, 0) scale(1.06); }
  100% { transform: translate3d(-1%, 1%, 0) scale(1.02); }
}

.section--emerald .ambient-star--emerald-1 {
  width: 240px;
  height: 240px;
  top: -40px;
  left: -40px;
  color: rgba(231, 181, 90, 0.11);
  animation: starSpinDrift 28s linear infinite;
}

.section--emerald .ambient-star--emerald-2 {
  width: 200px;
  height: 200px;
  bottom: -40px;
  right: 3%;
  color: rgba(255, 255, 255, 0.08);
  animation: starSpinDrift 24s linear infinite reverse;
}

@keyframes orbFloatA {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-45px, 36px) scale(1.14); }
}

@keyframes orbFloatB {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(45px, -32px) scale(1.12); }
}

@keyframes starSpinDrift {
  0% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(180deg) translateY(-14px); }
  100% { transform: rotate(360deg) translateY(0); }
}

/* --------------------------------------------------------------------------
   6. Hero Entrance, Kinetic Text Shimmer, Ken Burns & Orbiting Pills
   -------------------------------------------------------------------------- */
.hero__arabic {
  animation: heroSlideUp 0.78s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero__iqra {
  animation: iqraGlowPulse 2.6s ease-in-out infinite;
}

.hero__title {
  animation: heroSlideUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.1s backwards;
}

.hero__title span {
  position: relative;
  display: inline-block;
  background: linear-gradient(95deg, var(--green-800) 0%, var(--green-600) 35%, var(--gold-500) 52%, var(--crimson-600) 68%, var(--green-800) 100%);
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: textShimmer 4.5s linear infinite;
}

.hero__subtitle {
  animation: heroSlideUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.2s backwards;
}

.hero__cta {
  animation: heroSlideUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.3s backwards;
}

.hero__trust {
  animation: heroSlideUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.42s backwards;
}

.hero__visual {
  animation: heroVisualZoom 1s cubic-bezier(0.22, 1, 0.36, 1) 0.18s backwards;
}

.hero__frame {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.hero__frame:hover {
  box-shadow: 0 28px 64px rgba(6, 78, 39, 0.24);
}

.hero__frame img {
  animation: kenBurnsDrift 16s ease-in-out infinite alternate;
}

/* Orbiting Floating Badges around Hero Frame */
.hero__orbit-pill {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(11, 122, 62, 0.2);
  box-shadow: 0 10px 24px rgba(5, 46, 24, 0.16);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-950);
  pointer-events: none;
}

.hero__orbit-pill--top {
  top: 16px;
  left: -18px;
  animation: floatPillA 3.8s ease-in-out infinite;
}

.hero__orbit-pill--mid {
  top: 44%;
  right: -18px;
  background: rgba(6, 78, 39, 0.94);
  color: var(--gold-400);
  border-color: rgba(231, 181, 90, 0.45);
  animation: floatPillB 4.4s ease-in-out infinite;
}

@keyframes floatPillA {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-9px) rotate(1deg); }
}

@keyframes floatPillB {
  0%, 100% { transform: translateY(0) rotate(1deg); }
  50% { transform: translateY(9px) rotate(-1deg); }
}

.hero__floating-crest {
  animation: floatCrest 4s ease-in-out infinite;
}

.hero__floating-crest::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2.5px dashed rgba(209, 147, 46, 0.65);
  animation: slowRotateRing 14s linear infinite;
  pointer-events: none;
}

.hero__floating-crest::after {
  content: "";
  position: absolute;
  inset: -13px;
  border-radius: 50%;
  border: 1.5px solid rgba(17, 148, 76, 0.25);
  animation: slowRotateRing 22s linear infinite reverse;
  pointer-events: none;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-600);
  margin-right: 5px;
  box-shadow: 0 0 0 0 rgba(17, 148, 76, 0.7);
  animation: livePulse 1.8s infinite;
}

@keyframes heroSlideUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroVisualZoom {
  from { opacity: 0; transform: translateY(28px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes kenBurnsDrift {
  0% { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.09) translate3d(-1.8%, -1.2%, 0); }
}

@keyframes floatCrest {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-11px); }
}

@keyframes slowRotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes iqraGlowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185, 56, 41, 0.28); transform: scale(1); }
  50% { box-shadow: 0 0 0 9px rgba(185, 56, 41, 0); transform: scale(1.04); }
}

@keyframes textShimmer {
  0% { background-position: 0% center; }
  100% { background-position: 240% center; }
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(17, 148, 76, 0.75); }
  70% { box-shadow: 0 0 0 10px rgba(17, 148, 76, 0); }
  100% { box-shadow: 0 0 0 0 rgba(17, 148, 76, 0); }
}

/* --------------------------------------------------------------------------
   7. Kinetic Horizontal Scroll Watermarks
   -------------------------------------------------------------------------- */
.kinetic-watermark {
  position: absolute;
  top: 1.5rem;
  left: -8%;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8.5vw, 7.2rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(6, 78, 39, 0.036);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  will-change: transform;
  transform: translate3d(var(--kx, 0px), 0, 0);
  transition: transform 0.1s linear;
}

.section--emerald .kinetic-watermark {
  color: rgba(255, 255, 255, 0.035);
}

/* --------------------------------------------------------------------------
   8. Infinite Marquee Ticker & Rotating Animated Conic Borders
   -------------------------------------------------------------------------- */
.values-marquee {
  background: linear-gradient(90deg, var(--green-950) 0%, var(--green-900) 50%, var(--green-950) 100%);
  color: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(231, 181, 90, 0.3);
  border-bottom: 1px solid rgba(231, 181, 90, 0.3);
  padding: 0.9rem 0;
  overflow: hidden;
  position: relative;
}

.values-marquee__track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  animation: marqueeRun 30s linear infinite;
}

.values-marquee:hover .values-marquee__track {
  animation-play-state: paused;
}

.values-marquee__group {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-shrink: 0;
}

.values-marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.values-marquee__star {
  color: var(--gold-400);
  display: inline-block;
  animation: twinkleStar 2.6s ease-in-out infinite;
}

@keyframes marqueeRun {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes twinkleStar {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.85; }
  50% { transform: scale(1.25) rotate(25deg); opacity: 1; }
}

/* Conic Spinning Glowing Border on Featured Cards (padding-box + border-box) */
.program-card.glow-border {
  border: 2.5px solid transparent !important;
  background:
    linear-gradient(var(--surface-white), var(--surface-white)) padding-box,
    conic-gradient(
      from var(--border-angle),
      var(--green-700) 0deg,
      var(--gold-400) 90deg,
      var(--crimson-600) 180deg,
      var(--gold-400) 270deg,
      var(--green-700) 360deg
    ) border-box;
  animation: spinConicBorder 4.5s linear infinite;
}

.admissions-panel.glow-border {
  border: 2.5px solid transparent !important;
  background:
    linear-gradient(155deg, var(--green-900) 0%, var(--green-950) 100%) padding-box,
    conic-gradient(
      from var(--border-angle),
      var(--gold-400) 0deg,
      rgba(255, 255, 255, 0.55) 90deg,
      var(--green-600) 180deg,
      var(--gold-400) 270deg,
      var(--gold-400) 360deg
    ) border-box;
  animation: spinConicBorder 5s linear infinite;
}

@keyframes spinConicBorder {
  to { --border-angle: 360deg; }
}

/* --------------------------------------------------------------------------
   9. Animated Metrics Strip
   -------------------------------------------------------------------------- */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-top: 2.5rem;
}

.metric-box {
  background: var(--surface-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.15rem;
  text-align: center;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.metric-box::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, var(--green-700), var(--gold-400), var(--crimson-600));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.metric-box:hover {
  transform: translateY(-6px);
  border-color: var(--green-600);
  box-shadow: var(--shadow-md);
}

.metric-box:hover::after {
  transform: scaleX(1);
}

.metric-box__num {
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--green-800);
  line-height: 1.1;
  margin-bottom: 0.32rem;
}

.metric-box__label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-600);
}

/* --------------------------------------------------------------------------
   10. Dramatic Scroll Reveals & Clip-Path Curtain Transitions
   -------------------------------------------------------------------------- */
.reveal,
[data-anim] {
  opacity: 0;
  transition:
    opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    clip-path 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--stagger, 0) * 90ms);
  will-change: opacity, transform;
}

.reveal,
[data-anim="up"] {
  transform: translateY(38px);
}

[data-anim="left"] {
  transform: translateX(-48px);
}

[data-anim="right"] {
  transform: translateX(48px);
}

[data-anim="zoom"] {
  transform: translateY(26px) scale(0.88);
}

[data-anim="flip"] {
  transform: perspective(1000px) rotateX(14deg) translateY(34px) scale(0.95);
}

[data-anim="curtain"] {
  clip-path: inset(0 100% 0 0);
  transform: scale(1.04);
}

.reveal.is-visible,
[data-anim].is-visible {
  opacity: 1;
  clip-path: inset(0 0% 0 0);
  transform: translate3d(0, 0, 0) scale(1) rotateX(0deg);
}

/* Principal quote growing emerald-gold bar */
.principal-quote {
  border-left: none;
  padding-left: 1.75rem;
}

.principal-quote::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4.5px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--green-700), var(--gold-500));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
}

.principal-quote.is-visible::before {
  transform: scaleY(1);
}

/* Islamic Ethos Cards Extra Glow & Urdu Float */
.ethos-card:hover .ethos-card__urdu {
  text-shadow: 0 0 18px rgba(231, 181, 90, 0.65);
  transform: translateX(-4px);
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

/* --------------------------------------------------------------------------
   11. Interactive 3D Card Depth, Spotlight & Icon Bounce
   -------------------------------------------------------------------------- */
.tilt-card {
  position: relative;
  transform-style: preserve-3d;
}

.tilt-card.is-visible:hover {
  transition:
    transform 0.14s ease-out,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

@media (hover: hover) and (pointer: fine) {
  .tilt-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
      360px circle at var(--mx, 50%) var(--my, 50%),
      rgba(17, 148, 76, 0.14),
      transparent 65%
    );
    transition: opacity 0.28s ease;
    z-index: 1;
  }

  .ethos-card.tilt-card::after {
    background: radial-gradient(
      360px circle at var(--mx, 50%) var(--my, 50%),
      rgba(231, 181, 90, 0.22),
      transparent 65%
    );
  }

  .tilt-card:hover::after {
    opacity: 1;
  }
}

.highlight-pill:hover .highlight-pill__icon,
.facility-card:hover .facility-card__icon,
.contact-card:hover .contact-card__icon {
  transform: scale(1.16) rotate(-6deg);
  transition: transform 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.program-card:hover .program-card__list li {
  transform: translateX(4px);
  transition: transform 0.25s ease;
}

/* Admission Steps Animated Connector Line & Pulse */
.steps-list {
  position: relative;
}

.steps-list::before {
  content: "";
  position: absolute;
  left: 3.15rem;
  top: 2.5rem;
  bottom: 2.5rem;
  width: 2.5px;
  background: linear-gradient(180deg, var(--green-700), var(--gold-400), var(--green-700));
  opacity: 0.35;
  z-index: 0;
}

.step-card {
  position: relative;
  z-index: 1;
}

.step-card__num {
  position: relative;
}

.step-card:hover .step-card__num::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 15px;
  border: 2px solid rgba(11, 122, 62, 0.5);
  animation: stepRing 0.95s ease-out infinite;
}

@keyframes stepRing {
  0% { transform: scale(1); opacity: 0.95; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* --------------------------------------------------------------------------
   12. Gallery Sliding Pill Filter, Sheen & 3D Hover + Lightbox
   -------------------------------------------------------------------------- */
.gallery-filters {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem;
  border-radius: 999px;
  background: var(--surface-cream);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  left: 50%;
  transform: translateX(-50%);
}

.filter-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
}

.filter-btn.is-active {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #fff;
  box-shadow: 0 6px 16px rgba(6, 78, 39, 0.28);
  transform: scale(1.03);
}

.gallery-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.36) 50%, transparent 80%);
  transform: skewX(-18deg);
  z-index: 2;
  pointer-events: none;
  transition: left 0.65s ease;
}

.gallery-item:hover::before {
  left: 145%;
}

.gallery-item__cat,
.gallery-item__title {
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover .gallery-item__cat {
  transform: translateY(-3px);
}

.gallery-item:hover .gallery-item__title {
  transform: translateY(-2px);
}

.gallery-item.is-popping {
  animation: galleryFilterPop 0.46s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes galleryFilterPop {
  from { opacity: 0; transform: scale(0.8) translateY(18px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.lightbox.is-open {
  animation: lightboxFade 0.25s ease forwards;
}

.lightbox.is-open .lightbox__dialog {
  animation: lightboxZoom 0.36s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.lightbox__img.is-switching {
  animation: imgCrossFade 0.28s ease forwards;
}

@keyframes lightboxFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lightboxZoom {
  from { opacity: 0; transform: scale(0.88) translateY(18px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes imgCrossFade {
  from { opacity: 0.25; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* --------------------------------------------------------------------------
   13. Map Radar Beacon + Scanner Sweep & Floating Buttons
   -------------------------------------------------------------------------- */
.map-visual__radar-sweep {
  position: absolute;
  width: 280px;
  height: 280px;
  top: 50%;
  left: 50%;
  margin: -140px 0 0 -140px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(17, 148, 76, 0.22) 0deg, transparent 70deg, transparent 360deg);
  animation: radarSweep 4.5s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes radarSweep {
  to { transform: rotate(360deg); }
}

.map-radar {
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 0.7rem;
}

.map-visual__pin-crest {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
  animation: pinBounce 3s ease-in-out infinite;
}

.map-radar__ring {
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2.5px solid rgba(11, 122, 62, 0.55);
  animation: radarPulse 2.4s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
  pointer-events: none;
}

.map-radar__ring--delay {
  animation-delay: 1.2s;
}

@keyframes radarPulse {
  0% { transform: scale(0.95); opacity: 0.9; }
  100% { transform: scale(2.15); opacity: 0; }
}

@keyframes pinBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.whatsapp-float::before,
.whatsapp-float::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid rgba(22, 163, 74, 0.6);
  animation: whatsappPulse 2.6s ease-out infinite;
  pointer-events: none;
}

.whatsapp-float::after {
  animation-delay: 1.3s;
}

@keyframes whatsappPulse {
  0% { transform: scale(1); opacity: 0.85; }
  100% { transform: scale(1.28); opacity: 0; }
}

.back-to-top {
  position: fixed;
  left: 1.35rem;
  bottom: 1.35rem;
  z-index: 940;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(231, 181, 90, 0.6);
  background: var(--green-900);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.85);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease, background-color 0.25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  background: var(--green-700);
  transform: translateY(-4px) scale(1.08);
}

/* --------------------------------------------------------------------------
   14. Responsive & Reduced Motion Safeguards
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero__orbit-pill--top {
    left: 10px;
    top: 12px;
  }
  .hero__orbit-pill--mid {
    right: 10px;
    top: 42%;
  }
}

@media (max-width: 820px) {
  .gallery-filters {
    border-radius: var(--radius-md);
    width: 100%;
    left: 0;
    transform: none;
  }
  .steps-list::before {
    display: none;
  }
}

@media (max-width: 600px) {
  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .hero__orbit-pill {
    display: none;
  }
  .back-to-top {
    left: 1rem;
    bottom: 1rem;
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preloader {
    display: none !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal,
  [data-anim] {
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
  }
}
