/* Shared one-shot entrance motion. JavaScript adds the data attributes only when
   the browser supports IntersectionObserver and motion has not been reduced. */
@media (prefers-reduced-motion: no-preference) {
  html.siteMotion-enabled:not(.siteMotion-prepared) body {
    visibility: hidden;
  }

  html.siteMotion-enabled [data-site-motion]:not([data-site-motion-complete]) {
    opacity: 0;
    translate: 0 var(--site-motion-y, 10px);
    scale: var(--site-motion-scale, 1);
    filter: blur(var(--site-motion-blur, 3px));
  }

  html.siteMotion-enabled [data-site-motion="chrome"]:not([data-site-motion-complete]) {
    --site-motion-y: -7px;
    --site-motion-blur: 2px;
    --site-motion-duration: 360ms;
  }

  html.siteMotion-enabled [data-site-motion="media"]:not([data-site-motion-complete]) {
    --site-motion-y: 8px;
    --site-motion-scale: 1.012;
    --site-motion-blur: 2px;
    --site-motion-duration: 520ms;
  }

  html.siteMotion-enabled [data-site-motion="card"]:not([data-site-motion-complete]) {
    --site-motion-y: 12px;
    --site-motion-scale: .992;
    --site-motion-blur: 2px;
    --site-motion-duration: 460ms;
  }

  html.siteMotion-enabled [data-site-motion][data-site-motion-visible]:not([data-site-motion-complete]) {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    filter: blur(0);
    transition-property: opacity, translate, scale, filter;
    transition-duration: var(--site-motion-duration, 440ms);
    transition-delay: var(--site-motion-delay, 0ms);
    transition-timing-function: cubic-bezier(.2, 0, 0, 1);
  }
}

/* Poster/PDF capture must never depend on whether an item has entered the viewport. */
html.exporting [data-site-motion] {
  opacity: 1 !important;
  translate: 0 0 !important;
  scale: 1 !important;
  filter: blur(0) !important;
  transition: none !important;
}

@media print {
  [data-site-motion] {
    opacity: 1 !important;
    translate: 0 0 !important;
    scale: 1 !important;
    filter: blur(0) !important;
    transition: none !important;
  }
}
