/* ==========================================================================
   base.css — Reset, Grundtypografie, Bedienhilfen
   ========================================================================== */

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

* { margin: 0; }

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

body {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: var(--leading-normal);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

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

p, li { text-wrap: pretty; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Linkunterstreichung im Fließtext: dünn, mit Abstand zur Grundlinie */
.prose a,
a.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--c-ink-faint);
  transition: text-decoration-color var(--dur-fast) var(--ease);
}
.prose a:hover,
a.link:hover { text-decoration-color: var(--c-ink); }

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
}

::selection {
  background: var(--c-ink);
  color: var(--c-bg);
}

hr {
  border: 0;
  border-top: 1px solid var(--c-rule);
  margin: var(--space-l) 0;
}

/* --- Bedienhilfen --------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: var(--space-2xs);
  left: var(--space-2xs);
  z-index: 100;
  padding: var(--space-2xs) var(--space-s);
  background: var(--c-ink);
  color: var(--c-bg);
  font-family: var(--font-display);
  font-size: var(--step--1);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

/* --- Bewegung nur, wenn erwünscht ---------------------------------------- */

@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;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
