/* Landing Scroll Animations & Effects (tg-8482) */

/* Global Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold, #C9A227);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 1000;
  pointer-events: none;
}

/* GSAP Active State: disable legacy CSS transitions on reveal items to avoid conflict */
html.gs-on .r {
  opacity: 1;
  transform: none;
  transition: none;
}

/* GSAP Tweening State: disable transitions during active tweens to prevent double-interpolation (R6) */
.gs-tweening {
  transition: none !important;
  transition-duration: 0s !important;
}

/* Split Image Parallax & Hover Preservation (R1, R2, Item B, Item C) - strictly scoped under html.gs-on */
html.gs-on .sph img {
  --sph-y: 0px;
  --sph-scale: 1.10;
  transform: translateY(var(--sph-y)) scale(var(--sph-scale));
  transform-origin: center center;
  will-change: transform;
}
html.gs-on .sph:hover img,
html.gs-on body .sph:hover img {
  --sph-scale: 1.14;
  transform: translateY(var(--sph-y)) scale(var(--sph-scale));
  filter: brightness(.68) saturate(.82);
}

/* Campus Image Parallax (R1, Item B, Item C) - strictly scoped under html.gs-on */
html.gs-on .campus img {
  --campus-y: 0px;
  transform: translateY(var(--campus-y)) scale(1.14);
  transform-origin: center center;
  will-change: transform;
}

/* CAI Section Progress Track & Highlight */
.cai-prog {
  height: 2px;
  background: rgba(255, 255, 255, .08);
  border-radius: 2px;
  margin: 32px 0 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}
.cai-prog-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gold, #C9A227), var(--gold-l, #DDB63A));
  transform-origin: 0 50%;
  transform: scaleX(0);
  will-change: transform;
}

.ax {
  --ax-y: 0px;
  transform: translateY(var(--ax-y));
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .2s ease;
}
.ax:hover {
  --ax-y: -2px;
}
.ax.cai-highlight {
  background: rgba(201, 162, 39, .15) !important;
  border-color: rgba(201, 162, 39, .48) !important;
  box-shadow: 0 4px 18px rgba(201, 162, 39, .22);
}

.lv {
  --lv-y: 0px;
  transform: translateY(var(--lv-y));
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease, filter .25s ease;
}
.lv:hover {
  --lv-y: -3px;
}
.lv.cai-highlight {
  border-color: var(--gold, #C9A227) !important;
  box-shadow: 0 6px 24px rgba(201, 162, 39, .32);
  filter: brightness(1.22);
}

/* Hardware acceleration hints */
.hero-bg img,
.campus img,
.pcard {
  will-change: transform;
}

/* Prefers Reduced Motion Fallback */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .mq-track {
    animation: none !important;
    transform: none !important;
  }
  .pre-dot {
    animation: none !important;
  }
  .hero-left .pre,
  .hero-h,
  .hero-desc,
  .hero-btns,
  .hero-right {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  #scroll-progress {
    display: none !important;
  }
  .cai-prog-fill {
    transform: scaleX(1) !important;
    transition: none !important;
  }
  .r {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  html.gs-on .sph img,
  html.gs-on .campus img {
    transform: none !important;
  }
}
