/* ==========================================================================
   Reset, Grundtypografie, Accessibility-Basics
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  /* Dezente Farbstimmung im Hintergrund – gibt Tiefe ohne Ablenkung. */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

ol,
ul {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 650;
}

/* --------------------------------------------------------------- Fokus */
/* Sichtbar, aber nur bei Tastaturbedienung – kein Rahmen beim Mausklick. */
:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ---------------------------------------------------- Screenreader-Hilfen */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -140%);
  z-index: 200;
  padding: var(--space-3) var(--space-5);
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--t-med) var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* WICHTIG: Das hidden-Attribut kommt im Browser-Stylesheet nur mit
   `display: none` und minimaler Spezifitaet. Jede eigene display-Regel
   (z. B. `.banner { display: flex }`) wuerde es aushebeln – das Element
   waere trotz `hidden` sichtbar. Diese Zeile macht hidden verlaesslich. */
[hidden] {
  display: none !important;
}

/* Icon-Sprite selbst darf nichts rendern. */
.sprite {
  display: none;
}

/* Standardgroesse aller Inline-Icons. */
svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: none;
}

/* Reduzierte Bewegung respektieren. */
@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;
  }
}

/* Hoher Kontrast: Raender verstaerken. */
@media (prefers-contrast: more) {
  :root {
    --border: var(--border-strong);
  }
}
