/* ============================================================
   UNMOZI Website - Animations: Keyframes & Transitions
   ============================================================ */

/* ===== Keyframes ===== */

@keyframes particles-drift {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}

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

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

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.15);
  }
  50% {
    box-shadow: 0 0 40px rgba(249, 115, 22, 0.3);
  }
}

@keyframes header-reveal {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== Scroll-Triggered Animation States ===== */

/* Elements marked with data-animate start hidden */
[data-animate] {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

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

[data-animate="scale-in"] {
  transform: scale(0.9);
}

/* Visible state — triggered by IntersectionObserver */
[data-animate].is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Stagger delay for sequential items */
[data-animate].is-visible [data-animate-delay="1"] { transition-delay: 0.1s; }
[data-animate].is-visible [data-animate-delay="2"] { transition-delay: 0.2s; }
[data-animate].is-visible [data-animate-delay="3"] { transition-delay: 0.3s; }
[data-animate].is-visible [data-animate-delay="4"] { transition-delay: 0.4s; }
[data-animate].is-visible [data-animate-delay="5"] { transition-delay: 0.5s; }

/* ===== Hover Effects ===== */

/* Button arrow slide on hover */
.btn--primary svg {
  transition: transform var(--transition-base);
}

.btn--primary:hover svg {
  transform: translateX(3px);
}

/* Card hover lift */
.stat {
  transition: transform var(--transition-base),
              box-shadow var(--transition-base),
              border-color var(--transition-base);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-accent);
  border-color: rgba(249, 115, 22, 0.25);
}

/* Feature list icon hover */
.feature-list__item {
  transition: transform var(--transition-base),
              color var(--transition-base);
}

.feature-list__item:hover {
  color: var(--color-text-primary);
  transform: translateX(2px);
}

.feature-list__item:hover .feature-list__icon {
  color: var(--color-cyan-400);
}

/* Spec grid row hover */
.specs-grid dt:hover,
.specs-grid dd:hover {
  color: var(--color-text-primary);
}

/* About highlight hover */
.about__highlight {
  transition: transform var(--transition-base),
              box-shadow var(--transition-base);
}

.about__highlight:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-accent);
}

/* Social icon hover */
.footer__social-link svg {
  transition: transform var(--transition-base);
}

.footer__social-link:hover svg {
  transform: scale(1.1);
}

/* Product image hover pulse */
.tpms__image-placeholder,
.tpms__image-photo,
.product-carousel {
  transition: box-shadow var(--transition-slow),
              transform var(--transition-slow);
}

.tpms__image-placeholder:hover,
.tpms__image-photo:hover,
.product-carousel:hover {
  box-shadow: var(--shadow-glow-accent);
  transform: scale(1.02);
}

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

  [data-animate] {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
