/* ANDERS 5000 · shared, color-only interaction states for both languages. */
:root {
  --anders-interaction-ink: #252525;
  --anders-interaction-blue: #002fa7;
  --anders-interaction-time: 240ms;
}

/* The existing logo masks and home-card duotone remain responsible for images. */
:is(.anders-en-nav a, .anders-en-header__lang-mobile, .anders-en-menu nav a, .anders-en-menu summary, .m-footer__meta a, .m-main a, .m-main button) {
  transition-property: color, text-decoration-color;
  transition-duration: var(--anders-interaction-time);
  transition-timing-function: ease;
}

.m-footer__meta a {
  color: var(--anders-interaction-ink) !important;
}
/* The published English contact CTA has a stronger legacy ID rule. */
body.anders-en-launch #article-2001 .c-teaserSimple__text a[href^="mailto:"] {
  color: var(--anders-interaction-ink) !important;
  text-decoration-color: var(--anders-interaction-ink) !important;
}
/* German Design+ CTA elements also use page-local ID rules with !important. */
body.anders-de-v1 :is(#article-1714, #article-2005, #article-1706, #article-1739, #article-1707, #article-1740, #article-1741) .de-v3-cta a[href^="mailto:"] {
  color: var(--anders-interaction-ink) !important;
  border-bottom-color: var(--anders-interaction-ink) !important;
  transition-property: color, border-bottom-color;
}
body.anders-de-v1 #article-1714 .de-v3-row-link :is(h2, span:last-child) {
  transition: color var(--anders-interaction-time) ease;
}

/* Preserve the restrained underline that already identifies the current page. */
@media (hover: hover) and (pointer: fine) {
  body:is(.anders-en-launch, .anders-de-v1) :is(.anders-en-nav a, .anders-en-header__lang-mobile, .anders-en-menu nav a, .anders-en-menu summary):hover,
  .m-footer__meta a:hover,
  body:is(.anders-en-launch, .anders-de-v1) .m-footer__meta a:hover,
  .m-main :is(a, button):hover,
  body.anders-en-launch #article-2001 .c-teaserSimple__text a[href^="mailto:"]:hover,
  body.anders-de-v1 :is(#article-1714, #article-2005, #article-1706, #article-1739, #article-1707, #article-1740, #article-1741) .de-v3-cta a[href^="mailto:"]:hover {
    color: var(--anders-interaction-blue) !important;
    text-decoration-color: var(--anders-interaction-blue) !important;
  }
  body.anders-de-v1 :is(#article-1714, #article-2005, #article-1706, #article-1739, #article-1707, #article-1740, #article-1741) .de-v3-cta a[href^="mailto:"]:hover {
    border-bottom-color: var(--anders-interaction-blue) !important;
  }
  body.anders-de-v1 #article-1714 .de-v3-row-link:hover :is(h2, span:last-child) {
    color: var(--anders-interaction-blue) !important;
  }
}

/* Touch taps must never leave a hover color behind. */
@media (hover: none) {
  body:is(.anders-en-launch, .anders-de-v1) :is(.anders-en-nav a, .anders-en-header__lang-mobile, .anders-en-menu nav a, .anders-en-menu summary):hover,
  .m-footer__meta a:hover,
  body:is(.anders-en-launch, .anders-de-v1) .m-footer__meta a:hover,
  .m-main :is(a, button):hover,
  body:is(.anders-en-launch, .anders-de-v1) .m-main a:hover,
  body.anders-en-launch #article-2001 .c-teaserSimple__text a[href^="mailto:"]:hover,
  body.anders-de-v1 :is(#article-1714, #article-2005, #article-1706, #article-1739, #article-1707, #article-1740, #article-1741) .de-v3-cta a[href^="mailto:"]:hover {
    color: var(--anders-interaction-ink) !important;
    text-decoration-color: var(--anders-interaction-ink) !important;
  }
  body.anders-de-v1 :is(#article-1714, #article-2005, #article-1706, #article-1739, #article-1707, #article-1740, #article-1741) .de-v3-cta a[href^="mailto:"]:hover {
    border-bottom-color: var(--anders-interaction-ink) !important;
  }
}

/* Keyboard focus has an outline in addition to the color change. */
:is(.anders-en-nav a, .anders-en-header__lang-mobile, .anders-en-menu nav a, .anders-en-menu summary, .m-footer__meta a, .m-main a, .m-main button):focus-visible {
  color: var(--anders-interaction-blue) !important;
  text-decoration-color: var(--anders-interaction-blue) !important;
  outline: 2px solid var(--anders-interaction-blue) !important;
  outline-offset: 4px;
}
body:is(.anders-en-launch, .anders-de-v1) :is(.anders-en-nav a, .anders-en-header__lang-mobile, .anders-en-menu nav a, .anders-en-menu summary, .m-footer__meta a, .m-main a, .m-main button):focus-visible {
  color: var(--anders-interaction-blue) !important;
  text-decoration-color: var(--anders-interaction-blue) !important;
}
body.anders-en-launch #article-2001 .c-teaserSimple__text a[href^="mailto:"]:focus-visible {
  color: var(--anders-interaction-blue) !important;
  text-decoration-color: var(--anders-interaction-blue) !important;
}
body.anders-de-v1 :is(#article-1714, #article-2005, #article-1706, #article-1739, #article-1707, #article-1740, #article-1741) .de-v3-cta a[href^="mailto:"]:focus-visible {
  color: var(--anders-interaction-blue) !important;
  border-bottom-color: var(--anders-interaction-blue) !important;
}
body.anders-de-v1 #article-1714 .de-v3-row-link:focus-visible :is(h2, span:last-child) {
  color: var(--anders-interaction-blue) !important;
}
:is(.anders-en-header__logo, header .m-header__logo > a, footer a:has(> img[src*="anders_logo_black_upsidedown.svg"])):focus-visible {
  outline: 2px solid var(--anders-interaction-blue) !important;
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  :is(.anders-en-nav a, .anders-en-header__lang-mobile, .anders-en-menu nav a, .anders-en-menu summary, .m-footer__meta a, .m-main a, .m-main button) {
    transition-duration: 0ms;
  }
  body.anders-de-v1 #article-1714 .de-v3-row-link :is(h2, span:last-child) {
    transition-duration: 0ms;
  }
}
