/* Just Wax Me - Animations */
/* Subtle, elegant animations for a refined experience */

/* ============================================
   FADE IN ANIMATIONS
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   STAGGER ANIMATIONS
   ============================================ */

.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

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

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

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.02);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

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

/* ============================================
   BUTTON ANIMATIONS
   ============================================ */

.btn {
  position: relative;
  overflow: hidden;
}

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

.btn:hover::before {
  width: 300%;
  height: 300%;
}

/* Gentle pulse for primary CTAs */
@keyframes gentle-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(233, 30, 140, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(233, 30, 140, 0);
  }
}

.btn-pulse {
  animation: gentle-pulse 2s infinite;
}

/* ============================================
   HERO ANIMATIONS
   ============================================ */

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

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

.shimmer {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

/* Hero badge slide in */
@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge {
  animation: slide-down 0.8s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

/* Hero title fade in */
.hero h1 {
  animation: slide-down 0.8s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

.hero-subtitle {
  animation: slide-down 0.8s ease forwards;
  animation-delay: 0.6s;
  opacity: 0;
}

.hero-cta {
  animation: slide-down 0.8s ease forwards;
  animation-delay: 0.8s;
  opacity: 0;
}

.hero-trust {
  animation: slide-down 0.8s ease forwards;
  animation-delay: 1s;
  opacity: 0;
}

/* ============================================
   DECORATIVE ANIMATIONS
   ============================================ */

@keyframes rotate-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate-slow {
  animation: rotate-slow 20s linear infinite;
}

@keyframes pulse-soft {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.pulse-soft {
  animation: pulse-soft 3s ease-in-out infinite;
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */

@keyframes page-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.page-transition {
  animation: page-enter 0.4s ease;
}

/* ============================================
   LOADING STATES
   ============================================ */

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

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-gray-100) 25%,
    var(--color-gray-50) 50%,
    var(--color-gray-100) 75%
  );
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.scroll-indicator {
  animation: bounce 2s infinite;
}

/* ============================================
   ICON ANIMATIONS
   ============================================ */

.icon-spin {
  transition: transform 0.5s ease;
}

.icon-spin:hover {
  transform: rotate(180deg);
}

/* ============================================
   ACCESSIBILITY - 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;
  }

  .fade-in,
  .fade-in-up,
  .fade-in-left,
  .fade-in-right,
  .fade-in-scale,
  .stagger-children > * {
    opacity: 1;
    transform: none;
  }

  .hero-badge,
  .hero h1,
  .hero-subtitle,
  .hero-cta,
  .hero-trust {
    opacity: 1;
  }
}

/* ============================================
   SMOOTH SCROLL BEHAVIOR
   ============================================ */

html {
  scroll-behavior: smooth;
}

/* ============================================
   LINK UNDERLINE ANIMATION
   ============================================ */

.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
}

.link-underline:hover::after {
  width: 100%;
}

/* ============================================
   CARD FLIP ON HOVER
   ============================================ */

.card-3d {
  perspective: 1000px;
}

.card-3d-inner {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
  transform: rotateY(5deg) rotateX(2deg);
}

/* ============================================
   IMAGE ZOOM ON HOVER
   ============================================ */

.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.5s ease;
}

.img-zoom:hover img {
  transform: scale(1.05);
}
