/* =============================================
   SAPPFUEL — animations.css
   Custom keyframes & entrance animations
   ============================================= */

/* ── Hero Entrance ── */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroSlideRight {
  from {
    opacity: 0;
    transform: translateX(-48px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroSlideLeft {
  from {
    opacity: 0;
    transform: translateX(48px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Fuel Flow Line ── */
@keyframes flowLine {
  0%   { width: 0; opacity: 0; }
  20%  { opacity: 1; }
  100% { width: 100%; opacity: 1; }
}

/* ── Pulse Red Dot (stat accent) ── */
@keyframes pulseRed {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(220,38,38,.5);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(220,38,38,0);
  }
}

/* ── Counter Count-up (triggered by JS adding .counting class) ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Shimmer on logo items ── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* ── Subtle float for hero image ── */
@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* ── Red accent bar sweep ── */
@keyframes barSweep {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

/* ── Hero staggered reveals ── */
.hero-animate-1 {
  animation: heroSlideRight 0.8s cubic-bezier(0.4,0,0.2,1) 0.2s both;
}
.hero-animate-2 {
  animation: heroFadeUp 0.8s cubic-bezier(0.4,0,0.2,1) 0.45s both;
}
.hero-animate-3 {
  animation: heroFadeUp 0.8s cubic-bezier(0.4,0,0.2,1) 0.65s both;
}
.hero-animate-4 {
  animation: heroFadeUp 0.8s cubic-bezier(0.4,0,0.2,1) 0.85s both;
}
.hero-animate-img {
  animation: scaleIn 1s cubic-bezier(0.4,0,0.2,1) 0.3s both, floatY 6s ease-in-out 1.5s infinite;
}

/* ── Stat count-up animation ── */
.stat-number.counting {
  animation: countUp 0.5s ease both;
}

/* ── Red bar accent ── */
.animated-bar {
  animation: barSweep 0.8s cubic-bezier(0.4,0,0.2,1) 0.4s both;
}

/* ── Pulse on red accent dots ── */
.pulse-red {
  animation: pulseRed 2s ease-in-out infinite;
}

/* ── Smooth page load overlay ── */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--blue-deep);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  animation: scaleIn 0.6s cubic-bezier(0.4,0,0.2,1) both;
}

.loader-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-main), var(--blue-bright));
  animation: flowLine 0.8s cubic-bezier(0.4,0,0.2,1) 0.2s both;
}

/* ── Hover underline sweep ── */
.link-sweep {
  position: relative;
  display: inline-block;
}
.link-sweep::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 2px;
  background: var(--red-main);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.link-sweep:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
