/* ============================================================
   ZEELCHEM™ Animations — Premium Visual Effects
   ============================================================ */

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Hero Text Animation ── */
@keyframes heroGradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes heroTextGlow {
  0% {
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6)) drop-shadow(0 0 40px rgba(251, 191, 36, 0.3));
  }
  100% {
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.4));
  }
}

.hero-title-gradient {
  display: inline;
  background: linear-gradient(90deg, #ffffff 0%, #38bdf8 25%, #00d4ff 50%, #fbbf24 75%, #ffffff 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroGradientFlow 6s ease-in-out infinite;
}

/* ── Floating Particles (CSS Only) ── */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0;
  animation: particleFloat 8s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 10s; }
.particle:nth-child(2) { left: 25%; animation-delay: 1.5s; animation-duration: 12s; }
.particle:nth-child(3) { left: 40%; animation-delay: 3s; animation-duration: 9s; }
.particle:nth-child(4) { left: 55%; animation-delay: 0.5s; animation-duration: 11s; }
.particle:nth-child(5) { left: 70%; animation-delay: 2s; animation-duration: 10s; }
.particle:nth-child(6) { left: 85%; animation-delay: 4s; animation-duration: 8s; }
.particle:nth-child(7) { left: 15%; animation-delay: 1s; animation-duration: 13s; width: 3px; height: 3px; background: var(--color-gold); }
.particle:nth-child(8) { left: 60%; animation-delay: 2.5s; animation-duration: 11s; width: 3px; height: 3px; background: var(--color-gold); }

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-20vh) scale(1);
    opacity: 0;
  }
}

/* ── Molecular Grid Background ── */
.molecular-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
}

.molecular-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--color-accent) 1px, transparent 0),
    radial-gradient(circle at 1px 1px, var(--color-accent) 0.5px, transparent 0);
  background-size: 80px 80px, 40px 40px;
  background-position: 0 0, 20px 20px;
}

/* ── Water Ripple Effect (hover) ── */
.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.2) 0%, transparent 70%);
  transition: width 0.6s ease, height 0.6s ease, top 0.6s ease, left 0.6s ease;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.ripple-effect:hover::after {
  width: 300%;
  height: 300%;
}

/* ── Counter Animation ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.count-up {
  animation: countUp 0.8s ease-out forwards;
}

/* ── Pulse Dot ── */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

/* ── Shimmer Effect ── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 40%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 60%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

/* ── Floating Badge ── */
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.float-badge {
  animation: floatBadge 3s ease-in-out infinite;
}

/* ── Card Stagger In ── */
.stagger-in > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-in.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(7) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(8) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }

/* ── Glow Hover ── */
.glow-hover {
  transition: box-shadow var(--transition-base);
}

.glow-hover:hover {
  box-shadow: var(--shadow-glow-cyan);
}

.glow-hover-gold:hover {
  box-shadow: var(--shadow-glow-gold);
}

/* ── Gradient Border Animation ── */
@keyframes borderGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-gold), var(--color-primary));
  background-size: 300% 100%;
  animation: borderGradient 4s linear infinite;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.gradient-border:hover::before {
  opacity: 1;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .stagger-in > * {
    opacity: 1;
    transform: none;
  }

  .particle {
    display: none;
  }
}
