/**
 * Premium Page Scroll & Load Animations
 * Designed for CRM Credentialing Genie
 * 
 * Works in tandem with the IntersectionObserver JS implementation:
 * - `.animate`: Initial state (hidden / prepared)
 * - `.animate.active`: Target state (visible / animated)
 */

/* ==========================================================================
   Global / Configuration / Core Transitions
   ========================================================================== */
.animate {
  --anim-duration: 0.8s;
  --anim-delay: 0s;
  --anim-curve: cubic-bezier(0.25, 1, 0.5, 1); /* Elegant ease-out */

  opacity: 0;
  transition: opacity var(--anim-duration) var(--anim-curve) var(--anim-delay),
              transform var(--anim-duration) var(--anim-curve) var(--anim-delay),
              filter var(--anim-duration) var(--anim-curve) var(--anim-delay),
              clip-path var(--anim-duration) var(--anim-curve) var(--anim-delay);
  will-change: transform, opacity, filter, clip-path;
}



/* Delay Helpers */
.animate.delay-100 { --anim-delay: 0.1s; }
.animate.delay-200 { --anim-delay: 0.2s; }
.animate.delay-300 { --anim-delay: 0.3s; }
.animate.delay-400 { --anim-delay: 0.4s; }
.animate.delay-500 { --anim-delay: 0.5s; }
.animate.delay-600 { --anim-delay: 0.6s; }
.animate.delay-700 { --anim-delay: 0.7s; }
.animate.delay-800 { --anim-delay: 0.8s; }

/* Duration Helpers */
.animate.dur-300 { --anim-duration: 0.3s; }
.animate.dur-500 { --anim-duration: 0.5s; }
.animate.dur-800 { --anim-duration: 0.8s; }
.animate.dur-1000 { --anim-duration: 1s; }
.animate.dur-1200 { --anim-duration: 1.2s; }
.animate.dur-1500 { --anim-duration: 1.5s; }

/* ==========================================================================
   Animation Variations (Modifiers)
   ========================================================================== */

/* 1. Fade Animations */
.animate.fade-up {
  transform: translateY(40px);
}

.animate.fade-down {
  transform: translateY(-40px);
}

.animate.fade-left {
  transform: translateX(40px);
}

.animate.fade-right {
  transform: translateX(-40px);
}

/* 2. Zoom Animations */
.animate.zoom-in {
  transform: scale(0.85);
}

.animate.zoom-out {
  transform: scale(1.1);
}

/* 3. Rotate & Flip (Premium Look) */
.animate.flip-up {
  transform: perspective(1000px) rotateX(-30deg);
  transform-origin: top;
  backface-visibility: hidden;
}

.animate.flip-down {
  transform: perspective(1000px) rotateX(30deg);
  transform-origin: bottom;
  backface-visibility: hidden;
}

/* 4. Blur Effects */
.animate.blur-in {
  filter: blur(8px);
  transform: scale(0.95);
}

/* 5. Reveal Animations (Uses Clip Path for High-End Cinematic feel) */
.animate.reveal-left {
  clip-path: inset(0 100% 0 0);
}
.animate.reveal-left.active {
  clip-path: inset(0 0 0 0);
}

.animate.reveal-right {
  clip-path: inset(0 0 0 100%);
}
.animate.reveal-right.active {
  clip-path: inset(0 0 0 0);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .animate {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
  }
}
/* Base Active State */
.animate.active {
  opacity: 1;
  transform: translate(0, 0) scale(1) rotate(0deg);
  filter: blur(0);
}