/* =========================================================
   Site-wide motion
   Content fades and rises into place as it scrolls into view.
   Hidden only while html.motion is set (by motion.njk), so the
   page stays fully visible without JavaScript or with reduced
   motion.
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  html.motion :is(
    .modern-page-heading,
    .team-hiring,
    .team-section-heading,
    .team-card,
    .team-alumni__item,
    .research-card,
    .media-section-heading,
    .media-item,
    .publication-item,
    .news-entry,
    .home-section-heading,
    .home-about__kicker,
    .home-about__title,
    .home-about__copy,
    .home-about__actions,
    .teaching-course,
    .tc-card,
    .teaching-archive,
    .modern-page-card,
    .course-quick__surface,
    .cq,
    .course-content-section,
    .course-content-preamble,
    .publication-hero .columns,
    .teaser .container,
    .page-content > *,
    .bibtex-section .container
  ):not(.is-visible) {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }

  html.motion .reveal-anim {
    transition:
      opacity 0.22s cubic-bezier(0.2, 0.7, 0.2, 1),
      transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1) !important;
    transition-delay: var(--reveal-delay, 0ms) !important;
  }
}
