/*
 * cx-motion-reveal.css — look of the scroll reveal (MKT-WP-REPLICA-MOTION-REVEAL).
 * Behaviour: assets/js/motion/cx-motion-reveal.js. Contract: docs/knowledge/motion-module.md.
 *
 * Canvas values (Main.dc.html l.535-538): 40 px up, opacity 0 -> 1, 0.9 s,
 * cubic-bezier(.2,.7,.2,1), delay per child set by the JS in --cx-reveal-delay.
 *
 * Why it can never leave content hidden:
 *   - Everything that hides lives under `html.cx-motion`, a class that exists only
 *     with JS running, no reduced motion and no failed piece (the core removes it
 *     first when anything goes wrong), inside `no-preference`.
 *   - `screen` keeps print and PDF out of it: a printed page shows everything.
 *   - The shift is the individual `translate` property, not `transform`: the lift a
 *     Button gets from Transform on hover (`cx-glow-hover`, Advanced > Transform)
 *     composes with it instead of being overwritten, and a browser without `translate`
 *     still gets the fade, never a hidden element.
 *   - The transition is only on while revealing (`--in` without `--done`); afterwards
 *     the element keeps its own transitions (Elementor's container ones, a hover).
 *
 * Specificity: hiding and revealing are 0,2,0, below the 0,3,0 a widget's own Style
 * tab prints, so nothing here out-ranks an editor setting.
 */
@media screen and (prefers-reduced-motion: no-preference) {
  :where(html.cx-motion) {
    --cx-reveal-shift: 40px;
    --cx-reveal-duration: 0.9s;
    --cx-reveal-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  /* Waiting: hidden and 40 px low, with no transition (it appears already hidden). */
  :where(html.cx-motion) .cx-reveal:not(.cx-reveal--in),
  :where(html.cx-motion) .cx-reveal-item:not(.cx-reveal--in) {
    opacity: 0;
    translate: 0 var(--cx-reveal-shift);
  }

  /* Revealing: back to its own values, over 0.9 s, after its stagger delay. */
  :where(html.cx-motion) .cx-reveal--in:not(.cx-reveal--done) {
    transition:
      opacity var(--cx-reveal-duration) var(--cx-reveal-ease) var(--cx-reveal-delay, 0ms),
      translate var(--cx-reveal-duration) var(--cx-reveal-ease) var(--cx-reveal-delay, 0ms);
  }
}
