/* ==========================================================================
   Base: Reset, Typografie-Grundlagen, Barrierefreiheit
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  font-kerning: normal;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, address {
  margin: 0;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}

p { text-wrap: pretty; }

ul[role="list"], ol[role="list"] {
  list-style: none;
  padding: 0;
}

address { font-style: normal; }

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

img { height: auto; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button {
  font: inherit;
  color: inherit;
}

/* Fokus: sichtbar und markenkonform (WCAG 2.4.7 / 2.4.11) */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.theme-dark :focus-visible { outline-color: var(--kt-white); }

::selection {
  background: var(--kt-red);
  color: var(--kt-white);
}

/* Nur fuer Screenreader sichtbar */
.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;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--kt-anthracite);
  color: var(--kt-white);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

/* Offene Inhalte sichtbar markieren (Entwurf, vor Go-live entfernen) */
.offen {
  display: inline-block;
  padding: 0.15em 0.45em;
  border: 1px dashed currentColor;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  line-height: 1.5;
  opacity: 0.8;
}
