/* =============================================
   Silk Surgico — Animation Styles
   ============================================= */

/* ---------- Keyframes ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

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

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

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

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

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

@keyframes ssHeroPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes ss3dCardIn {
  from {
    opacity: 0;
    transform: translateY(40px) rotateX(-12deg) translateZ(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0) translateZ(0);
  }
}

@keyframes ss3dMapIn {
  from {
    opacity: 0;
    transform: perspective(900px) rotateX(8deg) translateY(30px);
  }
  to {
    opacity: 1;
    transform: perspective(900px) rotateX(0) translateY(0);
  }
}

@keyframes ssContactFloat {
  0%, 100% {
    transform: translateY(0) translateZ(0) rotate(0deg);
  }
  50% {
    transform: translateY(-24px) translateZ(20px) rotate(6deg);
  }
}

@keyframes ss3dPulse {
  0%, 100% {
    box-shadow: 0 6px 0 rgba(10, 46, 92, 0.06), 0 20px 56px rgba(10, 46, 92, 0.12);
  }
  50% {
    box-shadow: 0 8px 0 rgba(10, 46, 92, 0.04), 0 28px 64px rgba(10, 46, 92, 0.16);
  }
}

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

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

@keyframes ssHeroFadeRight {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Animation Utility Classes ---------- */
.animate-fade-up {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-left {
  animation: fadeInLeft 0.8s ease forwards;
}

.animate-fade-right {
  animation: fadeInRight 0.8s ease forwards;
}

.animate-zoom {
  animation: zoomIn 0.6s ease forwards;
}

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

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Stagger delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

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

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

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

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

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

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(44, 82, 130, 0.3);
}

/* Product card shine effect */
.product-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s ease;
}

.product-card:hover .product-image::after {
  left: 100%;
}

/* Category card icon bounce */
.category-link i {
  transition: transform 0.3s ease;
}

.category-card:hover .category-link i {
  transform: translateX(4px);
}

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

.btn::after {
  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.4s ease, height 0.4s ease;
}

.btn:active::after {
  width: 200px;
  height: 200px;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-silver-bg) 25%,
    var(--color-silver-light) 50%,
    var(--color-silver-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Counter number animation */
.stat-number.counting {
  transition: all 0.3s ease;
}

/* Header slide down on scroll */
.site-header {
  animation: slideDown 0.5s ease;
}

/* Hero text entrance */
.hero-content .hero-badge,
.hero-content .hero-title,
.hero-content .hero-desc,
.hero-content .hero-buttons {
  opacity: 0;
}

.hero-swiper .swiper-slide-active .hero-badge {
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-swiper .swiper-slide-active .hero-title {
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero-swiper .swiper-slide-active .hero-desc {
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

.hero-swiper .swiper-slide-active .hero-buttons {
  animation: fadeInUp 0.8s ease 0.8s forwards;
}

.hero-swiper .swiper-slide-active .hero-stats-row {
  animation: fadeInUp 0.8s ease 1s forwards;
}

/* WhatsApp pulse ring */
.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: pulse 2s ease-in-out infinite;
  opacity: 0.5;
}

/* Scroll reveal initial state (before AOS) */
[data-aos] {
  pointer-events: auto;
}

/* Smooth image load */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Popup entrance */
.popup-overlay.active .popup-content {
  animation: zoomIn 0.3s ease;
}

/* Newsletter success animation */
@keyframes checkmark {
  0% {
    stroke-dashoffset: 50;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.form-success {
  animation: fadeInUp 0.5s ease;
}

/* Process step connector animation */
.process-step {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.process-step:nth-child(1) { animation-delay: 0.1s; }
.process-step:nth-child(2) { animation-delay: 0.2s; }
.process-step:nth-child(3) { animation-delay: 0.3s; }
.process-step:nth-child(4) { animation-delay: 0.4s; }
.process-step:nth-child(5) { animation-delay: 0.5s; }

/* Testimonial quote mark */
.testimonial-text::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--color-navy-light);
  opacity: 0.2;
  line-height: 0;
  display: block;
  margin-bottom: -10px;
}

/* Reduced motion override */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-up,
  .animate-fade-left,
  .animate-fade-right,
  .animate-zoom,
  .animate-float,
  .animate-pulse,
  .process-step,
  .hero-content .hero-badge,
  .hero-content .hero-title,
  .hero-content .hero-desc,
  .hero-content .hero-buttons {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .product-image::after {
    display: none;
  }

  .whatsapp-float::before {
    animation: none;
  }
}
