/* ===========================================================================
   dwbkd.de – gemeinsame Gestaltung für Startseite, Impressum und Datenschutz
   Seit 2026-10-19. Schriften kommen aus /assets/css/fonts.css (selbst gehostet).
   =========================================================================== */


:root {
  --paper: #fbfaf6;
  --paper-2: #f1eee6;
  --card: #ffffff;
  --ink: #1c1b18;
  --soft: #55514a;
  --line: #dedad0;
  --red: #c23b17;          /* Korrekturrot: der eine Akzent */
  --red-ink: #b2350f;
  --on-red: #fffaf5;

  --serif: 'Source Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Schibsted Grotesk', system-ui, sans-serif;
  --max: 1240px;
  --pad: clamp(1rem, 4.5vw, 3rem);
  --header-h: 72px;        /* Höhe der klebenden Kopfzeile, per JS aktuell gehalten */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #181714; --paper-2: #211f1b; --card: #26241f;
    --ink: #ece8df; --soft: #b4ada0; --line: #3a3731;
    --red: #ef7a54; --red-ink: #f08c69; --on-red: #1b0d07;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #181714; --paper-2: #211f1b; --card: #26241f;
  --ink: #ece8df; --soft: #b4ada0; --line: #3a3731;
  --red: #ef7a54; --red-ink: #f08c69; --on-red: #1b0d07;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; hanging-punctuation: first; }
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }
body {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
p { text-wrap: pretty; hyphens: auto; -webkit-hyphens: auto; }
a { color: inherit; }
::selection { background: var(--red); color: var(--on-red); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 2px; }
.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; }
.skip-link { position: absolute; top: -100%; left: 1rem; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; font-family: var(--sans); font-size: 0.9rem; z-index: 999; }
.skip-link:focus { top: 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.sans { font-family: var(--sans); }
.eyebrow { font-family: var(--sans); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.01em; color: var(--soft); }

/* Unterstrichene Links: dünn, mit Abstand, beim Überfahren rot */
.ul { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: var(--line); transition: text-decoration-color .2s, color .2s; }
.ul:hover { text-decoration-color: var(--red); color: var(--red-ink); }

/* KOPF ------------------------------------------------------------------ */
/* Bleibt beim Scrollen oben stehen. Der vollbreite Streifen wird über ein
   ::before gemalt, damit der Kopf selbst in der Inhaltsbreite (max 1240px)
   zentriert bleibt und kein Markup geändert werden muss. */
.top {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding-top: 1.6rem; padding-bottom: 1.6rem;
  transition: padding-top .25s ease, padding-bottom .25s ease;
}
.top::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: 50%; width: 100vw; margin-left: -50vw;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
  z-index: -1;
}
/* Sobald gescrollt wird: etwas flacher, Haarlinie und zarter Schatten. */
.top.is-stuck { padding-top: 0.95rem; padding-bottom: 0.95rem; }
.top.is-stuck::before { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(20, 14, 6, .5); }
.brand { display: flex; align-items: baseline; gap: 0.8rem; text-decoration: none; }
.brand .mark { font-family: var(--sans); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.035em; }
.brand .mark i { font-style: normal; color: var(--red); }
.brand .who { font-family: var(--sans); font-size: 0.9rem; color: var(--soft); }
.menu { display: flex; gap: clamp(1rem, 2.6vw, 2.2rem); list-style: none; font-family: var(--sans); font-size: 0.95rem; }
.menu a { text-decoration: none; padding: 0.4rem 0; background: linear-gradient(var(--red), var(--red)) 0 100% / 0 1.5px no-repeat; transition: background-size .25s, color .25s; }
.menu a:hover { background-size: 100% 1.5px; }
/* Aktiver Abschnitt beim Scrollen – gleiche rote Unterstreichung wie beim Überfahren. */
.menu a.is-active { background-size: 100% 1.5px; color: var(--red-ink); }

/* FUSS ------------------------------------------------------------------ */
footer { border-top: 1px solid var(--line); }
.foot { display: flex; justify-content: space-between; gap: 0.8rem 2rem; flex-wrap: wrap; padding-top: 1.8rem; padding-bottom: calc(1.8rem + env(safe-area-inset-bottom)); font-family: var(--sans); font-size: 0.85rem; color: var(--soft); }
.foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--red-ink); }
.foot a[aria-current="page"] { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 600px) {
  .top { flex-wrap: wrap; row-gap: 0.6rem; }
  .brand .who { display: none; }
}

/* RECHTSSEITEN (Impressum, Datenschutz) ------------------------------------ */
.page-head { padding-top: clamp(2.5rem, 8vh, 5.5rem); padding-bottom: clamp(2rem, 5vh, 3.5rem); border-bottom: 1px solid var(--line); }
.page-head .lead-in { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head h1 { font-weight: 380; font-size: clamp(2.4rem, 6.4vw, 5.2rem); line-height: 1.02; letter-spacing: -0.022em; overflow-wrap: break-word; hyphens: manual; }

.legal { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem 1.5rem; padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.toc { grid-column: 1 / 4; position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; font-family: var(--sans); font-size: 0.92rem; }
.toc .tlabel { display: block; margin-bottom: 0.8rem; }
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 1.9rem 1fr; padding: 0.38rem 0; text-decoration: none; color: var(--soft); line-height: 1.35; transition: color .2s; }
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--red-ink); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--ink); }

.legal .body { grid-column: 5 / 12; max-width: 40em; }
.legal .body section { padding-top: 0.4rem; }
.legal .body section + section { margin-top: 3.2rem; }
.legal .body h2 { font-weight: 420; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.12; letter-spacing: -0.015em; margin-bottom: 1.1rem; text-wrap: balance; }
.legal .body h2 .hn { display: block; font-family: var(--sans); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.01em; color: var(--red-ink); margin-bottom: 0.35rem; font-variant-numeric: tabular-nums; }
.legal .body h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; margin: 1.8rem 0 0.5rem; }
.legal .body p { margin-bottom: 1rem; }
.legal .body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--line); overflow-wrap: break-word; transition: color .2s, text-decoration-color .2s; }
.legal .body a:hover { color: var(--red-ink); text-decoration-color: var(--red); }
.legal .body ul { list-style: none; margin: 0 0 1.3rem; }
.legal .body li { position: relative; padding: 0.25rem 0 0.25rem 1.4em; }
.legal .body li::before { content: "–"; position: absolute; left: 0; color: var(--red); }
.legal .body strong { font-weight: 600; }
.legal .mono { font-family: var(--sans); font-size: 0.9em; white-space: nowrap; }

/* Kasten wie ein Briefkopf: Fläche statt Rahmen */
.info-card { background: var(--paper-2); padding: 1.6rem 1.8rem; margin: 0 0 2.6rem; border-radius: 2px; }
.info-card .ic-label { font-family: var(--sans); font-size: 0.82rem; font-weight: 500; color: var(--red-ink); margin-bottom: 0.7rem; }
.info-card p { margin-bottom: 0.6rem; }
.info-card p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .toc { display: none; }
  .legal .body { grid-column: 1 / 13; }
}
@media (max-width: 600px) {
  .info-card { padding: 1.3rem 1.1rem; }
}

/* COOKIE-DIALOG -------------------------------------------------------------
   Der Baustein /assets/legal/consent.{css,js} gilt für ALLE Anwendungen unter
   dwbkd.de und bleibt unverändert. Nur auf den Seiten mit class="dwbkd-site"
   bekommt er hier das Kleid der Website – gleiche Knöpfe, gleiche Texte,
   gleiche Sperre. */
.dwbkd-site .dwbkd-consent-scrim { background: rgba(28, 24, 18, .5); }
.dwbkd-site .dwbkd-consent {
  --cc-ink: var(--card);      /* Fläche */
  --cc-paper: var(--ink);     /* Schrift */
  --cc-muted: var(--soft);
  --cc-green: var(--red);
  --cc-line: var(--line);
  max-width: 620px;
  padding: 1.8rem 2rem 1.6rem;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(40,30,10,.08), 0 30px 60px -20px rgba(20,14,6,.45);
}
.dwbkd-site .dwbkd-consent h2 { font-family: var(--serif); font-weight: 420; font-size: 1.65rem; line-height: 1.15; letter-spacing: -0.015em; margin-bottom: 0.7rem; }
.dwbkd-site .dwbkd-consent p { font-family: var(--serif); font-size: 1.05rem; line-height: 1.55; color: var(--ink); margin-bottom: 1rem; }
.dwbkd-site .dwbkd-consent a { color: var(--ink); text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.dwbkd-site .dwbkd-consent a:hover { color: var(--red-ink); text-decoration-color: var(--red); }
.dwbkd-site .dwbkd-consent .dwbkd-consent-legal { font-family: var(--sans); font-size: 0.85rem; color: var(--soft); margin: -0.3rem 0 1.3rem; }
.dwbkd-site .dwbkd-consent .dwbkd-consent-legal a { color: var(--soft); }
.dwbkd-site .dwbkd-consent button { font-family: var(--sans); font-size: 0.95rem; border-radius: 3px; padding: 0.7rem 1.15rem; border-color: var(--ink); }
.dwbkd-site .dwbkd-consent button:hover { background: var(--paper-2); }
.dwbkd-site .dwbkd-consent button.is-primary { background: var(--red); border-color: var(--red); color: var(--on-red); }
.dwbkd-site .dwbkd-consent button.is-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.dwbkd-site .dwbkd-consent button.is-quiet { border-color: transparent; color: var(--soft); }
.dwbkd-site .dwbkd-consent button.is-quiet:hover { background: transparent; color: var(--ink); }
.dwbkd-site .dwbkd-consent button.dwbkd-consent-dismiss { padding: 0; border-color: transparent; color: var(--soft); }
.dwbkd-site .dwbkd-consent button.dwbkd-consent-dismiss:hover { background: var(--paper-2); color: var(--ink); }
.dwbkd-site .dwbkd-consent button:focus-visible,
.dwbkd-site .dwbkd-consent a:focus-visible,
.dwbkd-site .dwbkd-consent input:focus-visible { outline-color: var(--red); }
.dwbkd-site .dwbkd-consent-group strong { font-size: 0.95rem; }
.dwbkd-site .dwbkd-consent-group span { font-size: 0.88rem; }
@media (max-width: 560px) {
  .dwbkd-site .dwbkd-consent { border-radius: 6px 6px 0 0; padding: 1.4rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom)); }
  .dwbkd-site .dwbkd-consent h2 { font-size: 1.4rem; }
}
