/* ============================================================
   GEMEINSAME BASIS — Beratungsstelle Emsbüren
   Design-Tokens, Grundtypografie und wiederkehrende Bausteine für
   index.html, impressum/, datenschutz/ und 404.html.
   Seitenspezifisches Layout bleibt inline in der jeweiligen Datei.
   ============================================================ */

/* ---------- Schrift (self-hosted, keine externen Requests) ---------- */
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/mulish-400.woff2") format("woff2");
}
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/mulish-500.woff2") format("woff2");
}
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/mulish-700.woff2") format("woff2");
}

:root {
  --brand-accent: #FFC800;
  --brand-accent-soft: #FAC95254;
  --ink: #222222;
  --ink-strong: #1C1C1C;
  --ink-muted: #646464;
  --ink-subtle: #8B8D94;
  --surface: #FFFFFF;
  --surface-alt: #F5F5F5;
  --surface-alt-2: #F1F1F1;
  --border: #E0E2E5;
  --overlay: #00000014;

  --font: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 40px;
  --s-5: 64px;
  --s-6: 96px;

  --max-section: 1140px;
  --max-text: 720px;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 var(--s-2);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-strong);
  text-wrap: balance;
}
h1 { font-size: 40px; line-height: 1.1; }
h2 { font-size: 34px; line-height: 1.1; }
h3 { font-size: 26px; line-height: 1.2; }
h4 { font-size: 22px; line-height: 1.3; }
h5 { font-size: 18px; line-height: 1.3; }

p { margin: 0 0 var(--s-2); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--ink-strong);
  text-decoration-color: var(--brand-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--ink-strong); }

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

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

/* ---------- Layout-Helfer ---------- */
.wrap {
  width: 100%;
  max-width: var(--max-section);
  margin-inline: auto;
  padding-inline: var(--s-3);
}
.measure { max-width: var(--max-text); }

section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.eyebrow {
  display: inline-block;
  margin: 0 0 var(--s-2);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 3px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--brand-accent);
}
.lead {
  font-size: 24px;
  line-height: 1.3;
  color: var(--ink);
}
.meta { font-size: 16px; line-height: 1.5; color: var(--ink-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary {
  background: var(--brand-accent);
  color: var(--ink-strong);
  border-color: var(--brand-accent);
}
.btn--primary:hover { background: #e6b400; border-color: #e6b400; }
.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--secondary:hover { background: var(--ink); color: #fff; }
.btn__icon { width: 18px; height: 18px; flex: none; }

/* ---------- Bilder / Medien ---------- */
figure { margin: 0; }
figcaption { margin-top: 10px; font-size: 15px; color: var(--ink-muted); }

.media {
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt-2);
}
.media--portrait { aspect-ratio: 4 / 5; }
.media--map { aspect-ratio: 16 / 9; }

.logo { display: block; width: 150px; height: auto; }
.logo--footer { width: 220px; }

/* ---------- SKIP-LINK ---------- */
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--ink-strong);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: top .15s ease;
}
.skip:focus { top: 12px; }

/* ---------- HEADER (Grundgerüst) ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}
.header__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.header__brand .brandname {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-strong);
  line-height: 1.15;
}
.header__brand .brandname small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-muted);
}

/* ---------- FOOTER (Grundfarben) ---------- */
.footer {
  background: var(--ink-strong);
  color: #d8d8da;
}
.footer a { color: #fff; text-decoration-color: var(--brand-accent); }
.footer a:hover { text-decoration-color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
