/* ==========================================================================
   base.css – Reset, Grundtypografie, Layout-Grundgerüst
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  font-size: 125%; /* 20px Basis – gesamte Seite größer (Zoom-Wirkung) */
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* Höhe der fixen Navigation */
}

@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;
  }
}

body {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
h4 {
  line-height: var(--lh-tight);
  overflow-wrap: break-word;
  /* Zeilen ausbalancieren (kein einzelnes "?" am Ende) und lange
     deutsche Komposita sauber trennen */
  text-wrap: balance;
  hyphens: auto;
}

h1 {
  font-size: var(--fs-hero);
}

h2 {
  font-size: var(--fs-xl);
}

h3 {
  font-size: var(--fs-lg);
}

p,
ul,
ol {
  overflow-wrap: break-word;
}

a {
  color: var(--color-green);
}

a:hover {
  color: var(--color-teal);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* Layout-Container */
.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.wrap--narrow {
  max-width: var(--content-narrow);
}

.section {
  padding-block: var(--space-section);
}

.section__title {
  margin-bottom: var(--space-4);
}

.section__intro {
  max-width: var(--content-narrow);
  margin-bottom: var(--space-5);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
}

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

/* Sprunglink für Tastaturnutzer */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-3);
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  background: var(--color-text);
  color: var(--color-text-invert);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.skip-link:focus {
  top: 0;
  color: var(--color-text-invert);
}
