/* Motion changes only composited visuals, never document geometry or text sizing. */
html body { animation: none; }
html body .brand-logo-image,
html body .modal-title-wrap img { animation: none !important; }

.discovery-search-hero { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion-lite]) :not([data-dialog-motion]) > .modal-card:not(.listing-lightbox-modal):not(.fullscreen-image-modal):not(.shorts-viewer-modal) {
    animation: un-dialog-enter 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  @media (hover: hover) and (pointer: fine) {
    html:not([data-motion-lite]) :is(.photo-track, .apartment-media-tile, .short-card) > img {
      transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
    }
    html:not([data-motion-lite]) :is(.apartment-media-tile, .short-card):hover > img,
    html:not([data-motion-lite]) .photo-track > img:hover { transform: scale(1.025); }

    html:not([data-motion-lite]) :is(.brand-logo-image, .profile-photo) {
      transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
    }
    html:not([data-motion-lite]) :is(button, a):hover > .profile-photo,
    html:not([data-motion-lite]) :is(button, a):hover > .brand-logo-wrap > .brand-logo-image { transform: scale(1.035); }

    html:not([data-motion-lite]) :is(.discovery-start-search, .quick-action-button, .marketplace-category-tabs button) .dock-icon {
      transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
    }
    html:not([data-motion-lite]) :is(.discovery-start-search, .quick-action-button, .marketplace-category-tabs button):hover .dock-icon { transform: translateY(-2px); }
  }
}

@keyframes un-dialog-enter {
  from { opacity: 0.8; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Also suppress legacy loops and smooth scrolling when motion is not appropriate. */
html[data-motion-lite] *, html[data-motion-lite] *::before, html[data-motion-lite] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  html, body, body *, body *::before, body *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
