/* Grundlagen: Reset, Typografie, Layout-Helfer */

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

* {
  margin: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100vh;
  font-family: var(--font-base);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-weight: var(--fw-regular);
  overflow-wrap: break-word;
  hyphens: manual; /* Trennung nur an gesetzten &shy; – wie in Figma */
}

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

/* Layout-Helfer */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section--surface {
  background: var(--color-surface);
}

/* Typografie-Klassen (Figma-Textstile) */

.heading-2 {
  font-size: var(--fs-h2);
  line-height: 1.17;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

.subline {
  font-size: var(--fs-subline);
  line-height: 1.5;
  color: var(--color-muted);
}

.text-body {
  font-size: var(--fs-body);
  line-height: 1.5;
}

.text-body p + p {
  margin-top: 1.5em;
}

/* Barrierefreiheit */

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  font-weight: var(--fw-medium);
  color: var(--color-white);
  background: var(--color-primary);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}
