/* base.css – Reset, Grundtypografie, Layout-Grundlagen, Fokus, Skip-Link */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: light; scroll-padding-top: 5rem; }
html[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { color-scheme: dark; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-400);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.22;
  color: var(--text);
  margin: 0 0 var(--space-2);
  font-weight: 400;
  letter-spacing: 0;
  overflow-wrap: break-word;
  hyphens: auto;
}
h1 { font-size: var(--fs-800); }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); }

p { margin: 0 0 var(--space-2); max-width: var(--measure); }
ul, ol { max-width: var(--measure); }
p, li, blockquote { overflow-wrap: break-word; hyphens: auto; }

a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
}
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 700; }
code, kbd { font-family: var(--font-mono); font-size: 0.92em; }

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

/* Sichtbarer Fokus für alle interaktiven Elemente (Tastatur) */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}
/* Maus-Klick erzeugt keinen Dauerring, Tastatur schon */
:focus:not(:focus-visible) { outline: none; }

@media (forced-colors: active) {
  :focus-visible {
    outline: 3px solid Highlight;
    forced-color-adjust: auto;
  }
}

/* Skip-Link: erst bei Fokus sichtbar */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 1000;
  background: var(--accent-2);
  color: var(--accent-2-ink);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--space-2); }

/* Layout-Hilfen */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-2); }
.section { padding-block: var(--space-6); }
.section--tint { background: var(--surface-2); }
.lede { font-size: var(--fs-500); color: var(--text-muted); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-300);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 var(--space-1);
}

/* Nur für Screenreader */
.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;
}

main:focus { outline: none; }

@media (min-width: 44rem) {
  .container { padding-inline: var(--space-3); }
}

@media (max-width: 22rem) {
  .container { padding-inline: 0.75rem; }
}

/* Reduced Motion: alle Bewegungen aus, Inhalt sofort sichtbar */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
