@media (prefers-reduced-motion: no-preference) {
  @keyframes clinic-copy-in {
    from { opacity: .55; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }

  @keyframes clinic-photo-in {
    from { opacity: .65; transform: scale(.984); }
    to { opacity: 1; transform: none; }
  }

  .clinic-site .hero-text.motion-reveal,
  .clinic-site .service-feature-copy.motion-reveal { animation: none; }

  .clinic-site .hero-text.motion-reveal > *,
  .clinic-site .service-feature-copy.motion-reveal > * {
    animation: clinic-copy-in .52s cubic-bezier(.22, .75, .24, 1) backwards;
  }

  .clinic-site .hero-text.motion-reveal > :nth-child(2),
  .clinic-site .service-feature-copy.motion-reveal > :nth-child(2) { animation-delay: .07s; }
  .clinic-site .hero-text.motion-reveal > :nth-child(3),
  .clinic-site .service-feature-copy.motion-reveal > :nth-child(3) { animation-delay: .14s; }
  .clinic-site .hero-text.motion-reveal > :nth-child(4),
  .clinic-site .service-feature-copy.motion-reveal > :nth-child(4) { animation-delay: .21s; }

  .clinic-site .hero-image.motion-reveal,
  .clinic-site .service-feature-figure.motion-reveal {
    animation: clinic-photo-in .68s cubic-bezier(.22, .75, .24, 1) .08s backwards;
  }

  .home-service-directory li.motion-reveal,
  .services-directory .service-detail.motion-reveal {
    animation: clinic-copy-in .5s cubic-bezier(.22, .75, .24, 1) backwards;
  }

  .home-service-directory li.motion-reveal:nth-child(even),
  .services-directory .service-detail.motion-reveal:nth-child(even) { animation-delay: .08s; }

  .gallery-panel[role='tabpanel']:not([hidden]) {
    animation: clinic-copy-in .32s ease-out;
  }

  @keyframes community-card-in {
    from { opacity: .18; transform: translateY(26px) scale(.965); }
    to { opacity: 1; transform: none; }
  }

  @keyframes community-marquee {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(calc(-50% - (var(--marquee-gap) / 2)), 0, 0); }
  }

  .clinic-site .community-grid {
    animation: community-marquee 64s linear infinite;
  }

  .clinic-site .community-marquee:is(:hover, :focus-within) .community-grid {
    animation-play-state: paused;
  }

  .clinic-site .community-grid figure.motion-reveal {
    animation: community-card-in .72s cubic-bezier(.2, .72, .2, 1) backwards;
  }
  .clinic-site .community-set figure.motion-reveal:nth-child(4n + 2) { animation-delay: .09s; }
  .clinic-site .community-set figure.motion-reveal:nth-child(4n + 3) { animation-delay: .18s; }
  .clinic-site .community-set figure.motion-reveal:nth-child(4n) { animation-delay: .27s; }

  .gallery-category > span { transition: transform .2s ease; }
  .gallery-category:is(:hover, :focus-visible) > span { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .clinic-site .community-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .clinic-site .community-grid { transform: none; }
  .clinic-site .community-set-copy { display: none; }
}
