/* =====================================================================
   Barrierefreiheit: Bedienfeld, Hilfen und Darstellungsarten
   Gilt für index.html, jobs.html, impressum.html, datenschutz.html.
   Ohne gewählte Einstellung ändert diese Datei nichts am Aussehen der
   Seite: sichtbar sind nur der Knopf am Rand und, bei Bedienung mit der
   Tastatur, Sprunglink und Fokusrahmen.
   Die Einstellungen setzt barrierefreiheit.js als Klassen an <html>.
   ===================================================================== */

/* ----- Nur für Screenreader ----- */
.a11y-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ----- Sprunglink: erscheint nur bei Tastaturbedienung ----- */
.a11y-skip {
  position: fixed;
  left: 16px;
  top: -200px;
  z-index: 300;
  padding: 12px 20px;
  background: #F5EFE6;
  color: #5C4A37;
  border: 1px solid #5C4A37;
  border-radius: 6px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}
.a11y-skip:focus { top: 16px; }
main:focus { outline: none; }

/* ----- Fokusrahmen (nur Tastatur, :focus-visible) ----- */
:focus-visible { outline: 2px solid var(--c-walnuss); outline-offset: 3px; }
:is(.jobs-bar, .lebensphasen, .jobs-teaser, .bewerben, .site-footer) :focus-visible { outline-color: var(--c-leinen); }

/* ----- Pause-Knopf für den Bildwechsel (nur bei Tastaturbedienung sichtbar) ----- */
.hero-pause {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 8px 14px;
  border: 1px solid #5C4A37;
  border-radius: 6px;
  background: #F5EFE6;
  color: #5C4A37;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}
.hero-pause:not(:focus-visible) {
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* =====================================================================
   Bedienfeld
   Bewusst in px: es bleibt bei jeder gewählten Schriftgröße bedienbar.
   ===================================================================== */
.a11y {
  --a-bg: #F5EFE6;
  --a-fl: #E6D4B7;
  --a-tx: #2D2823;
  --a-ak: #5C4A37;
  --a-li: rgba(92, 74, 55, 0.25);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: normal;
  word-spacing: normal;
  color: var(--a-tx);
}
.a11y *, .a11y *::before, .a11y *::after { box-sizing: border-box; }
.a11y button { font: inherit; color: inherit; letter-spacing: normal; word-spacing: normal; }

.a11y-knopf {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 210;
  width: 48px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: #5C4A37;
  color: #F5EFE6 !important;
  cursor: pointer;
  transition: background 0.2s;
}
.a11y-knopf:hover, .a11y-knopf[aria-expanded="true"] { background: #2D2823; }
.a11y-knopf:focus-visible { outline: 2px solid #5C4A37; outline-offset: 3px; }
.a11y-knopf svg { width: 26px; height: 26px; display: block; }

.a11y-feld {
  position: fixed;
  right: 56px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 210;
  width: 320px;
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--a-bg);
  border: 1px solid var(--a-li);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(45, 40, 35, 0.16);
  overflow: hidden;
}
.a11y-feld[hidden] { display: none; }
.a11y-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 14px 20px;
  border-bottom: 1px solid var(--a-li);
}
.a11y-titel {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--a-ak);
  letter-spacing: normal;
}
.a11y-zu {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 6px;
  background: none;
  cursor: pointer;
}
.a11y-zu:hover { background: var(--a-fl); }
.a11y-zu svg { width: 16px; height: 16px; }
.a11y-inhalt { padding: 16px 20px 20px; overflow-y: auto; overscroll-behavior: contain; }

.a11y-gruppe { margin: 0 0 18px; }
.a11y-gruppe-titel {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #55604A;
}
.a11y-reihe { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.a11y-wahl {
  min-height: 40px;
  padding: 8px 6px;
  border: 1px solid var(--a-li);
  border-radius: 6px;
  background: transparent;
  font-size: 14px !important;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.a11y-wahl:hover { border-color: var(--a-ak); }
.a11y-wahl[aria-pressed="true"] { background: var(--a-ak); border-color: var(--a-ak); color: var(--a-bg); }
.a11y-wahl:disabled { opacity: 0.4; cursor: default; }
.a11y-schrift { grid-template-columns: 1fr auto 1fr; grid-auto-flow: row; align-items: center; }
.a11y-schrift-wert { min-width: 56px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }

.a11y-schalter {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin: 0 0 6px;
  padding: 8px 12px;
  border: 1px solid var(--a-li);
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-weight: 500;
  cursor: pointer;
}
.a11y-schalter:hover { border-color: var(--a-ak); }
.a11y-schalter::after {
  content: '';
  flex-shrink: 0;
  width: 34px;
  height: 20px;
  border-radius: 10px;
  background: var(--a-li) radial-gradient(circle at 10px 50%, var(--a-bg) 7px, transparent 7.5px);
  transition: background 0.15s;
}
.a11y-schalter[aria-pressed="true"] { border-color: var(--a-ak); }
.a11y-schalter[aria-pressed="true"]::after { background: var(--a-ak) radial-gradient(circle at 24px 50%, var(--a-bg) 7px, transparent 7.5px); }

.a11y-vorlesen .a11y-reihe { grid-template-columns: 1fr auto; grid-auto-flow: row; }
.a11y-vorlesen .a11y-wahl { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; }
.a11y-vorlesen svg { width: 14px; height: 14px; flex-shrink: 0; }
.a11y-hinweis { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--a-ak); }

.a11y-reset {
  width: 100%;
  min-height: 40px;
  margin-top: 4px;
  border: 0;
  background: none;
  font-size: 14px !important;
  font-weight: 500;
  color: var(--a-ak) !important;
  text-decoration: underline;
  text-decoration-color: rgba(92, 74, 55, 0.4);
  text-underline-offset: 3px;
  cursor: pointer;
}
.a11y-reset:hover { text-decoration-color: currentColor; }
.a11y :focus-visible { outline: 2px solid var(--a-ak); outline-offset: 2px; }

/* Handy und Tablet: runder Knopf unten links, Feld über die Breite */
@media (max-width: 820px) {
  .a11y-knopf { top: auto; right: auto; left: 16px; bottom: 16px; transform: none; width: 48px; height: 48px; border-radius: 50%; }
  .a11y-feld { top: auto; right: 12px; left: 12px; bottom: 76px; transform: none; width: auto; max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); }
}
@media print { .a11y, .a11y-skip, .a11y-lineal { display: none !important; } }

/* Text, der gerade vorgelesen wird */
.a11y-liest { background: rgba(230, 212, 183, 0.7); box-shadow: 0 0 0 4px rgba(230, 212, 183, 0.7); border-radius: 2px; }

/* Leselineal: zwei abgedunkelte Flächen ober- und unterhalb der Zeile */
.a11y-lineal { position: fixed; left: 0; right: 0; z-index: 205; pointer-events: none; background: rgba(45, 40, 35, 0.4); }
.a11y-lineal-oben { top: 0; height: 0; border-bottom: 2px solid #A0463C; }
.a11y-lineal-unten { bottom: 0; height: 0; }

/* =====================================================================
   Schriftgröße: alle Schriftgrößen der Seite sind in rem angegeben
   ===================================================================== */
html.a11y-schrift-115 { font-size: 115%; }
html.a11y-schrift-130 { font-size: 130%; }
html.a11y-schrift-150 { font-size: 150%; }
/* große Schrift: Menüpunkte im Kopf dürfen umbrechen statt aus dem Bild zu laufen */
@media (min-width: 921px) {
  html:is(.a11y-schrift-115, .a11y-schrift-130, .a11y-schrift-150, .a11y-abstand-1, .a11y-abstand-2) .header-logo { flex-shrink: 0; }
  html:is(.a11y-schrift-115, .a11y-schrift-130, .a11y-schrift-150, .a11y-abstand-1, .a11y-abstand-2) .header-logo :is(.logo-name, .logo-sub) { white-space: nowrap; }
  html:is(.a11y-schrift-115, .a11y-schrift-130, .a11y-schrift-150, .a11y-abstand-1, .a11y-abstand-2) .nav-primary { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; column-gap: 20px; }
}
@media (max-width: 920px) {
  html:is(.a11y-schrift-130, .a11y-schrift-150, .a11y-abstand-2) .header-logo { min-width: 0; }
  html:is(.a11y-schrift-130, .a11y-schrift-150, .a11y-abstand-2) .header-logo .logo-name { white-space: normal; }
  html:is(.a11y-schrift-130, .a11y-schrift-150, .a11y-abstand-2) .menu-toggle-label { white-space: nowrap; }
}
/* lange Wörter trennen statt seitlich überlaufen */
html:is(.a11y-schrift-115, .a11y-schrift-130, .a11y-schrift-150, .a11y-abstand-1, .a11y-abstand-2) :is(.jobs-bar, .site-header, .mobile-menu, main, .site-footer) {
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* =====================================================================
   Textabstand
   ===================================================================== */
html.a11y-abstand-1 :is(.jobs-bar, .site-header, .mobile-menu, main, .site-footer) :not(svg, svg *) {
  line-height: 1.9 !important;
  letter-spacing: 0.04em !important;
  word-spacing: 0.1em !important;
}
html.a11y-abstand-2 :is(.jobs-bar, .site-header, .mobile-menu, main, .site-footer) :not(svg, svg *) {
  line-height: 2.15 !important;
  letter-spacing: 0.08em !important;
  word-spacing: 0.18em !important;
}
html:is(.a11y-abstand-1, .a11y-abstand-2) :is(.jobs-bar, .site-header, .mobile-menu, main, .site-footer) :is(h1, h2, h3, h4, .logo-name, .logo-sub, h1 *, h2 *, h3 *, h4 *) { line-height: 1.4 !important; }
html:is(.a11y-abstand-1, .a11y-abstand-2) :is(.jobs-bar, .site-header, .mobile-menu, main, .site-footer) .label { letter-spacing: 0.18em !important; }
html.a11y-abstand-1 main :is(p, li) + :is(p, li) { margin-top: 0.5em; }
html.a11y-abstand-2 main :is(p, li) + :is(p, li) { margin-top: 0.8em; }

/* =====================================================================
   Lesbare Schrift: Inter auch für Überschriften, keine Kursive
   ===================================================================== */
html.a11y-lesbar { --font-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
html.a11y-lesbar :is(h1, h2, h3, h4, .logo-name) { letter-spacing: 0 !important; }
html.a11y-lesbar :is(em, i, .pull) { font-style: normal !important; }

/* =====================================================================
   Links hervorheben
   ===================================================================== */
html.a11y-links :is(.jobs-bar, .site-header, .mobile-menu, main, .site-footer) a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 4px !important;
  text-decoration-color: currentColor !important;
  font-weight: 500;
}
html.a11y-links :is(main, .site-footer, .mobile-menu) a:not(.btn) { border-bottom: 0 !important; }
html.a11y-links .nav-primary a.nav-cta, html.a11y-links a.btn { box-shadow: 0 0 0 2px currentColor; }

/* =====================================================================
   Animationen stoppen
   ===================================================================== */
html.a11y-ruhe { scroll-behavior: auto !important; }
html.a11y-ruhe *, html.a11y-ruhe *::before, html.a11y-ruhe *::after {
  transition: none !important;
  animation: none !important;
}
html.a11y-ruhe .fade-up { opacity: 1 !important; transform: none !important; }
html.a11y-ruhe .leistung:hover { transform: none !important; }

/* =====================================================================
   Hoher Kontrast (hell)
   ===================================================================== */
html.a11y-kontrast {
  --c-salbei: #55604A;
  --c-text-soft: #2D2823;
  --c-walnuss: #4A3A2A;
  --c-border: rgba(92, 74, 55, 0.55);
}
html.a11y-kontrast :is(.header-logo .logo-sub, .opening-hours .closed) { opacity: 1 !important; }
html.a11y-kontrast :is(.lebensphasen-header p, .phase p, .jobs-teaser p, .bewerben .bw-text > p, .bw-kontakt, .bw-steps p,
  .site-footer, .footer-col a, .footer-bottom) { color: #F5EFE6 !important; }
html.a11y-kontrast a.text-link, html.a11y-kontrast .legal a:not(.btn) { text-decoration-color: currentColor; }
html.a11y-kontrast :is(.qualifications li, .biete-karte .check-list li) { border-bottom-color: rgba(92, 74, 55, 0.45); }
html.a11y-kontrast .phase { border-color: rgba(245, 239, 230, 0.5); background: rgba(245, 239, 230, 0.08); }

/* =====================================================================
   Dunkle Darstellung
   Fotos, Anfahrtskarte und die roten Knöpfe bleiben, wie sie sind.
   Die Bildmarke erscheint in Leinen (Brand-Guidelines 2.2).
   ===================================================================== */
html.a11y-dunkel {
  color-scheme: dark;
  --c-sand: #3A332C;          /* Karten und Flächen */
  --c-walnuss: #E6D4B7;       /* Überschriften, Akzente */
  --c-anthrazit: #1F1B17;     /* Fußzeile */
  --c-rot: #E08A7E;           /* rote Schrift (Zahlen, Hervorhebung, Hover) */
  --c-salbei: #9DAD8E;
  --c-text: #F5EFE6;
  --c-text-soft: #D8CDBD;
  --c-border: rgba(245, 239, 230, 0.16);
}
html.a11y-dunkel body,
html.a11y-dunkel :is(.mobile-menu, .ueber-mich, .pillar, .leistung, .faq, .map-dialog, .gs-steps li, .fakt) { background: #2D2823; }
html.a11y-dunkel .leistung:hover { background: var(--c-sand); }
html.a11y-dunkel .site-header { background: rgba(45, 40, 35, 0.92); }
html.a11y-dunkel :is(.lebensphasen, .jobs-teaser, .jobs-bar, .bewerben) { background: #463C33; }
html.a11y-dunkel :is(.lebensphasen .label, .jobs-teaser .label, .bewerben .label, .bw-num, .jobs-bar .pfeil) { color: #E6D4B7; }
html.a11y-dunkel :is(.btn-primary, .nav-primary .nav-cta) { background: #A0463C; color: #F5EFE6; }
html.a11y-dunkel :is(.btn-primary, .nav-primary .nav-cta):hover { background: #8A3A30; color: #F5EFE6; }
html.a11y-dunkel .btn-walnuss { background: #E6D4B7; color: #2D2823; }
html.a11y-dunkel .btn-walnuss:hover { background: #F5EFE6; }
html.a11y-dunkel .btn-leinen { color: #2D2823; }
html.a11y-dunkel .btn-leinen:hover { background: #E6D4B7; }
html.a11y-dunkel :is(.qualifications li, .biete-karte .check-list li) { border-bottom-color: rgba(245, 239, 230, 0.12); }
html.a11y-dunkel .header-logo svg path[fill="#A0463C"] { fill: #F5EFE6; }
html.a11y-dunkel .header-logo svg path[stroke="#A0463C"] { stroke: #F5EFE6; }
html.a11y-dunkel .a11y-skip, html.a11y-dunkel .hero-pause { background: #2D2823; color: #E6D4B7; border-color: #E6D4B7; }
html.a11y-dunkel .a11y-liest { background: rgba(230, 212, 183, 0.22); box-shadow: 0 0 0 4px rgba(230, 212, 183, 0.22); }
html.a11y-dunkel .a11y-lineal { background: rgba(0, 0, 0, 0.5); }

/* Dunkel und hoher Kontrast zusammen */
html.a11y-dunkel.a11y-kontrast {
  --c-walnuss: #F5EFE6;
  --c-text-soft: #F5EFE6;
  --c-salbei: #B5C4A6;
  --c-border: rgba(245, 239, 230, 0.45);
}
html.a11y-dunkel.a11y-kontrast body,
html.a11y-dunkel.a11y-kontrast :is(.mobile-menu, .ueber-mich, .pillar, .leistung, .faq, .map-dialog, .gs-steps li, .fakt) { background: #1F1B17; }
html.a11y-dunkel.a11y-kontrast .site-header { background: rgba(31, 27, 23, 0.95); }
html.a11y-dunkel.a11y-kontrast { --c-anthrazit: #000000; }

/* Bedienfeld in dunkler Darstellung */
html.a11y-dunkel .a11y {
  --a-bg: #2D2823;
  --a-fl: #3A332C;
  --a-tx: #F5EFE6;
  --a-ak: #E6D4B7;
  --a-li: rgba(245, 239, 230, 0.22);
}
html.a11y-dunkel .a11y-gruppe-titel { color: #9DAD8E; }
html.a11y-dunkel .a11y-knopf { background: #E6D4B7; color: #2D2823 !important; }
html.a11y-dunkel .a11y-knopf:hover, html.a11y-dunkel .a11y-knopf[aria-expanded="true"] { background: #F5EFE6; }
html.a11y-dunkel .a11y-knopf:focus-visible { outline-color: #E6D4B7; }
html.a11y-dunkel .a11y-feld { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4); }
html.a11y-dunkel .a11y-reset { text-decoration-color: rgba(230, 212, 183, 0.4); }
