/*
 * scroll-reveal.css — adapted motion-anything recipe (scroll-reveal)
 * https://github.com/nexu-io/motion-anything
 *
 * fades + moves elements into view as they scroll into the viewport.
 * direction is chosen per element via data-reveal-dir (default: up).
 *
 * GPU-safe: transform + opacity only.
 * Respects prefers-reduced-motion (instant end state, no travel).
 */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

/*
 * Direction variants.
 * Place elements according to where they sit on the page:
 *   - default (up) — most content rises as it enters.
 *   - down — for panels that visually “drop in” from above the natural reading spot.
 *   - left / right — for lateral sequences, feature strips, side cards.
 */
[data-reveal][data-reveal-dir="down"] {
  transform: translateY(-16px);
}

[data-reveal][data-reveal-dir="left"] {
  transform: translateX(-16px);
}

[data-reveal][data-reveal-dir="right"] {
  transform: translateX(16px);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
