/*
 * Arcade Direct — permanent surface-aware foreground contract.
 * Design reminder: on a light rendered surface, titles are deep navy. On a navy, dark-media or
 * image-darkened surface, titles are white and supporting copy is soft grey. This final cascade
 * layer exists so generic main.css heading inheritance cannot leave a title dark on dark.
 */

/* Dark and image-darkened surfaces: title contrast must never inherit the navy global default. */
:where(
  .ad-home-hero,
  .ad-hire-hero,
  .ad-sale-hero,
  .ad-archive-hero--image,
  .ad-catalogue-authentic--hire,
  .ad-route-media:not(.ad-route-media--activation):not(.ad-route-media--games-room),
  .ad-event-hero,
  .ad-event-way,
  .ad-event-branding,
  .ad-event-closing,
  .ad-case-hero,
  .ad-case-video,
  .ad-case-services,
  .ad-case-archive-hero,
  .ad-brand-hero,
  .ad-brand-gallery-section,
  .ad-brand-routes,
  .ad-inspiration-intro,
  .ad-inspiration-archive__intro,
  .ad-repair-hero,
  .ad-repair-symptoms,
  .ad-route-media--dark,
  .footer-cta,
  .ad-surface--dark,
  .ad-surface--image-dark
) :is(h1, h2, h3, h4, h5, h6, .ad-display-title) {
  color: #fff !important;
}

:where(
  .ad-home-hero,
  .ad-hire-hero,
  .ad-sale-hero,
  .ad-archive-hero--image,
  .ad-catalogue-authentic--hire,
  .ad-route-media:not(.ad-route-media--activation):not(.ad-route-media--games-room),
  .ad-event-hero,
  .ad-event-way,
  .ad-event-branding,
  .ad-event-closing,
  .ad-case-hero,
  .ad-case-video,
  .ad-case-services,
  .ad-case-archive-hero,
  .ad-brand-hero,
  .ad-brand-gallery-section,
  .ad-brand-routes,
  .ad-inspiration-intro,
  .ad-inspiration-archive__intro,
  .ad-repair-hero,
  .ad-repair-symptoms,
  .ad-route-media--dark,
  .footer-cta,
  .ad-surface--dark,
  .ad-surface--image-dark
) > :is(p, .ad-intro, .ad-summary):not(.ad-label) {
  color: #d3e3e3 !important;
}

/* A dark hover, selected or keyboard-focus state changes the entire card foreground together. */
:is(
  .ad-event-route-rail__item,
  .ad-event-package-card a,
  .ad-case-services__grid a,
  .ad-case-archive-card,
  .ad-brand-directions a,
  .ad-brand-routes a,
  .ad-inspiration-archive__card,
  .ad-repair-service,
  .ad-card--dark-on-interact
):is(:hover, :focus-visible, :focus-within, [aria-current="true"], .is-selected) :is(h1, h2, h3, h4, h5, h6, strong, b, .ad-display-title) {
  color: #fff !important;
}

:is(
  .ad-event-route-rail__item,
  .ad-event-package-card a,
  .ad-case-services__grid a,
  .ad-case-archive-card,
  .ad-brand-directions a,
  .ad-brand-routes a,
  .ad-inspiration-archive__card,
  .ad-repair-service,
  .ad-card--dark-on-interact
):is(:hover, :focus-visible, :focus-within, [aria-current="true"], .is-selected) :is(p, small, em) {
  color: #d3e3e3 !important;
}

/* Explicit light-surface guard for reusable sections that may sit beside dark components. */
:where(
  .ad-sale-browser,
  .ad-hire-browser,
  .ad-event-intro,
  .ad-event-occasions,
  .ad-event-packages,
  .ad-case-moments,
  .ad-case-gallery-section,
  .ad-case-machines,
  .ad-inspiration-gallery-section,
  .ad-inspiration-machines,
  .ad-brand-principles,
  .ad-brand-directions,
  .ad-brand-case-study,
  .ad-repair-overview,
  .ad-repair-services,
  .ad-repair-custom,
  .ad-repair-request,
  .ad-surface--light
) :is(h1, h2, h3, h4, h5, h6, .ad-display-title) {
  color: #081224 !important;
}

@media (prefers-reduced-motion: reduce) {
  :is(.ad-event-route-rail__item, .ad-event-package-card a, .ad-case-services__grid a, .ad-case-archive-card, .ad-brand-directions a, .ad-brand-routes a, .ad-inspiration-archive__card, .ad-repair-service) {
    transition-duration: .01ms !important;
  }
}
