/* ============================================================
   Druck und Zauber · Barrierefreiheit (WCAG 2.2 AA)
   Skip-Link · Fokus · Opt-in-Menü · Reduced-Motion · Kontrast
   ============================================================ */

/* --- Skip-Link --- */
.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  z-index: 1000; background: var(--black); color: #fff;
  padding: 0.7rem 1.4rem; border-radius: 0 0 12px 12px;
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.9rem;
  text-decoration: none; transition: top 0.18s ease;
}
.skip-link:focus { top: 0; outline: 3px solid var(--mint); outline-offset: 2px; }

/* --- Sichtbarer Fokus (nur Tastatur) --- */
:focus-visible {
  outline: 3px solid var(--mint-dark);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Buttons/Links auf dunklem Grund: heller Fokusring */
.kontakt-btn:focus-visible, .social-btn:focus-visible,
footer a:focus-visible, .cta-btn:focus-visible {
  outline-color: var(--mint);
}

/* --- Screenreader-only --- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ============================================================
   Barrierefreiheits-Menü (Opt-in, oben rechts in der Nav)
   ============================================================ */
.a11y { position: relative; }
.a11y-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem; height: 40px; padding: 0 0.85rem;
  background: var(--mint-pale); color: var(--mint-text, #3C7D69);
  border: 1px solid var(--mint-light); border-radius: 50px;
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.78rem;
  cursor: pointer; transition: background 0.18s, border-color 0.18s;
}
.a11y-toggle:hover { background: var(--mint-light); }
.a11y-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.a11y-toggle .a11y-label { display: inline; }
@media (max-width: 520px) { .a11y-toggle .a11y-label { display: none; } }

.a11y-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 280px; max-width: calc(100vw - 24px);
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 18px 50px rgba(26,26,26,0.16);
  padding: 1rem; z-index: 200;
}
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 {
  font-family: 'Nunito', sans-serif; font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--mint-text, #3C7D69); margin: 0 0 0.7rem;
}
.a11y-opt {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.8rem; padding: 0.55rem 0.2rem; font-size: 0.88rem; color: var(--black);
  border-top: 1px solid var(--border);
}
.a11y-opt:first-of-type { border-top: none; }
.a11y-opt button[role="switch"] {
  flex-shrink: 0; width: 46px; height: 26px; border-radius: 50px;
  border: 1px solid var(--mint-light); background: #E6F2EC; cursor: pointer;
  position: relative; transition: background 0.18s;
}
.a11y-opt button[role="switch"]::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.18s;
}
.a11y-opt button[role="switch"][aria-checked="true"] { background: var(--mint-dark); }
.a11y-opt button[role="switch"][aria-checked="true"]::after { transform: translateX(20px); }
.a11y-reset {
  margin-top: 0.6rem; width: 100%; padding: 0.5rem; border: none;
  background: none; color: var(--mint-text, #3C7D69); font-family: 'Nunito', sans-serif;
  font-weight: 700; font-size: 0.8rem; cursor: pointer; border-radius: 8px;
}
.a11y-reset:hover { background: var(--mint-pale); }

/* ============================================================
   Opt-in-Klassen am <html> (setzt a11y.js)
   ============================================================ */
/* Mehr Kontrast */
html.a11y-contrast {
  --gray: #2E2E2E; --gray-mid: #333; --gray-light: #4A4A4A;
  --mint-text: #2F6253; --border: #9BC7B8;
}
html.a11y-contrast .technique-card,
html.a11y-contrast .product-card,
html.a11y-contrast .kontakt-card,
html.a11y-contrast .about-stat,
html.a11y-contrast .impressum-block,
html.a11y-contrast .faq-item { border-width: 2px; }
html.a11y-contrast a { text-decoration: underline; }

/* Größere Schrift */
html.a11y-bigtext { font-size: 118.75%; }

/* Bewegung aus (manuell) */
html.a11y-nomotion *, html.a11y-nomotion *::before, html.a11y-nomotion *::after {
  animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important; scroll-behavior: auto !important;
}
html.a11y-nomotion [data-reveal] { opacity: 1 !important; transform: none !important; }

/* Lesehilfe: ruhigerer Hintergrund + mehr Zeilenabstand */
html.a11y-readable body { line-height: 1.95; letter-spacing: 0.01em; }
html.a11y-readable #hero::before,
html.a11y-readable .deco { display: none !important; }

/* ============================================================
   System-Reduced-Motion: scroll-reveal sofort sichtbar
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .deco-anim { animation: none !important; }
}
