/* Grundlagen: Reset, Seite, Links, Fokus, Hilfsklassen, reduzierte Bewegung. */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink2);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a {
  color: var(--ink-link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

main:focus {
  outline: none;
}

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

[hidden] {
  display: none !important;
}

/* Theme-Wechsel: 0,5 s weicher Farbübergang, nur während des Umschaltens */
.theme-anim,
.theme-anim * {
  transition:
    background-color 0.5s ease,
    color 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease !important;
}

.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;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--on-ink);
  font-size: 13px;
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
  color: var(--on-ink);
}

/* Typografie-Stufen aus dem Design-System */
.display-xl,
.display-l,
.display-m {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 90%;
  color: var(--ink);
}

.display-xl {
  font-size: 100px;
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.display-l {
  font-size: 46px;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.display-m {
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
