/* ==========================================================================
   SEOFELD DESIGN-SYSTEM  ·  „Havel & Ziegel"
   --------------------------------------------------------------------------
   Statisches Design-System für seofeld.de – keine Abhängigkeiten.
   Farbwelt: warmes Creme (Papier), Tannengrün (Havel-Landschaft),
   Ziegel-Terracotta (Glindower Ziegelei = lokale Verwurzelung).
   Typografie: Fraunces Variable (Headlines, warm-editorial),
   Instrument Sans Variable (Fließtext, klar-modern). Lokal gehostet.
   Raster: 1rem-Spacing-Skala, mobile-first, WCAG AA.
   Lebende Referenz: /design-system.html
   ========================================================================== */

/* ---------- 1. Fonts (lokal, font-display: swap) ---------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/fraunces-latin-standard-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url('../fonts/instrument-sans-latin-standard-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: italic;
  font-display: swap;
  font-weight: 400 700;
  src: url('../fonts/instrument-sans-latin-standard-italic.woff2') format('woff2-variations');
}

/* ---------- 2. Design-Tokens ---------- */
:root {
  /* Farben */
  --c-bg: #FAF7F2;            /* warmes Creme – Grundfläche */
  --c-surface: #FFFFFF;       /* Karten, Panels */
  --c-surface-warm: #F3EDE3;  /* abgesetzte Sektionen */
  --c-ink: #21302B;           /* Text – dunkles Grünschwarz */
  --c-ink-soft: #51605A;      /* Sekundärtext (AA auf Creme) */
  --c-brand: #1E4D3B;         /* Tannengrün – Marke */
  --c-brand-deep: #143528;    /* dunkle Sektionen, Footer */
  --c-brand-tint: #E4EDE7;    /* grüne Tönung für Chips/Infos */
  --c-accent: #B04D2D;        /* Ziegel-Terracotta – CTA; 4,57:1 auf --c-surface-warm (AA, knapp) */
  --c-accent-hover: #9C4227;
  --c-accent-soft: #F6E7DE;   /* Terracotta-Tönung */
  --c-gold: #D99A2B;          /* Charts, Sterne, Highlights */
  --c-line: #E7DFD2;          /* Linien, Card-Borders */
  --c-line-dark: rgba(255,255,255,.16);
  --c-focus: #B04D2D;

  /* Typografie */
  --f-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-body: 'Instrument Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-s: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-m: 1.1875rem;
  --fs-l: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --fs-xl: clamp(1.5rem, 1.25rem + 1.2vw, 2rem);
  --fs-2xl: clamp(1.875rem, 1.5rem + 1.8vw, 2.625rem);
  --fs-3xl: clamp(2.25rem, 1.7rem + 2.6vw, 3.375rem);
  --lh-tight: 1.15;
  --lh-base: 1.65;

  /* Spacing (1rem-Raster) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem; --s-6: 2rem; --s-7: 2.5rem; --s-8: 3rem;
  --s-9: 4rem; --s-10: 5rem; --s-11: 6rem; --s-12: 8rem;

  /* Sonstiges */
  --radius-s: 8px; --radius-m: 14px; --radius-l: 22px; --radius-pill: 999px;
  --shadow-s: 0 1px 3px rgba(33,48,43,.07);
  --shadow-m: 0 6px 24px -6px rgba(33,48,43,.12);
  --shadow-l: 0 18px 48px -12px rgba(33,48,43,.18);
  --w-content: 46rem;
  --w-wide: 72rem;
}

/* ---------- 3. Basis / Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-ink);
  background: var(--c-bg);
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--f-head);
  font-weight: 580;
  line-height: var(--lh-tight);
  color: var(--c-ink);
  margin: 0 0 var(--s-4);
  text-wrap: balance;
  font-variation-settings: 'SOFT' 60, 'WONK' 0, 'opsz' 40;
}
h1 { font-size: var(--fs-3xl); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-2xl); margin-top: var(--s-9); }
h3 { font-size: var(--fs-xl); margin-top: var(--s-7); }
h4 { font-size: var(--fs-m); font-family: var(--f-body); font-weight: 650; }
p, ul, ol { margin: 0 0 var(--s-5); }
li { margin-bottom: var(--s-2); }
a { color: var(--c-brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-accent); }
strong { font-weight: 650; }
blockquote {
  margin: var(--s-6) 0; padding: var(--s-5) var(--s-6);
  border-left: 4px solid var(--c-gold);
  background: var(--c-surface); border-radius: 0 var(--radius-m) var(--radius-m) 0;
  font-family: var(--f-head); font-size: var(--fs-m); font-style: italic;
}
blockquote cite { display: block; margin-top: var(--s-3); font-family: var(--f-body); font-style: normal; font-size: var(--fs-s); color: var(--c-ink-soft); }
table { width: 100%; border-collapse: collapse; margin: var(--s-6) 0; font-size: var(--fs-s); background: var(--c-surface); border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow-s); }
th, td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--c-line); vertical-align: top; }
th { background: var(--c-brand); color: #fff; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; border-radius: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--c-brand); color: #fff; padding: var(--s-3) var(--s-4); z-index: 100; }
.skip-link:focus { left: var(--s-4); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- 4. Layout-Container ---------- */
.wrap { max-width: var(--w-wide); margin-inline: auto; padding-inline: var(--s-5); }
.wrap--narrow { max-width: var(--w-content); }
.section { padding-block: var(--s-9); }
.section--warm { background: var(--c-surface-warm); }
.section--dark { background: var(--c-brand-deep); color: #F2EFE8; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: #DCE5DF; }
.section--dark a { color: #F0C97A; }
.grid { display: grid; gap: var(--s-5); }
@media (min-width: 700px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--split { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: var(--s-8); }
}
.eyebrow {
  display: inline-block; font-size: var(--fs-xs); font-weight: 650;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-accent);
  margin-bottom: var(--s-3);
}
.lead { font-size: var(--fs-m); color: var(--c-ink-soft); }

/* ---------- 5. Komponente: Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,247,242,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-3); }
.logo { display: flex; align-items: baseline; gap: var(--s-2); text-decoration: none; font-family: var(--f-head); font-size: 1.45rem; font-weight: 640; color: var(--c-ink); }
.logo:hover { color: var(--c-brand); }
.logo__dot { width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--c-accent); align-self: center; }
.logo small { font-family: var(--f-body); font-size: var(--fs-xs); font-weight: 500; color: var(--c-ink-soft); }
.nav { display: none; }
.nav ul { list-style: none; display: flex; gap: var(--s-5); margin: 0; padding: 0; align-items: center; }
.nav a { text-decoration: none; font-size: var(--fs-s); font-weight: 550; color: var(--c-ink); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--c-accent); }
/* Haupt-CTA in der Navbar: maximaler Kontrast (Weiß auf Tannengrün-Dunkel, ~13:1).
   Wichtig: ".nav a" hat höhere Spezifität als ".btn--primary" und würde die
   Textfarbe auf Ink kippen – deshalb hier explizit als ".nav a.btn--primary". */
.nav a.btn--primary { background: var(--c-brand-deep); border-color: var(--c-brand-deep); color: #fff; }
.nav a.btn--primary:hover, .nav a.btn--primary:focus-visible { background: var(--c-brand); color: #fff; }
.nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; padding: var(--s-3); cursor: pointer; }
.nav-toggle span { width: 24px; height: 2px; background: var(--c-ink); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 960px) {
  .nav { display: block; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }
}
.nav-mobile { border-top: 1px solid var(--c-line); background: var(--c-bg); }
.nav-mobile[hidden] { display: none; }
.nav-mobile ul { list-style: none; margin: 0; padding: var(--s-4) var(--s-5) var(--s-6); }
.nav-mobile a { display: block; padding: var(--s-3) 0; text-decoration: none; font-weight: 550; color: var(--c-ink); border-bottom: 1px solid var(--c-line); }

/* ---------- 6. Komponente: Buttons ---------- */
.btn {
  display: inline-block; padding: 0.8em 1.5em; border-radius: var(--radius-pill);
  font-family: var(--f-body); font-size: var(--fs-s); font-weight: 650;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn--primary { background: var(--c-accent); color: #fff; box-shadow: var(--shadow-s); }
.btn--primary:hover { background: #9C4227; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-m); }
.btn--ghost { background: transparent; color: var(--c-brand); border-color: var(--c-brand); }
.btn--ghost:hover { background: var(--c-brand); color: #fff; }
.btn--light { background: #fff; color: var(--c-brand-deep); }
.btn--light:hover { background: var(--c-gold); color: var(--c-brand-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }

/* ---------- 7. Komponente: Hero ---------- */
.hero { padding-block: var(--s-9) var(--s-8); }
.hero .lead { max-width: 38rem; }
.hero__note { font-size: var(--fs-xs); color: var(--c-ink-soft); margin-top: var(--s-3); }
.hero__media img, .hero__media svg { border-radius: var(--radius-l); box-shadow: var(--shadow-l); }

/* ---------- 8. Komponente: Proof-Bar ---------- */
.proof-bar { border-block: 1px solid var(--c-line); background: var(--c-surface); }
.proof-bar__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-5); padding-block: var(--s-6); }
@media (min-width: 700px) { .proof-bar__grid { grid-template-columns: repeat(4, 1fr); } }
.proof { text-align: center; }
.proof b { display: block; font-family: var(--f-head); font-size: var(--fs-2xl); font-weight: 620; color: var(--c-brand); line-height: 1.1; }
.proof span { font-size: var(--fs-xs); color: var(--c-ink-soft); }

/* ---------- 9. Komponente: Cards ---------- */
.card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-m); padding: var(--s-6); box-shadow: var(--shadow-s);
}
.card h3 { margin-top: 0; font-size: var(--fs-l); }
.card--link { display: block; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); color: inherit; }
.card--link .card__more { color: var(--c-accent); font-weight: 650; font-size: var(--fs-s); }
.card__icon { width: 44px; height: 44px; border-radius: var(--radius-s); background: var(--c-brand-tint); display: grid; place-items: center; margin-bottom: var(--s-4); color: var(--c-brand); }

/* ---------- 10. Komponente: Case-Study-Block ---------- */
.case { display: grid; gap: var(--s-5); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-l); padding: var(--s-6); box-shadow: var(--shadow-s); }
@media (min-width: 800px) { .case { grid-template-columns: 1fr 1fr; align-items: center; padding: var(--s-8); } }
.case__stats { display: flex; flex-wrap: wrap; gap: var(--s-5); margin-top: var(--s-4); }
.case__stat b { display: block; font-family: var(--f-head); font-size: var(--fs-xl); color: var(--c-accent); }
.case__stat span { font-size: var(--fs-xs); color: var(--c-ink-soft); }
.case figure { margin: 0; }

/* ---------- 11. Komponente: Testimonial ---------- */
.testimonial { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-m); padding: var(--s-6); box-shadow: var(--shadow-s); }
.testimonial__stars { color: var(--c-gold); letter-spacing: 2px; margin-bottom: var(--s-3); font-size: var(--fs-m); }
.testimonial p { font-style: italic; }
.testimonial footer { font-size: var(--fs-s); color: var(--c-ink-soft); }

/* ---------- 12. Komponente: FAQ-Accordion (nativ, ohne JS-Pflicht) ---------- */
.faq { max-width: var(--w-content); }
.faq details { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-m); margin-bottom: var(--s-3); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: var(--s-4) var(--s-5); font-weight: 650; display: flex; justify-content: space-between; gap: var(--s-4); align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--f-head); font-size: 1.4em; color: var(--c-accent); flex-shrink: 0; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details[open] summary { border-bottom: 1px solid var(--c-line); }
.faq .faq__a { padding: var(--s-4) var(--s-5); }
.faq .faq__a p:last-child { margin-bottom: 0; }

/* ---------- 13. Komponente: Tool-Embed (Rechner, Checks, Quiz) ---------- */
.tool { background: var(--c-brand-deep); color: #F2EFE8; border-radius: var(--radius-l); padding: var(--s-6); box-shadow: var(--shadow-l); }
@media (min-width: 700px) { .tool { padding: var(--s-8); } }
.tool h2, .tool h3 { color: #fff; margin-top: 0; }
.tool p { color: #DCE5DF; }
.tool fieldset { border: 0; padding: 0; margin: 0 0 var(--s-5); }
.tool legend, .tool label { font-weight: 600; color: #fff; display: block; margin-bottom: var(--s-2); }
.tool .opts { display: grid; gap: var(--s-2); }
@media (min-width: 640px) { .tool .opts--row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }
.tool .opt { position: relative; }
.tool .opt input { position: absolute; opacity: 0; }
.tool .opt span {
  display: block; padding: var(--s-3) var(--s-4); border: 2px solid var(--c-line-dark);
  border-radius: var(--radius-s); font-size: var(--fs-s); cursor: pointer; color: #F2EFE8; text-align: center;
}
.tool .opt input:checked + span { border-color: var(--c-gold); background: rgba(217,154,43,.15); font-weight: 650; }
.tool .opt input:focus-visible + span { outline: 3px solid var(--c-gold); outline-offset: 2px; }
.tool__result { background: #fff; color: var(--c-ink); border-radius: var(--radius-m); padding: var(--s-6); margin-top: var(--s-5); }
.tool__result h3, .tool__result h4 { color: var(--c-ink); margin-top: 0; }
.tool__result p { color: var(--c-ink); }
.tool__result .big { font-family: var(--f-head); font-size: var(--fs-2xl); color: var(--c-brand); font-weight: 620; }
.tool__hint { font-size: var(--fs-xs); color: #B9C6BF; margin-top: var(--s-4); }
.tool__hint a { color: #F0C97A; }
.tool progress { width: 100%; height: 10px; border-radius: 99px; }

/* ---------- 14. Komponente: CTA-Section ---------- */
.cta {
  background: linear-gradient(135deg, var(--c-brand) 0%, var(--c-brand-deep) 100%);
  color: #F2EFE8; border-radius: var(--radius-l); padding: var(--s-8) var(--s-6);
  text-align: center; box-shadow: var(--shadow-l);
}
.cta h2 { color: #fff; margin-top: 0; }
.cta p { color: #DCE5DF; max-width: 34rem; margin-inline: auto; }
/* Links auf dunklen/grünen Flächen: immer Gold – nie Markengrün auf Grün */
.cta a:not(.btn), .tool a:not(.btn), .section--dark a:not(.btn) { color: #F0C97A; text-decoration-color: #F0C97A; }
.cta a:not(.btn):hover, .tool a:not(.btn):hover, .section--dark a:not(.btn):hover { color: #FFDD9E; }
.cta .btn-row { justify-content: center; }
.cta__meta { font-size: var(--fs-xs); color: #B9C6BF; margin-top: var(--s-4); }

/* ---------- 15. Komponente: Breadcrumb & TOC ---------- */
.breadcrumb { font-size: var(--fs-xs); color: var(--c-ink-soft); padding-block: var(--s-4) 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; }
.breadcrumb li + li::before { content: '›'; margin-right: var(--s-2); color: var(--c-line); }
.breadcrumb a { color: var(--c-ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-accent); }

/* ---------- 16. Komponente: Chart / Figure ---------- */
.figure { margin: var(--s-7) 0; }
.figure figcaption { font-size: var(--fs-xs); color: var(--c-ink-soft); margin-top: var(--s-3); }
.figure--panel { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-m); padding: var(--s-5); box-shadow: var(--shadow-s); }

/* ---------- 17. Komponente: Autor / E-E-A-T-Box ---------- */
.author-box { display: flex; gap: var(--s-5); align-items: center; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-m); padding: var(--s-5); margin-block: var(--s-7); }
.author-box img, .author-box svg { width: 76px; height: 76px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.author-box p { margin: 0; font-size: var(--fs-s); color: var(--c-ink-soft); }
.author-box b { color: var(--c-ink); }

/* ---------- 18. Komponente: Footer ---------- */
/* Footer: Farben bewusst als Literale (statt var()), damit auch
   Audit-Tools ohne Custom-Property-Auflösung den Kontrast korrekt
   messen. Weiß auf #143528 = 13,4:1 (WCAG AAA). */
.site-footer { background-color: #143528; color: #DCE5DF; margin-top: var(--s-10); padding-block: var(--s-9) var(--s-6); font-size: var(--fs-s); }
.site-footer a { color: #F2EFE8; text-decoration: none; }
.site-footer a:hover { color: #D99A2B; }
.site-footer h4 { color: #FFFFFF; font-size: var(--fs-s); margin: 0 0 var(--s-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--s-2); }
.footer-grid { display: grid; gap: var(--s-6); grid-template-columns: 1fr 1fr; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-legal { border-top: 1px solid var(--c-line-dark); margin-top: var(--s-7); padding-top: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; font-size: var(--fs-xs); color: #B9C6BF; }
.footer-legal a { color: #B9C6BF; }
address { font-style: normal; }

/* ---------- 19. Utilities ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.badge { display: inline-block; background: var(--c-brand-tint); color: var(--c-brand); font-size: var(--fs-xs); font-weight: 650; border-radius: var(--radius-pill); padding: 0.25em 0.9em; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 1.8em; position: relative; }
.checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--c-brand); font-weight: 700; }
.article-meta { font-size: var(--fs-xs); color: var(--c-ink-soft); margin-bottom: var(--s-5); }
.prose > h2 { margin-top: var(--s-8); }

/* ---------- 20. Komponente: Cookie-Consent-Banner ---------- */
.consent {
  position: fixed; inset: auto var(--s-4) var(--s-4) var(--s-4); z-index: 90;
  max-width: 32rem; margin-inline: auto;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-m);
  padding: var(--s-5); box-shadow: var(--shadow-l); font-size: var(--fs-s);
}
.consent p { margin-bottom: var(--s-4); }
.consent .btn-row { gap: var(--s-3); }
.consent .btn { padding: 0.6em 1.2em; }

