/**
 * Grundlagen: Reset, Typografie, Fokus. Nutzt ausschließlich Variablen aus theme.css.
 */

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

/* hidden blendet immer aus, auch wenn eine Klasse display setzt (z. B. display: grid); sonst greift das Umschalten per hidden nicht */
[hidden] { display: none !important; }

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

/* Scrollbars: schmal und passend zum Theme, auf allen Seiten und in allen scrollbaren Bereichen.
   Standard-Eigenschaften (Firefox, Chrome und Edge ab 121), dazu ::-webkit-scrollbar für Safari und ältere Browser. */
html { scrollbar-color: var(--scrollbar-thumb) transparent; }
/* Beim Überziehen (oben über den Kopf, unten unter den Fuß hinaus) zeigt der Browser den Hintergrund des Dokuments: so schwarz wie Kopf
   und Fuß statt weiß im hellen Design. Die Seite selbst behält ihren Hintergrund (body). */
html { background: var(--color-black); }
*, *::before, *::after { scrollbar-width: thin; }
*:hover { scrollbar-color: var(--scrollbar-thumb-hover) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--radius-full); border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family-base);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-family-heading);
  line-height: 1.15;
  margin: 0 0 var(--space-md);
}

p { margin: 0 0 var(--space-md); }
img { max-width: 100%; height: auto; }
a { color: var(--color-accent-text); }

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

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

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