/* ============================================================
   LOKAL GEHOSTETE SCHRIFTEN
   Ersetzt den früheren Google-Fonts-CDN-Import (Datenschutzgrund:
   kein Drittanbieter-Request beim Seitenaufruf mehr nötig).
   Dateien via Fontsource-Pakete bezogen (identische, offizielle
   Schriftdaten wie Google Fonts, nur selbst gehostet).
   ============================================================ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

/* ============================================================
   DESIGN TOKENS
   Palette: gedecktes Nachtblau + Stahlblau + neutrale Grautöne.
   Gewählt, weil ein Berater mit vier Zulassungen (Versicherung,
   Kapitalanlage, Finanzierung, Immobilie) Ruhe und Verlässlichkeit
   ausstrahlen muss – kein Startup-Gradient, kein Verkaufston.
   ============================================================ */
:root {
  /* Farben – exakt aus dem Logo (LOGO_HMO_RZ) extrahiert */
  --color-ink: #14171C;          /* fast schwarz – Headlines, wie die Logo-Wortmarke */
  --color-navy: #1B3D8C;         /* Primärfarbe – 1:1 aus dem Logo */
  --color-navy-2: #142F6B;       /* Hover/aktiv – abgedunkeltes Logo-Blau */
  --color-steel: #4E6FB5;        /* Akzent – Links, Icons, Linien */
  --color-steel-light: #C7D3EE;  /* helle Linien, Rahmen */
  --color-gray-900: #2B2F36;     /* Fließtext */
  --color-gray-500: #6B7280;     /* Sekundärtext */
  --color-gray-200: #E3E6EA;     /* Rahmen, Trenner */
  --color-gray-100: #F2F4F7;     /* Sektionshintergrund */
  --color-bg: #FBFCFD;           /* Seitenhintergrund */
  --color-white: #FFFFFF;

  /* Zusätzliche Markenfarben aus dem Wave-Logo (LOGOWAVE_HMO_RZ) */
  --color-mint: #ECF5F4;         /* helle Wave-Farbe – sparsam für Flächen/Hintergründe */
  --color-terracotta: #DB9056;   /* warmer Akzent aus der ersten Wave-Logo-Version */
  --color-sage: #A0BD41;         /* Akzentfarbe, Grün am 19.08. erneut leicht angepasst */
  --color-sage-light: #F0F5E9;   /* Flächenfarbe (von Markus vorgegeben, unverändert) */

  /* Typografie */
  --font-display: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --step-0: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 1.85rem);
  --step-3: clamp(1.8rem, 1.4rem + 1.8vw, 2.75rem);
  --step-4: clamp(2.2rem, 1.6rem + 3vw, 3.6rem);

  /* Layout */
  --maxw: 1120px;
  --radius: 3px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;
}

@media (prefers-color-scheme: dark) {
  /* Bewusst kein Dark Mode: Vertrauensmarke soll auf jedem Gerät
     identisch und kontrolliert wirken. */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--color-gray-900);
  background: var(--color-bg);
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  font-weight: 600;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
p  { margin: 0 0 var(--space-2); color: var(--color-gray-900); }
a  { color: var(--color-navy); text-decoration-color: var(--color-steel-light); }
a:hover { color: var(--color-steel); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-steel);
  outline-offset: 2px;
}

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-2);
}

@media (min-width: 640px) {
  .container { padding-inline: var(--space-3); }
}

/* ============ HEADER / NAV ============ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0.5rem;
  z-index: 200;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0.5rem;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-2);
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--color-ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand-logo { display: inline-flex; align-items: center; }
.brand-logo img { height: 42px; width: auto; display: block; }
@media (min-width: 640px) { .brand-logo img { height: 48px; } }
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius);
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-navy);
}
.nav-toggle .bar { display: block; width: 20px; height: 2px; background: var(--color-navy); position: relative; }
.nav-toggle .bar::before, .nav-toggle .bar::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--color-navy); transition: transform .2s;
}
.nav-toggle .bar::before { top: -6px; }
.nav-toggle .bar::after { top: 6px; }

.nav-links {
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
}
.nav-links.open { display: flex; }
.nav-links a {
  display: block;
  padding: var(--space-2) var(--space-3);
  text-decoration: none;
  color: var(--color-navy);
  border-top: 1px solid var(--color-gray-200);
  font-weight: 500;
}
.nav-links a[aria-current="page"] { color: var(--color-steel); }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    border-bottom: none;
    gap: var(--space-3);
    margin-left: var(--space-5);
    font-size: 0.9rem;
  }
  .nav-links a { border-top: none; padding: 0.4rem 0; }
  .nav-links a.cta {
    background: var(--color-navy);
    color: var(--color-white);
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius);
  }
  .nav-links a.cta:hover { background: var(--color-navy-2); color: var(--color-white); }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--color-navy); color: var(--color-white); }
.btn-primary:hover { background: var(--color-navy-2); color: var(--color-white); }
.btn-ghost { background: transparent; border-color: var(--color-gray-200); color: var(--color-navy); }
.btn-ghost:hover { border-color: var(--color-steel); color: var(--color-steel); }

/* ============ HERO ============ */
.hero {
  padding-block: var(--space-5) var(--space-4);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(78,111,181,0.12), transparent 60%),
    var(--color-bg);
  border-bottom: 1px solid var(--color-gray-200);
}
.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-steel);
  display: block;
  margin-bottom: var(--space-2);
}
.hero-grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
}
.hero p.lead {
  font-size: var(--step-1);
  color: var(--color-gray-500);
  max-width: 34ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }

/* ---- Signatur-Element: Grundsätze-Grafik (4-Segmente-Logo + Caption) ----
   Bild und zusammenfassender Satz liegen bewusst auf derselben Fläche (eine Karte),
   statt getrennter Textblöcke. Die Grafik selbst ist navy/sage auf transparentem
   Grund – deshalb helle Kartenfläche statt Navy-Hintergrund, sonst verschwinden
   die drei blauen Segmente im Hintergrund. Der Farbsegment-Balken darunter nimmt
   die Aufteilung der Grafik auf (3 Navy + 1 Sage) und verbindet sie optisch mit
   dem Text darunter. */
.principles {
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-sage-light) 130%);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-3);
  color: var(--color-ink);
  box-shadow: 0 20px 50px -24px rgba(20,23,28,0.22);
  text-align: center;
}
.principles-mark { width: 100%; max-width: 340px; display: block; margin: 0 auto; }
.principles-divider {
  width: 220px;
  height: 1px;
  margin: var(--space-3) auto;
  background: var(--color-gray-200);
  position: relative;
}
.principles-divider::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-sage);
}
.principles-caption {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.35;
  color: var(--color-ink);
  max-width: 32ch;
  margin: 0 auto;
}

/* ============ WAVE-DIVIDER ============
   Dekoratives Element aus dem Wave-Logo (LOGOWAVE_HMO_RZ), sparsam als
   Kapitel-Trenner zwischen Sections eingesetzt – kein Muster/Tiling,
   sondern die Original-Grafik in Maßen. */
.wave-divider { display: flex; justify-content: center; padding-block: var(--space-2); }
.wave-divider img { height: 32px; width: auto; opacity: 0.9; }

/* ============ SECTIONS ============ */
.section { padding-block: var(--space-5); }
.section-tight { padding-block: var(--space-4); }
.section.alt { background: var(--color-gray-100); }
.sage { background: var(--color-sage-light); }
.section-head { max-width: 640px; margin-bottom: var(--space-4); }
.section-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-steel);
}

.grid { display: grid; gap: var(--space-3); }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.card .num {
  font-family: var(--font-mono);
  color: var(--color-steel);
  font-size: 0.8rem;
  display: block;
  margin-bottom: var(--space-1);
}
.card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.card p { color: var(--color-gray-500); margin-bottom: 0; font-size: 0.95rem; }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  border-top: 1px solid var(--color-gray-200);
  padding-top: var(--space-3);
  margin-top: var(--space-4);
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--color-navy);
}
.stat span { color: var(--color-gray-500); font-size: 0.85rem; }

blockquote.testimonial {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-ink);
  border-left: 3px solid var(--color-steel);
  padding-left: var(--space-3);
  margin: 0;
}
blockquote.testimonial footer {
  margin-top: var(--space-2);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-gray-500);
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--color-ink);
  color: var(--color-gray-200);
  padding-block: var(--space-4) var(--space-3);
}
.site-footer a { color: var(--color-steel-light); }
.footer-grid {
  display: grid;
  gap: var(--space-3);
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: repeat(5, 1fr); } }
.footer-grid h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  margin-bottom: var(--space-1);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.4rem; font-size: 0.9rem; }
.footer-member-badge {
  display: inline-block;
  background: var(--color-white);
  padding: 10px 12px;
  border-radius: var(--radius);
}
.footer-member-badge img { width: 100%; max-width: 170px; height: auto; display: block; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  font-size: 0.8rem;
  color: var(--color-gray-500);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  justify-content: space-between;
}
.footer-badge {
  background: var(--color-white);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}
.footer-badge img { height: 34px; width: auto; display: block; }

/* ============ FORM (Kontakt) ============ */
.form-field { margin-bottom: var(--space-2); }
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 0.3rem;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-gray-900);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.8rem; color: var(--color-gray-500); }
.form-status { margin-top: var(--space-2); font-size: 0.9rem; }
.form-status[data-state="ok"] { color: #1B5E20; }
.form-status[data-state="error"] { color: #8A1F1F; }

/* ============ LEGAL PAGES ============ */
.legal h2 { margin-top: var(--space-4); font-size: 1.3rem; }
.page-impressum .legal h3 { margin-top: var(--space-3); font-size: 1.05rem; }
.legal dl { margin: 0; }
.legal dt { font-weight: 600; margin-top: var(--space-2); }
.legal dd { margin: 0 0 var(--space-1); color: var(--color-gray-900); }
.todo {
  background: #FFF8E1;
  border: 1px dashed #C9A227;
  color: #6B5400;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.82em;
}

/* ============ ICON-BADGES (im Stil des Logos) ============
   Weißes Liniensymbol auf Navy-Kreis – gleiche Farbe, gleiche Strichstärke
   wie die drei Segmente im Logo (Schloss, Euro, Wachstumspfeil). */
.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: var(--space-2);
}
.icon-badge svg { width: 26px; height: 26px; }
.card-icon-row { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-1); }
.card-icon-row .icon-badge { margin-bottom: 0; width: 44px; height: 44px; }
.card-icon-row .icon-badge svg { width: 22px; height: 22px; }
/* ============ VERGLEICHSTABELLE (Provision vs. Honorar) ============ */
.compare-table { display: flex; flex-direction: column; gap: 2px; }
.compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  padding: 0.6rem 0.5rem;
  font-size: 0.85rem;
  border-radius: 3px;
}
.compare-row:not(.compare-head):nth-child(odd) { background: var(--color-gray-100); }
.compare-row.compare-head {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gray-500);
  border-bottom: 2px solid var(--color-gray-200);
  padding-bottom: 0.5rem;
}
.compare-row span:first-child { font-weight: 600; color: var(--color-ink); }
.compare-row:not(.compare-head) span:nth-child(2) { color: var(--color-gray-500); }
.compare-row:not(.compare-head) span:nth-child(3) { color: var(--color-navy); font-weight: 600; }

.text-muted { color: var(--color-gray-500); }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

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

/* ============ SCROLL-FORTSCHRITT ============ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-steel);
  z-index: 100;
  transition: width 0.1s linear;
}
@media (prefers-reduced-motion: reduce) { .scroll-progress { display: none; } }

/* ============ SCROLL-REVEAL ============
   Ohne JS (kein .js-Klasse am html-Element) bleibt alles sofort sichtbar –
   das ist die Grundlage, der Effekt ist nur eine Zugabe. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
.js [data-reveal-group] > * { transition-delay: calc(var(--reveal-index, 0) * 80ms); }

/* ============ BILD-SLOTS ============
   Feste Platzhalter mit Bildunterschrift, welche Aufnahme benötigt wird –
   ersetzt einfach das <div> durch <img src="..." alt="..."> derselben Klasse. */
.image-slot {
  position: relative;
  background: var(--color-gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.image-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-slot .slot-caption {
  position: relative;
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: rgba(16,24,38,0.78);
  color: var(--color-white);
  font-size: 0.72rem;
  line-height: 1.4;
}
.image-slot.ratio-16-9 { aspect-ratio: 16/9; margin-bottom: var(--space-2); }
.image-slot.ratio-4-5  { aspect-ratio: 4/5; }
.image-slot.ratio-1-1  { aspect-ratio: 1/1; }

/* ============ FAQ (details/summary) ============ */
.faq-item {
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius);
  margin-bottom: var(--space-1);
  background: var(--color-white);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-2) var(--space-3);
  font-weight: 600;
  color: var(--color-ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--color-steel);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-answer {
  padding: 0 var(--space-3) var(--space-2);
  color: var(--color-gray-500);
}
