/* =========================================================
   hm-FINANZPLANUNG GmbH – Stylesheet
   Farben und Grundgestaltung nach der bisherigen Website:
   Leinen-Hintergrund, cremeweiße Inhaltsflächen, Logo-Blau,
   dunkelrote Akzent-Boxen. Statisch, ohne externe Schriften
   oder Skripte (DSGVO-freundlich).
   ========================================================= */

:root {
  --blue: #333366;        /* Blau des Logos */
  --blue-soft: #e6e5ef;
  --red: #8b0000;         /* bisheriges Dunkelrot (darkred) */
  --red-dark: #6e0000;
  --paper: #faf0e6;       /* bisheriger Hintergrund (linen) */
  --card: #fffaf0;        /* bisherige Inhaltsflächen (floralwhite) */
  --ink: #23233f;
  --muted: #5d5d73;
  --line: #e7d9c6;
  --radius: 8px;
  --max: 1140px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Trebuchet MS", Trebuchet, "Lucida Sans Unicode", "Lucida Grande", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--blue);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h3 { font-size: 1.28rem; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.narrow { max-width: 780px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--blue); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }

.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--red); margin-bottom: .8rem;
}

/* ---------- Kopf: blauer Navigationsbalken, Logo „schwebt“ darüber (wie bisher) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  padding: 30px 0 10px;
}
.header-bar {
  position: relative;
  display: flex; align-items: center; justify-content: flex-end; gap: 1rem;
  min-height: 58px; padding: 0 .8rem 0 170px;
  background: var(--blue); border-radius: 6px;
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, .25);
}
.brand { position: absolute; left: 28px; top: -22px; z-index: 2; display: block; }
.brand-logo {
  height: 116px; width: auto; background: #fff;
  border: solid var(--paper); border-width: 5px 8px;
  box-shadow: 4px 5px 10px rgba(25, 25, 80, .45);
  transition: transform .2s;
}
.brand:hover .brand-logo { transform: translateY(-2px); }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a {
  display: block; padding: .45rem .75rem; border-radius: 5px;
  text-decoration: none; color: #fff; font-weight: 600; font-size: .98rem;
}
.main-nav a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.main-nav a[aria-current="page"] { background: #1f1f4a; color: #fff; box-shadow: inset 0 -2px 0 var(--red); }
.main-nav .nav-cta a { background: var(--red); color: #fff; margin-left: .4rem; }
.main-nav .nav-cta a:hover, .main-nav .nav-cta a[aria-current="page"] { background: var(--red-dark); box-shadow: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: .8rem 1.4rem; border-radius: 6px; border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-outline { border-color: var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }

/* ---------- Startseiten-Kopf ---------- */
.hero { padding: clamp(3.5rem, 6vw, 4.5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 16ch; }
.hero .lead { font-size: clamp(1.1rem, 1.8vw, 1.25rem); color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 2rem 0 0; padding: 0; list-style: none; font-size: .95rem; color: var(--muted); }
.hero-facts li::before { content: "✓"; color: var(--red); font-weight: 700; margin-right: .4rem; }

.hero-visual { display: flex; flex-direction: column; gap: 1.2rem; max-width: 430px; margin-left: auto; }
.hero-visual img {
  width: 100%; border-radius: var(--radius);
  border: 6px solid #fff; box-shadow: 4px 6px 18px rgba(51, 51, 102, .28);
}

/* ---------- Unterseiten-Kopf (hell statt blau) ---------- */
.page-hero { padding: clamp(3.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.2rem); }
.page-hero .lead { max-width: 62ch; font-size: 1.15rem; color: var(--muted); margin: 0; }

/* ---------- Sektionen ---------- */
section { padding: clamp(2.8rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--card); border-block: 1px solid var(--line); }
.section-head { max-width: 700px; margin-bottom: 2.2rem; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; display: flex; flex-direction: column;
  box-shadow: 2px 3px 8px rgba(51, 51, 102, .06);
}
.section-alt .card { background: var(--paper); }
.card p { color: var(--muted); }
.card .icon { font-size: 1.5rem; color: var(--red); margin-bottom: .8rem; line-height: 1; }
.card .more { margin-top: auto; font-weight: 700; text-decoration: none; }
.card .more::after { content: " →"; }

.checklist { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.checklist li { padding-left: 1.7rem; position: relative; margin-bottom: .65rem; }
.checklist li::before {
  content: ""; position: absolute; left: .15rem; top: .55em; width: .6rem; height: .6rem;
  background: var(--red); transform: rotate(45deg);
}

/* Infokasten: hell mit blauer Kante (statt vollflächig blau) */
.callout {
  background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--blue);
  border-radius: var(--radius); padding: 1.6rem 1.7rem;
}
.section-alt .callout { background: var(--paper); }
.callout h3 { margin-bottom: .8rem; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

/* Rote Box – wie auf der bisherigen Website */
.think {
  background: var(--red); color: #fff; border-radius: var(--radius);
  padding: 1.5rem 1.7rem;
}
.think .think-title { display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin-bottom: .4rem; color: #fff; }
.think p { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.45; }
.think cite { display: block; margin-top: .7rem; font-style: normal; font-size: .9rem; opacity: .85; font-family: var(--sans); }
.think.quote p::before { content: "„"; }
.think.quote p::after { content: "“"; }

.highlight-box {
  border-left: 4px solid var(--red); background: var(--card);
  padding: 1.3rem 1.5rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0;
}

/* ---------- Bilder ---------- */
.side { display: flex; flex-direction: column; gap: 1.5rem; }
.photo { margin: 0; }
.photo img {
  width: 100%; border-radius: var(--radius);
  border: 6px solid #fff; box-shadow: 3px 4px 12px rgba(51, 51, 102, .2);
}
.photo.tall img { aspect-ratio: 4 / 5; object-fit: cover; }
.photo figcaption { font-size: .9rem; color: var(--muted); font-style: italic; margin-top: .55rem; }

/* Navigationsinstrumente */
.instrument {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.instrument img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.instrument > div { padding: 1.2rem 1.3rem 1.4rem; }
.instrument h3 { margin-bottom: .35rem; }
.instrument p { color: var(--muted); margin: 0; font-size: .97rem; }
.instrument-name { display: flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: .25rem; }
.instrument-name b { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--blue); color: #fff; letter-spacing: 0; font-family: var(--serif); }

/* ---------- Ablauf ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.steps li { position: relative; padding: 2rem 1.5rem 1.5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.section-alt .steps li { background: var(--paper); }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -1.05rem; left: 1.5rem; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--blue); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 600;
}
.steps p { color: var(--muted); margin: 0; }

/* ---------- Preise ---------- */
.price { font-family: var(--serif); font-size: 2.2rem; color: var(--blue); line-height: 1; margin: .3rem 0 .4rem; }
.price small { font-family: var(--sans); font-size: .95rem; color: var(--muted); }
.price-card.featured { border: 2px solid var(--red); position: relative; }
.badge { position: absolute; top: -.75rem; right: 1.3rem; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .65rem; border-radius: 4px; }
.fineprint { font-size: .92rem; color: var(--muted); margin-top: 1.2rem; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare, .numbers { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td, .numbers th, .numbers td { padding: .9rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th, .numbers thead th { background: var(--blue); color: #fff; font-weight: 700; }
.compare tbody th { font-weight: 700; color: var(--blue); width: 28%; }
.numbers td, .numbers th { text-align: right; white-space: nowrap; }
.numbers th:first-child, .numbers td:first-child { text-align: left; }
.numbers tr.base td { color: var(--muted); }
.compare tr:last-child > *, .numbers tr:last-child > * { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .8rem; padding: 0 1.3rem; }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; position: relative; font-family: var(--serif); font-size: 1.18rem; color: var(--blue); font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-size: 1.5rem; color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 1.1rem; color: var(--muted); }

/* ---------- Personen ---------- */
.person { display: grid; grid-template-columns: 150px 1fr; gap: 1.5rem; align-items: start; }
.person img { width: 150px; aspect-ratio: 3 / 4; object-fit: cover; border: 5px solid #fff; border-radius: 4px; box-shadow: 3px 4px 10px rgba(51, 51, 102, .25); }
.person h3 { margin-bottom: .2rem; }
.person .role { color: var(--red); font-weight: 700; font-size: .95rem; margin-bottom: .8rem; }
.person ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.person li { margin-bottom: .25rem; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--red); }
.timeline li { padding: 0 0 1.1rem 1.3rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -.55rem; top: .4rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--paper); border: 3px solid var(--red); }
.timeline b { color: var(--blue); font-family: var(--serif); font-size: 1.15rem; display: block; }

/* ---------- Kontakt ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .label { width: 6.5rem; flex-shrink: 0; color: var(--muted); font-size: .92rem; }
.contact-list a { font-weight: 700; text-decoration: none; }

/* ---------- Rechtstexte ---------- */
.legal h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.legal > h2:first-child, .legal > .note-draft:first-child { margin-top: 0; }
.page-hero + section:has(.legal) { padding-top: 1rem; }
.legal h3 { font-size: 1.12rem; margin-top: 1.5rem; }
.legal h4 { font-family: var(--serif); color: var(--blue); font-size: 1.02rem; margin: 1.2rem 0 .4rem; }
.legal p, .legal li { overflow-wrap: anywhere; }
.legal dl { display: grid; grid-template-columns: 14rem 1fr; gap: .4rem 1.2rem; margin: 0 0 1rem; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }
.note-draft { background: #fff5e6; border: 1px dashed var(--red); border-radius: var(--radius); padding: 1rem 1.2rem; font-size: .95rem; margin-bottom: 2rem; }

/* ---------- Abschluss-Band ---------- */
.cta-band .container {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--red);
  border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.2rem);
}
.cta-band h2 { margin-bottom: .2rem; font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
.cta-band p { margin: 0; color: var(--muted); }

/* ---------- Fußzeile im Logo-Blau ---------- */
.site-footer { background: var(--blue); color: #d4d4e6; padding: 3rem 0 1.4rem; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #fff; background: var(--red); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-family: var(--serif); font-size: 1.1rem; margin: 0 0 .8rem; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.18); margin-top: 2.3rem; padding-top: 1.2rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .86rem; }
.footer-bottom nav { display: flex; gap: 1.2rem; }

/* =========================================================
   Tablet
   ========================================================= */
@media (max-width: 1000px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split, .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .hero-visual img { margin-left: 0; max-width: 100%; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; }
  .side > * { flex: 1 1 260px; }

  .hero-visual { margin-left: 0; }
  .brand-logo { height: 100px; }
  .brand { top: -18px; }
  .nav-toggle-label {
    display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
    padding: .45rem .9rem; border: 1px solid rgba(255,255,255,.45); border-radius: 5px;
    font-weight: 700; color: #fff; user-select: none;
  }
  .nav-toggle-label .bars, .nav-toggle-label .bars::before, .nav-toggle-label .bars::after {
    display: block; width: 18px; height: 2px; background: #fff; position: relative; transition: transform .2s;
  }
  .nav-toggle-label .bars::before, .nav-toggle-label .bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-label .bars::before { top: -6px; }
  .nav-toggle-label .bars::after { top: 6px; }
  .nav-toggle:checked + .nav-toggle-label .bars { background: transparent; }
  .nav-toggle:checked + .nav-toggle-label .bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle:checked + .nav-toggle-label .bars::after { transform: translateY(-6px) rotate(-45deg); }
  .nav-toggle:focus-visible + .nav-toggle-label { outline: 3px solid #fff; outline-offset: 3px; }

  .main-nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px);
    background: var(--blue); border-radius: 6px;
    box-shadow: 0 18px 28px -16px rgba(25,25,80,.55);
    display: none;
  }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 2.6rem 1rem 1rem; gap: 0; }
  .main-nav a { padding: .8rem .6rem; border-bottom: 1px solid rgba(255,255,255,.15); border-radius: 0; font-size: 1.05rem; }
  .main-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--red); }
  .main-nav .nav-cta a { margin: 1rem 0 0; text-align: center; border-bottom: 0; border-radius: 5px; }
}

/* =========================================================
   Smartphone
   ========================================================= */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-header { padding-top: 22px; }
  .header-bar { min-height: 50px; padding-left: 110px; }
  .brand { left: 14px; top: -16px; }
  .brand-logo { height: 82px; border-width: 4px 6px; }
  .hero { padding-top: 3.8rem; }
  .page-hero { padding-top: 3.8rem; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .card { padding: 1.4rem; }
  .instrument { flex-direction: row; }
  .instrument img { width: 38%; aspect-ratio: 3 / 4; flex-shrink: 0; }
  .instrument > div { padding: .9rem 1rem; }
  .instrument h3 { font-size: 1.08rem; }
  .instrument p { font-size: .92rem; }
  .person { grid-template-columns: 1fr; }
  .person img { width: 140px; }
  .legal dl { grid-template-columns: 1fr; gap: 0; }
  .legal dd { margin-bottom: .8rem; }
  .contact-list li { flex-direction: column; gap: .15rem; }
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr { border-bottom: 1px solid var(--line); padding: .5rem 0; }
  .compare tr:last-child { border-bottom: 0; }
  .compare th, .compare td { border: 0; padding: .3rem 1rem; }
  .compare tbody th { width: 100%; font-family: var(--serif); font-size: 1.1rem; }
  .compare td::before { content: attr(data-label); display: block; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
  .numbers th, .numbers td { padding: .6rem .55rem; font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .cta-band, .footer-bottom nav { display: none; }
  body { background: #fff; }
}
.split > *, .hero-grid > *, .grid > * { min-width: 0; }
