/* Nachlassrente.de – für ältere Menschen optimiert:
   große Schrift, hoher Kontrast, große Klickflächen, ruhiges Layout. */

:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-alt: #f1ebe0;
  --text: #1c2430;
  --text-soft: #3d4756;
  --primary: #1f4e79;
  --primary-dark: #163a5c;
  --accent: #2e7d4f;
  --accent-dark: #22603c;
  --border: #c9bfae;
  --focus: #e0a100;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(28, 36, 48, 0.08);
  --font-scale: 1;
}

* { box-sizing: border-box; }

html {
  font-size: calc(20px * var(--font-scale));
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Verdana, "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.25;
  color: var(--primary-dark);
  margin: 0 0 0.6em;
}
h1 { font-size: 2.3rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Kopfbereich ---------- */
.dev-notice {
  background: #fff3c4;
  color: var(--text);
  border-bottom: 2px solid var(--focus);
  font-size: 0.9rem;
  padding: 10px 0;
}
.topbar {
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.85rem;
}
.topbar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
}
.font-controls { display: flex; align-items: center; gap: 8px; }
.font-controls button {
  min-width: 48px;
  min-height: 40px;
  font: inherit;
  font-weight: bold;
  background: #fff;
  color: var(--primary-dark);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.font-controls button:hover { background: var(--surface-alt); }

.site-header {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--primary-dark);
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-weight: bold;
}
.logo svg { flex-shrink: 0; }
.logo span small { color: var(--accent); font-size: 1em; }

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.main-nav a {
  display: inline-block;
  padding: 8px 4px;
  font-weight: bold;
  text-decoration: none;
  color: var(--text);
}
.main-nav a:hover { text-decoration: underline; }

.header-phone {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.3;
}
.header-phone small { color: var(--text-soft); font-size: 0.8rem; }
.header-phone strong { font-size: 1.25rem; color: var(--accent-dark); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 14px 28px;
  font: inherit;
  font-weight: bold;
  font-size: 1.05rem;
  border-radius: var(--radius);
  border: 3px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--primary-dark); border-color: var(--primary); }
.btn-secondary:hover { background: var(--surface-alt); color: var(--primary-dark); }

/* ---------- Abschnitte ---------- */
section { padding: 72px 0; scroll-margin-top: 170px; }
section:nth-of-type(even) { background: var(--surface); }
.section-intro { max-width: 760px; font-size: 1.1rem; color: var(--text-soft); margin-bottom: 40px; }

.hero {
  background: var(--bg);
  padding: 0 0 72px;
}

/* Bild über die ganze Breite, Text links im hellen Bildbereich */
.hero-banner {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-banner::before {
  /* heller Verlauf von links, damit der Text gut lesbar bleibt */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg,
    rgba(251, 248, 243, 0.94) 0%,
    rgba(251, 248, 243, 0.86) 38%,
    rgba(251, 248, 243, 0.25) 58%,
    rgba(251, 248, 243, 0) 70%);
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
}
.hero-banner .container {
  position: relative;
  z-index: 2;
  padding-top: 64px;
  padding-bottom: 64px;
}
.hero-content { max-width: 560px; }
.hero-content h1 { font-size: 2.5rem; }
.hero-lead { font-size: 1.2rem; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.hero-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.hero-card h2 { font-size: 1.35rem; }
.hero > .container { margin-top: 48px; }
.hero-card-wide .checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
}

/* Bilder */
.section-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.section-image { margin-bottom: 28px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative;
  padding-left: 46px;
  margin-bottom: 16px;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: bold;
  text-align: center;
  line-height: 32px;
}

/* Schritte */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.steps li {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  counter-increment: step;
}
section:nth-of-type(even) .steps li { background: var(--bg); }
.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  font-family: Georgia, serif;
}
.steps p { margin: 0; color: var(--text-soft); }

/* Vorteile */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
section:nth-of-type(even) .card { background: var(--bg); }
.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card p { margin: 0; color: var(--text-soft); }

/* Rechner */
.calculator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
section:nth-of-type(even) .calculator { background: var(--bg); }
.field { margin-bottom: 24px; }
.field label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
}
.field .hint { display: block; font-size: 0.85rem; color: var(--text-soft); font-weight: normal; }
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 60px;
  padding: 12px 16px;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 2px solid #8a8070;
  border-radius: 10px;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }

.result {
  background: var(--primary-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.result-label { font-size: 1rem; margin: 0 0 4px; opacity: 0.9; }
.result-value {
  font-family: Georgia, serif;
  font-size: 2.6rem;
  font-weight: bold;
  margin: 0 0 12px;
  line-height: 1.2;
}
.result-note { font-size: 0.85rem; opacity: 0.9; margin: 0; }

.disclaimer {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 20px;
}

/* Sicherheit */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.notice {
  background: #fff8e6;
  border-left: 6px solid var(--focus);
  border-radius: 8px;
  padding: 24px 28px;
}
.notice h3 { color: var(--text); }
.notice p:last-child { margin: 0; }

/* FAQ */
.faq { max-width: 860px; }
.faq details {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
section:nth-of-type(even) .faq details { background: var(--bg); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 64px 22px 24px;
  font-weight: bold;
  font-size: 1.1rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  text-align: center;
  line-height: 36px;
  font-size: 1.4rem;
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 24px 22px; color: var(--text-soft); }
.faq details > div p:last-child { margin: 0; }

/* Kontakt */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
}
.contact-box {
  background: var(--primary-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px;
}
.contact-box h3 { color: #fff; }
.contact-box a { color: #fff; }
.contact-phone {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.9rem;
  font-weight: bold;
  text-decoration: none;
  margin: 8px 0 4px;
}
.contact-box hr { border: 0; border-top: 1px solid rgba(255,255,255,0.3); margin: 24px 0; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.checkbox {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
  font-size: 0.9rem;
}
.checkbox input { width: 28px; height: 28px; flex-shrink: 0; margin-top: 2px; }
.form-success {
  background: #e7f4ec;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px;
}
.form-success h3 { color: var(--accent-dark); }

/* Fußbereich */
.site-footer {
  background: var(--text);
  color: #e6e9ee;
  padding: 48px 0 32px;
  font-size: 0.9rem;
}
.site-footer a { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.site-footer h3 { color: #fff; font-size: 1.1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid #4a5361; padding-top: 24px; color: #b9c0ca; }

/* Unterseiten */
.page { padding: 64px 0; }
.page .container { max-width: 860px; }

/* ---------- Mobil ---------- */
/* Text im Bild nur bei genug Breite – sonst Bild oben, Text darunter */
@media (max-width: 1199px) {
  /* Überschrift unten im Bild, Einleitung und Buttons darunter.
     display: contents macht h1, Text und Buttons zu direkten Rasterelementen. */
  .hero-banner { display: grid; grid-template-columns: 100%; min-height: 0; }
  .hero-banner::before { display: none; }
  .hero-banner .container,
  .hero-content { display: contents; }
  .hero-image {
    grid-area: 1 / 1;
    position: static;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 560px;
    object-position: 72% 50%;
  }
  .hero-content h1 {
    grid-area: 1 / 1;
    align-self: end;
    z-index: 1;
    margin: 0;
    padding: 72px 24px 24px;
    font-size: 2.1rem;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    background: linear-gradient(to top,
      rgba(22, 58, 92, 0.92) 0%,
      rgba(22, 58, 92, 0.75) 55%,
      rgba(22, 58, 92, 0) 100%);
  }
  .hero-lead { margin: 0; padding: 28px 24px 0; }
  .hero-actions { padding: 0 24px; }
}

@media (max-width: 960px) {
  .calculator,
  .trust-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .main-nav { order: 3; width: 100%; }
}

@media (max-width: 640px) {
  html { font-size: calc(18px * var(--font-scale)); }
  .container { padding: 0 16px; }
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.5rem; }
  section { padding: 52px 0; }
  .hero { padding: 0 0 48px; }
  .hero-content h1 { font-size: 1.85rem; padding: 64px 16px 20px; }
  .hero-image { aspect-ratio: 1 / 1; }
  .hero-lead { padding: 24px 16px 0; }
  .hero-actions { padding: 0 16px; }
  .steps, .cards, .form-row, .hero-card-wide .checklist { grid-template-columns: 1fr; }
  .hero > .container { margin-top: 32px; }
  .calculator { padding: 24px; }
  .btn { width: 100%; }
  .site-header { position: static; }
  .header-phone { display: none; }
}

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