/* Basis: Reset, Typografie, Barrierefreiheit */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-background);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
img { font-style: italic; } /* Alt-Text sichtbar formatieren, falls Bild fehlt */

h1, h2, h3, h4 {
  margin: 0 0 .6em;
  line-height: var(--lh-heading);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: inherit;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 750; }
h4 { font-size: 1.1rem; font-weight: 750; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li + li { margin-top: .3em; }
strong { font-weight: 750; }

a {
  color: var(--color-primary-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition-default);
}
a:hover { color: var(--color-primary-darker); }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--color-primary-dark);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-button);
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
