/* =============================================
   VELOUR THEME - ANIMATIONS
   ============================================= */

/* =============================================
   SCROLL REVEAL BASE STATES
   ============================================= */
[data-reveal] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition-duration: 0.7s;
}

[data-reveal="fade-up"] {
  transform: translateY(40px);
}

[data-reveal="fade-down"] {
  transform: translateY(-40px);
}

[data-reveal="fade-left"] {
  transform: translateX(40px);
}

[data-reveal="fade-right"] {
  transform: translateX(-40px);
}

[data-reveal="scale-up"] {
  transform: scale(0.9);
}

[data-reveal="zoom-in"] {
  transform: scale(0.85);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger delays */
[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="500"] { transition-delay: 0.5s; }
[data-delay="600"] { transition-delay: 0.6s; }
[data-delay="700"] { transition-delay: 0.7s; }
[data-delay="800"] { transition-delay: 0.8s; }

/* =============================================
   PAGE LOAD ANIMATIONS
   ============================================= */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.7); }
  60% { opacity: 1; transform: scale(1.05); }
  80% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* =============================================
   HERO ANIMATIONS
   ============================================= */
.hero-badge {
  animation: slideInDown 0.6s ease both;
  animation-delay: 0.1s;
}

.hero-title {
  animation: slideInUp 0.7s ease both;
  animation-delay: 0.2s;
}

.hero-subtitle {
  animation: slideInUp 0.7s ease both;
  animation-delay: 0.35s;
}

.hero-actions {
  animation: slideInUp 0.7s ease both;
  animation-delay: 0.5s;
}

.hero-stats {
  animation: fadeIn 0.8s ease both;
  animation-delay: 0.65s;
}

.hero-visual {
  animation: scaleIn 0.8s ease both;
  animation-delay: 0.3s;
}

.hero-card-float.top-right {
  animation: slideInRight 0.7s ease both, float 4s ease-in-out 0.7s infinite;
}

.hero-card-float.bottom-left {
  animation: slideInLeft 0.7s ease both 0.2s, float 4s ease-in-out 2s infinite;
}

/* =============================================
   FLOATING ANIMATION
   ============================================= */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(3deg); }
}

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

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

/* =============================================
   COUNT-UP STATS
   ============================================= */
.stat-number,
.hero-stat-number {
  display: inline-block;
  transition: transform 0.3s ease;
}

.stat-number.counting,
.hero-stat-number.counting {
  transform: scale(1.05);
  color: var(--color-primary);
}

/* =============================================
   CARD HOVER MICRO-INTERACTIONS
   ============================================= */
.value-card,
.service-card,
.post-card,
.feature-card,
.testimonial-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  will-change: transform;
}

/* Icon pulse on hover */
.value-card:hover .value-icon,
.service-card:hover .service-icon {
  animation: iconPulse 0.4s ease;
}

@keyframes iconPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Button ripple */
.btn {
  position: relative;
  overflow: hidden;
}

.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* =============================================
   MEGA MENU ANIMATION
   ============================================= */
.mega-menu {
  transition: opacity 0.25s ease,
              transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0.25s ease;
}

.mega-menu-col {
  animation: none;
}

.mega-menu-parent:hover .mega-menu-col {
  animation: slideInUp 0.3s ease both;
}

.mega-menu-parent:hover .mega-menu-col:nth-child(1) { animation-delay: 0s; }
.mega-menu-parent:hover .mega-menu-col:nth-child(2) { animation-delay: 0.05s; }
.mega-menu-parent:hover .mega-menu-col:nth-child(3) { animation-delay: 0.1s; }
.mega-menu-parent:hover .mega-menu-col:nth-child(4) { animation-delay: 0.15s; }
.mega-menu-parent:hover .mega-menu-col:nth-child(5) { animation-delay: 0.2s; }
.mega-menu-parent:hover .mega-menu-col:nth-child(6) { animation-delay: 0.25s; }

/* =============================================
   STAGGERED GRID ITEMS
   ============================================= */
.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* =============================================
   NAV UNDERLINE ANIMATION
   ============================================= */
.main-navigation > ul > li > a {
  position: relative;
  overflow: hidden;
}

/* =============================================
   LOADING SKELETON
   ============================================= */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    var(--color-light) 25%,
    rgba(255,255,255,0.8) 50%,
    var(--color-light) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* =============================================
   SCROLL INDICATOR
   ============================================= */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--color-primary);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* =============================================
   PARALLAX BLOBS
   ============================================= */
.blob-animate {
  animation: blobMorph 8s ease-in-out infinite alternate;
}

@keyframes blobMorph {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: rotate(0deg) scale(1);
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    transform: rotate(180deg) scale(1.05);
  }
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: rotate(360deg) scale(1);
  }
}

/* =============================================
   PULSE RING
   ============================================= */
@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: 1; }
  80%, 100% { transform: scale(1.4); opacity: 0; }
}

.pulse-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  animation: pulseRing 2s ease-out infinite;
}

/* =============================================
   PROGRESS BAR ANIMATION
   ============================================= */
.progress-bar {
  background: var(--color-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  height: 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .stagger-children > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-badge,
  .hero-title,
  .hero-subtitle,
  .hero-actions,
  .hero-stats,
  .hero-visual,
  .hero-card-float {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =============================================
   TRANSITION UTILITIES
   ============================================= */
.transition-none { transition: none !important; }
.transition-fast { transition-duration: 0.15s !important; }
.transition-slow { transition-duration: 0.5s !important; }

/* =============================================
   WOOCOMMERCE ANIMATIONS
   ============================================= */
.woocommerce ul.products li.product {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease !important;
}

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  animation: slideInDown 0.4s ease both;
}

/* Cart count bump */
@keyframes cartBump {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.5); }
}

.cart-count.bumping {
  animation: cartBump 0.35s ease;
}
