:root {
  --fx-duration: 700ms;
  --fx-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fx-distance: 2.5rem;
  --fx-delay: 0ms;
  --fx-header-offset: 100px; /* match your sticky header height */
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--fx-header-offset);
}

.fx-up,
.fx-down,
.fx-left,
.fx-right,
.fx-zoom-in,
.fx-zoom-out,
.fx-fade {
  opacity: 0;
  transition:
    opacity var(--fx-duration) var(--fx-ease) var(--fx-delay),
    transform var(--fx-duration) var(--fx-ease) var(--fx-delay);
  will-change: opacity, transform;
}

.fx-up {
  transform: translateY(var(--fx-distance));
}
.fx-down {
  transform: translateY(calc(var(--fx-distance) * -1));
}
.fx-left {
  transform: translateX(var(--fx-distance));
}
.fx-right {
  transform: translateX(calc(var(--fx-distance) * -1));
}
.fx-zoom-in {
  transform: scale(0.92);
}
.fx-zoom-out {
  transform: scale(1.08);
}
.fx-fade {
  transform: none;
}

.fx-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Explicit opt-out for above-the-fold / LCP elements: add class "fx-none"
   (or "no-fx") via Elementor's Advanced tab -> CSS Classes. */
.fx-none,
.no-fx {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fx-up,
  .fx-down,
  .fx-left,
  .fx-right,
  .fx-zoom-in,
  .fx-zoom-out,
  .fx-fade {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
