/*
 * base.css — Reset, Selbst-Hosting-Fonts, Grundtypografie
 * ============================================================================
 * Schriften werden self-hosted ausgeliefert (DSGVO: kein Google-CDN).
 * Lege die .woff2-Dateien unter assets/fonts/ ab — siehe README.
 * Bis dahin greifen robuste Fallbacks (Georgia / system-ui).
 * ==========================================================================*/

/* — Fraunces (Display, Serif) — */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;            /* variable Achse, falls vorhanden */
  font-display: swap;
  src: url("../fonts/fraunces/fraunces-variable.woff2") format("woff2-variations"),
       url("../fonts/fraunces/fraunces-600.woff2") format("woff2");
  font-named-instance: "Regular";
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/fraunces/fraunces-italic-variable.woff2") format("woff2-variations");
}

/* — Hanken Grotesk (Body, Sans) — */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/hanken-grotesk/hanken-grotesk-variable.woff2") format("woff2-variations"),
       url("../fonts/hanken-grotesk/hanken-grotesk-400.woff2") format("woff2");
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  font-weight: 400;
  text-rendering: optimizeLegibility;
  /* Dezente Papier-/Korn-Textur über sanftem Verlauf — Atmosphäre statt Volltonfläche */
  background-image:
    radial-gradient(1200px 600px at 100% -5%, rgba(217, 162, 63, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(100, 127, 66, 0.07), transparent 55%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

button { cursor: pointer; }

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

a {
  color: var(--c-forest);
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--c-moss); }

/* ========================================================================== */
/* Typografie                                                                  */
/* ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: var(--lh-snug);
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
  /* Fraunces optische Achsen, falls Variable-Font geladen */
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30, "WONK" 0;
}

h1 { font-size: var(--fs-2xl); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p { max-width: 68ch; }

p + p { margin-top: 1em; }

strong, b { font-weight: 600; }

small { font-size: var(--fs-xs); }

blockquote {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-style: italic;
  line-height: 1.35;
  color: var(--c-cocoa);
  border-left: 3px solid var(--c-gold);
  padding-left: var(--space-sm);
}

hr {
  border: 0;
  height: 1px;
  background: var(--c-line);
  margin: var(--space-lg) 0;
}

code, pre {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

::selection {
  background: var(--c-gold);
  color: var(--c-espresso);
}

/* ========================================================================== */
/* Fokus & Zugänglichkeit                                                      */
/* ========================================================================== */
:focus-visible {
  outline: 3px solid var(--c-forest);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  background: var(--c-espresso);
  color: var(--c-cream);
  padding: 0.7em 1.4em;
  border-radius: 0 0 var(--r-md) var(--r-md);
  z-index: var(--z-menu);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 0; color: var(--c-cream); }

/* Nur für Screenreader */
.screen-reader-text,
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ========================================================================== */
/* Reduced Motion — Animationen weitgehend deaktivieren                        */
/* ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
