/* The start page is intentionally excluded: only content reveals as you scroll. */
@supports (animation-timeline: view()) and (animation-range: entry 0% entry 80%) {
  @media (prefers-reduced-motion: no-preference) {
    body:not(.page-start) main :is(
      .match-hero__body, .match-hero__figure, .field-gallery__intro, .field-card,
      .atlas-heading, .city-grid, .city-preview, .section-heading, .media-feature,
      .home-feature-copy, .support-home-grid > a, .custom-home__copy,
      .custom-home__stage, .goods-home-grid > a, .news-home > div, .news-home__photo,
      .collection-hero__layout, .catalog-toolbar, .city-index, .product-card, .red-editorial,
      .city-detail-hero, .city-kits-heading, .city-detail-products > a, .city-bottom,
      .product-gallery, .product-buy, .design-story,
      .custom-hero-copy, .custom-hero-number, .builder-panel, .custom-preview,
      .custom-products > h2, .custom-product-grid > *, .split-hero__copy,
      .split-hero__graphic, .black-section > h2, .feature-row > *,
      .news-feature, .news-number, .news-photo, .news-longread > article,
      .news-section-heading, .news-row, .matchday > h2, .matchday-grid > *
    ) {
      animation: hnfl-scroll-reveal linear both;
      animation-timeline: view(block);
      animation-range: entry 0% entry 82%;
    }

    /* A short stagger within a row; later rows animate on their own entry. */
    body:not(.page-start) main :is(.product-card, .field-card):nth-child(3n + 2) {
      animation-range: entry 8% entry 88%;
    }
    body:not(.page-start) main :is(.product-card, .field-card):nth-child(3n + 3) {
      animation-range: entry 15% entry 94%;
    }

    /* Keyboard navigation and direct section links never wait on an animation. */
    body:not(.page-start) main :is(:focus-visible, :focus-within, :target) {
      animation: none !important;
    }
    body:not(.page-start) main :target > :first-child {
      animation: none !important;
    }
  }
}

@keyframes hnfl-scroll-reveal {
  from { opacity: .24; translate: 0 1.3rem; }
  to   { opacity: 1; translate: 0 0; }
}
