/**
 * Scroll reveal (assets/js/scroll-reveal.js), same effect as lp-obuz `.reveal`:
 * fade in + move up 18px, 0.6s ease.
 * Uses the standalone `translate` property (not `transform`) so Tailwind transform classes on the
 * same element (rotate-45, -translate-x-1/2, ...) keep working, and leaves opacity to the element's
 * own classes once visible (opacity-80 stays 0.8).
 */

/* Until the script has picked its blocks, keep below-the-fold page sections hidden (no flash of content).
   The head script removes this class after 2.5s if the reveal script never runs.
   Skip sections with data-sr-skip and the first section (above-the-fold hero) so the initial screen renders immediately. */
html.zk-sr-pending body > :is(section, nav):not([data-sr-skip]):not(:first-of-type),
html.zk-sr-pending main > :is(section, nav):not([data-sr-skip]):not(:first-of-type) {
  opacity: 0;
}

html.zk-sr .reveal {
  transition: opacity 0.6s ease, translate 0.6s ease;
}

html.zk-sr .reveal:not(.is-visible) {
  opacity: 0;
  translate: 0 18px;
}

/* Rows of a [data-sr-stagger] list: come in from the top right and settle into place, one after
   another (the delays are set by the script). */
html.zk-sr .reveal.reveal-right {
  transition: opacity 0.6s ease, translate 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

html.zk-sr .reveal.reveal-right:not(.is-visible) {
  translate: 40px -16px;
}

/* Rows of a [data-sr-stagger="down"] list (e.g. the process steps): drop in from above. */
html.zk-sr .reveal.reveal-down {
  transition: opacity 0.6s ease, translate 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

html.zk-sr .reveal.reveal-down:not(.is-visible) {
  translate: 0 -28px;
}

/* No sideways page scroll while rows are still shifted to the right. */
html.zk-sr [data-sr-stagger]:not([data-sr-stagger="down"]):has(> .reveal) {
  overflow-x: clip;
}

@media print {
  html.zk-sr-pending body > :is(section, nav),
  html.zk-sr-pending main > :is(section, nav),
  html.zk-sr .reveal:not(.is-visible),
  html.zk-sr .reveal.reveal-right:not(.is-visible),
  html.zk-sr .reveal.reveal-down:not(.is-visible) {
    opacity: 1;
    translate: none;
  }
}
