/* ============================================================
   BASE — Reset + Typografie
   ============================================================ */

/* Bunny Fonts (DSGVO-konform, Google-Fonts-Mirror). Production: selbst-hosten. */
@import url('https://fonts.bunny.net/css?family=fraunces:300,400,500,600,700,900|dm-sans:400,500,600,700|jetbrains-mono:400,500,600&display=swap');

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-feature-settings: "ss01", "ss02";   /* Fraunces stylistic sets */
  font-variant-ligatures: common-ligatures;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg-page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  letter-spacing: var(--tr-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  /* Dezenter Papier-Grain als Atmosphäre (Light default) */
  background-image:
    radial-gradient(circle at 20% 0%, rgba(45, 95, 63, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(178, 90, 50, 0.04) 0%, transparent 50%),
    url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.07 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
  background-size: auto, auto, 200px 200px;
}


/* ---------- TYPOGRAPHY DEFAULTS ---------- */

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  color: var(--text);
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
}

h1 { font-size: clamp(var(--fs-3xl), 8vw, var(--fs-5xl)); }
h2 { font-size: clamp(var(--fs-2xl), 5vw, var(--fs-4xl)); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p {
  margin: 0 0 var(--s-4) 0;
  max-width: 60ch;
  color: var(--text-soft);
}

a {
  color: inherit;
  text-decoration: none;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.18em;
  transition: color var(--dur-2) var(--ease-out);
}
a:hover { color: var(--accent-hi); }

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

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

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

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--s-7) 0;
}

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

/* ---------- UTILITIES ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.mono { font-family: var(--font-mono); letter-spacing: var(--tr-mono); }
.label-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--text-dim);
}

.italic { font-style: italic; }
.serif { font-family: var(--font-display); }

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

.container       { max-width: var(--container);        margin-inline: auto; padding-inline: var(--gutter); }
.container-wide  { max-width: var(--container-wide);   margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow{ max-width: var(--container-narrow); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(var(--s-8), 10vw, var(--s-10)); }
.section-tight { padding-block: var(--s-7); }

.divider-line {
  height: 1px;
  background: var(--border);
}

/* Visually hidden */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- ANIMATION KEYFRAMES ---------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slide-in-x {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--forest-glow); }
  50%      { box-shadow: 0 0 0 8px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
