/* DOMFINANZ – Starterliste Altersvorsorgedepot
   Schriften werden selbst gehostet (Ordner /fonts, Lizenz: SIL OFL 1.1). */

@font-face {
  font-family: "Open Sans";
  src: url("fonts/OpenSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("fonts/OpenSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #8c1713;
  --red-dark: #6c110e;
  --ink: #1e1b1b;
  --text: #393536;
  --muted: #5d5859;
  --line: #e7e3e3;
  --circle: #f1efef;
  --soft: #f8f7f7;
  --white: #fff;

  --font-head: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1120px;
  --gutter: 20px;
  --radius: 20px;
  --space: clamp(4rem, 9vw, 7.5rem);
}

/* ---------- Basis ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  body { font-size: 1.0625rem; }
}

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

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  hyphens: manual;
}

h1 { font-size: clamp(2rem, 7.4vw, 2.9rem); line-height: 1.14; }
h2 { font-size: clamp(1.6rem, 4.6vw, 2.4rem); }
h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.35; }

p { margin: 0; }
p + p { margin-top: 1em; }

a { color: var(--red); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-dark); }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

.section { padding-block: var(--space); }
.section--soft { background: var(--soft); }

.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head p { margin-top: 1rem; color: var(--muted); }

.eyebrow {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--red);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Button ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0.85rem 1.6rem;
  border: 2px solid var(--red);
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }
.btn svg { flex: none; width: 1.1em; height: 1.1em; }

.btn--light { background: var(--white); border-color: var(--white); color: var(--red); }
.btn--light:hover { background: #f6eaea; border-color: #f6eaea; color: var(--red-dark); }
.btn--light:focus-visible { outline-color: var(--white); }

.btn { text-wrap: balance; }
@media (max-width: 399px) {
  .btn { padding-inline: 1.25rem; font-size: 0.9375rem; }
  .btn svg { display: none; }
}

.btn-note { margin-top: 0.85rem; color: var(--muted); font-size: 0.875rem; }

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

.site-header { padding-block: 1.1rem; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo { display: inline-block; line-height: 0; }
.logo img { width: 150px; height: auto; }
@media (min-width: 768px) {
  .site-header { padding-block: 1.6rem; }
  .logo img { width: 180px; }
}
.header-link {
  padding: 0.4rem 0.2rem;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--red);
}
.header-link:hover { color: var(--red); }

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

.hero {
  padding-top: clamp(1.5rem, 5vw, 3.5rem);
  padding-bottom: var(--space);
  overflow-x: clip; /* Kreis darf nicht für seitliches Scrollen sorgen */
}
@supports not (overflow-x: clip) {
  .hero { overflow: hidden; }
}
.hero .wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero h1 { max-width: 20ch; }
.hero h1 .accent { color: var(--red); }
.hero-text p { max-width: 34rem; margin-top: 1.5rem; font-size: 1.0625rem; }
.hero-text .btn { margin-top: 2rem; }

.hero-media {
  position: relative;
  justify-self: center;
  width: min(100%, 420px);
  /* Platz für den Teil des Kreises, der über das Foto hinausragt (ca. 19 % der Fotobreite),
     damit er im einspaltigen Layout nicht in den Button läuft */
  margin-top: min(19.2%, 81px);
  isolation: isolate;
}
/* Der große hellgraue Kreis */
.hero-media::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 128%;
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  transform: translate(-44%, -54%);
  border-radius: 50%;
  background: var(--circle);
}
.hero-media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.4fr 1fr; gap: 4rem; }
  .hero h1 { font-size: clamp(2.25rem, 3.6vw, 2.9rem); }
  .hero-media { width: min(100%, 460px); justify-self: end; margin-top: 0; margin-right: 2rem; }
  .hero-media::before { width: 136%; }
}

/* ---------- Kurz erklärt ---------- */

.cards {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
.card {
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
@media (min-width: 768px) {
  .card { padding: 2.25rem 2rem; }
}
.card h3::before {
  content: "";
  display: block;
  width: 2rem;
  height: 3px;
  margin-bottom: 1.1rem;
  border-radius: 2px;
  background: var(--red);
}
.card p { margin-top: 0.75rem; }

/* ---------- Förderrechner ---------- */

.calc {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
@media (min-width: 900px) {
  .calc { grid-template-columns: 1fr 1fr; }
}

.calc-inputs { padding: 1.75rem 1.5rem; }
.calc-results { padding: 1.75rem 1.5rem; border-top: 1px solid var(--line); }
@media (min-width: 768px) {
  .calc-inputs, .calc-results { padding: 2.5rem; }
}
@media (min-width: 900px) {
  .calc-results { border-top: 0; border-left: 1px solid var(--line); }
}

.field + .field { margin-top: 2.25rem; }
.field-label {
  display: block;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
}

.amount-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.number-wrap {
  display: inline-flex;
  align-items: center;
  flex: none;
  border: 1px solid #cfc9ca;
  border-radius: 12px;
  background: var(--white);
}
.number-wrap:focus-within { outline: 3px solid var(--red); outline-offset: 2px; }
.number-wrap input {
  width: 4.2ch;
  min-height: 48px;
  padding: 0 0 0 0.75rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 600 1.125rem/1 var(--font-body);
  text-align: right;
  -moz-appearance: textfield;
  appearance: textfield;
}
.number-wrap input:focus { outline: none; }
.number-wrap input::-webkit-outer-spin-button,
.number-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.number-wrap .unit { padding: 0 0.75rem 0 0.35rem; color: var(--muted); font-size: 0.9375rem; }

/* Schieberegler */
input[type="range"] {
  --fill: 16.67%;
  flex: 1;
  min-width: 0;
  height: 48px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
input[type="range"]:focus { outline: none; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--red) 0 var(--fill), #e4dfe0 var(--fill) 100%);
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: #e4dfe0;
}
input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--red);
}
input[type="range"]::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  -webkit-appearance: none;
  appearance: none;
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--red); outline-offset: 3px; }
input[type="range"]:focus-visible::-moz-range-thumb { outline: 3px solid var(--red); outline-offset: 3px; }

.range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.stepper {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  border: 1px solid #cfc9ca;
  border-radius: 12px;
}
.stepper button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--red);
  font: 500 1.5rem/1 var(--font-body);
  cursor: pointer;
}
.stepper button:first-child { border-radius: 11px 0 0 11px; }
.stepper button:last-child { border-radius: 0 11px 11px 0; }
.stepper button:hover:not(:disabled) { background: #f6eeee; }
.stepper button:disabled { color: #b9b3b4; cursor: default; }
.stepper button:focus-visible { outline-offset: -3px; }
.stepper input {
  width: 3.2rem;
  min-height: 48px;
  border: 0;
  border-inline: 1px solid #e4dfe0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 600 1.125rem/1 var(--font-body);
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus-visible { outline-offset: -3px; border-radius: 0; }

.results { margin: 0; }
.result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.result-row:first-child { padding-top: 0; }
.result-row dt { color: var(--muted); }
.result-row dd {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.result-row--total { border-bottom: 0; padding-top: 1.25rem; }
.result-row--total dt { color: var(--ink); font-weight: 500; }
.result-row--total dd {
  color: var(--red);
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
}
.result-row[hidden] { display: none; }

.result-sentence {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 500;
}
.result-hint {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.result-hint[hidden] { display: none; }

.calc-note {
  max-width: 48rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}
.calc-cta { margin-top: 2.25rem; }

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

.faq { max-width: 48rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: block;
  padding: 1.35rem 3rem 1.35rem 0;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after,
.faq summary::before {
  content: "";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--red);
  transition: transform 0.2s ease;
}
.faq summary::before { transform: rotate(90deg); }
.faq details[open] summary::before { transform: rotate(0deg); }
.faq summary:hover { color: var(--red); }
.faq summary:focus-visible { outline-offset: 4px; }
.faq details p { max-width: 42rem; padding: 0 3rem 1.6rem 0; }

/* ---------- Über Lukas ---------- */

.about {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .about { grid-template-columns: 0.8fr 1fr; gap: 5rem; }
}
/* Untereinander: Foto mittig. Nebeneinander (ab 900px): links neben dem Text. */
.about picture { display: block; justify-self: center; }
@media (min-width: 900px) {
  .about picture { justify-self: start; }
}
.about-photo {
  width: min(100%, 380px);
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.about-text p { max-width: 36rem; margin-top: 1.25rem; }
.about-text h2 + p { margin-top: 1.5rem; }

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.contact a:hover { border-color: var(--red); color: var(--red); }
.contact svg { width: 20px; height: 20px; flex: none; color: var(--red); }

/* ---------- Bordeaux-Box ---------- */

.final { padding-bottom: var(--space); }
.final-box {
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 5vw, 4.5rem);
  border-radius: calc(var(--radius) + 4px);
  background: var(--red);
  color: var(--white);
  text-align: center;
}
.final-box h2 { color: var(--white); }
.final-box p { max-width: 34rem; margin: 1.25rem auto 0; }
.final-box .btn { margin-top: 2rem; }
.final-box .final-share {
  max-width: 30rem;
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9375rem;
}

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

.site-footer {
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer .wrap {
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .site-footer .wrap {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
.footer-firm { color: var(--ink); font-weight: 500; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--ink);
}
.footer-links a:hover { color: var(--red); }

/* ---------- Sticky-Leiste (nur mobil) ---------- */

.sticky-cta { display: none; }

@media (max-width: 767px) {
  .js .sticky-cta {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 50;
    display: block;
    padding: 0.65rem var(--gutter) calc(0.65rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(0);
    transition: transform 0.25s ease, visibility 0.25s;
  }
  .js .sticky-cta.is-hidden {
    visibility: hidden;
    transform: translateY(110%);
  }
  .sticky-cta .btn { width: 100%; min-height: 48px; padding-block: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

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

.legal { padding-block: clamp(2rem, 6vw, 4rem) var(--space); }
.legal .wrap { max-width: calc(46rem + 2 * var(--gutter)); }
.legal h1 { font-size: clamp(2rem, 6vw, 2.75rem); margin-bottom: 2rem; }
.legal h2 { font-size: clamp(1.35rem, 3.5vw, 1.65rem); margin-top: 3rem; margin-bottom: 1rem; }
.legal h3 { font-size: 1.125rem; margin-top: 2rem; margin-bottom: 0.6rem; }
.legal h4 {
  margin: 1.5rem 0 0.4rem;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
}
.legal p { margin-top: 0.85rem; }
.legal p + p { margin-top: 0.85rem; }
.legal ul { margin: 0.85rem 0 0; padding-left: 1.25rem; }
.legal li + li { margin-top: 0.5rem; }
.legal a { overflow-wrap: anywhere; }
.legal .back { margin-top: 3rem; }

.legal-highlight {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--red);
  border-radius: 0 12px 12px 0;
  background: var(--soft);
}
.legal-highlight h3 { margin-top: 0; }

.placeholder-note {
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  border: 2px dashed var(--red);
  border-radius: 12px;
  background: #fbf3f3;
  color: var(--ink);
  font-size: 0.9375rem;
}
