/* ==========================================================================
   HIGH-PERFORMANCE GPU ANIMATIONS (60FPS HARDWARE ACCELERATED)
   Detailing and Restoring Studio
   ========================================================================== */

/* 1. Scroll Reveal Animations */
.reveal-init {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delay classes */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* 2. 3D Tilt Card Container */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.25s ease-out;
  will-change: transform;
}

/* 3. Ambient Floating Red Glow Orbs */
@keyframes float-ambient {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.22;
  }
  50% {
    transform: translate(30px, -20px) scale(1.1);
    opacity: 0.32;
  }
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: float-ambient 8s ease-in-out infinite alternate;
}

.ambient-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.25) 0%, transparent 70%);
  top: -100px;
  left: 10%;
}

.ambient-orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.18) 0%, transparent 70%);
  bottom: 10%;
  right: 5%;
  animation-delay: -4s;
}

/* 4. Range Rover Comparison Slider Pulse & Glowing Handle */
@keyframes handle-pulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.8), 0 0 30px rgba(229, 9, 20, 0.4);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 30, 39, 1), 0 0 45px rgba(229, 9, 20, 0.7);
    transform: translate(-50%, -50%) scale(1.08);
  }
}

.comparison-handle-btn {
  animation: handle-pulse 2.5s infinite ease-in-out;
}

/* 5. Smooth Tab Slide Indicator for Filters */
.catalog-filters {
  position: relative;
}

.filter-btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
  z-index: -1;
}

.filter-btn:hover::before {
  left: 100%;
}

/* 6. Neon Border Racing Light on Featured Cards */
@keyframes neon-race {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.card-neon-border {
  position: relative;
}

.card-neon-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(229, 9, 20, 0.6), rgba(255, 255, 255, 0.2), rgba(229, 9, 20, 0.6));
  background-size: 200% 200%;
  animation: neon-race 4s linear infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-neon-border:hover::after {
  opacity: 1;
}

/* 7. Number Counter Glow Effect */
.stat-number.counting {
  color: var(--red-vibrant);
  text-shadow: 0 0 20px var(--red-glow-strong);
  transition: text-shadow 0.3s ease;
}
