/* Generated from packages/motion-web/src/motion.css by scripts/export-django-static.mjs. Edit the source. */
/* @aents/motion-web · the presets, as CSS transitions.
 *
 * The vocabulary — Fade, Rise, Scale, Slide — is the one index.tsx exports,
 * and the numbers come from @aents/theme: index.tsx writes the duration, the
 * curve and the delay of each instance into the three custom properties this
 * file reads.
 */

.aents-motion {
  transition-property: opacity, transform;
  transition-duration: var(--aents-motion-duration, 280ms);
  transition-timing-function: var(
    --aents-motion-ease,
    cubic-bezier(0.22, 1, 0.36, 1)
  );
  transition-delay: var(--aents-motion-delay, 0ms);
}

/* The hidden half of every preset. Only what a preset moves is declared, so a
 * fade transitions opacity alone and never touches the compositor for a
 * transform it does not use. */
.aents-motion--hidden {
  opacity: 0;
  /* Promised only while there is something still to animate: a permanent
   * will-change on every revealed section keeps layers alive for nothing. */
  will-change: opacity, transform;
}

.aents-motion--hidden.aents-motion--rise {
  transform: translateY(16px);
}

.aents-motion--hidden.aents-motion--scale {
  transform: scale(0.96);
}

.aents-motion--hidden.aents-motion--slideLeft {
  transform: translateX(16px);
}

/* The reveal is over: whatever the compositor was doing with it, the element
 * takes its final value. See `useSettled` — a section suspended by
 * content-visibility does not advance a transition, and one that scrolled away
 * halfway through used to come back halfway through. */
.aents-motion--settled {
  transition: none;
}

/* The page-reading indicator. Scaled from its left edge by a scroll listener;
 * the short transition is what stands in for the spring the engine used to
 * run, and it is what keeps the bar from stepping frame by frame. */
.aents-motion-progress {
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 160ms linear;
}

/* Belt and braces. index.tsx already renders every preset in its final state
 * when the preference is set — this is here so a class that somehow survives a
 * preference change still cannot animate. */
@media (prefers-reduced-motion: reduce) {
  .aents-motion,
  .aents-motion-progress {
    transition: none;
  }
}
