/**
 * QualiVerse - High-End Human UX Micro-Animations
 * Sophisticated, high-performance, GPU-accelerated motion
 */

/* Pulse Ring Animation (Petrol Teal / Royal Blue) */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 83, 123, 0.4);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(0, 83, 123, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 83, 123, 0);
  }
}

/* Gentle Floating Effect for Badges and Floating Elements */
@keyframes float-gentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.float-animate {
  animation: float-gentle 4s ease-in-out infinite;
}

/* AI Scan Line Effect (Simulated Document Audit) */
@keyframes scan-line {
  0% {
    top: 0%;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

.scanning-active {
  position: relative;
  overflow: hidden;
}

.scanning-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--qv-royal-blue), var(--qv-petrol-teal), transparent);
  box-shadow: 0 0 12px var(--qv-royal-blue);
  animation: scan-line 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

/* Shimmer Loading Effect */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer {
  background: linear-gradient(90deg, var(--qv-platinum) 25%, #FFFFFF 50%, var(--qv-platinum) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
}

/* Reveal On Scroll (Classes toggled by IntersectionObserver) */
.reveal-init {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-init.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* 3D Tilt Wrapper */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
  will-change: transform;
}

/* Interactive Card Ripple */
.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(26, 0, 179, 0.15);
  transform: scale(0);
  animation: ripple-grow 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-grow {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Number Roll Animation */
.number-roll {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtle Interactive Academic Badge Glow */
.badge-glow {
  position: relative;
}

.badge-glow::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--qv-royal-blue), var(--qv-petrol-teal));
  z-index: -1;
  opacity: 0.15;
  transition: opacity var(--transition-normal);
}

.badge-glow:hover::before {
  opacity: 0.35;
}

