/* ============================================================
   Reset, Typografie, Basis
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-accent-hover); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--lh-heading);
  margin: 0 0 var(--space-4);
  color: var(--color-text);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 { font-size: var(--fs-display); line-height: var(--lh-display); font-weight: 500; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p { margin: 0 0 var(--space-4); max-width: var(--content-max-text); }

ul, ol { margin: 0 0 var(--space-5); padding-left: 1.25rem; }
li + li { margin-top: var(--space-2); }
li { max-width: var(--content-max-text); }

strong, b { font-weight: 600; }

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-7) 0;
}

/* Material Symbols */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'opsz' 24, 'wght' 400, 'FILL' 0, 'GRAD' 0;
  vertical-align: middle;
}

/* Skip-Link (a11y) */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 1000;
  background: var(--color-primary);
  color: var(--color-text-on-dark);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.skip-link:focus {
  top: var(--space-3);
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Focus-Sichtbarkeit weltweit */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Reduced Motion respektieren */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
