/* ============================================================
   Barrierefreiheit (EN 301 549 / WCAG 2.1 AA)
   Skip-Link, Einstellungs-Menü (Kontrast, Textgröße, Animationen),
   Hochkontrast-Modus, prefers-contrast-Unterstützung.
   ============================================================ */

/* ---------- Skip-Link: erstes fokussierbares Element ---------- */
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 60;
  transform: translateY(-200%);
  background: var(--copper-bright, #dfa477); color: #14100b;
  font: 500 15px/1 var(--sans, sans-serif);
  padding: 14px 22px; border-radius: 10px;
  text-decoration: none;
  transition: transform .2s ease-out;
}
.skip-link:focus-visible { transform: none; outline: 3px solid #fff; }

/* ---------- Schwebender Einstellungs-Knopf (linke Kante) ---------- */
.a11y-btn {
  position: fixed; left: 14px; top: 50%; z-index: 40;
  transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 13, 8, .92); color: var(--cream, #f3ead9);
  border: 1px solid var(--hairline, rgba(201, 138, 94, .4));
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.a11y-btn:hover { border-color: var(--copper, #c98a5e); }
.a11y-btn:focus-visible { outline: 3px solid var(--copper-bright, #dfa477); outline-offset: 3px; }
.a11y-btn svg { width: 26px; height: 26px; }

/* ---------- Panel ---------- */
.a11y-panel {
  position: fixed; left: 14px; top: 50%; z-index: 41;
  transform: translateY(-50%);
  width: min(320px, calc(100vw - 28px));
  background: #171009; color: var(--cream, #f3ead9);
  border: 1px solid var(--hairline, rgba(201, 138, 94, .4));
  border-radius: 18px; padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
}
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 {
  font: 600 20px/1.2 var(--serif, serif); letter-spacing: 0;
  margin-bottom: 4px;
}
.a11y-panel .hint { font-size: 12.5px; color: var(--cream-dim, #c8bba6); margin-bottom: 14px; }
.a11y-row { padding: 12px 0; border-top: 1px solid rgba(243, 234, 217, .12); }
.a11y-row .lbl { display: block; font-size: 14px; margin-bottom: 9px; }
.a11y-seg { display: flex; gap: 8px; }
.a11y-seg button, .a11y-toggle {
  border: 1px solid var(--hairline, rgba(201, 138, 94, .4));
  border-radius: 10px; padding: 9px 14px;
  font-size: 14px; color: var(--cream, #f3ead9);
  background: rgba(243, 234, 217, .04);
  cursor: pointer; min-height: 44px;
}
.a11y-seg button[aria-pressed="true"], .a11y-toggle[aria-pressed="true"] {
  background: var(--copper-bright, #dfa477); color: #14100b; font-weight: 500;
  border-color: var(--copper-bright, #dfa477);
}
.a11y-seg button:focus-visible, .a11y-toggle:focus-visible, .a11y-close:focus-visible {
  outline: 3px solid var(--copper-bright, #dfa477); outline-offset: 2px;
}
.a11y-toggle { width: 100%; text-align: left; }
.a11y-close {
  position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(243, 234, 217, .2); color: inherit; background: none; cursor: pointer;
}
.a11y-panel .legal { margin-top: 12px; font-size: 11.5px; color: var(--cream-faint, #93876f); }

/* ---------- Textgröße (wirkt wie Browser-Zoom, Layout fließt mit) ---------- */
html[data-a11y-text="1"] body { zoom: 1.12; }
html[data-a11y-text="2"] body { zoom: 1.25; }

/* ---------- Hochkontrast ---------- */
html.a11y-contrast {
  --cream: #ffffff;
  --cream-dim: #f2ecdf;
  --cream-faint: #d9cdb6;
  --copper: #e8a878;
  --copper-bright: #f2bd92;
  --hairline: rgba(232, 168, 120, .6);
  --hairline-soft: rgba(255, 255, 255, .3);
}
html.a11y-contrast .grain,
html.a11y-contrast .film-vignette,
html.a11y-contrast .hero-glow,
html.a11y-contrast .hero-glow-2 { display: none !important; }
html.a11y-contrast .film-stage::before,
html.a11y-contrast .film-stage::after {
  background: linear-gradient(to bottom, rgba(0, 0, 0, .85), transparent);
}
html.a11y-contrast .film-stage::after {
  background: linear-gradient(to top, rgba(0, 0, 0, .85), transparent);
}
html.a11y-contrast .film .hero-center::before {
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, .82), rgba(0, 0, 0, .55) 60%, transparent 80%);
}
html.a11y-contrast .film .hero-phones,
html.a11y-contrast .live,
html.a11y-contrast .film-skip,
html.a11y-contrast .film-ai-note { background: #000; color: #fff; }
html.a11y-contrast .nav { background: #000; }
html.a11y-contrast .btn-ghost { border-color: #fff; color: #fff; }
html.a11y-contrast .price-row .amt { color: #f2bd92; }
html.a11y-contrast ::selection { background: #fff; color: #000; }

/* Nutzer-Systemeinstellung „mehr Kontrast": gleiche Anhebung automatisch */
@media (prefers-contrast: more) {
  html:not(.a11y-contrast-off) {
    --cream: #ffffff;
    --cream-dim: #f2ecdf;
    --cream-faint: #d9cdb6;
    --hairline-soft: rgba(255, 255, 255, .3);
  }
}

/* Handy: Knopf ganz unten links (unter den Hero-Knoepfen, neben der Fusszeile),
   Panel darueber */
@media (max-width: 640px) {
  .a11y-btn {
    left: 10px; top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: none; width: 46px; height: 46px;
  }
  .a11y-btn svg { width: 23px; height: 23px; }
  .a11y-panel { top: auto; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); transform: none; }
}
