/* Scroll-triggered and entrance animations (Elementor/animate.css compatible) */
/* Elementor/WordPress zoom animations (from gagoniri.com about-us) */
@keyframes zoomInUp {
  from { opacity: 0; transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0); animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); }
  60% { opacity: 1; transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0); animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); }
  100% { opacity: 1; transform: none; }
}
@keyframes zoomInLeft {
  from { opacity: 0; transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0); animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); }
  60% { opacity: 1; transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0); animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); }
  100% { opacity: 1; transform: none; }
}
@keyframes zoomInRight {
  from { opacity: 0; transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0); animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); }
  60% { opacity: 1; transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0); animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); }
  100% { opacity: 1; transform: none; }
}

/* Elementor animations for Our Mission, Pricing, Contact (from gagoniri.com) */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translate3d(-100%, 0, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translate3d(100%, 0, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 100%, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translate3d(-100%, 0, 0); visibility: visible; }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translate3d(100%, 0, 0); visibility: visible; }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); }
  50% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes jello {
  11.1%, from, to { transform: none; }
  22.2% { transform: skewX(-12.5deg) skewY(-12.5deg); }
  33.3% { transform: skewX(6.25deg) skewY(6.25deg); }
  44.4% { transform: skewX(-3.125deg) skewY(-3.125deg); }
  55.5% { transform: skewX(1.5625deg) skewY(1.5625deg); }
  66.6% { transform: skewX(-0.78125deg) skewY(-0.78125deg); }
  77.7% { transform: skewX(0.390625deg) skewY(0.390625deg); }
  88.8% { transform: skewX(-0.1953125deg) skewY(-0.1953125deg); }
}
@keyframes rotateInUpRight {
  from { transform-origin: right bottom; transform: rotate3d(0, 0, 1, -90deg); opacity: 0; }
  to { transform-origin: right bottom; transform: none; opacity: 1; }
}

/* Base: hidden until .in-view is added */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.animate-on-scroll.in-view {
  opacity: 1;
}

/* Animation variants – set initial transform so transition works */
.animate-on-scroll.anim-fade-in { }
.animate-on-scroll.anim-fade-in.in-view { opacity: 1; }

.animate-on-scroll.anim-fade-in-up { transform: translateY(24px); }
.animate-on-scroll.anim-fade-in-up.in-view { transform: translateY(0); animation: none; }

/* WordPress/AOS-style: stronger fade-up for page titles (match gagoniri.com) */
.animate-on-scroll.anim-fade-in-up-page { transform: translateY(60px); }
.animate-on-scroll.anim-fade-in-up-page.in-view { transform: translateY(0); animation: none; }

/* Fade in from right (element enters moving left) – AOS “fade-left” */
.animate-on-scroll.anim-fade-in-left { transform: translateX(60px); }
.animate-on-scroll.anim-fade-in-left.in-view { transform: translateX(0); animation: none; }

/* Fade in from left (element enters moving right) – AOS “fade-right” */
.animate-on-scroll.anim-fade-in-right { transform: translateX(-60px); }
.animate-on-scroll.anim-fade-in-right.in-view { transform: translateX(0); animation: none; }

.animate-on-scroll.anim-slide-in-left { transform: translateX(-32px); }
.animate-on-scroll.anim-slide-in-left.in-view { transform: translateX(0); animation: none; }

.animate-on-scroll.anim-slide-in-right { transform: translateX(32px); }
.animate-on-scroll.anim-slide-in-right.in-view { transform: translateX(0); animation: none; }

.animate-on-scroll.anim-slide-in-up { transform: translateY(24px); }
.animate-on-scroll.anim-slide-in-up.in-view { transform: translateY(0); animation: none; }

.animate-on-scroll.anim-zoom-in { transform: scale(0.95); }
.animate-on-scroll.anim-zoom-in.in-view { transform: scale(1); animation: none; }

/* Elementor-style zoom (match gagoniri.com about-us: keyframe animation on in-view) */
.animate-on-scroll.anim-zoom-in-up {
  opacity: 0;
  transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);
  transition: none;
}
.animate-on-scroll.anim-zoom-in-up.in-view {
  animation: zoomInUp 1s cubic-bezier(0.175, 0.885, 0.32, 1) forwards;
}

.animate-on-scroll.anim-zoom-in-left {
  opacity: 0;
  transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);
  transition: none;
}
.animate-on-scroll.anim-zoom-in-left.in-view {
  animation: zoomInLeft 1s cubic-bezier(0.175, 0.885, 0.32, 1) forwards;
}

.animate-on-scroll.anim-zoom-in-right {
  opacity: 0;
  transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);
  transition: none;
}
.animate-on-scroll.anim-zoom-in-right.in-view {
  animation: zoomInRight 1s cubic-bezier(0.175, 0.885, 0.32, 1) forwards;
}

/* Elementor keyframe animations – Our Mission, Pricing, Contact */
.animate-on-scroll.anim-fadeInLeft {
  opacity: 0;
  transform: translate3d(-100%, 0, 0);
  transition: none;
}
.animate-on-scroll.anim-fadeInLeft.in-view {
  animation: fadeInLeft 0.8s ease-out forwards;
}
.animate-on-scroll.anim-fadeInRight {
  opacity: 0;
  transform: translate3d(100%, 0, 0);
  transition: none;
}
.animate-on-scroll.anim-fadeInRight.in-view {
  animation: fadeInRight 0.8s ease-out forwards;
}
.animate-on-scroll.anim-fadeInUp {
  opacity: 0;
  transform: translate3d(0, 100%, 0);
  transition: none;
}
.animate-on-scroll.anim-fadeInUp.in-view {
  animation: fadeInUp 0.8s ease-out forwards;
}
.animate-on-scroll.anim-slideInLeft {
  opacity: 0;
  transform: translate3d(-100%, 0, 0);
  transition: none;
}
.animate-on-scroll.anim-slideInLeft.in-view {
  animation: slideInLeft 0.8s ease-out forwards;
}
.animate-on-scroll.anim-slideInRight {
  opacity: 0;
  transform: translate3d(100%, 0, 0);
  transition: none;
}
.animate-on-scroll.anim-slideInRight.in-view {
  animation: slideInRight 0.8s ease-out forwards;
}
.animate-on-scroll.anim-zoomIn {
  opacity: 0;
  transform: scale3d(0.3, 0.3, 0.3);
  transition: none;
}
.animate-on-scroll.anim-zoomIn.in-view {
  animation: zoomIn 0.8s ease-out forwards;
}
.animate-on-scroll.anim-jello {
  transition: none;
}
.animate-on-scroll.anim-jello.in-view {
  animation: jello 1s ease-in-out forwards;
}
.animate-on-scroll.anim-rotateInUpRight {
  opacity: 0;
  transform-origin: right bottom;
  transform: rotate3d(0, 0, 1, -90deg);
  transition: none;
}
.animate-on-scroll.anim-rotateInUpRight.in-view {
  animation: rotateInUpRight 0.8s ease-out forwards;
}

/* Stagger delays for children */
.animate-stagger-children .animate-on-scroll.anim-delay-1 { transition-delay: 0.1s; }
.animate-stagger-children .animate-on-scroll.anim-delay-2 { transition-delay: 0.2s; }
.animate-stagger-children .animate-on-scroll.anim-delay-3 { transition-delay: 0.3s; }
.animate-stagger-children .animate-on-scroll.anim-delay-4 { transition-delay: 0.4s; }
.animate-stagger-children .animate-on-scroll.anim-delay-5 { transition-delay: 0.5s; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none !important;
    transition: none;
  }
  .animate-on-scroll.anim-fade-in-up,
  .animate-on-scroll.anim-slide-in-left,
  .animate-on-scroll.anim-slide-in-right,
  .animate-on-scroll.anim-slide-in-up,
  .animate-on-scroll.anim-zoom-in,
  .animate-on-scroll.anim-zoom-in-up,
  .animate-on-scroll.anim-zoom-in-left,
  .animate-on-scroll.anim-zoom-in-right,
  .animate-on-scroll.anim-fade-in-up-page,
  .animate-on-scroll.anim-fade-in-left,
  .animate-on-scroll.anim-fade-in-right { transform: none; }
  .animate-on-scroll.in-view { animation: none; }
  .animate-on-scroll.anim-zoom-in-up.in-view,
  .animate-on-scroll.anim-zoom-in-left.in-view,
  .animate-on-scroll.anim-zoom-in-right.in-view { animation: none; }
  .animate-on-scroll.anim-fadeInLeft,
  .animate-on-scroll.anim-fadeInRight,
  .animate-on-scroll.anim-fadeInUp,
  .animate-on-scroll.anim-slideInLeft,
  .animate-on-scroll.anim-slideInRight,
  .animate-on-scroll.anim-zoomIn,
  .animate-on-scroll.anim-jello,
  .animate-on-scroll.anim-rotateInUpRight { transform: none; }
  .animate-on-scroll.anim-fadeInLeft.in-view,
  .animate-on-scroll.anim-fadeInRight.in-view,
  .animate-on-scroll.anim-fadeInUp.in-view,
  .animate-on-scroll.anim-slideInLeft.in-view,
  .animate-on-scroll.anim-slideInRight.in-view,
  .animate-on-scroll.anim-zoomIn.in-view,
  .animate-on-scroll.anim-jello.in-view,
  .animate-on-scroll.anim-rotateInUpRight.in-view { animation: none; }
}
