/* ==========================================================================
   Karlheim – Die Gutachter
   Responsives Stylesheet, ersetzt den Adobe-Muse-Export.
   Keine separate /phone-Version mehr: ein Layout von 320px bis Desktop.
   ========================================================================== */

/* --- Schriften ------------------------------------------------------------
   Achtung: Muse hat die 500er-Datei als Gewicht 400 eingebunden. Diese
   Zuordnung ist bewusst beibehalten, damit die Optik identisch bleibt.      */

@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/open-sans-v29-latin-300.woff') format('woff');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/open-sans-v29-latin-500.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/open-sans-v29-latin-700.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* --- Design-Tokens -------------------------------------------------------- */

:root {
  --mint:         #35D3B3;
  --mint-alt:     #2BD3B1;
  --mint-pale:    #C5F4EB;
  --teal:         #2A908B;
  --teal-dark:    #1E9B82;
  --blue:         #1A6E9B;
  --blue-bar:     #427C9B;
  --grey-text:    #7F7F7F;
  --grey-soft:    #6B6B6B;
  --grey-bg:      #EFEFEF;
  --grey-line:    #C4C4C4;
  --input-bg:     #F2F2F2;
  --footer-veil:  rgba(75, 75, 75, .9);
  --link-muted:   #C0C0C0;

  --page:    1200px;   /* Seitenbreite wie im Muse-Dokument */
  --gutter:    30px;   /* Innenabstand links/rechts        */
  --header-h:  148px;  /* Logo-Zeile + Navigation          */

  --font: 'Open Sans', 'Segoe UI', Arial, Helvetica, sans-serif;
}

/* --- Reset ---------------------------------------------------------------- */

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 15px;
  line-height: 21px;
  color: #000;
  background: #fff;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p  { margin: 0 0 21px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 21px; padding-left: 21px; }
ul:last-child, ol:last-child { margin-bottom: 0; }
li { margin-bottom: 10px; }
li::marker { color: var(--mint); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--grey-text); }

hr { border: 0; border-top: 3px solid var(--mint); margin: 0; }

/* --- Layout --------------------------------------------------------------- */

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

.band { padding: 60px 0; }            /* voller Streifen, Farbe per Modifier */
.band--mint  { background: var(--mint); color: #fff; }
.band--pale  { background: var(--mint-pale); }
.band--grey  { background: var(--grey-bg); }
.band--tight { padding: 40px 0; }
.band--sub   { padding: 36px 0 76px; }   /* Unterseiten unter dem Farbstreifen */
.band--legal { padding: 52px 0 80px; }   /* Impressum, Datenschutz, AGB       */

/* Zweispaltiges Inhaltsraster: Fließtext + schmale Info-Spalte ------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 750fr) minmax(0, 359fr);
  gap: 31px;
  align-items: start;
}

/* --- Kopfbereich ---------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 40;
  background: #fff;
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
}

.site-header__logo img { width: 433px; max-width: 100%; }

.site-header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 300;
  line-height: 30px;
  color: var(--grey-text);
  white-space: nowrap;
}
.site-header__phone svg { width: 18px; height: 26px; fill: currentColor; flex: none; }
.site-header__phone:hover { color: var(--mint); }

.site-header__rule { margin-top: 7px; }

/* Navigation -------------------------------------------------------------- */

.nav { position: relative; }

.nav__toggle {
  display: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: 18px;
  color: var(--grey-text);
  cursor: pointer;
}
.nav__toggle svg { width: 24px; height: 18px; stroke: currentColor; stroke-width: 2; }

.nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 31px;
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
}
.nav__list > li { margin: 0; }

.nav__link {
  display: block;
  padding: 8px 0 16px;
  font-size: 18px;
  line-height: 24px;
  color: var(--grey-text);
  white-space: nowrap;
}
.nav__link:hover,
.nav__item:hover > .nav__link { color: var(--mint); }
.nav__link[aria-current="page"] { color: var(--mint-alt); font-weight: 700; }

/* Untermenü „Gutachten" */
.nav__item { position: relative; }
.nav__sub {
  position: absolute;
  top: 100%;
  left: -14px;
  min-width: 284px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav__item:hover > .nav__sub,
.nav__item:focus-within > .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__sub > li { margin: 0; }
.nav__sub a {
  display: block;
  padding: 10px 14px 12px;
  font-size: 18px;
  line-height: 20px;
  color: var(--grey-text);
  transition: background .18s ease, color .18s ease;
}
.nav__sub a:hover { background: var(--mint); color: #fff; }

/* --- Bühne / Slideshow ---------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: #d9dde0;
}
.hero__slides { position: relative; }
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
}
.hero__slide:first-child { position: relative; }
.hero__slide.is-active { opacity: 1; z-index: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.hero__caption-area {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.hero__caption-area .wrap { height: 100%; position: relative; }

.hero__caption {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: min(561px, 100%);
  padding: 24px 30px 28px;
  background: rgba(26, 110, 155, .85);
  color: #fff;
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: auto;
}
.hero__caption.is-active { opacity: 1; }
.hero__caption p { font-size: 20px; line-height: 28px; font-weight: 300; margin-bottom: 16px; }
.hero__caption p:last-child { margin-bottom: 0; }

.hero__nav {
  position: absolute;
  z-index: 3;
  bottom: 24px;
  display: flex;
  gap: 20px;
  pointer-events: auto;
}
.hero__nav button {
  width: 44px; height: 60px;
  background: none;
  border: 0;
  color: #fff;
  font: 300 50px/60px var(--font);
  cursor: pointer;
  opacity: .85;
}
.hero__nav button:hover { opacity: 1; }

/* Schmaler Farbstreifen mit Seitentitel (Unterseiten) */
.pagehead { background: var(--mint-pale); padding: 74px 0 62px; }
.pagehead h1 { font-size: 35px; line-height: 42px; }

/* --- Typografie-Bausteine ------------------------------------------------- */

.t-h1  { font-size: 35px; line-height: 39px; }
.t-h2  { font-size: 42px; line-height: 46px; }
.t-h3  { font-size: 25px; line-height: 28px; color: var(--teal); }
.t-h4  { font-size: 29px; line-height: 32px; }
.t-lead{ font-size: 15px; line-height: 21px; }
.t-mint  { color: var(--mint); }
.t-white { color: #fff; }
.t-small { font-size: 12px; line-height: 16px; color: #464646; }

.prose h1 { font-size: 35px; line-height: 39px; margin: 0 0 26px; }
.prose h2 { font-size: 27px; line-height: 32px; margin: 34px 0 14px; clear: left; }
.prose h3 { font-size: 20px; line-height: 26px; font-weight: 700; margin: 28px 0 12px; }
.prose > :first-child { margin-top: 0; }
.prose img { margin: 34px 0; width: 100%; }
.prose > img:first-child { margin-top: 0; }

/* Bild im Fließtext: links umflossen wie im Original */
.prose img.is-inline {
  float: left;
  width: auto;
  max-width: 48%;
  margin: 4px 30px 20px 0;
}
.prose img.is-inline + p { margin-top: 0; }
.prose::after { content: ''; display: block; clear: both; }

/* Rechtstexte: schmaler Satzspiegel, engere Absätze */
.prose--legal { max-width: 750px; margin-top: 34px; font-size: 16px; line-height: 21px; }
.prose--legal p { margin-bottom: 16px; }
.prose--legal h2 { font-size: 20px; line-height: 26px; font-weight: 700; margin: 34px 0 12px; }
.prose--legal h3 { font-size: 16px; line-height: 21px; font-weight: 700; margin: 22px 0 6px; }
.prose--legal a { color: var(--teal); text-decoration: underline; }
/* Lange URLs in den Rechtstexten dürfen umbrechen */
.prose--legal { overflow-wrap: anywhere; word-break: break-word; }
.prose a { color: var(--teal); }
.prose a:hover { color: var(--mint); }

/* Fließtext auf dem Mint-Streifen */
.prose--onmint, .prose--onmint h1, .prose--onmint h2 { color: #fff; }
.prose--onmint li::marker { color: #fff; }
.prose--onmint a { color: #fff; text-decoration: underline; }

/* --- Info-Karten in der schmalen Spalte ----------------------------------- */

.card {
  padding: 20px 22px 24px;
  border: 1px solid var(--mint);
}
.card + .card { margin-top: 37px; }
.card__title { font-size: 27px; line-height: 32px; color: var(--mint); margin-bottom: 12px; }
.card ul { padding-left: 18px; }
.card li { font-size: 15px; line-height: 20px; }

.card--filled {
  background: var(--mint);
  border-color: var(--mint-alt);
}
.card--filled .card__title { color: #fff; }
.card--filled li::marker { color: #fff; }

/* Weiße Box im Mint-Streifen („Karlheim bietet:") */
.card--onmint { background: transparent; border-color: #fff; }
.card--onmint .card__title { color: #fff; }
.card--onmint,
.card--onmint a { color: #000; }
.card--onmint li::marker { color: #fff; }

/* --- Leistungs-Kacheln ---------------------------------------------------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 30px;
  margin-top: 46px;
}

.tile { display: flex; flex-direction: column; }
.tile__img { aspect-ratio: 360 / 240; overflow: hidden; }
.tile__img img { width: 100%; height: 100%; object-fit: cover; }
.tile__title {
  margin: 26px 0 14px;
  font-size: 25px;
  line-height: 28px;
  color: var(--teal);
}
.tile__title a:hover { color: var(--mint); }
.tile__text { flex: 1 1 auto; font-size: 15px; line-height: 21px; }

.btn-ghost {
  display: block;
  margin-top: 24px;
  padding: 4px 10px;
  border: 1px solid var(--link-muted);
  font-size: 20px;
  line-height: 26px;
  text-align: center;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-ghost:hover { background: var(--mint); border-color: var(--mint); color: #fff; }

/* Blaue Aktions-Kachel („Online-Check") */
.tile--promo {
  background: var(--blue);
  color: #fff;
  padding-bottom: 24px;
}
.tile--promo .tile__title,
.tile--promo .tile__text,
.tile--promo .btn-solid { margin-inline: 24px; }
.tile--promo .tile__title { color: #fff; }

.btn-solid {
  display: block;
  margin-top: 24px;
  padding: 9px 14px;
  background: var(--mint-alt);
  color: #000;
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  text-align: center;
  transition: background .2s ease, color .2s ease;
}
.btn-solid:hover { background: #fff; color: var(--blue); }

/* --- Kundenlogos ---------------------------------------------------------- */

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 34px 30px;
  margin-top: 46px;
}
.logos img {
  flex: 0 0 calc((100% - 6 * 30px) / 7);
  max-height: 110px;
  width: auto;
  max-width: calc((100% - 6 * 30px) / 7);
  object-fit: contain;
  margin-inline: auto;
}

/* --- Team ----------------------------------------------------------------- */

.team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 60px 66px;
  margin-top: 40px;
}
.person__name { font-size: 29px; line-height: 32px; margin-bottom: 18px; }
.person__body { display: grid; grid-template-columns: 263px minmax(0, 1fr); gap: 22px; }
.person__photo img { width: 100%; }
.person__role { font-size: 18px; line-height: 20px; color: var(--mint); margin-bottom: 10px; }
.person__mail { font-size: 15px; line-height: 22px; margin-bottom: 16px; }
.person__mail b { color: var(--mint); font-size: 17px; font-weight: 700; margin-right: 6px; }
.person ul { padding-left: 16px; }
.person li { font-size: 14px; line-height: 18px; margin-bottom: 8px; }
.person__note { margin-top: 22px; font-size: 12px; line-height: 16px; color: #464646; text-transform: uppercase; }

/* --- „Was uns ausmacht" – Icon-Reihe -------------------------------------- */

/* Förderungen auf „Über uns" */
.support { display: grid; grid-template-columns: minmax(0, 749fr) minmax(0, 361fr); gap: 30px; align-items: start; }
.support + .support { margin-top: 54px; }
.support__img img { width: 100%; }

.usps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  margin-top: 56px;
  text-align: center;
}
.usps img { width: 80px; height: 80px; margin: 0 auto 26px; }
.usps p { font-size: 16px; line-height: 21px; }

/* --- Fußbereich ----------------------------------------------------------- */

.site-footer { position: relative; color: #fff; }

.site-footer__info {
  position: relative;
  min-height: 480px;
  padding: 58px 0 70px;
  background-image: url('../../images/shutterstock_137746490.jpg');
  background-size: cover;
  background-position: center;
}
.site-footer__info::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--footer-veil);
}
.site-footer__info > * { position: relative; }

.site-footer__cols {
  display: grid;
  grid-template-columns: 1.55fr 1fr 1fr 1fr;
  gap: 30px;
}
.site-footer__logo img { width: 337px; max-width: 100%; margin-bottom: 22px; }
.site-footer__address { font-size: 18px; line-height: 25px; font-weight: 300; }

.site-footer h2 { font-size: 22px; line-height: 31px; font-weight: 300; margin-bottom: 20px; }
.site-footer dt { font-size: 18px; line-height: 25px; font-weight: 300; color: var(--mint); }
.site-footer dd { margin: 0 0 22px; font-size: 18px; line-height: 25px; font-weight: 300; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 11px; }
.site-footer ul a { font-size: 18px; line-height: 25px; font-weight: 300; color: var(--link-muted); }
.site-footer ul a:hover { color: #fff; }

/* Karte + darüberliegendes Kontaktformular */
.site-footer__map { position: relative; }
.site-footer__map iframe { display: block; width: 100%; height: 480px; border: 0; }

.contact-panel {
  background: rgba(53, 211, 179, .9);
  padding: 26px 30px 28px;
}
.contact-panel h2 { font-size: 40px; line-height: 44px; font-weight: 300; margin-bottom: 16px; }

@media (min-width: 1001px) {
  .site-footer__map .wrap {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    pointer-events: none;
  }
  .contact-panel { width: 518px; margin-top: -100px; pointer-events: auto; }
}

.site-footer__bar { background: var(--blue-bar); }
.site-footer__bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 30px;
  min-height: 60px;
  padding-block: 12px;
  font-size: 16px;
  line-height: 21px;
  font-weight: 300;
}
.site-footer__bar b { font-size: 14px; line-height: 20px; font-weight: 700; }
.site-footer__bar .heart { color: var(--mint); }
.site-footer__bar a:hover { color: var(--mint); }

/* --- Formular ------------------------------------------------------------- */

.field { margin-bottom: 12px; }
.field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  line-height: 18px;
  font-weight: 300;
  color: var(--grey-soft);
}
.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  padding: 6px 8px;
  background: var(--input-bg);
  border: 1px solid var(--grey-line);
  border-radius: 0;
  font: 400 15px/20px var(--font);
  color: #000;
  -webkit-appearance: none;
}
.field textarea { height: 104px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--grey-line); font-style: italic; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

.field--check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
}
.field--check input { width: 18px; height: 18px; flex: none; accent-color: var(--blue); }
.field--check label { margin: 0; font-size: 18px; line-height: 22px; color: #000; }
.field--check a { text-decoration: underline; }

.btn-submit {
  padding: 8px 26px;
  background: var(--input-bg);
  border: 1px solid var(--grey-line);
  font: 400 18px/24px var(--font);
  text-transform: uppercase;
  color: #000;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.btn-submit:hover { background: #fff; }
.btn-submit[disabled] { opacity: .6; cursor: default; }

.form-status { margin-top: 10px; font-size: 14px; line-height: 20px; min-height: 20px; }
.form-status[data-state="error"]   { color: #7d0018; font-weight: 700; }
.form-status[data-state="success"] { color: #08411f; font-weight: 700; }

/* Kontaktseite: Formular über die volle Breite */
.contact-page__form { max-width: 813px; }
.contact-page__form .btn-submit { background: #fff; }

/* --- Hilfsklassen --------------------------------------------------------- */

.to-top { margin-left: auto; text-decoration: underline; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 10px 16px; background: var(--mint); color: #fff;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Breakpoints
   ========================================================================== */

/* Tablet quer und schmaler Desktop ---------------------------------------- */
@media (max-width: 1180px) {
  .nav__list { gap: 0 18px; }
  .nav__link { font-size: 17px; }
  .site-header__logo img { width: 360px; }
}

/* Ab hier klappt die Navigation zum Menü, Spalten stapeln ------------------ */
@media (max-width: 1000px) {
  :root { --gutter: 24px; }

  .nav__toggle { display: flex; }
  .nav__list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 0 12px;
    border-top: 1px solid var(--grey-bg);
  }
  .nav.is-open .nav__list { display: flex; }
  .nav__link { padding: 12px 0; font-size: 18px; }
  .nav__sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    min-width: 0;
    padding-left: 18px;
    border-left: 2px solid var(--mint-pale);
  }
  .nav__sub a { padding: 10px 0; }
  .nav__sub a:hover { background: none; color: var(--mint); }

  .split { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 46px 26px; }
  .team  { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .logos { gap: 30px 26px; }
  .logos img { flex-basis: calc((100% - 3 * 26px) / 4); max-width: calc((100% - 3 * 26px) / 4); }
  .support { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .usps  { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 30px; }

  .site-footer__info { min-height: 0; }
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 30px; }
  .site-footer__map iframe { height: 340px; }
  .contact-panel { margin-top: 0; }

  .hero__caption { position: static; transform: none; width: 100%; }
  .hero__caption:not(.is-active) { display: none; }
  .hero__caption-area { position: static; }
  .hero__caption-area .wrap { position: relative; padding: 0; max-width: none; }
  .hero__nav { top: auto; bottom: 10px; right: var(--gutter); }
  .hero__nav button { width: 36px; height: 44px; font-size: 34px; line-height: 44px; }
}

/* Telefon ------------------------------------------------------------------ */
@media (max-width: 640px) {
  :root { --gutter: 18px; }

  body { font-size: 15px; }

  .site-header__top { flex-wrap: wrap; row-gap: 10px; }
  .site-header__logo img { width: 240px; }
  .site-header__phone { font-size: 19px; }

  .band { padding: 40px 0; }
  .pagehead { padding: 34px 0 30px; }
  .pagehead h1 { font-size: 26px; line-height: 32px; }

  .t-h1, .prose h1 { font-size: 26px; line-height: 32px; }
  .prose h2 { font-size: 22px; line-height: 27px; }
  .t-h2 { font-size: 30px; line-height: 34px; }
  .t-h3 { font-size: 22px; line-height: 26px; }
  .t-h4 { font-size: 24px; line-height: 28px; }

  .tiles { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .logos { gap: 24px 20px; }
  .logos img { flex-basis: calc((100% - 2 * 20px) / 3); max-width: calc((100% - 2 * 20px) / 3); max-height: 66px; }
  .usps  { grid-template-columns: minmax(0, 1fr); }

  .person__body { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .person__photo img { max-width: 263px; }

  .prose img.is-inline { float: none; max-width: 100%; width: 100%; margin: 24px 0; }

  .hero__caption p { font-size: 17px; line-height: 24px; }
  .hero__caption { padding: 20px var(--gutter) 22px; }

  .site-footer__cols { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .site-footer__info { padding: 40px 0 44px; }
  .contact-panel { padding: 26px var(--gutter) 30px; }
  .contact-panel h2 { font-size: 30px; line-height: 34px; }
  .site-footer__bar .wrap { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
