/* ==========================================================================
   Himalayan Trails — motion

   One reveal, used sparingly. No library, no parallax, no scroll-jacking. The
   whole file is inert under prefers-reduced-motion.
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity var(--ht-duration-slow) var(--ht-ease-out),
    transform var(--ht-duration-slow) var(--ht-ease-out);
}

[data-reveal][data-revealed="true"] {
  opacity: 1;
  transform: none;
}

/* Children of a revealed group stagger slightly so a row of cards reads as a
   sequence rather than a single block snapping in. */
[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(1rem);
  transition:
    opacity var(--ht-duration-slow) var(--ht-ease-out),
    transform var(--ht-duration-slow) var(--ht-ease-out);
  transition-delay: calc(var(--reveal-index, 0) * 70ms);
}

[data-reveal-group][data-revealed="true"] > * {
  opacity: 1;
  transform: none;
}

/*
 * Fallback for browsers without IntersectionObserver, and the safety net if the
 * JS module fails to load: content must never be permanently invisible.
 */
.no-js [data-reveal],
.no-js [data-reveal-group] > * {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-group] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
