/* ============================================================
   Scroll-reveal animations (replicas dos keyframes do Elementor)
   ============================================================ */

/* Estado inicial: invisível antes de entrar no viewport */
[data-animation] {
  opacity: 0;
  will-change: transform, opacity;
  transition: none;
}

/* Quando IntersectionObserver adiciona .is-visible, dispara o keyframe */
[data-animation].is-visible {
  opacity: 1;
  animation-duration: .9s;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animation="fadeIn"].is-visible        { animation-name: fadeIn; }
[data-animation="fadeInUp"].is-visible      { animation-name: fadeInUp; }
[data-animation="fadeInDown"].is-visible    { animation-name: fadeInDown; }
[data-animation="fadeInLeft"].is-visible    { animation-name: fadeInLeft; }
[data-animation="fadeInRight"].is-visible   { animation-name: fadeInRight; }
[data-animation="zoomIn"].is-visible        { animation-name: zoomIn; }
[data-animation="rotateInUpRight"].is-visible { animation-name: rotateInUpRight; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 40px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translate3d(0, -40px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translate3d(-50px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translate3d(50px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale3d(0.7, 0.7, 0.7); }
  50%  { opacity: 1; }
  to   { opacity: 1; transform: scale3d(1, 1, 1); }
}
@keyframes rotateInUpRight {
  from {
    opacity: 0;
    transform-origin: right bottom;
    transform: rotate3d(0, 0, 1, -90deg);
  }
  to {
    opacity: 1;
    transform-origin: right bottom;
    transform: translate3d(0, 0, 0);
  }
}

/* Respeita preferência do sistema por menos movimento */
@media (prefers-reduced-motion: reduce) {
  [data-animation] { opacity: 1 !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
