/* Schriften (selbst gehostet, SIL OFL, Lizenzen in assets/fonts/), Reset, Grundtypografie, Hilfsklassen. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--proto-h, 0px) + var(--space-6));
  background: var(--scene-sky);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: var(--lh-body);
  overflow-x: hidden;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-3);
  color: var(--color-heading);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: var(--fs-lg); font-weight: 600; letter-spacing: 0; }

p,
ul,
ol,
dl,
figure,
blockquote,
table {
  margin: 0 0 var(--space-4);
}

p {
  text-wrap: pretty;
}

ul,
ol {
  padding-left: 1.25em;
}

li + li {
  margin-top: var(--space-1);
}

strong,
b {
  font-weight: 600;
}

a {
  color: var(--color-link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration-thickness: 2px;
}

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

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

hr {
  height: 1px;
  margin: var(--space-6) 0;
  border: 0;
  background: var(--color-rule);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-weight: 600;
}

code {
  padding: 0.05em 0.3em;
  border-radius: 4px;
  background: var(--surface-inset);
  font-size: 0.9em;
}

/* Layout */

.wrap {
  width: min(var(--content), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(48rem, 100% - 2 * var(--gutter));
}

main {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  padding-bottom: var(--section-gap);
}

main:focus {
  outline: none;
}

/* Abstand zwischen den Scheiben. Nie größer als ihr Innenabstand (.pane), sonst zerfällt die Seite in Inseln. */
.section {
  margin-top: var(--section-gap);
}

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

.stack > * + * {
  margin-top: var(--space-4);
}

.grid {
  display: grid;
  gap: var(--gutter);
}

@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Hilfsklassen */

[hidden] {
  display: none !important;
}


.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-s);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

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

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

.tabular {
  font-variant-numeric: tabular-nums;
}

.nowrap {
  white-space: nowrap;
}

.muted {
  color: var(--color-text-muted);
}

.lead {
  font-size: var(--fs-lg);
  line-height: 1.5;
}

@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;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
