/* BEM mixes own only optional motion; each original block keeps its layout. */
.about-motion { min-inline-size: 0; --about-motion-offset: 20px; }

@media (prefers-reduced-motion: no-preference) {
  .about-motion__item--pending { opacity: 0; }

  .about-motion__item--entered {
    animation: var(--about-motion-entrance, about-motion-arrive) 1200ms cubic-bezier(.25, .46, .45, .94) backwards;
  }

  .about-motion__item--from-left { --about-motion-entrance: about-motion-from-left; }
  .about-motion__item--from-right { --about-motion-entrance: about-motion-from-right; }
  .about-motion__item--copy { animation-delay: 100ms; }
  .about-motion__item--photo { animation-duration: 1400ms; }
  .about-motion__item--step { animation-duration: 1000ms; }
  .about-motion__item--link { transition: translate 450ms cubic-bezier(.22, 1, .36, 1); }

  .about-motion__item--link:focus-visible { translate: 0 -4px; }
  .about-motion__item--settled { animation: none; }

  @media (hover: hover) and (pointer: fine) {
    .about-motion__item--link:hover { translate: 0 -4px; }
  }

  /* A shallow window cannot provide the entrance's reading space. */
  @media (max-height: 400px) {
    .about-motion__item--pending { opacity: 1; }
    .about-motion__item--entered { animation: none; }
  }
}

/* Keep lateral movement inside the existing compact page gutters. */
@media (max-width: 639px) {
  .about-motion { --about-motion-offset: 8px; }
}

@keyframes about-motion-arrive {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes about-motion-from-left {
  from { opacity: 0; transform: translateX(calc(-1 * var(--about-motion-offset))); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes about-motion-from-right {
  from { opacity: 0; transform: translateX(var(--about-motion-offset)); }
  to { opacity: 1; transform: translateX(0); }
}
