/* ==========================================================================
   02-BASE — Reset, Grundtypografie, Zugänglichkeit
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sticky-Nav-Höhe berücksichtigen, wenn per Anker gesprungen wird */
  scroll-padding-top: calc(var(--nav-h, 4.75rem) + var(--s-5));
}

body {
  margin: 0;
  background-color: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--f-text);
  font-size: var(--t-body);
  line-height: var(--lh-normal);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;   /* schützt gegen horizontales Ausbrechen von Marquees */
}

/* Verhindert Scrollen, solange das Mobil-Menü offen ist */
body[data-scroll-sperre] { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;      /* verhindert Hurenkinder in Headlines */
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: var(--lh-snug); }
h4 { font-size: var(--t-h4); line-height: var(--lh-snug); }

p  { margin: 0 0 var(--s-4); max-width: var(--max-w-text); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color var(--d-fast) var(--e-out);
}
a:hover { color: var(--c-accent); }

ul, ol { margin: 0 0 var(--s-4); padding-left: var(--s-5); }
li + li { margin-top: var(--s-2); }

img, video, svg, picture {
  display: block;
  max-width: 100%;
  height: auto;
}

figure { margin: 0; }

strong, b { font-weight: 700; }

hr {
  border: 0;
  border-top: var(--b-bold);
  margin: var(--s-7) 0;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border-radius: var(--radius);
}

button { cursor: pointer; }

/* --- Fokus: sichtbar und kantig, nie entfernen -------------------------- */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* --- Auswahlfarbe --- */
::selection {
  background: var(--c-accent);
  color: var(--c-accent-ink);
}

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

/* --- Sprunglink zum Inhalt (Pflicht für Barrierefreiheit) --------------- */
.sprunglink {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
  z-index: var(--z-modal);
  padding: var(--s-3) var(--s-4);
  background: var(--c-ink);
  color: var(--c-paper);
  font-family: var(--f-label);
  font-size: var(--t-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--d-base) var(--e-out);
}
.sprunglink:focus { transform: translateY(0); }

/* --- Bewegung reduzieren: harte Abschaltung ----------------------------
   Pflicht. Ohne das ist die Seite für Menschen mit vestibulären
   Beschwerden unbenutzbar — und es ist ein WCAG-Kriterium. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Reveal-Elemente müssen trotzdem sichtbar sein */
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* --- Druckansicht: Kunden drucken Kontaktseiten wirklich aus ----------- */
@media print {
  .site-nav, .site-footer, .zum-anfang, video, .karte-platzhalter { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
