/* ═══════════════════════════════════════════════════════════════
   STEMULUS CINEMATIC MOTION ENGINE (CSS)
   Hardware-Accelerated GSAP ScrollTrigger & Motion Choreography
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Magnetic Custom Cursor ── */
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(244, 96, 12, 0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
  will-change: transform;
}

#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: #F4600C;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  will-change: transform;
}

#cursor-ring.active {
  width: 54px;
  height: 54px;
  background-color: rgba(244, 96, 12, 0.08);
  border-color: #F4600C;
}

@media (max-width: 1024px) {
  #cursor-ring, #cursor-dot { display: none !important; }
}

/* ── 2. Scroll-Linked Story Reveals ── */
.reveal-story {
  opacity: 0;
  transform: translateY(35px);
  will-change: transform, opacity;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  will-change: transform, opacity;
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  will-change: transform, opacity;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  will-change: transform, opacity;
}

/* ── 3. Glowing SVG Road Connector Pulse ── */
.road-pulse-dot {
  animation: road-pulse 2.2s ease-in-out infinite;
}

@keyframes road-pulse {
  0% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 4px #F4600C); }
  50% { transform: scale(1.6); opacity: 0.6; filter: drop-shadow(0 0 12px #F4600C); }
  100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 4px #F4600C); }
}

/* ── 4. Card Tilt & Elevation Physics ── */
.motion-card-tilt {
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  will-change: transform, box-shadow;
}

.motion-card-tilt:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
}

/* ── 5. KPI Counter & Progress Fill Sheen ── */
.kpi-number-roll {
  display: inline-block;
  will-change: contents;
}

.progress-bar-glow {
  position: relative;
  overflow: hidden;
}

.progress-bar-glow::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: bar-sheen 3s ease-in-out infinite;
}

@keyframes bar-sheen {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* ── 6. Reduced Motion Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  .reveal-story, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .road-pulse-dot { animation: none; }
  .progress-bar-glow::after { animation: none; }
  .motion-card-tilt { transition: none; }
  .motion-card-tilt:hover { transform: none; }
  #cursor-ring, #cursor-dot { display: none !important; }
}
