/* Animation styles for static HTML pages */

/* Prevent layout shifts during load */
body {
  min-height: 100vh;
}

/* Reserve space for particle container */
#tsparticles {
  contain: layout style paint;
}

/* Prevent CLS from animations */
.animate-on-scroll {
  content-visibility: auto;
}

:root {
  --animation-duration: 0.6s;
  --transition-duration: 0.3s;
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--animation-duration) ease-out,
              transform var(--animation-duration) ease-out;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Card transitions */
.pricing-card,
.feature-card,
.bonus-card {
  transition: all var(--transition-duration) ease-out;
}

/* Button hover effects */
button,
a[style*="background"] {
  transition: all var(--transition-duration) ease-out;
}

button:hover,
a[style*="background"]:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

button:active,
a[style*="background"]:active {
  transform: translateY(0);
}

/* Accessibility: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .animate-on-scroll {
    transform: translateY(20px);
  }
}

/* Gradient Mesh Background */
.gradient-mesh {
  position: relative;
  overflow: hidden;
}

.gradient-mesh::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 50%, rgba(251, 191, 36, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 40% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  animation: gradientShift 20s ease infinite;
  z-index: -1;
}

@keyframes gradientShift {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(10%, 10%) rotate(120deg);
  }
  66% {
    transform: translate(-10%, 5%) rotate(240deg);
  }
}

/* Parallax Scrolling */
.parallax-section {
  position: relative;
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 120%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  z-index: -1;
}

/* Animated Progress Bars */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Enhanced Button Micro-interactions */
.btn-ripple {
  position: relative;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Glow effect on hover */
.btn-glow {
  position: relative;
  transition: all 0.3s ease;
}

.btn-glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #fbbf24, #f59e0b, #fbbf24);
  border-radius: inherit;
  opacity: 0;
  z-index: -1;
  filter: blur(10px);
  transition: opacity 0.3s ease;
}

.btn-glow:hover::before {
  opacity: 0.7;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    filter: blur(10px);
  }
  50% {
    filter: blur(15px);
  }
}

/* Disable animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gradient-mesh::before,
  .progress-bar::after,
  .btn-glow::before {
    animation: none !important;
  }
}

/* Performance Fix: Hide YouTube embeds to prevent 882KB load */
iframe[src*="youtube.com"],
iframe[src*="youtu.be"],
iframe[src*="youtube-nocookie.com"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
