/* Grundregeln für alle Seiten: Rücksetzen, Schrift, Links, Fokus, Bewegung. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-base);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: var(--weight-black);
}

h1 {
  font-size: var(--text-7xl);
  line-height: var(--leading-3xl);
}

h2 {
  font-size: var(--text-4xl);
  line-height: var(--leading-xl);
}

h3 {
  font-size: var(--text-md);
  line-height: var(--leading-md);
}

p,
ol,
ul,
dl,
dd,
fieldset {
  margin: 0;
}

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

fieldset {
  padding: 0;
  border: 0;
}

a {
  color: var(--color-text);
}

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

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font-family: var(--font-body);
  font-size: var(--text-base);
}

input::placeholder {
  color: var(--color-text-muted);
}

svg {
  flex-shrink: 0;
}

:focus-visible {
  outline: var(--line-medium) solid var(--color-gold);
  outline-offset: var(--line-medium);
}

[hidden] {
  display: none !important;
}

/* Nur für Screenreader sichtbar. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* htmx setzt seine Klassen, die Stile dazu kommen wegen der CSP von hier. */
.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
