/*
 * Vendored, verbatim port of hhds-web-library's PAT-002 "reveal-motion"
 * pattern (patterns/reveal-motion/reveal-motion.css) -- this standalone
 * WordPress child theme doesn't load the library's own build pipeline (see
 * the .lib-no-list incident, 2026-09-09: referencing a --lib-* class name
 * without actually vendoring its real definition silently breaks), so this
 * is the real implementation copied in, not a bespoke reinvention. Same
 * class/attribute contract (.lib-reveal, [data-motion-variant],
 * .is-motion-visible, .lib-motion-ready) as the library's own real pattern,
 * so any future real library integration stays drop-in compatible.
 * Tokens consumed here (--lib-motion-*) are already vendored verbatim in
 * tokens-base.css -- no new tokens invented for this.
 *
 * Motion Direction System (catalog/motion-system-v1.md) governs every use
 * of this pattern on this site: purpose-first only (orient/sequence/prove,
 * never bare decoration), viewport-triggered one-shot entrance (tier
 * "entry", <=700ms), smallest sufficient tier, and mandatory
 * prefers-reduced-motion support (below) -- see each section's own
 * .lib-reveal usage in functions.php for its specific intent/rationale.
 */
.lib-motion-ready .lib-reveal {
  opacity: 0;
  transform: translate3d(0, var(--lib-motion-distance-md), 0);
  transition:
    opacity var(--lib-motion-duration-entry) var(--lib-motion-ease-emphasis),
    transform var(--lib-motion-duration-entry) var(--lib-motion-ease-emphasis);
}

.lib-motion-ready .lib-reveal[data-motion-variant="fade"] {
  transform: none;
}

.lib-motion-ready .lib-reveal[data-motion-variant="scale"] {
  transform: scale(var(--lib-motion-scale-enter));
}

.lib-motion-ready .lib-reveal[data-motion-variant="left"] {
  transform: translate3d(calc(var(--lib-motion-distance-md) * -1), 0, 0);
}

.lib-motion-ready .lib-reveal[data-motion-variant="right"] {
  transform: translate3d(var(--lib-motion-distance-md), 0, 0);
}

.lib-motion-ready .lib-reveal.is-motion-visible,
.lib-motion-ready .lib-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.lib-reveal-group > .lib-reveal:nth-child(2),
.lib-reveal--delay-1 {
  transition-delay: var(--lib-motion-delay-1);
}

.lib-reveal-group > .lib-reveal:nth-child(3),
.lib-reveal--delay-2 {
  transition-delay: var(--lib-motion-delay-2);
}

.lib-reveal-group > .lib-reveal:nth-child(4),
.lib-reveal--delay-3 {
  transition-delay: var(--lib-motion-delay-3);
}

.lib-reveal-group > .lib-reveal:nth-child(5),
.lib-reveal-group > .lib-reveal:nth-child(6),
.lib-reveal--delay-4 {
  transition-delay: var(--lib-motion-delay-4);
}

@media (prefers-reduced-motion: reduce) {
  .lib-motion-ready .lib-reveal,
  .lib-motion-ready .lib-reveal.is-motion-visible,
  .lib-motion-ready .lib-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
