/* Content stays visible until the observer prepares a short entrance. */
@keyframes portfolio-arrival {
  from { opacity: var(--arrival-opacity, .06); transform: translateY(var(--arrival-rise, 1.2rem)); }
  to { opacity: 1; transform: translateY(0); }
}

@media screen {
  :where(html[data-motion="play"]) [data-arrival-pending]:not(:focus-within, :target) { opacity: var(--arrival-opacity, .06); }
  :where(html[data-motion="play"]) [data-arriving] {
    animation: portfolio-arrival var(--arrival-duration, 880ms) cubic-bezier(.19,.63,.28,1)
      var(--arrival-delay, 0ms) backwards;
  }

  :is(.gallery-intro h1, .hero-copy h1, .banner-type h1, .opening h1, .sport-copy h2) {
    --arrival-rise: .72em;
    --arrival-duration: 960ms;
  }
  :is(.gallery-intro p, .hero-intro, .cover-brief, .sport-intro, .opening .intro) {
    --arrival-delay: 80ms;
    --arrival-duration: 780ms;
  }
  :is(.hero-copy .facts, .hero-media) { --arrival-delay: 160ms; }
  :is(.banner-type .cover-kicker, .hero-copy .eyebrow, .opening .context) {
    --arrival-rise: .5rem;
    --arrival-delay: 55ms;
  }
  :is(.work-card, .case-figure, .mascot-spread, .lockups, .venue-gallery a,
    .related-card, .feed-handset, .hero-media, .guide-plate, .portrait, .study-strip figure, .tour-screens) {
    --arrival-opacity: .12;
    --arrival-rise: 1.55rem;
    --arrival-duration: 920ms;
  }
  :is(.work-card:first-child, .work-card:nth-child(2)) { --arrival-delay: 145ms; }
  :is(.related-card + .related-card, .figure-pair .case-figure + .case-figure,
    .section-body, .feed-note, .venue-rooms > :nth-child(2), .venue-details > :nth-child(2)) {
    --arrival-delay: 75ms;
  }
  .venue-details > :nth-child(3) { --arrival-delay: 150ms; }

  [data-arriving]:focus-within { animation: none; }
  .study-strip > :nth-child(even) { --arrival-delay: 65ms; }
  .venue-pair > :nth-child(2) { --arrival-delay: 95ms; }
}
@media screen and (min-width: 701px) {
  .work-card:nth-child(even) { --arrival-delay: 75ms; }
  .work-card:nth-child(2) { --arrival-delay: 220ms; }
}
