/* ============================================================================
   Generiertes Stylesheet – Template «fresh»
   Sommer-Akkord: helle Flächen, Pill-Chips, sehr abgerundete Karten mit
   sanftem Hoverschatten, fröhliche Sans-Paare.
   Design-Tokens der Site als CSS-Variablen (Token-Variation je Nische).
   Alle Fonts werden lokal ausgeliefert (keine externen Requests).
   ========================================================================== */
@font-face {
  font-family: "P052";
  src: url("/static/fonts/p052.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "P052";
  src: url("/static/fonts/p052-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Serif";
  src: url("/static/fonts/dejavu-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Serif";
  src: url("/static/fonts/dejavu-serif-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --primary: #b3552e;
  --accent: #4c6b6b;
  --background: #fbf6ef;
  --ink: #32241d;
  --font-heading: "P052";
  --font-body: "DejaVu Serif";
  --base-size: 18px;
  --line-height: 1.65;
  --surface: #ffffff;
  --max-width: 66rem;
  --radius: 1rem;
  --pill: 2rem;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: color-mix(in srgb, var(--background) 55%, var(--accent) 12%);
  color: var(--ink);
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: var(--base-size);
  line-height: var(--line-height);
}
h1, h2, h3 { line-height: 1.2; font-weight: 700; font-family: var(--font-heading), var(--font-body), system-ui, sans-serif; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0.9rem auto;
  padding: 0.6rem 1.1rem;
  background: var(--surface);
  border-radius: var(--pill);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.06);
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.site-nav { display: flex; gap: 1rem; font-size: 0.95em; }

/* Hero auf Akzent-Fläche, abgerundet. */
.hero {
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: var(--radius);
  padding: 2.25rem 1.5rem 1.75rem;
  margin: 1.25rem 0 1.75rem;
}
.hero h1 { font-size: 1.9rem; margin: 0 0 0.5rem; }
.tagline { margin: 0; color: color-mix(in srgb, var(--ink) 68%, transparent); }

.post-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.4rem;
  padding-bottom: 3rem;
}
.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.3rem;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.05);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
@media (hover: hover) {
  .post-card:hover { box-shadow: 0 8px 20px rgb(0 0 0 / 0.1); }
  .post-card:hover a { text-decoration: none; }
}
.chip {
  align-self: flex-start;
  background: var(--primary);
  color: var(--surface);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: var(--pill);
}
.post-title { font-size: 1.25rem; margin: 0; }
.post-card .ai-image { margin: 0; }
.post-card .ai-image img { border-radius: 0.6rem; }
.excerpt { color: color-mix(in srgb, var(--ink) 72%, transparent); margin: 0; flex: 1; }
.read-more { margin: 0; }
.read-more a {
  background: color-mix(in srgb, var(--accent) 25%, var(--surface));
  color: var(--ink);
  font-weight: 700;
  padding: 0.4rem 0.95rem;
  border-radius: var(--pill);
  display: inline-block;
}
.no-posts {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  color: color-mix(in srgb, var(--ink) 65%, transparent);
}

/* Artikel */
.post {
  max-width: 46rem;
  margin: 1.5rem auto 3rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.06);
  padding: 2rem 2.25rem;
}
.post-header h1 { font-size: 1.9rem; margin-bottom: 0.5rem; }
.post-header .excerpt { color: color-mix(in srgb, var(--ink) 70%, transparent); }
.post-featured { margin: 1.4rem 0; }
.chapter h2, .conclusion h2 { font-size: 1.35rem; margin-top: 1.9rem; }
.chapter h2::before { content: "✺"; color: var(--accent); margin-right: 0.5rem; }
.conclusion h2::before { content: "✨"; }

.ai-image { margin: 1.1rem 0; }
.ai-image img { width: 100%; height: auto; display: block; border-radius: 0.6rem; }
.ai-image-caption {
  font-size: 0.85em;
  margin-top: 0.4rem;
  color: color-mix(in srgb, var(--ink) 58%, transparent);
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--surface);
  border-radius: var(--pill);
  padding: 0.8rem 1.4rem;
  font-size: 0.9em;
}
.site-legal { display: flex; gap: 1rem; }
.legal {
  max-width: 46rem;
  margin: 1.5rem auto 3rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
}

/* Ad-Slot (Ticket 14): nur bei aktivem Modus; sichtbar nach Consent. */
.ad-slot {
  max-width: var(--max-width);
  margin: 1.5rem auto 2.5rem;
  padding: 1rem;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius);
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  font-size: 0.85em;
  text-align: center;
}
.ad-slot[hidden] { display: none; }
.ad-placeholder { color: inherit; }

/* ============================ Consent-Banner (ADR-0004) =================== */
#consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 16px rgb(0 0 0 / 0.14);
  padding: 1.25rem 1.25rem;
  z-index: 100;
  max-height: 80vh;
  overflow: auto;
}
html[data-bconsent="accepted"] #consent-banner,
#consent-banner.bconsent-hidden { display: none !important; }
.consent-main { max-width: 50rem; margin: 0 auto; text-align: center; }
.consent-main p { margin: 0 0 0.75rem; }
.consent-dialog p { text-align: center; }
.consent-dialog { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent); }
.consent-dialog[hidden] { display: none; }
.consent-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.consent-actions button {
  font: inherit;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--primary);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
}
#consent-accept { background: var(--primary); }
.consent-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent-categories { list-style: none; margin: 0.75rem 0; padding: 0; display: grid; gap: 0.5rem; justify-items: center; }
.consent-categories label { display: flex; align-items: center; gap: 0.5rem; }