/* ==========================================================================
   Basis: Reset, Typografie, Hilfsklassen
   ========================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

h1,
h2,
h3,
h4 {
  color: var(--c-heading);
  line-height: 1.2;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--c-blue-600);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--c-blue-700);
}

:focus-visible {
  outline: 3px solid var(--c-blue-400);
  outline-offset: 3px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--c-blue-100);
  color: var(--c-heading);
}

/* Icons -------------------------------------------------------------------- */

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: inline-block;
  flex-shrink: 0;
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Layout-Hilfen ------------------------------------------------------------ */

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-blue-700);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  top: 12px;
}

/* Scroll-Animationen (nur aktiv, wenn JS die Klasse setzt) ------------------ */

.can-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

.can-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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