/* ============================================================
   Motion — restrained, editorial, accessibility-aware
   ============================================================ */

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes line-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes float-glow {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.85;
  }
}

/* Gentle entrance for whole pages */
body {
  animation: page-in 0.55s var(--ease) both;
}

/* Scroll reveals — only active once JS adds .js-reveal */
.js-reveal [data-reveal] {
  opacity: 0;
}

.js-reveal [data-reveal].is-visible {
  animation: reveal-up 0.85s var(--ease) forwards;
  animation-delay: var(--reveal-delay, 0ms);
}

.js-reveal [data-reveal="line"] {
  transform-origin: left;
}

.js-reveal [data-reveal="line"].is-visible {
  animation: line-grow 1s var(--ease) forwards;
}

/* Hero ambience */
.hero::after {
  animation: float-glow 9s ease-in-out infinite;
}

/* Image treatment */
img[data-zoom] {
  transition: transform 0.9s var(--ease), filter 0.6s ease;
}

img[data-zoom]:hover {
  transform: scale(1.04);
}

/* Navigation micro-interactions */
.primary-nav a,
.text-link,
.btn,
.back-link,
.whatsapp-float {
  will-change: transform;
}

/* Reduced motion — respect user preference fully */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

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

  .hero::after {
    animation: none;
  }
}
