/* ==========================================================================
   Base – Reset, Typografie, globale Hilfsklassen
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-text);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--color-red);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Typografie --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-kicker);
  text-transform: uppercase;
  letter-spacing: var(--tracking-kicker);
  color: var(--color-red);
}

.kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--color-red);
}

.kicker--invert {
  color: #fff;
}

.kicker--invert::before {
  background: var(--color-red);
}

.section-title {
  font-size: var(--text-h2);
  text-transform: uppercase;
  margin-top: var(--space-sm);
}

.lead {
  font-size: var(--text-lead);
  color: var(--color-text-muted);
  line-height: var(--leading-snug);
  max-width: 56ch;
}

/* --- Layout-Helfer --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-section);
}

.section--light {
  background: var(--color-surface-2);
}

.section--dark {
  background: var(--color-ink);
  color: var(--color-text-invert);
}

.section-head {
  max-width: 62ch;
  margin-bottom: var(--space-lg);
}

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

/* --- Scroll-Reveal (motion-safe) --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
