/* ═══════════ RESET & BASIS ═══════════ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--ink);
  background: var(--bg-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

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

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

.skip-link {
  position: fixed;
  top: -100px;
  left: var(--space-4);
  z-index: 200;
  padding: var(--space-3) var(--space-5);
  background: var(--cream);
  color: var(--bg-0);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus {
  top: 0;
}

/* Korn-Textur über der ganzen Seite (SVG-FeTurbulence, dezent) */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ═══════════ LAYOUT-HELFER ═══════════ */

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

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
}

.accent-italic {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0;
}

.hl {
  color: var(--gold);
  font-weight: 550;
}