/* mit-immo.com – Grundbuch-Optik: Papier, Tannengrün, Ziegelrot */
@font-face { font-family: "Bentham"; src: url("/assets/fonts/Bentham.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("/assets/fonts/WorkSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("/assets/fonts/WorkSans-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("/assets/fonts/WorkSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --papier: #f5f0e6;
  --papier-2: #ebe4d4;
  --weiss: #fffdf8;
  --tinte: #14261f;
  --gruen: #1d4a3a;
  --gruen-tief: #0f2e24;
  --ziegel: #b5452a;
  --ziegel-hell: #e9c9bc;
  --grau: #5a6860;
  --linie: rgba(20, 38, 31, .16);
  --serif: "Bentham", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Work Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --breite: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gruen); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ziegel); }
:focus-visible { outline: 2px solid var(--ziegel); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.9rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); }
h3 { font-size: 1.5rem; line-height: 1.2; }
p { margin: 0 0 1em; }
.rahmen { max-width: var(--breite); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--weiss); padding: 8px 14px; z-index: 100; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 50; background: rgba(245, 240, 230, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linie); }
.kopf__zeile { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.marke { display: inline-flex; align-items: baseline; gap: .32em; text-decoration: none; color: var(--tinte); font-family: var(--serif); font-size: 1.7rem; line-height: 1; }
.marke__mit { letter-spacing: .14em; border-bottom: 2px solid var(--ziegel); padding-bottom: 3px; }
.marke__immo { font-style: normal; color: var(--gruen); }
.marke:hover { color: var(--tinte); }
.marke--hell, .marke--hell .marke__immo { color: var(--papier); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--tinte); text-decoration: none; font-size: .95rem; font-weight: 500; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: var(--ziegel); color: var(--tinte); }
.nav .nav__cta { background: var(--gruen); color: var(--papier); padding: 10px 18px; border: 0; border-radius: 2px; }
.nav .nav__cta:hover, .nav .nav__cta[aria-current] { background: var(--gruen-tief); color: var(--papier); }
.kopf__menue { display: none; font: inherit; font-weight: 500; background: none; border: 1px solid var(--tinte); border-radius: 2px; padding: 8px 14px; color: var(--tinte); cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .6em; font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  padding: 15px 26px; border-radius: 2px; border: 1px solid var(--gruen); background: var(--gruen); color: var(--papier); transition: background .2s, color .2s, transform .2s; }
.btn:hover { background: var(--gruen-tief); color: var(--papier); transform: translateY(-1px); }
.btn--linie { background: transparent; color: var(--gruen); }
.btn--linie:hover { background: var(--gruen); color: var(--papier); }
.btn--hell { background: var(--papier); color: var(--gruen-tief); border-color: var(--papier); }
.btn--hell:hover { background: var(--weiss); color: var(--gruen-tief); }
.btn__pfeil { transition: transform .2s; }
.btn:hover .btn__pfeil { transform: translateX(4px); }
.btnzeile { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Bausteine */
.vorspann { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ziegel); margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.vorspann::before { content: ""; width: 34px; height: 1px; background: var(--ziegel); }
.lead { font-size: 1.2rem; line-height: 1.6; color: #2c3d35; max-width: 38em; }
.abschnitt { padding: clamp(64px, 9vw, 120px) 0; }
.abschnitt--dunkel { background: var(--gruen-tief); color: var(--papier); }
.abschnitt--dunkel a { color: var(--papier); }
.abschnitt--dunkel .lead { color: #cfdbd3; }
.abschnitt--dunkel .vorspann { color: #e8a48f; }
.abschnitt--dunkel .vorspann::before { background: #e8a48f; }
.abschnitt--ton { background: var(--papier-2); }
.kopfzeile { max-width: 46em; margin-bottom: clamp(36px, 5vw, 60px); }
.fussnote { font-size: .85rem; color: var(--grau); max-width: 60em; }
.abschnitt--dunkel .fussnote { color: #a9bab0; }

/* Hero */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--linie) 1px, transparent 1px); background-size: 100% 44px; mask-image: linear-gradient(90deg, transparent 55%, #000); }
.hero__raster { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 em { font-style: normal; color: var(--ziegel); }
.hero__text > * { animation: auf .7s both; }
.hero__text > :nth-child(2) { animation-delay: .08s; }
.hero__text > :nth-child(3) { animation-delay: .16s; }
.hero__text > :nth-child(4) { animation-delay: .24s; }
@keyframes auf { from { opacity: 0; transform: translateY(14px); } }

/* Vergleichskarte (Hero) */
.vergleich { background: var(--weiss); border: 1px solid var(--linie); box-shadow: 14px 14px 0 var(--gruen-tief); padding: 30px 30px 26px; animation: auf .8s .3s both; }
.vergleich__titel { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--grau); margin: 0 0 20px; }
.vergleich__zeile { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 16px; padding: 16px 0; border-top: 1px solid var(--linie); }
.vergleich__land { font-weight: 600; }
.vergleich__land small { display: block; font-weight: 400; color: var(--grau); font-size: .88rem; line-height: 1.4; }
.vergleich__zahl { font-family: var(--serif); font-size: clamp(3rem, 6vw, 4.4rem); line-height: .9; }
.vergleich__zahl--at { color: var(--ziegel); }
.vergleich__zahl--de { color: var(--gruen); }
.jahre { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--linie); }
.jahre span { height: 26px; background: var(--papier-2); position: relative; animation: fuell .4s both; animation-delay: calc(.7s + var(--i) * .07s); }
.jahre span:last-child { background: var(--gruen); }
.jahre span:last-child::after { content: "10"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--papier); font-size: .8rem; font-weight: 600; }
@keyframes fuell { from { transform: scaleY(.2); opacity: 0; } }
.jahre__text { font-size: .85rem; color: var(--grau); margin: 10px 0 0; }

/* Kennzahlen-Leiste */
.leiste { border-top: 1px solid var(--tinte); border-bottom: 1px solid var(--tinte); }
.leiste__raster { display: grid; grid-template-columns: repeat(3, 1fr); }
.leiste__feld { padding: 30px 28px 28px 0; }
.leiste__feld + .leiste__feld { border-left: 1px solid var(--linie); padding-left: 28px; }
.leiste__zahl { font-family: var(--serif); font-size: clamp(2.4rem, 4.5vw, 3.4rem); line-height: 1; display: block; margin-bottom: 8px; }
.leiste__feld p { margin: 0; color: var(--grau); font-size: .95rem; line-height: 1.5; }

/* Karten / Raster */
.raster3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid currentColor; }
.raster3 > * { padding: 30px 30px 10px 0; }
.raster3 > * + * { border-left: 1px solid var(--linie); padding-left: 30px; }
.abschnitt--dunkel .raster3 > * + * { border-left-color: rgba(245, 240, 230, .2); }
.nr { font-family: var(--serif); font-size: 1.1rem; color: var(--ziegel); display: block; margin-bottom: 14px; letter-spacing: .08em; }
.abschnitt--dunkel .nr { color: #e8a48f; }
.raster2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }

/* Schritte */
.schritte { list-style: none; margin: 0; padding: 0; counter-reset: s; border-top: 1px solid var(--tinte); }
.schritte li { counter-increment: s; display: grid; grid-template-columns: 110px 1fr 1.3fr; gap: 24px; padding: 30px 0; border-bottom: 1px solid var(--linie); align-items: baseline; }
.schritte li::before { content: counter(s, decimal-leading-zero); font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--ziegel); }
.schritte h3 { margin: 0; }
.schritte p { margin: 0; color: #2c3d35; }
.schritte .wer { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--grau); margin-top: 10px; }

/* Tabelle */
.tabelle-huelle { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; min-width: 640px; }
.tabelle th, .tabelle td { text-align: left; vertical-align: top; padding: 18px 20px 18px 0; border-bottom: 1px solid var(--linie); }
.tabelle thead th { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--tinte); }
.tabelle tbody th { font-weight: 600; width: 26%; }
.tabelle td strong { color: var(--gruen); }
.tabelle td.at strong { color: var(--ziegel); }

/* Listen */
.haken { list-style: none; padding: 0; margin: 0; }
.haken li { padding: 14px 0 14px 34px; border-bottom: 1px solid var(--linie); position: relative; }
.haken li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 14px; height: 7px; border-left: 2px solid var(--gruen); border-bottom: 2px solid var(--gruen); transform: rotate(-45deg); }
.haken--achtung li::before { width: 12px; height: 2px; border: 0; background: var(--ziegel); transform: none; top: 27px; }
.haken strong { display: block; }

/* FAQ */
.faq { border-top: 1px solid var(--tinte); }
.faq details { border-bottom: 1px solid var(--linie); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 44px 22px 0; font-family: var(--serif); font-size: 1.4rem; line-height: 1.25; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-family: var(--sans); font-size: 1.6rem; color: var(--ziegel); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 24px; max-width: 46em; color: #2c3d35; }

/* Porträt */
.portraet { position: relative; background: var(--papier-2); border: 1px solid var(--linie); overflow: hidden; aspect-ratio: 4 / 5; max-width: 440px; }
.portraet img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.portraet::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--ziegel); }
.hinweisbox { border-left: 3px solid var(--ziegel); background: var(--weiss); padding: 22px 26px; margin: 28px 0 0; }
.hinweisbox h3 { font-size: 1.25rem; margin-bottom: .4em; }
.hinweisbox p:last-child { margin-bottom: 0; }

/* Abschluss-Aufruf */
.aufruf { background: var(--gruen-tief); color: var(--papier); padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.aufruf::after { content: "10"; position: absolute; right: -2vw; bottom: -9vw; font-family: var(--serif); font-size: 34vw; line-height: 1; color: rgba(245, 240, 230, .05); pointer-events: none; }
.aufruf .rahmen { position: relative; z-index: 1; }
.aufruf h2 { max-width: 16em; }
.aufruf p { color: #cfdbd3; max-width: 36em; }

/* Seitenkopf Unterseiten */
.seitenkopf { padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--tinte); }
.seitenkopf h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); max-width: 15em; }

/* Rechner */
.rechner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.rechner__eingabe { background: var(--weiss); border: 1px solid var(--linie); padding: 28px; }
.rechner__eingabe h2, .rechner__ergebnis h2 { font-size: 1.6rem; }
.regler { padding: 14px 0; border-top: 1px solid var(--linie); }
.regler__kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.regler label { font-weight: 500; font-size: .97rem; }
.regler output { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.regler small { display: block; color: var(--grau); font-size: .82rem; line-height: 1.4; margin-top: 4px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--gruen) var(--p, 50%), var(--papier-2) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 3px; background: var(--papier-2); }
input[type=range]::-moz-range-progress { height: 3px; background: var(--gruen); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--weiss); border: 2px solid var(--gruen); margin-top: -10px; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--weiss); border: 2px solid var(--gruen); }
.rechner details { border-top: 1px solid var(--linie); margin-top: 6px; }
.rechner details summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--gruen); }
select, input[type=text], input[type=email], input[type=tel], textarea {
  font: inherit; width: 100%; padding: 12px 14px; border: 1px solid rgba(20, 38, 31, .35); border-radius: 2px; background: var(--weiss); color: var(--tinte); }
textarea { min-height: 130px; resize: vertical; }
.rechner__ergebnis { position: sticky; top: 96px; }
.haupt { background: var(--gruen-tief); color: var(--papier); padding: 28px 30px; box-shadow: 12px 12px 0 var(--ziegel); margin-bottom: 30px; }
.haupt__label { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: #e8a48f; margin: 0 0 8px; }
.haupt__zahl { font-family: var(--serif); font-size: clamp(2.8rem, 6vw, 4.2rem); line-height: 1; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.haupt p:last-child { margin: 0; color: #cfdbd3; font-size: .95rem; }
.werte { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--tinte); margin: 0; }
.werte div { padding: 16px 14px 16px 0; border-bottom: 1px solid var(--linie); }
.werte div:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--linie); }
.werte dt { font-size: .85rem; color: var(--grau); line-height: 1.35; }
.werte dd { margin: 4px 0 0; font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.werte dd.minus { color: var(--ziegel); }
.diagramm { margin-top: 28px; background: var(--weiss); border: 1px solid var(--linie); padding: 20px 18px 12px; }
.diagramm h3 { font-family: var(--sans); font-size: .95rem; font-weight: 600; margin: 0 0 4px; }
.diagramm svg { width: 100%; height: auto; display: block; overflow: visible; }
.diagramm text { font-family: var(--sans); font-size: 11px; fill: var(--grau); }
.legende { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .85rem; color: var(--grau); margin: 0 0 8px; padding: 0; list-style: none; }
.legende i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 7px; }

/* Mini-Rechner Startseite */
.mini { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.mini__feld { background: var(--weiss); border: 1px solid var(--linie); padding: 26px 28px; color: var(--tinte); }
.mini__ergebnis { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 8px; border-top: 1px solid var(--tinte); }
.mini__ergebnis div { padding: 16px 0 4px; }
.mini__ergebnis div + div { padding-left: 18px; border-left: 1px solid var(--linie); }
.mini__ergebnis span { display: block; font-size: .85rem; color: var(--grau); }
.mini__ergebnis b { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mini__ergebnis .at b { color: var(--ziegel); }
.mini__ergebnis .de b { color: var(--gruen); }

/* Formular */
.formular { display: grid; gap: 18px; }
.formular label { display: block; font-weight: 500; font-size: .95rem; margin-bottom: 6px; }
.formular .zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.formular .zustimmung { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: .9rem; font-weight: 400; color: #2c3d35; }
.formular .zustimmung input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gruen); }
.formular__status { font-size: .95rem; color: var(--gruen); min-height: 1.5em; margin: 0; }

/* Rechtstexte */
.text { max-width: 46em; }
.text h2 { font-size: 1.7rem; margin-top: 1.6em; }
.entwurf { display: inline-block; background: var(--ziegel-hell); color: #6d2414; font-size: .82rem; font-weight: 600; padding: 4px 10px; margin-bottom: 18px; }

/* Fuß */
.fuss { background: var(--tinte); color: #c6d1ca; padding: 64px 0 28px; font-size: .95rem; }
.fuss__raster { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.fuss h2 { font-family: var(--sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--papier); margin-bottom: 14px; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin-bottom: 8px; }
.fuss a { color: #c6d1ca; text-decoration: none; }
.fuss a:hover { color: var(--papier); text-decoration: underline; }
.fuss__claim { font-family: var(--serif); font-size: 1.3rem; color: var(--papier); margin: 14px 0 18px; }
.fuss__hinweis { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(245, 240, 230, .16); font-size: .82rem; color: #8fa097; }
.fuss__hinweis p { max-width: 70em; margin: 0; }

/* Einblenden beim Scrollen */
.zeig { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.zeig.da { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero__raster, .raster2, .rechner, .mini { grid-template-columns: 1fr; }
  .rechner__ergebnis { position: static; }
  .raster3 { grid-template-columns: 1fr; }
  .raster3 > * { padding: 26px 0 6px; }
  .raster3 > * + * { border-left: 0; padding-left: 0; border-top: 1px solid var(--linie); }
  .abschnitt--dunkel .raster3 > * + * { border-top-color: rgba(245, 240, 230, .2); }
  .schritte li { grid-template-columns: 64px 1fr; }
  .schritte li p { grid-column: 2; }
  .schritte li::before { font-size: 2.2rem; }
  .fuss__raster { grid-template-columns: 1fr; }
  .kopf__menue { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--papier); border-bottom: 1px solid var(--tinte); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; }
  .nav.offen { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--linie); }
  .nav .nav__cta { margin-top: 14px; text-align: center; }
  .vergleich { box-shadow: 8px 8px 0 var(--gruen-tief); margin-right: 8px; }
  .haupt { box-shadow: 8px 8px 0 var(--ziegel); margin-right: 8px; }
}
@media (max-width: 620px) {
  .leiste__raster { grid-template-columns: 1fr; }
  .leiste__feld { padding: 22px 0; }
  .leiste__feld + .leiste__feld { border-left: 0; padding-left: 0; border-top: 1px solid var(--linie); }
  .formular .zwei, .werte { grid-template-columns: 1fr; }
  .werte div:nth-child(even) { padding-left: 0; border-left: 0; }
  .mini__ergebnis b { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .zeig { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Zahlen in der Groteskschrift: Bentham hat Mediävalziffern, die 0 liest sich dort wie ein „o“ */
.vergleich__zahl, .leiste__zahl, .haupt__zahl, .mini__ergebnis b, .schritte li::before {
  font-family: var(--sans); font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums lining-nums;
}
.vergleich__zahl { font-size: clamp(2.6rem, 5vw, 3.6rem); }
.leiste__zahl { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.haupt__zahl { font-size: clamp(2.4rem, 5vw, 3.5rem); }
.mini__ergebnis b { font-size: 1.9rem; }
.schritte li::before { font-size: 2.4rem; }

.abschnitt--dunkel a.btn--hell { color: var(--gruen-tief); }
