/* Grundlage: Reset, Seite, Schrift, Überschriften, Links, Fokus, kleine Hilfsklassen. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--frame-top);
}

:root[data-motion='still'] {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

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

/* Titel immer fett und eng, alles Bedienbare dünn und klein (Type Contrast) */
h1,
h2,
h3,
h4 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-title);
}

h1 {
  font-size: var(--text-h1);
}

h2 {
  max-width: 16ch;
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
  letter-spacing: var(--tracking-h3);
}

h4 {
  font-size: var(--text-small);
  letter-spacing: 0;
}

p {
  max-width: var(--measure);
}

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

img,
video {
  width: 100%;
  height: auto;
}

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

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

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

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

/* Nur für Screenreader */
/* top: 0, damit ein verstecktes Element am Ende der Seite sie nicht um 1 px verlängert */
.visually-hidden {
  position: absolute;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Englisch: feste Texte erst zeigen, wenn js/i18n.js sie übersetzt hat (kein deutsches
   Aufblitzen) */
:root[lang='en']:not(.is-translated) [data-en] {
  visibility: hidden;
}

.skip-link {
  position: fixed;
  top: var(--space-2xs);
  left: var(--space-2xs);
  z-index: 100;
  padding: var(--space-2xs) var(--space-s);
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: var(--text-ui);
  transform: translateY(-200%);
}

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

@keyframes blur-in {
  from {
    opacity: 0;
    filter: blur(12px);
  }
}

@keyframes blur-out {
  to {
    opacity: 0;
    filter: blur(12px);
  }
}
