/* ===== THUNDER / LIGHTNING ANIMATIONS ===== */

/* ===== THUNDER PAINT / STRIKE ANIMATION ===== */

/* Main bolt: paints top-to-bottom with smooth continuous reveal */
.thunder-animate .hero__thunder {
  clip-path: inset(0 0 100% 0);
  animation: thunderStrike 1.2s ease-out 0.5s forwards,
             thunderGlow 4s ease-in-out 2s infinite;
}

/* Smooth continuous paint from top to bottom */
@keyframes thunderStrike {
  0% {
    clip-path: inset(0 0 100% 0);
  }
  100% {
    clip-path: inset(0 0 0% 0);
  }
}

/* After the strike completes, pulse the glow */
@keyframes thunderGlow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(249, 228, 1, 0.15));
  }
  20% {
    filter: drop-shadow(0 0 40px rgba(249, 228, 1, 0.7)) drop-shadow(0 0 80px rgba(249, 228, 1, 0.25));
  }
  25% {
    filter: drop-shadow(0 0 5px rgba(249, 228, 1, 0.05));
  }
  35% {
    filter: drop-shadow(0 0 30px rgba(249, 228, 1, 0.5)) drop-shadow(0 0 60px rgba(249, 228, 1, 0.15));
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(249, 228, 1, 0.15));
  }
}

@keyframes thunderShadowPulse {
  0%, 100% {
    opacity: 0.08;
  }
  20% {
    opacity: 0.2;
  }
  25% {
    opacity: 0.05;
  }
  35% {
    opacity: 0.18;
  }
  50% {
    opacity: 0.08;
  }
}

/* Legacy thunderPulse2 - kept for other thunder elements */
@keyframes thunderPulse2 {
  0%, 100% {
    opacity: 0.1;
    filter: drop-shadow(0 0 0px transparent);
  }
  10% {
    opacity: 0.05;
  }
  18% {
    opacity: 0.8;
    filter: drop-shadow(0 0 35px rgba(249, 228, 1, 0.7));
  }
  22% {
    opacity: 0.15;
  }
  28% {
    opacity: 0.7;
    filter: drop-shadow(0 0 20px rgba(249, 228, 1, 0.4));
  }
  40% {
    opacity: 0.1;
    filter: drop-shadow(0 0 0px transparent);
  }
}

/* Products thunder bolt paint animation (scroll-triggered) */
.products__bg-thunder {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.products__bg-thunder.revealed {
  clip-path: inset(0 0 0% 0);
}

/* Slow thunder for products section */
.thunder-animate-slow {
  animation: thunderSlow 6s ease-in-out infinite;
}

@keyframes thunderSlow {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 0.6; transform: translateY(-5px); }
  60% { opacity: 0.3; transform: translateY(3px); }
}

/* Thunder flash overlay effect */
.thunder-flash {
  position: fixed;
  inset: 0;
  background: rgba(249, 228, 1, 0.03);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  animation: thunderFlash 8s ease-in-out infinite;
}

@keyframes thunderFlash {
  0%, 90%, 100% { opacity: 0; }
  92% { opacity: 1; }
  93% { opacity: 0; }
  95% { opacity: 0.7; }
  96% { opacity: 0; }
}

/* Electric shimmer on hero thunder bolts */
.thunder-bolt--1::after,
.thunder-bolt--2::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(249,228,1,0.3) 50%, transparent 100%);
  animation: electricShimmer 2s ease-in-out infinite;
  opacity: 0;
}

@keyframes electricShimmer {
  0%, 100% { opacity: 0; transform: translateY(-100%); }
  50% { opacity: 0.6; transform: translateY(100%); }
}

/* ===== BUTTON PULSE GLOW ===== */
.btn--yellow,
.btn--white,
.header__cta {
  animation: btnPulseGlow 3s ease-in-out 2s infinite;
}

.btn--yellow:hover,
.btn--white:hover,
.header__cta:hover {
  animation: none !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px rgba(249, 228, 1, 0.5) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

@keyframes btnPulseGlow {
  0%, 100% {
    box-shadow: 0 0 0px rgba(249, 228, 1, 0);
  }
  50% {
    box-shadow: 0 0 25px rgba(249, 228, 1, 0.5), 0 0 50px rgba(249, 228, 1, 0.2);
  }
}

/* ===== ACCENT CURVE DRAW LEFT TO RIGHT ===== */
.reveal-accent {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s;
}

.reveal-accent.revealed,
.revealed .reveal-accent,
.reveal-left.revealed .reveal-accent,
.who-we-are__left.revealed .who-we-are__accent {
  clip-path: inset(0 0 0 0) !important;
}

/* ===== HERO TEXT ANIMATE IN ===== */
.hero-animate-in {
  opacity: 0;
  transform: translateY(40px);
  animation: heroTextIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(0.3s + var(--anim-order, 0) * 0.1s);
}

.hero-word {
  display: inline-block;
}

@keyframes heroTextIn {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Legacy fadeSlideUp */
@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero title text reveal - slide up with slight scale */
@keyframes textReveal {
  0% {
    opacity: 0;
    transform: translateY(40px);
    clip-path: inset(100% 0 0 0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
  }
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */

/* Reveal from below */
.reveal-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s);
}

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

/* Reveal from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reveal from right */
.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Scale reveal */
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ===== PARALLAX EFFECTS ===== */
.parallax-slow {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ===== HOVER ANIMATIONS ===== */

/* Card hover lift */
.services__card,
.products__card,
.industries__card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.4s ease;
}

.services__card:hover,
.industries__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.products__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

/* Arrow hover animation */
.link-arrow .arrow-icon,
.btn .arrow-icon,
.header__cta .arrow-icon {
  transition: transform 0.3s ease;
}

/* Arrow hover consolidated in style.css */

/* ===== COUNTER ANIMATION ===== */
.stats__number {
  transition: all 0.3s ease;
}

/* ===== SMOOTH SECTION TRANSITIONS ===== */
section {
  position: relative;
}

/* Staggered children animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.5s; }

.stagger-children.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== PAGE LOAD ANIMATION ===== */
body {
  animation: pageLoad 0.6s ease-out;
}

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