/**
 * Motion System v1.1.0.0 — unified animations, transitions, micro-interactions.
 * Motion tokens (--motion-*, --ease-*) defined in tokens.css (inlined in layout).
 */

/* ── Micro-interactions (cards, buttons, links) ── */
.motion-hover-lift {
  transition:
    transform var(--motion-base) var(--ease-emphasis),
    box-shadow var(--motion-base) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard);
}
@media (hover: hover) {
  .motion-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elite-md);
  }
}

.motion-focus-ring:focus-visible {
  outline: 2px solid var(--clr-accent-primary);
  outline-offset: 3px;
}

.motion-press:active {
  transform: scale(0.98);
  transition: transform var(--motion-fast) var(--ease-standard);
}

/* Hub card motion lives in hub-card.css — avoid duplicate lift rules here */

/* Smooth link underlines */
.motion-link {
  transition: color var(--motion-fast) var(--ease-standard);
}
.motion-link-underline {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size var(--motion-base) var(--ease-emphasis);
}
.motion-link-underline:hover {
  background-size: 100% 1px;
}

/* WhatsApp floating CTA — token-driven */
.wa-float-cta {
  position: fixed !important;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  z-index: 99999;
  border: 2px solid rgba(255, 255, 255, 0.65);
  transition:
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-base) var(--ease-standard),
    opacity var(--motion-fast) var(--ease-standard);
  pointer-events: auto;
}
@media (hover: hover) {
  .wa-float-cta:hover,
  .wa-float-cta:focus-visible {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
    color: #fff;
    text-decoration: none;
    outline: none;
  }
}
@media (max-width: 767px) {
  .wa-float-cta {
    right: 14px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }
}

/* Footer links — underline grow */
.footer-link.motion-link-underline {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
}
.site-footer__link.motion-link-underline:hover,
.footer-link.motion-link-underline:hover {
  background-size: 100% 1px;
}

/* Fade-in for dynamically injected content */
@keyframes motion-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.motion-fade-in {
  animation: motion-fade-in var(--motion-slow) var(--ease-emphasis) both;
}

/* Stagger helper (aligns with animations.css) */
.motion-stagger > *:nth-child(1) { animation-delay: 0ms; }
.motion-stagger > *:nth-child(2) { animation-delay: 60ms; }
.motion-stagger > *:nth-child(3) { animation-delay: 120ms; }
.motion-stagger > *:nth-child(4) { animation-delay: 180ms; }
.motion-stagger > *:nth-child(5) { animation-delay: 240ms; }
.motion-stagger > *:nth-child(6) { animation-delay: 300ms; }

/* ── Reduced motion: accessibility + performance ── */
@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;
  }

  .reveal,
  .reveal-zoom {
    opacity: 1 !important;
    transform: none !important;
  }

  .marquee-track {
    animation: none !important;
  }

  .motion-hover-lift:hover,
  .hub-card:hover,
  .nh-card:hover,
  .fw-card:hover,
  .za-catalog-card:hover,
  .bento-card:hover {
    transform: none !important;
  }

  .vs-page-loader {
    display: none !important;
  }
}
