/* ==========================================================================
   Base – Reset, Typografie, Grundelemente
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

body {
  margin: 0;
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  color: var(--color-brand-primary);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); line-height: 1.05; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.05rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

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

ul, ol { margin: 0 0 1.2em; padding-left: 1.15em; }
li { margin-bottom: 0.45em; }
li::marker { color: var(--color-accent-deep); }

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

strong { font-weight: 600; }

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

::selection { background: var(--color-accent); color: var(--color-brand-primary); }

/* --- Fokus ------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-accent-deep);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.on-dark :focus-visible,
.site-footer :focus-visible,
.site-header--transparent :focus-visible { outline-color: var(--color-accent); }

/* --- Skip-Link --------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 999;
  transform: translateY(-160%);
  background: var(--color-brand-primary);
  color: var(--color-accent);
  padding: 0.7rem 1.15rem;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast);
}
.skip-link:focus-visible { transform: translateY(0); }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-accent-ink);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--color-accent);
  flex: none;
}
.on-dark .eyebrow { color: var(--color-accent); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--color-text);
  letter-spacing: -0.012em;
  max-width: 46ch;
}
.on-dark .lead { color: var(--color-text-invert); }

.muted { color: var(--color-muted); }
.on-dark .muted { color: var(--color-muted-invert); }

.text-accent { color: var(--color-accent-ink); }
.on-dark .text-accent { color: var(--color-accent); }

.on-dark {
  background: var(--color-dark);
  color: var(--color-text-invert);
}
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--color-text-invert); }

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
}
