/* Shared opt-in motion tokens. Loaded before site/widget/page styling.
   Content is NEVER hidden by this stylesheet; JS owns transient animations only.
   Times are seconds (unitless); distances accept bounded px/rem values. */
:where(.lp-document) {
  --lp-motion-time: 0.45;
  --lp-motion-dist: 16px;
  --lp-motion-delay: 0;
  --lp-motion-stagger: 0.07;
  --lp-motion-ease: out;
  --lp-motion-enabled: 1;
}
/* Background-only parallax enhancement. The authored background remains the
   static fallback. The private marker is set by motion.js, never by Markdown.
   Reserve the section's ::before for this layer; existing pseudo-art is skipped. */
.lp-section[data-lp-parallax="true"] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.lp-section[data-lp-parallax="true"]::before {
  content: "";
  position: absolute;
  /* Match the resolved distance plus a 1px seam guard, capped at 256 + 1. */
  inset: calc(-1 * clamp(0px, var(--lp-parallax-overscan, 64px), 257px)) 0;
  z-index: -1;
  pointer-events: none;
  background-color: inherit;
  background-image: inherit;
  background-position: inherit;
  background-repeat: no-repeat;
  background-size: cover;
  transform: translate3d(0, var(--lp-parallax-y, 0px), 0);
}
/* Standalone Markdown image: the existing paragraph is the stationary frame.
   Individual translate/scale preserve an author's separate transform property. */
.lp-document p[data-lp-parallax-frame="true"] { overflow: hidden; }
.lp-document p[data-lp-parallax-frame="true"] > img[data-lp-parallax="true"] {
  display: block;
  transform-origin: center;
  translate: 0 var(--lp-parallax-y, 0px);
  scale: var(--lp-parallax-scale, 1);
}
@media (max-width: 48rem), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .lp-section[data-lp-parallax="true"]::before { content: none; }
  .lp-document p[data-lp-parallax-frame="true"] > img[data-lp-parallax="true"] {
    translate: none;
    scale: none;
  }
}
@media print {
  .lp-section[data-lp-parallax="true"]::before { content: none; }
  .lp-document p[data-lp-parallax-frame="true"] > img[data-lp-parallax="true"] {
    translate: none;
    scale: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  :where(.lp-document) { --lp-motion-enabled: 0; }
}
@media print {
  :where(.lp-document) { --lp-motion-enabled: 0; }
}
