/* =====================================================
   HPU Scroll Animations — Bootstrap 5.3.3 Compatible
   No conflicts with WOW.js, jQuery, Slick, or Bootstrap
   ===================================================== */

/* ── Base animation state (hidden before reveal) ── */
[data-hpu-anim] {
  opacity: 0;
  transition-property: opacity, transform, filter;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  transition-duration: 0.75s;
  will-change: opacity, transform;
}

/* Delay variants */
[data-hpu-delay="100"] { transition-delay: 0.10s; }
[data-hpu-delay="200"] { transition-delay: 0.20s; }
[data-hpu-delay="300"] { transition-delay: 0.30s; }
[data-hpu-delay="400"] { transition-delay: 0.40s; }
[data-hpu-delay="500"] { transition-delay: 0.50s; }
[data-hpu-delay="600"] { transition-delay: 0.60s; }
[data-hpu-delay="700"] { transition-delay: 0.70s; }
[data-hpu-delay="800"] { transition-delay: 0.80s; }

/* Duration variants */
[data-hpu-duration="slow"]   { transition-duration: 1.1s; }
[data-hpu-duration="fast"]   { transition-duration: 0.45s; }

/* ── Pre-reveal transform states ── */
[data-hpu-anim="fade-up"]        { transform: translateY(50px); }
[data-hpu-anim="fade-down"]      { transform: translateY(-50px); }
[data-hpu-anim="fade-left"]      { transform: translateX(60px); }
[data-hpu-anim="fade-right"]     { transform: translateX(-60px); }
[data-hpu-anim="fade-in"]        { transform: none; }
[data-hpu-anim="zoom-in"]        { transform: scale(0.82); }
[data-hpu-anim="zoom-out"]       { transform: scale(1.14); }
[data-hpu-anim="flip-up"]        { transform: perspective(600px) rotateX(25deg) translateY(30px); }
[data-hpu-anim="slide-left"]     { transform: translateX(80px); }
[data-hpu-anim="slide-right"]    { transform: translateX(-80px); }
[data-hpu-anim="blur-in"]        { transform: translateY(20px); filter: blur(10px); }
[data-hpu-anim="rotate-in"]      { transform: rotate(-6deg) scale(0.9); }
[data-hpu-anim="skew-up"]        { transform: translateY(40px) skewY(4deg); }

/* ── Revealed state ── */
[data-hpu-anim].hpu-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ── Stagger group: children animate in sequence ── */
.hpu-stagger > * {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1),
              transform 0.65s cubic-bezier(0.22,1,0.36,1);
}
.hpu-stagger.hpu-visible > *:nth-child(1)  { transition-delay: 0.05s; }
.hpu-stagger.hpu-visible > *:nth-child(2)  { transition-delay: 0.14s; }
.hpu-stagger.hpu-visible > *:nth-child(3)  { transition-delay: 0.23s; }
.hpu-stagger.hpu-visible > *:nth-child(4)  { transition-delay: 0.32s; }
.hpu-stagger.hpu-visible > *:nth-child(5)  { transition-delay: 0.41s; }
.hpu-stagger.hpu-visible > *:nth-child(6)  { transition-delay: 0.50s; }
.hpu-stagger.hpu-visible > *:nth-child(7)  { transition-delay: 0.59s; }
.hpu-stagger.hpu-visible > *:nth-child(8)  { transition-delay: 0.68s; }
.hpu-stagger.hpu-visible > * {
  opacity: 1;
  transform: none;
}

/* ── Counter animation highlight ── */
.hpu-count-up {
  display: inline-block;
  transition: color 0.4s ease;
}

/* ── Underline reveal (for headings) ── */
.hpu-underline-reveal {
  position: relative;
  display: inline-block;
}
.hpu-underline-reveal::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  height: 3px;
  width: 0;
  background: currentColor;
  transition: width 0.7s cubic-bezier(0.22,1,0.36,1) 0.3s;
  border-radius: 2px;
}
.hpu-visible .hpu-underline-reveal::after,
.hpu-underline-reveal.hpu-visible::after {
  width: 100%;
}

/* ── Pulse effect on badges / icons ── */
@keyframes hpuPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,165,0,0.45); }
  50%       { box-shadow: 0 0 0 10px rgba(255,165,0,0); }
}
.hpu-pulse.hpu-visible {
  animation: hpuPulse 2s ease-out 0.5s 3;
}

/* ── Floating (continuous) ── */
@keyframes hpuFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.hpu-float.hpu-visible {
  animation: hpuFloat 3.5s ease-in-out infinite;
  opacity: 1;
}

/* ── Respect reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  [data-hpu-anim],
  .hpu-stagger > * {
    transition: opacity 0.3s ease !important;
    transform: none !important;
    filter: none !important;
  }
}


/* ── Disable HPU animations on mobile ── */
@media (max-width: 767.98px) {

  [data-hpu-anim],
  .hpu-stagger > *,
  .hpu-pulse,
  .hpu-float,
  .hpu-underline-reveal::after {
    
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    
    transition: none !important;
    animation: none !important;
  }

  /* Ensure stagger items are visible */
  .hpu-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Remove underline animation */
  .hpu-underline-reveal::after {
    width: 100% !important;
  }
}


