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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, figure, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }

::selection { background: var(--gold); color: var(--ink-950); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  left: 1rem; top: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink-950);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Filmkorn über der ganzen Seite: statisches Rauschen, keine Animationskosten */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Bausteine ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand-300);
}
.label::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--gold);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.015em;
}
.display em { font-style: italic; color: var(--gold-hot); }

.btn {
  --btn-bg: var(--gold);
  --btn-fg: var(--ink-950);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--btn-bg);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--duration-normal) var(--ease-out-expo), border-color var(--duration-normal);
}
/* Füllung wischt wie eine Klinge von links nach rechts */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gold-hot);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-normal) var(--ease-out-expo);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  border-color: var(--line-strong);
}
.btn--ghost::before { background: var(--paper); }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--ink-950); border-color: var(--paper); }

.btn--dark {
  --btn-bg: var(--ink-950);
  --btn-fg: var(--paper);
}
.btn--dark::before { background: var(--ink-800); }

/* Einblenden beim Hineinscrollen (js/sections.js) */
.js:not(.reduced-motion) [data-reveal] {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity var(--duration-slow) var(--ease-out-expo), transform var(--duration-slow) var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
}
.js:not(.reduced-motion) [data-reveal].is-in { opacity: 1; transform: none; }

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