/* ==========================================================================
   Daniel Dinh Finanzberatung – Stylesheet
   Corporate Design: 4 Farben, Montserrat 600 + DM Sans, mobile first
   ========================================================================== */

/* ---------- Schriften (lokal, kein Google-Server) ---------- */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/dmsans-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/montserrat-latin-var.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --navy: #011937;
  --gold: #B7A16B;
  --white: #FFFFFF;
  --red: #B42318;

  --font-head: "Montserrat", sans-serif;
  --font-body: "DM Sans", sans-serif;

  /* Fließende Größen: Mobil (375 px) -> Desktop (1200 px) */
  --fs-h1: clamp(2.25rem, 1.682rem + 2.424vw, 3.5rem);
  --fs-h2: clamp(1.875rem, 1.591rem + 1.212vw, 2.5rem);
  --fs-h3: clamp(1.5rem, 1.33rem + 0.727vw, 1.875rem);
  --fs-h4: clamp(1.3125rem, 1.227rem + 0.364vw, 1.5rem);
  --fs-h5: clamp(1.125rem, 1.068rem + 0.242vw, 1.25rem);
  --fs-h6: clamp(1rem, 0.943rem + 0.242vw, 1.125rem);
  --fs-p: clamp(1rem, 0.943rem + 0.242vw, 1.125rem);
  --fs-lead: clamp(1.1875rem, 1.102rem + 0.364vw, 1.375rem);
  --fs-ui: 1rem;
  --fs-small: 0.875rem;

  /* Abstandsmaß */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 96px;

  --gutter: clamp(1.25rem, 0.682rem + 2.424vw, 2.5rem);
  --section: clamp(3.5rem, 2.364rem + 4.848vw, 6rem);
  --max: 1200px;
  --measure: 65ch;
  --radius: 8px;
  --header-h: 80px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s2));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: var(--fs-p);
  font-weight: 400;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  color: inherit;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}
h1 { font-size: var(--fs-h1); line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.01em; }
h4 { font-size: var(--fs-h4); line-height: 1.35; }
h5 { font-size: var(--fs-h5); line-height: 1.4; }
h6 { font-size: var(--fs-h6); line-height: 1.4; }

p { margin: 0 0 var(--s2); max-width: var(--measure); }
address { font-style: normal; }
.nowrap { white-space: nowrap; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 600; }

a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

.lead { font-size: var(--fs-lead); line-height: 1.55; }
.small { font-size: var(--fs-small); line-height: 1.5; }

/* Tastaturfokus: auf hell Marineblau, auf dunkel Weiß */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--white);
}

.visually-hidden {
  position: absolute !important;
  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;
  left: var(--s2);
  top: -100px;
  z-index: 200;
  padding: var(--s1) var(--s2);
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--s2); outline-color: var(--gold); }

.icon { width: 24px; height: 24px; flex: none; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }
.section--navy { background: var(--navy); color: var(--white); }
.section + .section:not(.section--navy) { padding-top: 0; }
.section--navy + .section:not(.section--navy) { padding-top: var(--section); }

/* Akzentlinie nach dem Logo-Motiv: Marineblau + Gold */
.accent {
  display: flex;
  width: 104px;
  height: 4px;
  margin-bottom: var(--s3);
}
.accent::before { content: ""; flex: 0 0 62%; background: var(--navy); }
.accent::after { content: ""; flex: 1; background: var(--gold); }
.on-dark .accent::before { background: var(--white); }

.section-head { margin-bottom: var(--s5); }
.section-head p { margin-top: var(--s2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  min-height: 48px;
  padding: 12px var(--s3);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-ui);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--white); color: var(--navy); text-decoration: none; }

.btn--secondary { background: var(--white); color: var(--navy); }
.btn--secondary:hover { background: var(--navy); color: var(--white); }

.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn--gold:hover { background: var(--white); border-color: var(--white); color: var(--navy); }

.on-dark .btn--secondary { background: transparent; border-color: var(--white); color: var(--white); }
.on-dark .btn--secondary:hover { background: var(--white); color: var(--navy); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* Textlink mit Pfeil (außerhalb von Fließtext) */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 48px;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow .icon { width: 20px; height: 20px; transition: transform .15s ease; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gold);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-height: var(--header-h);
}
.logo { display: block; padding-block: var(--s1); }
.logo img { width: 200px; height: auto; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  min-height: 48px;
  min-width: 48px;
  padding: 0 12px;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  font: 500 var(--fs-ui)/1.4 var(--font-body);
  cursor: pointer;
}
.nav-toggle .i-close { display: none; }
.nav-open .nav-toggle .i-open { display: none; }
.nav-open .nav-toggle .i-close { display: block; }

.main-nav { display: none; }
.nav-open .main-nav {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: var(--white);
  border-bottom: 1px solid var(--navy);
  padding: var(--s2) var(--gutter) var(--s4);
}

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list > li { border-bottom: 1px solid var(--gold); }
.nav-list > li.nav-cta { border-bottom: 0; padding-top: var(--s3); }
.nav-link,
.nav-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: 500 var(--fs-ui)/1.4 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}
.nav-link[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.4em; }
.nav-sub-toggle .icon { width: 20px; height: 20px; transition: transform .15s ease; }
.nav-sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }

.subnav { display: none; list-style: none; margin: 0; padding: 0 0 var(--s2) var(--s2); }
.has-sub.is-open .subnav { display: block; }
.subnav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--fs-ui);
  font-weight: 400;
  text-decoration: none;
}
.subnav a:hover,
.subnav a[aria-current="page"] { text-decoration: underline; }
.subnav .subnav-all { font-weight: 600; }
.nav-cta .btn { width: 100%; }

@media (min-width: 1100px) {
  .nav-toggle { display: none; }
  :root { --header-h: 96px; }
  .logo { padding-block: 0; }
  .logo img { width: 260px; }
  .main-nav,
  .nav-open .main-nav {
    display: block;
    position: static;
    padding: 0;
    border: 0;
    overflow: visible;
    max-height: none;
  }
  .nav-list { display: flex; align-items: center; gap: var(--s4); }
  .nav-list > li { border: 0; position: relative; }
  .nav-list > li.nav-cta { padding-top: 0; margin-left: var(--s1); }
  .nav-link, .nav-sub-toggle { width: auto; min-height: 48px; gap: 6px; }
  .nav-link:hover, .nav-sub-toggle:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.4em; }

  .subnav {
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 280px;
    padding: var(--s1) 0;
    background: var(--white);
    border: 1px solid var(--navy);
    border-radius: var(--radius);
  }
  .subnav a { padding: 0 var(--s2); }
  .subnav li.subnav-sep { border-top: 1px solid var(--gold); margin-top: var(--s1); padding-top: var(--s1); }
}

/* ---------- Hero ---------- */
/* Dunkle Bühne, Foto randlos rechts, Kennzahlen als Vertrauenszeile */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}
.hero-inner { padding-block: var(--s5) var(--s6); }
.hero h1 { margin-bottom: var(--s3); }
.hero .hl { color: var(--gold); }
.hero .lead { margin-bottom: var(--s4); }
.hero-phone {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 48px;
  margin-top: var(--s2);
  font-weight: 500;
}

.hero-stats {
  display: grid;
  gap: var(--s2);
  margin: var(--s5) 0 0;
  padding: var(--s4) 0 0;
  border-top: 1px solid var(--gold);
  list-style: none;
}
.hero-stats li { display: flex; align-items: baseline; gap: var(--s2); }
.stat-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-width: 6.2em;
  font-family: var(--font-head);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.stat-value .icon { width: 0.8em; height: 0.8em; color: var(--gold); }
.stat-label { font-size: var(--fs-small); line-height: 1.5; }

@media (min-width: 560px) {
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
  .hero-stats li { display: grid; gap: 4px; align-content: start; }
  .stat-value { min-width: 0; font-size: var(--fs-h3); }
}

/* Foto */
/* Mobil steht das Foto oben, damit Daniel sofort sichtbar ist */
.hero-media { position: relative; order: -1; margin: 0; }
.hero-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 60svh;
  object-fit: cover;
  object-position: 50% 15%;
}
.hero-card {
  position: absolute;
  left: 0;
  bottom: 0;
  display: grid;
  gap: 2px;
  padding: var(--s2) var(--s3);
  background: var(--white);
  color: var(--navy);
  border-radius: 0 var(--radius) 0 0;
}
.hero-card::before {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-bottom: var(--s1);
  background: var(--navy);
  border-right: 21px solid var(--gold);
}
.hero-card-name { font-family: var(--font-head); font-weight: 600; font-size: var(--fs-h6); line-height: 1.4; }
.hero-card-role { font-size: var(--fs-small); line-height: 1.5; }

@media (min-width: 1000px) {
  .hero { display: block; }
  .hero-inner {
    display: flex;
    align-items: center;
    min-height: clamp(640px, calc(100svh - var(--header-h)), 860px);
    padding-block: var(--s6);
  }
  .hero-text { width: 54%; padding-right: var(--s6); }
  .hero-media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 44%;
  }
  .hero-media img { height: 100%; max-height: none; aspect-ratio: auto; }
  /* Goldene Kante am Bildrand, Motiv der Logo-Akzentlinie */
  .hero-media::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 38%;
    background: var(--gold);
  }
  .hero-card { padding: var(--s3) var(--s4); }
}

/* Einmaliges, ruhiges Einblenden beim Laden */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: hero-rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-text > .reveal:nth-child(2) { animation-delay: .06s; }
  .hero-text > .reveal:nth-child(3) { animation-delay: .14s; }
  .hero-text > .reveal:nth-child(4) { animation-delay: .22s; }
  .hero-text > .reveal:nth-child(5) { animation-delay: .28s; }
  .hero-text > .reveal:nth-child(6) { animation-delay: .36s; }
  .hero-media img { animation: hero-settle 1.2s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-card { animation: hero-rise .7s .5s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes hero-settle {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: none; }
}

/* ---------- Zwei-Spalten-Text ---------- */
.split { display: grid; gap: var(--s4); }
@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 7fr; gap: var(--s6); }
}

/* ---------- Themen-Raster ---------- */
.topic-grid {
  display: grid;
  gap: 0 var(--s6);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 800px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
}
.topic {
  display: grid;
  gap: var(--s2);
  padding-block: var(--s4);
  border-top: 1px solid var(--gold);
}
@media (min-width: 480px) {
  .topic { grid-template-columns: auto 1fr; gap: 0 var(--s3); }
}
.topic-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
}
.topic-icon .icon { width: 28px; height: 28px; }
.topic h3 { margin-bottom: var(--s1); hyphens: auto; }

/* Desktop: 3er-Raster, Icon über der Überschrift */
@media (min-width: 1000px) {
  .topic-grid { grid-template-columns: repeat(3, 1fr); gap: 0 var(--s5); }
  .topic { grid-template-columns: 1fr; gap: var(--s3); align-content: start; }
  .topic--all { display: flex; }
  .topic--all a { flex: 1; }
}

/* Abschlusskachel „Alle Beratungsangebote“ */
.topic--all { padding-block: var(--s4); border-top: 0; }
.topic--all a {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s3);
  height: 100%;
  min-height: 160px;
  padding: var(--s4);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-head);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.topic--all .icon { width: 32px; height: 32px; color: var(--gold); transition: transform .15s ease; }
.topic--all a:hover { background: var(--gold); color: var(--navy); }
.topic--all a:hover .icon { color: var(--navy); transform: translateX(4px); }
@media (max-width: 799px) {
  .topic--all { grid-column: 1 / -1; }
}
.topic p { margin-bottom: var(--s1); }
.topic .link-arrow { min-height: 44px; }

/* ---------- Ablauf ---------- */
.steps {
  display: grid;
  gap: var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
}
.step { padding-top: var(--s3); border-top: 2px solid var(--gold); }
.step h3 { margin-bottom: var(--s2); }

/* ---------- Bild + Text ---------- */
.media-text { display: grid; gap: var(--s5); align-items: center; }
.media-text img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.media-text h2 { margin-bottom: var(--s3); }
.media-text .link-arrow { margin-top: var(--s2); }
@media (min-width: 900px) {
  .media-text { grid-template-columns: 1fr 1fr; gap: var(--s6); }
}

/* ---------- Bewertungen ---------- */
.reviews-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1) 12px;
  margin-top: var(--s2);
}
.review-stars { display: inline-flex; gap: 2px; color: var(--gold); }
.review-stars .icon { width: 20px; height: 20px; }

.reviews {
  display: grid;
  gap: var(--s5);
  margin: 0 0 var(--s4);
  padding: 0;
  list-style: none;
}
@media (min-width: 900px) {
  .reviews { grid-template-columns: repeat(3, 1fr); gap: var(--s6) var(--s5); }
}
/* Mobil und Tablet: seitlich wischen, die nächste Karte schaut an */
@media (max-width: 899px) {
  .reviews {
    display: flex;
    gap: var(--s3);
    margin-inline: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) var(--s2);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    overscroll-behavior-x: contain;
  }
  .review { flex: 0 0 min(85%, 420px); scroll-snap-align: start; }
}
.review figure {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding-top: var(--s4);
  border-top: 2px solid var(--gold);
}
.review .review-stars { margin-bottom: var(--s3); }
.review blockquote { margin: 0; }
.review blockquote p { margin-bottom: 12px; }
.review figcaption {
  display: grid;
  gap: 2px;
  margin-top: auto;
  padding-top: var(--s3);
}
.review-name { font-family: var(--font-head); font-size: var(--fs-h6); font-weight: 600; line-height: 1.4; }
.review-source { font-size: var(--fs-small); line-height: 1.5; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; }
.faq-item { border-top: 1px solid var(--gold); }
.faq-item:last-child { border-bottom: 1px solid var(--gold); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding-block: var(--s3);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: var(--fs-h4); line-height: 1.35; letter-spacing: 0; text-wrap: pretty; }
.faq-item summary .icon { transition: transform .15s ease; }
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-answer { padding-bottom: var(--s3); }

/* ---------- CTA-Block ---------- */
.cta { text-align: left; }
.cta h2 { margin-bottom: var(--s2); }
.cta p { margin-bottom: var(--s4); }
.cta .btn-row { align-items: center; gap: var(--s2) var(--s4); }
.cta-phone { display: inline-flex; align-items: center; gap: var(--s1); min-height: 48px; font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--white);
  padding-block: var(--s6) var(--s4);
  border-top: 1px solid var(--gold);
}
.footer-grid { display: grid; gap: var(--s5); }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 4fr 5fr 3fr; gap: var(--s6); }
}
.footer-title {
  margin-bottom: var(--s2);
  font-size: var(--fs-h6);
}
.site-footer address { font-style: normal; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.footer-contact li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.footer-contact .icon { width: 20px; height: 20px; margin-top: 3px; }
.footer-links { columns: 2; column-gap: var(--s3); }
@media (min-width: 900px) { .footer-links { columns: 1; } }
.footer-links li { break-inside: avoid; }
.footer-links a,
.footer-contact a { display: inline-flex; min-height: 32px; align-items: center; text-decoration: none; }
.footer-links a:hover,
.footer-contact a:hover { text-decoration: underline; }
.social { display: flex; gap: 12px; margin-top: var(--s3); }
.social a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--white);
  border-radius: var(--radius);
  color: var(--white);
}
.social a:hover { background: var(--white); color: var(--navy); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin-top: var(--s6);
  padding-top: var(--s3);
  border-top: 1px solid var(--gold);
  font-size: var(--fs-small);
  line-height: 1.5;
}
.footer-bottom ul { display: flex; gap: var(--s3); }
.footer-bottom a { display: inline-flex; min-height: 44px; align-items: center; }

/* ---------- Formular ---------- */
.form { display: grid; gap: var(--s3); }
.form-row { display: grid; gap: var(--s3); }
@media (min-width: 640px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 6px; }
.field > label,
.field legend {
  font-size: var(--fs-ui);
  font-weight: 600;
  line-height: 1.4;
}
.field .optional { font-weight: 400; }
fieldset.field { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }

.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  font: 400 1rem/1.4 var(--font-body);
}
.input:focus-visible { outline-offset: 1px; }
.field { min-width: 0; }

/* Datumsfeld: iOS Safari gibt dem Feld sonst eine feste Mindestbreite,
   sodass es auf dem Handy über den Rahmen hinausragt */
input[type="date"].input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  min-width: 0;
  max-width: 100%;
  background: var(--white);
}
input[type="date"].input::-webkit-date-and-time-value { text-align: left; }
input[type="date"].input::-webkit-datetime-edit { padding: 0; }

.choices { display: grid; gap: 4px var(--s3); }
@media (min-width: 640px) { .choices--2 { grid-template-columns: 1fr 1fr; } .choices--3 { grid-template-columns: repeat(3, 1fr); } }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding-block: 10px;
  font-size: var(--fs-ui);
  line-height: 1.4;
  cursor: pointer;
}
.choice input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--navy);
  cursor: pointer;
}
.field > label.choice--consent { font-size: var(--fs-small); font-weight: 400; line-height: 1.5; }

.field-error {
  display: none;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.5;
}
.field-error .icon { width: 18px; height: 18px; }
.field.has-error .field-error { display: flex; }
.field.has-error .input { border: 2px solid var(--red); padding: 9px 13px; }

.form-alert {
  display: none;
  align-items: flex-start;
  gap: 12px;
  padding: var(--s2);
  border-radius: var(--radius);
  background: var(--red);
  color: var(--white);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.5;
}
.form-alert.is-visible { display: flex; }
.form-alert a { color: var(--white); }

/* Spamschutz-Fangfeld: für Menschen unsichtbar */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-success { display: none; }
.form-success.is-visible { display: block; }
.form-success .icon { width: 48px; height: 48px; margin-bottom: var(--s2); }
.form-note { font-size: var(--fs-small); line-height: 1.5; }

/* ---------- Modal ---------- */
.modal {
  width: min(680px, calc(100vw - 2 * var(--s2)));
  max-height: calc(100dvh - 2 * var(--s2));
  margin: auto;
  padding: 0;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  overflow: auto;
}
.modal::backdrop { background: rgba(1, 25, 55, 0.7); }
.modal-inner { padding: var(--s4) var(--s3); }
@media (min-width: 640px) { .modal-inner { padding: var(--s5); } }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s2);
  margin-bottom: var(--s2);
}
.modal-head h2 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.01em; }
.modal-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  margin: -8px -8px 0 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}
.modal-close:hover { background: var(--navy); color: var(--white); }
.modal-intro { margin-bottom: var(--s4); }
body.modal-open { overflow: hidden; }

/* ---------- Cookie-Banner ---------- */
.consent {
  position: fixed;
  z-index: 150;
  left: var(--s2);
  right: var(--s2);
  bottom: var(--s2);
  max-width: 560px;
  padding: var(--s4) var(--s3) var(--s3);
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
}
.consent[hidden] { display: none; }
/* Akzentlinie wie im Logo */
.consent::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--s3);
  width: 104px;
  height: 4px;
  background: var(--navy);
  border-right: 40px solid var(--gold);
}
.consent-title {
  margin-bottom: var(--s1);
  font-family: var(--font-head);
  font-size: var(--fs-h5);
  font-weight: 600;
  line-height: 1.4;
}
.consent-text { font-size: var(--fs-small); line-height: 1.5; margin-bottom: var(--s3); }
.consent-actions { display: grid; gap: var(--s1); }
@media (min-width: 480px) { .consent-actions { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .consent { left: var(--s4); bottom: var(--s4); padding: var(--s4); } }

/* Link-Optik für Buttons (Footer „Cookie-Einstellungen“) */
.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.link-button:hover { text-decoration-thickness: 2px; }

@media print { .consent { display: none !important; } }

/* ==========================================================================
   Unterseiten
   ========================================================================== */

/* Kompakter Seiten-Hero (gleiche Bühne wie die Startseite) */
.hero--page .hero-media img { aspect-ratio: 4 / 3; object-position: 50% 45%; }
@media (min-width: 1000px) {
  .hero--page .hero-inner { min-height: clamp(520px, calc(78svh - var(--header-h)), 680px); }
  .hero--page .hero-media img { aspect-ratio: auto; }
}

/* Brotkrumen */
.breadcrumb { margin-bottom: var(--s4); font-size: var(--fs-small); line-height: 1.5; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0 var(--s1); margin: 0; padding: 0; list-style: none; }
.breadcrumb li { display: flex; align-items: center; gap: var(--s1); }
.breadcrumb li + li::before { content: "/"; color: var(--gold); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 32px; }
.breadcrumb [aria-current="page"] { font-weight: 600; }

/* Stichworte unter den Themen */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--s2);
  margin: 0 0 var(--s1);
  padding: 0;
  list-style: none;
}
.tags li { display: flex; align-items: center; gap: var(--s1); }
.tags li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* „Was Sie bei mir erwartet“: Bild links, vier Punkte rechts */
.expect { display: grid; gap: var(--s5); }
.expect-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.features { display: grid; margin: 0; padding: 0; list-style: none; }
.feature {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 var(--s3);
  padding-block: var(--s4);
}
.feature::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
  transform-origin: left center;
}
.feature .icon { width: 28px; height: 28px; margin-top: 6px; }
.feature h3 { margin-bottom: var(--s1); }
@media (min-width: 1000px) {
  .expect { grid-template-columns: 5fr 7fr; gap: var(--s6); align-items: start; }
  .expect-media { position: sticky; top: calc(var(--header-h) + var(--s4)); }
  .expect-media img { aspect-ratio: 4 / 5; }
}

/* Themenseiten: große Kennzahl und zwei gleich breite Spalten */
.big-number {
  display: block;
  margin-bottom: var(--s2);
  font-family: var(--font-head);
  font-size: clamp(3.5rem, 2.4rem + 4.5vw, 6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.big-number-label { font-size: var(--fs-lead); line-height: 1.45; max-width: 24ch; }
.split--even { gap: var(--s6); }
@media (min-width: 900px) {
  .split--even { grid-template-columns: 1fr 1fr; gap: var(--s7); }
}
.split > div > h2:not(:last-child) { margin-bottom: var(--s3); }
.note { margin-top: var(--s3); font-size: var(--fs-small); line-height: 1.5; }
.step-num {
  display: block;
  margin-bottom: var(--s2);
  font-family: var(--font-head);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}
.section-after { margin-top: var(--s5); }

/* Altersvorsorge: Rechenzeile Bedarf − Rente = Lücke */
.formula {
  display: grid;
  gap: var(--s2);
  align-items: stretch;
  margin: var(--s6) 0 0;
  padding: 0;
  list-style: none;
}
.formula-item {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: var(--s4);
  border: 1px solid var(--navy);
  border-radius: var(--radius);
}
.formula-item strong { font-family: var(--font-head); font-size: var(--fs-h4); font-weight: 600; line-height: 1.3; }
.formula-item span { font-size: var(--fs-small); line-height: 1.5; }
.formula-item--result { background: var(--navy); color: var(--white); }
.formula-op {
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1;
  color: var(--gold);
}
@media (min-width: 900px) {
  .formula { grid-template-columns: 1fr auto 1fr auto 1fr; gap: var(--s3); }
}

/* Über mich: vier Arbeitsprinzipien */
@media (min-width: 640px) and (max-width: 999px) {
  .steps--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .steps--4 { grid-template-columns: repeat(4, 1fr); gap: var(--s4); }
}
.steps--4 .icon { width: 32px; height: 32px; margin-bottom: var(--s2); color: var(--navy); }

/* Qualifikationen auf Marineblau */
.quals {
  display: grid;
  gap: 0 var(--s6);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 800px) { .quals { grid-template-columns: 1fr 1fr; } }
.quals li {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--gold);
  font-size: var(--fs-lead);
  line-height: 1.45;
}
.quals .icon { width: 26px; height: 26px; margin-top: 2px; color: var(--gold); }
.split .quals { grid-template-columns: 1fr; }
.split .quals li:first-child { padding-top: 0; }

/* Großes Zitat */
.pullquote {
  max-width: 22ch;
  margin: var(--s4) 0 0;
  padding-left: var(--s3);
  border-left: 4px solid var(--gold);
  font-family: var(--font-head);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Rechtsseiten: schlichter Seitenkopf und lesbarer Fließtext */
.page-head { padding-block: var(--s6) var(--s5); background: var(--navy); color: var(--white); }
.page-head .lead { margin-top: var(--s3); }
.legal > * { max-width: 760px; }
.legal h2 { margin: var(--s6) 0 var(--s2); font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.01em; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { margin: var(--s4) 0 var(--s1); font-size: var(--fs-h5); line-height: 1.4; letter-spacing: 0; }
.legal ul { margin: 0 0 var(--s2); padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.legal address { margin-bottom: var(--s2); }
.legal .pruefen { padding: 2px 6px; border: 1px dashed var(--navy); border-radius: 4px; font-weight: 600; }
.legal-meta { margin-top: var(--s6); font-size: var(--fs-small); line-height: 1.5; }

/* 404-Seite */
.hero--404 .hero-inner { min-height: clamp(420px, 60svh, 560px); }
.hero--404 .hero-text { width: auto; max-width: 720px; }
.hero--404 .big-number { color: var(--gold); }
.link-grid {
  display: grid;
  gap: 0 var(--s5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.link-grid li { border-top: 1px solid var(--gold); }
@media (min-width: 640px) { .link-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .link-grid { grid-template-columns: repeat(3, 1fr); } }

/* Kontakt: Kontaktwege links (mitlaufend), Formular rechts */
.hero--contact .hero-media img { object-position: 50% 15%; }
.hero--pflege .hero-media img { object-position: 45% 30%; }
.contact-layout { display: grid; gap: var(--s6); }
.contact-info .features { margin-top: var(--s4); }
.contact-info .feature a { font-size: var(--fs-lead); line-height: 1.4; font-weight: 500; }
.form-panel {
  padding: var(--s4) var(--s3);
  border: 1px solid var(--navy);
  border-radius: var(--radius);
}
.form-panel h2 { margin-bottom: var(--s2); }
.form-panel .form-intro { margin-bottom: var(--s4); }
@media (min-width: 640px) { .form-panel { padding: var(--s5); } }
@media (min-width: 1000px) {
  .contact-layout { grid-template-columns: 5fr 7fr; align-items: start; }
  .contact-info { position: sticky; top: calc(var(--header-h) + var(--s4)); }
}

/* Karte mit Zwei-Klick-Lösung: Google Maps lädt erst nach Zustimmung */
.map-box {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
}
.map-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent { width: 100%; max-width: 560px; padding: var(--s4) var(--s3); text-align: center; }
@media (min-width: 800px) { .map-box { aspect-ratio: 16 / 9; } }
.map-consent > .icon { width: 40px; height: 40px; margin: 0 auto var(--s2); color: var(--gold); }
.map-consent address { margin-bottom: var(--s3); font-style: normal; font-size: var(--fs-lead); line-height: 1.5; }
.map-consent .btn-row { justify-content: center; margin-bottom: var(--s3); }
.map-consent .small { margin-inline: auto; }

/* ==========================================================================
   Edle Effekte: Einblenden im Viewport, Linien, Bild-Blende, Header
   Nur aktiv mit JavaScript (.js) und ohne „Bewegung reduzieren“.
   ========================================================================== */
:root { --ease-out: cubic-bezier(.2, .7, .2, 1); }

/* Goldene Trennlinien als Pseudo-Element, damit sie sich „zeichnen“ lassen */
.topic, .step, .review figure { position: relative; border-top: 0; }
.topic::before, .step::before, .review figure::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
  transform-origin: left center;
}
.step::before, .review figure::before { height: 2px; }
.topic--all::before { display: none; }

/* Header: Logo wird beim Scrollen etwas kleiner (Desktop) */
.logo img { transition: width .4s var(--ease-out); }
@media (min-width: 1100px) {
  .site-header.is-scrolled .logo img { width: 210px; }
}

/* FAQ: weiches Auf- und Zuklappen (moderne Browser, sonst sofort) */
:root { interpolate-size: allow-keywords; }
.faq-item::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size .45s var(--ease-out), content-visibility .45s allow-discrete;
}
.faq-item[open]::details-content { block-size: auto; }
.faq-item summary .icon { transition: transform .35s var(--ease-out); }

@media (prefers-reduced-motion: no-preference) {
  /* Einblenden von unten */
  .js :is(.section-head, .split > div, .topic, .step, .feature, .media-text > div, .form-panel, .map-box, .quals > li, .formula, .review, .faq-item, .cta .container > *, .footer-grid > *) {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
    transition-delay: var(--rv-delay, 0s);
  }
  .js :is(.section-head, .split > div, .topic, .step, .feature, .media-text > div, .form-panel, .map-box, .quals > li, .formula, .review, .faq-item, .cta .container > *, .footer-grid > *).is-visible {
    opacity: 1;
    transform: none;
  }

  /* Akzentlinie und goldene Linien zeichnen sich von links */
  .js :is(.section-head, .split > div, .media-text > div) .accent,
  .js .cta .container > .accent,
  .js :is(.topic, .step, .feature, .review figure)::before {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.2s var(--ease-out);
    transition-delay: calc(var(--rv-delay, 0s) + .25s);
  }
  .js .is-visible .accent,
  .js .cta .container > .accent.is-visible,
  .js :is(.topic, .step, .feature).is-visible::before,
  .js .review.is-visible figure::before {
    transform: scaleX(1);
  }

  /* Bild-Blende mit leichtem Zoom */
  .js :is(.media-text > img, .expect-media > img) {
    clip-path: inset(10% 10% 10% 10% round var(--radius));
    opacity: 0;
    transform: scale(1.06);
    transition: clip-path 1.4s var(--ease-out), opacity 1s var(--ease-out), transform 1.6s var(--ease-out);
  }
  .js :is(.media-text > img, .expect-media > img).is-visible {
    clip-path: inset(0 0 0 0 round var(--radius));
    opacity: 1;
    transform: none;
  }
}

@media print {
  .js * { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
