/* ============================================================
   MULTI-INVEST · Barrierefreiheit (Phase 2)
   - Skip-Link
   - Globale Fokus-Indikatoren
   - prefers-reduced-motion
   - Touch-Target-Mindestgröße
   - Hochkontrast-Modus (per Widget togglebar)
   - Schriftgrößen-Skalierung (per Widget togglebar)
   - Widget-Panel (Anzeige anpassen)
   - Pause-Button für Hero-Video
   ============================================================ */

/* ---- Skip-Link ---- */
.a11y-skip {
  position: absolute;
  left: 8px;
  top: -200px;
  z-index: 9999;
  padding: 14px 22px;
  background: var(--navy);
  color: #fff !important;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  transition: top 0.2s ease;
}
.a11y-skip:focus {
  top: 12px;
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---- Globale Fokus-Indikatoren ----
   Navy-Outline auf hellen Hintergründen (höchster Kontrast),
   Weiß-Outline auf dunklen — beide ≥ 3:1 ggü. Hintergrund
   und damit WCAG 2.4.7 + 1.4.11 konform. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  border-radius: 3px;
}
/* Auf dunklen Hintergründen: weiße Outline mit Navy-Schatten */
.hero a:focus-visible,
.hero button:focus-visible,
.testimonials:not(.v-b) a:focus-visible,
.testimonials:not(.v-b) button:focus-visible,
.aw-c a:focus-visible,
.aw-c button:focus-visible,
.product-facts a:focus-visible,
.product-facts button:focus-visible,
.diamond-chart-section a:focus-visible,
.diamond-chart-section button:focus-visible,
.video-section a:focus-visible,
.video-section button:focus-visible,
.footer a:focus-visible,
.notfound a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--navy);
}
/* Auf gold-gefüllten Elementen: navy-Outline auf der inneren Seite */
.btn-primary:focus-visible,
.nav-cta:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  box-shadow: none;
}

/* ---- prefers-reduced-motion (System-Einstellung) ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto !important; }
}
/* + Manuell aktivierter „Animationen aus"-Modus */
body.a11y-no-motion *,
body.a11y-no-motion *::before,
body.a11y-no-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
body.a11y-no-motion {
  scroll-behavior: auto !important;
}

/* ---- Touch-Ziele Footer-Spalten ---- */
.footer .footer-col ul li a {
  padding: 3px 0;
}
.footer .footer-col ul li a:not(.footer-link-highlight) {
  display: inline-block;
}

/* ============================================================
   Hochkontrast-Modus (a11y-contrast)
   ============================================================ */
body.a11y-contrast {
  /* Faint-Texte werden voll-deckend */
}
body.a11y-contrast .intro-text p,
body.a11y-contrast .product-body p,
body.a11y-contrast .product-link,
body.a11y-contrast .section-head .lead,
body.a11y-contrast .award-meta,
body.a11y-contrast .award-b-meta,
body.a11y-contrast .aw-c-meta,
body.a11y-contrast .aw-d-meta,
body.a11y-contrast .legal-intro,
body.a11y-contrast .ls-num,
body.a11y-contrast .intro-year-label,
body.a11y-contrast .entity-eyebrow,
body.a11y-contrast .entity-details dt,
body.a11y-contrast .legal-toc a,
body.a11y-contrast .v-b .pillar-author .author-role,
body.a11y-contrast .author-role,
body.a11y-contrast .cb-key,
body.a11y-contrast .a11y-foot {
  color: #1a2734 !important;
}
body.a11y-contrast .hero-sub,
body.a11y-contrast .kpi-sub,
body.a11y-contrast .scroll-cue,
body.a11y-contrast .nav-logo .logo-tag,
body.a11y-contrast .testimonials .section-head .lead,
body.a11y-contrast .testimonial-mini p,
body.a11y-contrast .footer p,
body.a11y-contrast .footer .footer-address,
body.a11y-contrast .footer-bottom,
body.a11y-contrast .aw-c-head .lead {
  color: #ffffff !important;
}
/* Eyebrow-Akzent: weiterhin Gold, aber deutlich dunkler für Lesbarkeit */
body.a11y-contrast .eyebrow {
  color: #8a5500 !important;
}
body.a11y-contrast .testimonials .eyebrow,
body.a11y-contrast .aw-c .eyebrow,
body.a11y-contrast .hero-eyebrow {
  color: #ffcc66 !important;
}
/* Hover-States des Gold-Akzents: dunkler */
body.a11y-contrast .product-link:hover { color: #8a5500 !important; }
/* Links unterstreichen */
body.a11y-contrast main a,
body.a11y-contrast .legal-main a,
body.a11y-contrast .footer a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}
body.a11y-contrast main a.btn,
body.a11y-contrast main a.btn-primary,
body.a11y-contrast main a.btn-ghost-light,
body.a11y-contrast main a.product-link,
body.a11y-contrast .footer .footer-link-highlight,
body.a11y-contrast .nav-cta,
body.a11y-contrast .nav-logo {
  text-decoration: none !important;
}

/* ============================================================
   Links-unterstreichen-Modus — wirkt auf ALLE Links inkl. Buttons
   (button-artige Links wie .btn-primary, .product-link, .nav-cta).
   Ausgenommen sind echte Icon-/Logo-Links + das Widget selbst.
   ============================================================ */
body.a11y-underline a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
body.a11y-underline .nav-logo,
body.a11y-underline .a11y-skip,
body.a11y-underline .a11y-btn,
body.a11y-underline .a11y-foot a,
body.a11y-underline .nav-mobile-contact a,
body.a11y-underline .nav-mobile-cta a,
body.a11y-underline .thumb,
body.a11y-underline .form-row {
  text-decoration: none !important;
}

/* ============================================================
   Schriftgrößen-Skalierung — wirkt via CSS zoom auf den Body
   ============================================================ */
body.a11y-font-lg { zoom: 1.10; }
body.a11y-font-xl { zoom: 1.22; }

/* ============================================================
   Lese-Modus — erhöhter Zeilen-/Buchstaben-/Wort-Abstand
   ============================================================ */
body.a11y-readable p,
body.a11y-readable li,
body.a11y-readable blockquote,
body.a11y-readable .hero-sub,
body.a11y-readable .lead,
body.a11y-readable .legal-intro,
body.a11y-readable address {
  line-height: 2 !important;
  letter-spacing: 0.04em !important;
  word-spacing: 0.08em !important;
}
body.a11y-readable h1,
body.a11y-readable h2,
body.a11y-readable h3,
body.a11y-readable h4 {
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
}

/* ============================================================
   Sättigung reduzieren — Filter pro Body-Kind, damit das Widget
   selbst farbig bleibt (filter lässt sich nicht rückgängig machen,
   sobald er auf einen Vorfahren angewandt wurde).
   ============================================================ */
body.a11y-grayscale > *:not(.a11y-btn):not(.a11y-panel):not(.a11y-skip) {
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
}

/* ============================================================
   Barrierefreiheits-Widget
   ============================================================ */
.a11y-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  border: 1.5px solid rgba(20, 45, 86, 0.18);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 22px rgba(14, 34, 68, 0.18),
              0 1px 3px rgba(14, 34, 68, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.a11y-btn:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 10px 28px rgba(14, 34, 68, 0.22),
              0 1px 3px rgba(14, 34, 68, 0.08);
}
.a11y-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.a11y-btn.is-open {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
}
/* Liquid-Glass-Variante: aktiv, wenn der Button \u00fcber dunklen Sektionen liegt */
.a11y-btn.is-on-dark:not(.is-open) {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.a11y-btn.is-on-dark:not(.is-open):hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.6);
}
@media (max-width: 720px) {
  .a11y-btn {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
  .a11y-btn svg { width: 20px; height: 20px; }
}

.a11y-panel {
  position: fixed;
  right: 20px;
  bottom: 78px;
  z-index: 1000;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 30px 64px -18px rgba(14, 34, 68, 0.4),
              0 0 0 1px rgba(20, 45, 86, 0.08);
  padding: 22px 22px 18px;
  font-family: var(--font);
  color: var(--navy);
}
.a11y-panel[hidden] { display: none; }
@media (max-width: 720px) {
  .a11y-panel {
    right: 16px;
    bottom: 80px;
    width: calc(100vw - 32px);
  }
}

.a11y-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.a11y-panel-head h2 {
  margin: 0;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.a11y-panel-head h2::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1.5px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 10px;
  transform: translateY(-3px);
}
.a11y-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid rgba(20, 45, 86, 0.18);
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  color: var(--ink-muted);
  font-family: var(--font);
  transition: border-color 0.2s, color 0.2s;
}
.a11y-close:hover {
  border-color: var(--gold);
  color: var(--navy);
}

.a11y-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid rgba(20, 45, 86, 0.08);
}
.a11y-row:first-of-type { border-top: 0; }
.a11y-row-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}

/* Size selector */
.a11y-size-control {
  display: inline-flex;
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.a11y-size-control button {
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.a11y-size-control button:hover {
  color: var(--navy);
}
.a11y-size-control button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--navy);
}

/* Toggle row */
.a11y-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(20, 45, 86, 0.08);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  letter-spacing: -0.005em;
  gap: 14px;
}
.a11y-toggle > span:first-child {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.a11y-toggle small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0;
}
.a11y-toggle input[type="checkbox"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.a11y-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  background: rgba(20, 45, 86, 0.2);
  border-radius: 999px;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.a11y-switch::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}
.a11y-toggle input:checked ~ .a11y-switch {
  background: var(--gold);
}
.a11y-toggle input:checked ~ .a11y-switch::after {
  transform: translateX(16px);
}
.a11y-toggle input:focus-visible ~ .a11y-switch {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Footer of panel */
.a11y-reset {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--bg-soft);
  color: var(--ink-muted);
  border: 0;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.a11y-reset:hover {
  background: var(--navy);
  color: #fff;
}
.a11y-foot {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-faint);
}
.a11y-foot a {
  color: var(--navy);
  border-bottom: 1px solid rgba(246, 159, 0, 0.4);
}
