/* =============================================================
   VERTEX POWER SOLUTIONS — ANIMATIONS
   ============================================================= */

/* ---- Reveal-on-scroll base states ---- */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}
.reveal-up { transform: translateY(38px); }
.reveal-left { transform: translateX(-42px); }
.reveal-right { transform: translateX(42px); }

.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Stagger children of grids automatically via inline delay set by JS,
   fallback nth-child stagger for service/value/why cards */
.services-grid .service-card:nth-child(1) { transition-delay: 0.02s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.08s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.14s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.20s; }
.services-grid .service-card:nth-child(5) { transition-delay: 0.02s; }
.services-grid .service-card:nth-child(6) { transition-delay: 0.08s; }
.services-grid .service-card:nth-child(7) { transition-delay: 0.14s; }
.services-grid .service-card:nth-child(8) { transition-delay: 0.20s; }

.core-values .value-item:nth-child(1) { transition-delay: 0.02s; }
.core-values .value-item:nth-child(2) { transition-delay: 0.1s; }
.core-values .value-item:nth-child(3) { transition-delay: 0.18s; }

.why-us-grid .why-item:nth-child(1) { transition-delay: 0.02s; }
.why-us-grid .why-item:nth-child(2) { transition-delay: 0.06s; }
.why-us-grid .why-item:nth-child(3) { transition-delay: 0.1s; }
.why-us-grid .why-item:nth-child(4) { transition-delay: 0.14s; }
.why-us-grid .why-item:nth-child(5) { transition-delay: 0.18s; }
.why-us-grid .why-item:nth-child(6) { transition-delay: 0.22s; }

/* ---- Hero entrance (runs immediately on load, not scroll-triggered) ---- */
.hero-content.reveal-up { transform: translateY(0); opacity: 0; animation: heroFadeUp 1s cubic-bezier(0.22,1,0.36,1) 0.15s forwards; }
.hero-visual.reveal-right { transform: translateX(0); opacity: 0; animation: heroFadeRight 1.1s cubic-bezier(0.22,1,0.36,1) 0.3s forwards; }

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeRight {
  from { opacity: 0; transform: translateX(50px) scale(0.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

/* ---- Scroll indicator dot ---- */
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---- Marquee infinite scroll ---- */
@-webkit-keyframes marqueeScroll {
  from { -webkit-transform: translateX(0); transform: translateX(0); }
  to { -webkit-transform: translateX(-50%); transform: translateX(-50%); }
}
@keyframes marqueeScroll {
  from { -webkit-transform: translateX(0); transform: translateX(0); }
  to { -webkit-transform: translateX(-50%); transform: translateX(-50%); }
}

/* ---- WhatsApp float pulse ---- */
@keyframes pulseWhatsapp {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55), 0 10px 30px rgba(37, 211, 102, 0.35); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0), 0 10px 30px rgba(37, 211, 102, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 10px 30px rgba(37, 211, 102, 0.35); }
}

/* ---- Stat count-up support (visual emphasis only) ---- */
.stat-number { display: inline-block; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-up, .reveal-left, .reveal-right,
  .hero-content.reveal-up, .hero-visual.reveal-right {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .marquee-track { animation: none !important; }
  .whatsapp-float { animation: none !important; }
}
