/* ========================================================================
   Tarifanker - Landingpage "Warum Vergleichsportale wichtig sind"
   Nur System-Schriften, keine externen Ressourcen, kein JavaScript.
   Mobile-first: Basis fuer schmale Viewports, Erweiterung per min-width.
   ======================================================================== */

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

:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  /* Farbrollen (HEX exakt aus dem Briefing, Abschnitt 2) */
  --seite: #F7F9FB;
  --flaeche: #FFFFFF;
  --blau-dunkel: #0B3B6F;
  --blau-mittel: #1565A8;
  --blau-hell: #E8F1F9;
  --akzent: #C2410C;
  --akzent-hell: #FFEDD5;
  --text: #111827;
  --text-sekundaer: #4B5563;
  --rahmen: #D6DEE7;

  /* Abstandsskala */
  --raum-1: 0.25rem;
  --raum-2: 0.5rem;
  --raum-3: 0.75rem;
  --raum-4: 1rem;
  --raum-5: 1.5rem;
  --raum-6: 2rem;
  --raum-7: 3rem;
  --raum-8: 4rem;
  --raum-9: 6rem;

  --radius: 0.5rem;
  --schatten: 0 1px 2px rgba(17, 24, 39, 0.06);
  --textbreite: 36rem;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--seite);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
}

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

figure {
  margin: 0;
}

figcaption {
  margin-top: var(--raum-2);
  color: var(--text-sekundaer);
  font-size: 0.8125rem;
  line-height: 1.5;
}

h1,
h2,
h3,
h4 {
  color: var(--blau-dunkel);
  margin: 0 0 var(--raum-3);
  text-wrap: balance;
}

h1 {
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 600;
}

h4 {
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
  margin-top: var(--raum-4);
}

p {
  margin: 0 0 var(--raum-4);
  max-width: var(--textbreite);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--blau-mittel);
  text-decoration: underline;
  text-underline-offset: 0.125em;
}

a:hover {
  color: var(--blau-dunkel);
}

a:focus-visible,
summary:focus-visible,
details:focus-visible {
  outline: 3px solid var(--akzent);
  outline-offset: 2px;
  border-radius: 0.125rem;
}

/* Auf dunklem Grund erreicht der orange Fokusring nur 2,17:1 gegen #0B3B6F.
   WCAG 1.4.11 (Nicht-Text-Kontrast) verlangt 3:1, deshalb wird der Ring dort
   hell: #FFFFFF auf #0B3B6F sind 11,23:1. Geprueft mit tools/contrast.py. */
.kopf a:focus-visible,
.fuss a:focus-visible,
.skip-link:focus-visible {
  outline-color: var(--flaeche);
}

cite {
  font-style: italic;
}

/* Inline-Links in Fliesstext und Listen auf mindestens 24 px Trefferhoehe */
p a:not(.btn),
li a:not(.btn) {
  padding-block: 0.25rem;
}

/* ------------------------------------------------------------------ Layout */

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--raum-5);
}

.abschnitt {
  padding-block: var(--raum-7);
  border-top: 1px solid var(--rahmen);
}

.abschnitt-hell {
  background-color: var(--blau-hell);
}

.abschnitt-recht {
  background-color: var(--flaeche);
}

.intro {
  color: var(--text-sekundaer);
  margin-bottom: var(--raum-6);
}

.fussnote {
  margin-top: var(--raum-5);
  color: var(--text-sekundaer);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.abschnitt-bild {
  margin-bottom: var(--raum-6);
}

.abschnitt-bild img {
  width: 100%;
  border: 1px solid var(--rahmen);
  border-radius: var(--radius);
}

/* -------------------------------------------------------------- Skip-Link */

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  padding: var(--raum-3) var(--raum-4);
  background-color: var(--blau-dunkel);
  color: var(--flaeche);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform 120ms ease-in-out;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ------------------------------------------------------------------ Header */

.kopf {
  background-color: var(--blau-dunkel);
  color: var(--flaeche);
}

.kopf-innen {
  display: flex;
  flex-wrap: wrap;
  gap: var(--raum-2) var(--raum-5);
  align-items: center;
  justify-content: space-between;
  padding-block: var(--raum-4);
}

/* Marken-Lockup: Anker-Signet plus Wortmarke und Claim.
   Das Signet ist Inline-SVG und erbt die Farbe ueber currentColor, damit es
   auf dunklem Grund hell und im Footer identisch erscheint. */
.marke {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--raum-3);
  min-width: 0;
  min-height: 2.75rem;
  color: inherit;
  text-decoration: none;
}

.marke-zeichen {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--blau-hell);
}

.marke-zeichen-klein {
  width: 2rem;
  height: 2rem;
}

.marke-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wortmarke {
  display: block;
  margin: 0;
  color: var(--flaeche);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.claim {
  display: block;
  margin: 0;
  color: var(--blau-hell);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Der generische a:hover-Farbwechsel wuerde das Logo auf dem dunklen Header
   dunkelblau einfaerben. Deshalb hier explizit zuruecknehmen. */
.marke:hover,
.marke:focus-visible,
.marke:active {
  color: inherit;
}

.marke:hover .wortmarke,
.marke:focus-visible .wortmarke {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.fuss-marke {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--raum-2);
  margin: 0 0 var(--raum-3);
  max-width: none;
  color: var(--blau-hell);
}

.hauptnav {
  min-width: 0;
}

.nav-liste {
  display: flex;
  flex-wrap: wrap;
  gap: var(--raum-1) var(--raum-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-liste a {
  display: inline-block;
  min-height: 2.75rem;
  padding: var(--raum-2) var(--raum-1);
  color: var(--blau-hell);
  font-weight: 600;
  text-decoration: none;
}

.nav-liste a:hover {
  color: var(--flaeche);
  text-decoration: underline;
}

/* -------------------------------------------------------------------- Hero */

.hero {
  border-top: 0;
  padding-block: var(--raum-6) var(--raum-7);
}

.hero-innen {
  display: grid;
  gap: var(--raum-6);
}

.hero-text,
.hero-bild {
  min-width: 0;
}

.hero-sub {
  color: var(--text-sekundaer);
  font-size: 1.125rem;
  line-height: 1.5;
}

.aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: var(--raum-3) var(--raum-4);
  align-items: center;
  max-width: none;
  margin-top: var(--raum-5);
}

.btn {
  display: inline-block;
  min-height: 2.75rem;
  padding: var(--raum-3) var(--raum-5);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background-color 120ms ease-in-out, border-color 120ms ease-in-out;
}

.btn-primaer {
  background-color: var(--akzent);
  color: var(--flaeche);
}

.btn-primaer:hover {
  background-color: #9A330A;
  color: var(--flaeche);
}

.btn-sekundaer {
  background-color: var(--flaeche);
  border-color: var(--rahmen);
  color: var(--blau-mittel);
}

.btn-sekundaer:hover {
  border-color: var(--blau-mittel);
  color: var(--blau-dunkel);
}

/* ----------------------------------------------------------------- Karten */

.karten-raster,
.fakten-raster,
.hinweis-liste {
  display: grid;
  gap: var(--raum-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.karten-raster > li,
.fakten-raster > li,
.hinweis-liste > li {
  min-width: 0;
}

.karte {
  height: 100%;
  padding: var(--raum-5);
  background-color: var(--flaeche);
  border: 1px solid var(--rahmen);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
}

.karte p {
  max-width: none;
  color: var(--text);
}

/* ---------------------------------------------------------------- Schritte */

.schritte {
  display: grid;
  gap: var(--raum-5);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: schritt;
}

.schritte > li {
  min-width: 0;
  counter-increment: schritt;
}

.schritte .karte {
  padding-top: var(--raum-5);
  position: relative;
}

.schritte .karte::before {
  content: "Schritt " counter(schritt);
  display: inline-block;
  margin-bottom: var(--raum-3);
  padding: var(--raum-1) var(--raum-3);
  background-color: var(--blau-hell);
  border-radius: var(--radius);
  color: var(--blau-dunkel);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
}

/* ------------------------------------------------------------------ Fakten */

.fakt {
  height: 100%;
  padding: var(--raum-5);
  background-color: var(--blau-hell);
  border: 1px solid var(--rahmen);
  border-radius: var(--radius);
}

.fakt-zahl {
  margin: 0 0 var(--raum-2);
  max-width: none;
  color: var(--blau-dunkel);
  font-size: 2.25rem;
  line-height: 1.1;
  font-weight: 700;
}

.fakt h3 {
  margin-bottom: var(--raum-3);
}

.fakt p {
  max-width: none;
}

.quelle {
  margin-top: var(--raum-4);
  margin-bottom: 0;
  padding-top: var(--raum-3);
  border-top: 1px solid var(--rahmen);
  color: var(--text-sekundaer);
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- Hinweise */

.hinweis {
  height: 100%;
  padding: var(--raum-5);
  background-color: var(--flaeche);
  border: 1px solid var(--rahmen);
  border-left: 4px solid var(--akzent);
  border-radius: var(--radius);
}

.hinweis p {
  max-width: none;
}

.kasten {
  margin-top: var(--raum-6);
  padding: var(--raum-5);
  background-color: var(--akzent-hell);
  border: 1px solid var(--rahmen);
  border-left: 4px solid var(--akzent);
  border-radius: var(--radius);
  color: var(--text);
}

.kasten h3 {
  color: var(--blau-dunkel);
}

.kasten p {
  max-width: none;
  color: var(--text);
}

/* --------------------------------------------------------------------- FAQ */

.faq-liste {
  display: grid;
  gap: var(--raum-3);
}

.faq-liste > details {
  min-width: 0;
  background-color: var(--flaeche);
  border: 1px solid var(--rahmen);
  border-radius: var(--radius);
}

.faq-liste summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--raum-3);
  align-items: baseline;
  justify-content: space-between;
  min-height: 2.75rem;
  padding: var(--raum-4) var(--raum-5);
  color: var(--blau-dunkel);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.faq-liste summary::-webkit-details-marker {
  display: none;
}

.faq-liste summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--akzent);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.faq-liste details[open] summary::after {
  content: "\2212";
}

.faq-liste summary:hover {
  background-color: var(--blau-hell);
}

.faq-antwort {
  padding: 0 var(--raum-5) var(--raum-5);
  border-top: 1px solid var(--rahmen);
  padding-top: var(--raum-4);
}

.faq-antwort p {
  max-width: none;
}

/* ----------------------------------------------------------------- Quellen */

.quellen-liste {
  margin: 0 0 var(--raum-6);
  padding-left: var(--raum-5);
  display: grid;
  gap: var(--raum-4);
}

.quellen-liste > li {
  min-width: 0;
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.quellen-liste a {
  overflow-wrap: anywhere;
}

#quellen h3 {
  margin-top: var(--raum-6);
}

/* ------------------------------------------------------------- Rechtstexte */

.recht-raster {
  display: grid;
  gap: var(--raum-5);
  margin-top: var(--raum-6);
}

.recht-raster > article {
  min-width: 0;
}

.recht-raster p {
  max-width: none;
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.recht-raster h3 {
  margin-top: var(--raum-5);
}

.recht-raster h3:first-child {
  margin-top: 0;
}

/* ------------------------------------------------------------------ Footer */

.fuss {
  background-color: var(--blau-dunkel);
  color: var(--flaeche);
  padding-block: var(--raum-7) var(--raum-5);
}

.fuss-raster {
  display: grid;
  gap: var(--raum-6);
}

.fuss-spalte {
  min-width: 0;
}

.fuss-spalte h2 {
  color: var(--flaeche);
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 600;
}

.fuss-spalte p {
  max-width: none;
  color: var(--blau-hell);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.wortmarke-fuss {
  margin-bottom: 0;
  font-size: 1.25rem;
}

.fuss-liste {
  display: flex;
  flex-wrap: wrap;
  gap: var(--raum-1) var(--raum-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.fuss a {
  color: var(--flaeche);
  font-weight: 600;
}

.fuss a:hover {
  color: var(--blau-hell);
}

.fuss-liste a {
  display: inline-block;
  min-height: 2.75rem;
  padding: var(--raum-2) var(--raum-1);
}

.fuss-unten {
  margin-top: var(--raum-6);
  padding-top: var(--raum-4);
  border-top: 1px solid var(--blau-mittel);
}

.fuss-unten p {
  max-width: none;
  color: var(--blau-hell);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* ============================================================== Breakpoint
   Ab 48rem (768 px): zweispaltige Raster, groessere Typografie, Hero neben Bild
   ========================================================================= */

@media (min-width: 48rem) {
  body {
    font-size: 1.0625rem;
    line-height: 1.7;
  }

  h1 {
    font-size: 2.75rem;
    line-height: 1.15;
  }

  h2 {
    font-size: 2rem;
    line-height: 1.2;
  }

  h3 {
    font-size: 1.25rem;
  }

  figcaption,
  .fussnote,
  .quelle,
  .claim,
  .fuss-unten p {
    font-size: 0.875rem;
  }

  .abschnitt {
    padding-block: var(--raum-8);
  }

  .hero {
    padding-block: var(--raum-7) var(--raum-8);
  }

  .hero-innen {
    grid-template-columns: 1fr 1fr;
    gap: var(--raum-6);
    align-items: center;
  }

  .fakt-zahl {
    font-size: 3rem;
    line-height: 1.05;
  }

  .karten-raster,
  .fakten-raster,
  .hinweis-liste,
  .schritte,
  .recht-raster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fuss-raster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .abschnitt-bild img {
    max-height: 26rem;
    object-fit: cover;
  }
}

/* ============================================================== Breakpoint
   Ab 75rem (1200 px): dreispaltige Raster, vierspaltiger Footer
   ========================================================================= */

@media (min-width: 75rem) {
  .karten-raster,
  .fakten-raster,
  .hinweis-liste {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fuss-raster {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-innen {
    gap: var(--raum-7);
  }

  .abschnitt-bild img {
    max-height: 30rem;
  }
}

/* ------------------------------------------------- Reduzierte Bewegung */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none;
    animation: none;
  }
}

