/*
 * Entrance motion (UX-09). Elementor plays the animation chosen per element (bounceInLeft, bounceInUp,
 * bounceInRight, bounce, shake…) when it scrolls into view, by adding `.animated` and the animation's
 * class. Every one of those plays the same calm reveal instead: a short fade with a 16 px rise, no
 * bounce, no sideways travel. Siblings that enter together are staggered slightly.
 * The page data is untouched: deactivating the plugin brings the original animations back.
 */
@keyframes mse-reveal {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes mse-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

body .elementor .elementor-element.animated {
  animation-name: mse-reveal !important;
  animation-duration: 0.8s !important;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
  animation-fill-mode: both !important;
  animation-iteration-count: 1 !important;
}

/* Attention effects (shake, bounce, pulse…) only fade in: nothing on the page wobbles. */
body .elementor .elementor-element.animated:is(.shake, .bounce, .pulse, .tada, .wobble, .jello, .swing, .rubberBand, .headShake, .heartBeat, .flash) {
  animation-name: mse-fade !important;
}

/* Header and footer appear without travel so the page frame stays still. */
body .elementor-location-header .elementor-element.animated,
body .elementor-location-footer .elementor-element.animated {
  animation-name: mse-fade !important;
  animation-duration: 0.6s !important;
}

/* Gentle stagger for siblings entering together. */
body .elementor .e-con > .elementor-element.animated:nth-child(2),
body .elementor .e-con-inner > .elementor-element.animated:nth-child(2) { animation-delay: 0.07s !important; }
body .elementor .e-con > .elementor-element.animated:nth-child(3),
body .elementor .e-con-inner > .elementor-element.animated:nth-child(3) { animation-delay: 0.14s !important; }
body .elementor .e-con > .elementor-element.animated:nth-child(n + 4),
body .elementor .e-con-inner > .elementor-element.animated:nth-child(n + 4) { animation-delay: 0.21s !important; }

@media (prefers-reduced-motion: reduce) {
  body .elementor .elementor-element.animated { animation: none !important; }
  body .elementor .elementor-invisible { visibility: visible !important; }
}

/* An image a few pixels wider than the viewport (residency page) made the whole page scroll sideways. */
html, body { overflow-x: clip; }
