/* ── reveal on scroll ────────────────────────────────────────────
   Replaces WOW.js, which hid elements with an inline
   `visibility:hidden` and only revealed them when its scroll
   callback fired. A missed callback left the content invisible
   permanently - 196 elements on this site, including every service
   card, the pricing table and the contact form.

   The model is inverted here: content is VISIBLE by default and the
   animation only adds motion. The hidden starting state is scoped to
   `html.js`, and that class is set by an inline script in <head>, so a
   visitor without JavaScript is never shown a hidden element.

   OPACITY IS NOT TRANSITIONED, ON PURPOSE.
   A transition on opacity fails in exactly the situation WOW failed in.
   An element that is off-screen when `is-in` is added has no rendered
   frame to transition FROM, so the browser creates the transition in the
   `running` state at `currentTime: 0` and never advances it. Measured:
   22 of 28 elements stuck at `opacity: 0`, `playState: running`,
   `currentTime: 0`, indefinitely.

   So opacity changes instantly and only the transform is transitioned.
   If the transform transition is stuck, the element sits 14px lower and
   is still VISIBLE. A failed entrance animation is cosmetic; an
   invisible page is a business problem. */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: transform 0.62s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html.js .reveal.reveal-scale {
  transform: translateY(14px) scale(0.985);
}
html.js .reveal.is-in {
  opacity: 1;
  transform: none;
}
/* Safety net. js/reveal.js adds `reveal-all` to <html> after 2.5s, or
   immediately if IntersectionObserver is missing. This state shows every
   element with NO transition at all, so visibility can never depend on
   an animation completing. */
html.js.reveal-all .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}
/* Stagger siblings so a row of cards arrives in sequence rather than
   all at once. The delays are small enough that the last card is still
   moving when the row first appears. */
html.js .reveal.is-in:nth-child(2) { transition-delay: 0.07s; }
html.js .reveal.is-in:nth-child(3) { transition-delay: 0.14s; }
html.js .reveal.is-in:nth-child(4) { transition-delay: 0.21s; }
html.js .reveal.is-in:nth-child(5) { transition-delay: 0.28s; }
html.js .reveal.is-in:nth-child(6) { transition-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal,
  html.js .reveal.reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
