/* ==========================================================================
   Base: Reset, Typografie, Browser-Oberflächen, Layout-Primitive
   ========================================================================== */

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

* { margin: 0; }

/* hidden gilt immer, auch wenn eine Komponente display: grid oder flex setzt */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  scrollbar-color: var(--steel) var(--paper);
}

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

body {
  min-height: 100dvh;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-18);
  font-stretch: var(--stretch-text);
  line-height: var(--lh-body);
  font-kerning: normal;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--red);
  padding-bottom: var(--actionbar-h);
}

@media (min-width: 64em) {
  body { padding-bottom: 0; }
}

::selection { background: var(--red); color: var(--white); }

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

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

button { cursor: pointer; background: none; border: 0; padding: 0; }

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

p, li { text-wrap: pretty; }

h1, h2, h3, h4 {
  font-stretch: var(--stretch-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); line-height: 1.06; }
h3 { font-size: var(--fs-h3); }

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

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

/* Scrollbar (WebKit) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--steel); border: 3px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--ink); }

/* --------------------------------------------------------------------------
   Layout-Primitive
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--paper { background: var(--paper); }

.section-head {
  display: grid;
  gap: var(--space-stack);
  max-width: 44rem;
  margin-bottom: var(--space-head);
}

.lead {
  font-size: var(--fs-20);
  line-height: 1.5;
  color: var(--graphite);
  max-width: 38em;
}

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

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-12);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.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: var(--s-4);
  top: -100px;
  z-index: calc(var(--z-modal) + 1);
  padding: var(--s-3) var(--s-5);
  background: var(--ink);
  color: var(--white);
  font-weight: 650;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: currentColor;
}
