/* Shared motion primitives for load-in and scroll reveal effects */
:root {
  --reveal-duration: 0.62s;
  --reveal-easing: cubic-bezier(0.22, 0.61, 0.36, 1);
  --reveal-distance-y: 22px;
  --reveal-distance-x: 28px;
}

/* Replace heavy blur fade-in with a lighter transform + opacity motion */
.text-focus-in {
  -webkit-animation: text-soft-in 0.62s var(--reveal-easing) both !important;
  animation: text-soft-in 0.62s var(--reveal-easing) both !important;
}

/* Keep intentional rotation depth on marquee/service bars. */
.text-focus-in.rotate-2,
.text-focus-in.rotate-minus-1 {
  -webkit-animation: text-soft-in-fade 0.62s var(--reveal-easing) both !important;
  animation: text-soft-in-fade 0.62s var(--reveal-easing) both !important;
}

@-webkit-keyframes text-soft-in {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes text-soft-in {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@-webkit-keyframes text-soft-in-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes text-soft-in-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scroll reveal only activates when JS is available. */
.has-reveal-js [data-reveal] {
  opacity: 0;
  transition: opacity var(--reveal-duration) var(--reveal-easing),
    transform var(--reveal-duration) var(--reveal-easing);
  will-change: opacity, transform;
}

.has-reveal-js [data-reveal="fade-up"] {
  transform: translate3d(0, var(--reveal-distance-y), 0);
}

.has-reveal-js [data-reveal="fade-left"] {
  transform: translate3d(var(--reveal-distance-x), 0, 0);
}

.has-reveal-js [data-reveal="fade-right"] {
  transform: translate3d(calc(var(--reveal-distance-x) * -1), 0, 0);
}

.has-reveal-js [data-reveal="scale-up"] {
  transform: scale(0.97);
}

.has-reveal-js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 767.98px) {
  :root {
    --reveal-duration: 0.56s;
    --reveal-distance-y: 14px;
    --reveal-distance-x: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-focus-in,
  .wave,
  .illustration-wiggle,
  .scrolling-text-inner > div,
  .badge-pulse::before,
  [data-reveal] {
    -webkit-animation: none !important;
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
