/* =========================================================
   Peptides Easy — Stellar Effects
   Particle canvas, scroll reveals, glow animations.
   ========================================================= */

/* ---- Particle Canvas ---- */
#stellar-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed {
  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; }

/* ---- Glow Pulse on Hero ---- */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(13, 148, 136, 0.15), 0 0 60px rgba(13, 148, 136, 0.05); }
  50% { box-shadow: 0 0 30px rgba(13, 148, 136, 0.25), 0 0 80px rgba(13, 148, 136, 0.1); }
}

.hero-card {
  animation: glowPulse 4s ease-in-out infinite;
}

/* ---- Floating Animation ---- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.float {
  animation: float 5s ease-in-out infinite;
}

/* ---- Shimmer on CTA buttons ---- */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.btn--primary {
  background-size: 200% 100%;
  position: relative;
  overflow: hidden;
}

.btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmerSlide 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmerSlide {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}

/* ---- Product card hover glow ---- */
.product {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(13, 148, 136, 0.15), 0 0 0 1px rgba(13, 148, 136, 0.2);
}

/* ---- Magnetic button effect (subtle scale on hover) ---- */
.btn {
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.2s ease,
              background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* ---- Staggered card entry ---- */
@keyframes cardEntry {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.product:nth-child(1) { animation: cardEntry 0.5s 0.05s both cubic-bezier(0.22, 1, 0.36, 1); }
.product:nth-child(2) { animation: cardEntry 0.5s 0.1s both cubic-bezier(0.22, 1, 0.36, 1); }
.product:nth-child(3) { animation: cardEntry 0.5s 0.15s both cubic-bezier(0.22, 1, 0.36, 1); }
.product:nth-child(4) { animation: cardEntry 0.5s 0.2s both cubic-bezier(0.22, 1, 0.36, 1); }
.product:nth-child(5) { animation: cardEntry 0.5s 0.25s both cubic-bezier(0.22, 1, 0.36, 1); }
.product:nth-child(6) { animation: cardEntry 0.5s 0.3s both cubic-bezier(0.22, 1, 0.36, 1); }
.product:nth-child(7) { animation: cardEntry 0.5s 0.35s both cubic-bezier(0.22, 1, 0.36, 1); }
.product:nth-child(8) { animation: cardEntry 0.5s 0.4s both cubic-bezier(0.22, 1, 0.36, 1); }

/* ---- Twinkle for particle accent ---- */
@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}

/* ---- Trust icons subtle pulse ---- */
.trust__item .ic {
  animation: twinkle 3s ease-in-out infinite;
}
.trust__item:nth-child(2) .ic { animation-delay: 0.5s; }
.trust__item:nth-child(3) .ic { animation-delay: 1s; }
.trust__item:nth-child(4) .ic { animation-delay: 1.5s; }

/* ---- Section divider glow line ---- */
.section::before {
  content: "";
  display: block;
  height: 1px;
  max-width: 200px;
  margin: 0 auto 48px;
  background: linear-gradient(90deg, transparent, rgba(13, 148, 136, 0.3), transparent);
}

.section:first-of-type::before,
.hero + .section::before {
  display: none;
}

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

/* ---- Reduced motion support ---- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-card,
  .float,
  .btn--primary::after,
  .trust__item .ic {
    animation: none;
  }
  .product {
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
