/* ==========================================================================
   UTKAL INSTITUTE OF HOTEL MANAGEMENT & TOURISM (UIHMT) — JAJPUR, ODISHA
   File: assets/css/animations.css
   Purpose: Keyframes, Scroll-Triggered Reveals, Staggered Entrances, Ambient
            3D Motion, Partner Marquee, and Reduced-Motion Accessibility.
   Rule: 100% Design-System CSS Custom Properties (Zero hardcoded colors).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ORBITAL & AMBIENT KEYFRAMES
   -------------------------------------------------------------------------- */
/* The two accent rings flip top-to-bottom around the stationary crest.
   Counter-rotation makes the highlights exchange their positions in 3D. */
@keyframes orbitSpin {
  0% { transform: rotateX(0deg) rotateZ(0deg); }
  100% { transform: rotateX(360deg) rotateZ(360deg); }
}

@keyframes orbitSpinReverse {
  0% { transform: rotateX(0deg) rotateZ(0deg); }
  100% { transform: rotateX(-360deg) rotateZ(-360deg); }
}

@keyframes float3D {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(0, -12px, 14px) rotate(1.2deg);
  }
}

@keyframes floatOrbSlow {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(26px, -22px, 0) scale(1.08);
  }
}

@keyframes pulseLiveDot {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 var(--color-emerald-14);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 0 8px var(--color-transparent);
  }
}

@keyframes marqueeScroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes barGrowUp {
  0% {
    transform: scaleY(0.08);
    opacity: 0.3;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes logoOrbitSpin {
  0% {
    transform: scale(1.08) rotate(0deg);
  }
  100% {
    transform: scale(1.08) rotate(360deg);
  }
}

@keyframes logoGoldShimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* --------------------------------------------------------------------------
   2. SCROLL-TRIGGERED REVEALS ([data-reveal])
   -------------------------------------------------------------------------- */
[data-reveal] {
  --stagger-index: 0;
  opacity: 0;
  transition-property: opacity, transform, filter;
  transition-duration: 0.78s;
  transition-timing-function: var(--ease-out-expo);
  transition-delay: calc(var(--stagger-index) * 85ms);
  will-change: opacity, transform;
}

[data-reveal="up"] {
  transform: translate3d(0, 36px, 0);
}

[data-reveal="left"] {
  transform: translate3d(-36px, 0, 0);
}

[data-reveal="right"] {
  transform: translate3d(36px, 0, 0);
}

[data-reveal="zoom"] {
  transform: scale(0.93);
  filter: blur(4px);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

/* --------------------------------------------------------------------------
   3. AMBIENT MOTION UTILITIES
   -------------------------------------------------------------------------- */
.float-3d-slow {
  animation: float3D 6.5s ease-in-out infinite;
}

.float-3d-delayed {
  animation: float3D 7.2s ease-in-out 1.4s infinite;
}

.live-pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulseLiveDot 2s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   4. INFINITE SOCIAL PROOF MARQUEE
   -------------------------------------------------------------------------- */
.marquee-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    var(--color-transparent) 0%,
    var(--color-bg-primary) 10%,
    var(--color-bg-primary) 90%,
    var(--color-transparent) 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    var(--color-transparent) 0%,
    var(--color-bg-primary) 10%,
    var(--color-bg-primary) 90%,
    var(--color-transparent) 100%
  );
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: max-content;
  animation: marqueeScroll 34s linear infinite;
}

.marquee-viewport:hover .marquee-track {
  animation-play-state: paused;
}

/* --------------------------------------------------------------------------
   5. INTERACTIVE MICROINTERACTIONS
   -------------------------------------------------------------------------- */
.nav-link-animated {
  position: relative;
}

.nav-link-animated::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.2rem;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--gradient-gold-luxury);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease-out-expo);
}

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

/* Salary Trajectory Bar Growth */
.trajectory-bar {
  transform-origin: bottom;
  transform: scaleY(0.12);
  transition: transform 1.1s var(--ease-out-expo);
}

.trajectory-chart.is-revealed .trajectory-bar {
  transform: scaleY(1);
}

/* --------------------------------------------------------------------------
   6. ACCESSIBILITY: PREFERS-REDUCED-MOTION OVERRIDE
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .trajectory-bar {
    transform: scaleY(1) !important;
  }
}
