/* kontakt.css — /kontakt/ — das Anfrageformular trägt die Seite (Split 60/40) */

.kt-page {
  background: var(--warm);
  /* Formular-Töne.
     U11 K1: #FFFFFF gehoerte nicht zur Palette, der Feldgrund laeuft auf
     Cream. Der Rahmen bleibt bewusst auf 0.45 statt der im Brief genannten
     0.2: er ist seither das einzige Identifikationsmerkmal des Felds und
     traegt damit die 3:1 aus WCAG 1.4.11. Rechnung: task-11-report.md, K1. */
  --kt-field-bg: rgb(var(--cream-rgb));
  --kt-field-line: rgba(var(--ink-rgb), 0.45);
  --kt-field-line-strong: rgba(var(--ink-rgb), 0.62);
  --kt-label: #5A564F;
  --kt-error: #8C2626;
}

.kt-inner {
  max-width: var(--page-max);
  margin: 0 auto;
}

.kt-simple {
  /* Ein Fold-Start: H1 sitzt auf derselben Flucht wie die Photo-Hero-Typoblöcke.
     Kein voller Section-Spacer zwischen Headline und Formular, und unter dem
     letzten Block steht genau ein Pad-Token, dann der Footer (K6). */
  box-sizing: border-box;
  padding: var(--hero-pad-top) var(--hero-pad-x) var(--section-pad-y);
  /* Sticky-Nav darf die H1 beim Ankersprung #kontakt nicht ueberdecken. */
  scroll-margin-top: calc(var(--nav-h, 88px) + 16px);
}

/* Waka-Waka-Muster: Kopf und Formular tragen die linke Spalte, das Porträt
   steht rechts und beginnt auf derselben Flucht wie die H1. */
.kt-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.kt-head {
  margin-bottom: 24px;
}

.kt-head .sec-mark {
  color: var(--muted);
  margin-bottom: 18px;
}

.kt-head h1 {
  color: var(--ink);
  max-width: 24ch;
}

.kt-head h1 em {
  font-style: italic;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 300;
  color: var(--clay);
}

/* U11 K5: H1, Lead und Formular ergaben drei rechte Kanten in einer Spalte. */
.kt-lead {
  margin-top: 16px;
  max-width: 58ch;
  font-size: var(--type-body-1);
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* K5 ein Fill pro Fold: den traegt der Submit im Formular, der Header-CTA laeuft
   solange als Textlink, bis die Nav gescrollt auf Cream sitzt (dann wieder Fill). */
.kt-page-cream nav:not([data-scrolled="true"]) .navlinks .nav-cta {
  color: var(--ink);
  background: transparent;
  border-color: transparent;
  padding-inline: 8px;
}
.kt-page-cream nav:not([data-scrolled="true"]) .navlinks .nav-cta:hover,
.kt-page-cream nav:not([data-scrolled="true"]) .navlinks .nav-cta:focus-visible {
  color: var(--clay-contrast);
  background: transparent;
  border-color: transparent;
}

/* ---- Split: Formular links, Faktenspalte rechts ---- */
/* Foto und Fakten sind eigene Rasterkinder, damit die Reihenfolge auf dem
   Phone ueber `order` steuerbar bleibt, ohne die <aside>-Landmark per
   `display: contents` aufzuloesen. */
.kt-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  column-gap: 56px;
  row-gap: 24px;
  align-items: start;
}
.kt-split .kt-main { grid-column: 1; grid-row: 1 / span 2; }
.kt-split .kt-aside-photo { grid-column: 2; grid-row: 1; }
.kt-split .kt-aside { grid-column: 2; grid-row: 2; }

/* ---- Formularfläche ---- */
.kt-form-section {
  max-width: 760px;
  /* Sticky-Nav darf den Submit beim Ankersprung #anfrage nicht überdecken. */
  scroll-margin-top: calc(var(--nav-h, 88px) + 16px);
  padding: 40px;
  background: var(--cream);
  border: 1px solid var(--line);
}

.kt-split .kt-form-section {
  max-width: none;
  /* Kompakter Satz: Name, Kontakt, Nachricht, Consent und Submit stehen
     zusammen mit H1 und Lead im 1440x900-Fold (K7). */
  padding: 28px 30px 26px;
  display: flex;
  flex-direction: column;
  scroll-margin-top: calc(var(--nav-h, 88px) + 16px);
}

.kt-form-section > .uc { color: var(--muted); margin-bottom: 12px; }
.kt-form-section > h2 {
  letter-spacing: -0.025em;
}
.kt-form-section > p { margin-top: 12px; max-width: 56ch; color: var(--ink-soft); line-height: 1.6; }
.kt-form-section > h2 + .kt-form { margin-top: 28px; }

.kt-form { display: flex; flex-direction: column; gap: 16px; }
/* Im Split trägt das Textfeld die Resthöhe, damit die Formularfläche
   auf Fotohöhe endet, ohne toten Grund unter dem Hinweis. */
.kt-split .kt-form { flex: 1; }
.kt-split .kt-form-section:has(.kt-success) { background: rgb(var(--sand-rgb)); }
.kt-split .kt-field-message { flex: 1 1 auto; }
.kt-split .kt-success { flex: 1; }
.kt-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kt-field { display: grid; gap: 6px; }
.kt-field-message { grid-template-rows: auto minmax(120px, 1fr) auto; }

/* U11 K2: ein Feldlabel ist Bedienung, kein Etikett. Versalien in der
   Label-Sprache der Bildzeilen standen genau dort, wo der Nutzer tippt. */
.kt-field label {
  font-size: var(--type-body-2);
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 500;
  color: var(--ink-soft);
}

.kt-field input,
.kt-field textarea {
  width: 100%;
  padding: 10px 13px;
  font-size: var(--type-body-2);
  border: 1px solid var(--kt-field-line);
  border-radius: 2px;
  background: var(--kt-field-bg);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.25s ease;
}

.kt-field textarea {
  resize: vertical;
  /* Kompakte Mindesthöhe, damit der Submit im Fold bleibt (K7). */
  min-height: 120px;
  line-height: 1.55;
}

.kt-field input::placeholder,
.kt-field textarea::placeholder {
  color: #6E6A62;
}

.kt-field input:hover,
.kt-field textarea:hover { border-color: var(--kt-field-line-strong); }

.kt-field input:focus-visible,
.kt-field textarea:focus-visible,
.kt-consent input:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 1px;
  border-color: var(--clay-contrast);
}

.kt-field input[aria-invalid="true"],
.kt-field textarea[aria-invalid="true"] { border-color: var(--kt-error); }

/* Fehlermeldung unter dem Feld.
   U11: 13.5 px lag zwischen zwei Stufen der Skala. */
.kt-err {
  margin: 0;
  font-size: var(--type-body-2);
  line-height: 1.45;
  color: var(--kt-error);
}
.kt-err[hidden] { display: none; }
.kt-err-row { grid-column: 1 / -1; margin-top: -4px; }

.kt-consent-field { display: grid; gap: 6px; }
.kt-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--ink-soft);
  font-size: var(--type-body-2);
  line-height: 1.45;
  max-width: 64ch;
}
/* U9 R12: Checkbox und Label als Tap-Ziel, nicht als Haarkreuz. */
.kt-consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--clay-contrast); }
label.kt-consent { padding-block: 6px; }

/* Submit: dieselbe Primärfläche wie der Hero-Primär.
   U11: auf Feldbreite las sich der Knopf als Leiste, er traegt jetzt seine
   eigene Breite. `min()` statt fester 320 px, sonst ragt er unter 414 px aus
   der Karte (DE) bzw. unter 768 px (EN, schmalerer Innenraum). */
.kt-submit {
  width: auto;
  min-width: min(320px, 100%);
  align-self: start;
  justify-content: center;
  gap: 12px;
  padding: 14px 22px;
  margin-top: 2px;
}
.kt-submit:disabled { opacity: 0.6; cursor: wait; }

.kt-form-hint {
  margin: -4px 0 0;
  font-size: var(--type-body-2);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* U11: 14.5 px lag zwischen zwei Stufen der Skala. */
.kt-form-status { font-size: var(--type-body-2); line-height: 1.5; }
.kt-form-status:empty { display: none; }
.kt-form-status[data-state="success"] { color: #25633d; }
.kt-form-status[data-state="error"] { color: var(--kt-error); }
.kt-hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* Erfolgszustand ersetzt das Formular; die Fläche selbst ist die Karte,
   deshalb kein zweiter Rahmen und kein eigener Grund im Grund. */
.kt-success {
  display: grid;
  gap: 10px;
  align-content: center;
  min-height: 240px;
}
.kt-success:focus { outline: none; }
.kt-success-title {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 400;
  font-size: var(--type-h3);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.kt-success-text {
  font-size: var(--type-body-1);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ---- Faktenspalte rechts (Waka-Waka-Muster) ---- */
/* Das Porträt beginnt auf H1-Höhe im 4/5-Rahmen, darunter stehen die Fakten
   als Text. */
.kt-aside { align-self: start; }

.kt-aside-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  background: rgb(var(--sand-rgb));
}
/* U11 K6a: `center top` schnitt den Haaransatz an der Rahmenkante ab. */
.kt-aside-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 12%;
}

.kt-facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
/* U11 K7a: 8.5rem riss 80 px Luecke; 6rem traegt das laengste Label. */
.kt-fact {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  align-items: baseline;
  gap: 3px 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.kt-fact-label {
  /* U9: dasselbe Label-Bauteil wie .uc */
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--kt-label);
}
.kt-fact-value {
  font-size: var(--type-body-1);
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
}
a.kt-fact-value {
  border-bottom: 1px solid rgba(var(--clay-rgb), 0.5);
  padding-bottom: 1px;
  justify-self: start;
  transition: border-color 0.3s ease, color 0.3s ease;
}
a.kt-fact-value:hover { color: var(--clay-contrast); border-bottom-color: var(--clay); }
a.kt-fact-value:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
.kt-fact-value.kt-fact-plain { color: var(--ink-soft); }
/* U11 K7b: die Zahlen von Telefon und Adresse stehen untereinander und
   brauchen dieselbe Flucht wie ueberall sonst (.mono-num). */
.kt-fact .kt-fact-value.mono-num,
.kt-fact .kt-fact-value.kt-fact-plain {
  font-family: "Geist Mono", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  font-size: var(--type-body-2);
}
/* Die Adresse ist der einzige Fakt ohne Ziel. Ein Kartenlink kam bewusst
   nicht dazu (externer Dienst, ausserhalb des Scope); die Unterlinie der
   beiden Links bleibt und macht den Unterschied sichtbar. */

/* ---- Was danach passiert, direkt unter dem Formular ---- */
.kt-danach { margin-top: var(--section-pad-y); }
.kt-danach-h2 {
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 22px;
}
/* U11 K10: ein Muster fuer beide Seiten, Linie je Kachel wie .bb-step. */
.kt-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.kt-step {
  display: grid;
  gap: 10px;
  align-content: start;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.kt-step-num {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 500;
  color: var(--clay-contrast);
}
.kt-step p {
  margin: 0;
  font-size: var(--type-body-1);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* Termin 02.10.2026: Anruf als Hauptaktion ueber dem Formular, Formular bleibt zweiter Weg. */
.kt-call-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}
@media (max-width: 640px) {
  .kt-call-row { flex-direction: column; align-items: stretch; }
  .kt-call-row .btn-premium { justify-content: space-between; }
  .kt-call-row .btn-text { align-self: flex-start; }
}

/* ---- Karten: nur noch /en/contact/ (EN eingefroren) ---- */
.kt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.kt-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 28px 28px 24px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 2px;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.kt-card:hover,
.kt-card:focus-visible {
  border-color: rgba(var(--clay-rgb), 0.45);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(var(--ink-rgb), 0.06);
}

.kt-card:focus-visible {
  outline: 1px solid rgba(var(--clay-rgb), 0.55);
  outline-offset: 4px;
}

.kt-card-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.kt-card-primary .kt-card-label,
.kt-card-primary .kt-card-note {
  color: rgba(var(--cream-rgb), 0.72);
}

.kt-card-primary .kt-card-value { color: var(--cream); }

.kt-card-primary .kt-card-action {
  color: var(--clay-light);
  border-color: rgba(var(--cream-rgb), 0.35);
}

.kt-card-primary:hover,
.kt-card-primary:focus-visible { border-color: var(--clay-light); }

.kt-card-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}

.kt-card-value {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 500;
  font-size: var(--type-h3);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.kt-card-note {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 36ch;
}

.kt-card-action {
  margin-top: auto;
  padding-top: 18px;
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--clay);
  padding-bottom: 2px;
}

.kt-grid + .kt-form-section { margin-top: 64px; }

@media (max-width: 1024px) {
  .kt-split { gap: 36px; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr); }
  .kt-split .kt-form-section { padding: 26px 26px 24px; }
  .kt-fact { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  /* Mobil: H1, Lead, Formular mit Submit zuerst, danach das Foto vollbreit. */
  /* U11: einspaltig steht das Foto vor dem Formular, die Fakten dahinter. */
  .kt-split { grid-template-columns: 1fr; row-gap: 32px; }
  .kt-split .kt-main,
  .kt-split .kt-aside-photo,
  .kt-split .kt-aside { grid-column: 1; grid-row: auto; }
  .kt-split .kt-aside-photo { order: -1; }
  .kt-simple {
    padding: var(--hero-pad-top) var(--page-pad-mobile) var(--section-pad-y-mobile);
  }
  .kt-head { margin-bottom: 22px; }
  .kt-head h1 { max-width: none; }
  .kt-split .kt-form-section { padding: 22px 20px; display: block; }
  .kt-form-section { margin-top: 0; }
  .kt-form-row { grid-template-columns: 1fr; }
  .kt-err-row { margin-top: -8px; }
  .kt-success { min-height: 0; padding: 28px 22px; }
  /* U11 K6b: das Foto lief per negativem Margin vollbleed zwischen zwei
     eingerueckten Bloecken. */
  .kt-aside-photo {
    max-width: none;
    margin-inline: 0;
    border-radius: 2px;
  }
  .kt-aside-photo img { aspect-ratio: 4 / 5; }
  .kt-fact { grid-template-columns: 1fr; }
  .kt-danach { margin-top: var(--section-pad-y-mobile); }
  .kt-steps { grid-template-columns: 1fr; gap: 0; }
  /* U11 K10: einspaltig lagen Ober- und Unterlinie doppelt uebereinander. */
  .kt-step { padding: 16px 0; border-bottom: 0; }
  .kt-grid { grid-template-columns: 1fr; gap: 14px; }
  .kt-card { padding: 22px 22px 20px; }
  .kt-grid + .kt-form-section { margin-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .kt-card,
  .kt-field input,
  .kt-field textarea,
  a.kt-fact-value { transition: none; }
}

/* U9 R12: Tap-Ziel 44 px fuer Inline-Links im Fliesstext. padding-block
   vergroessert die Klickflaeche, margin-block nimmt denselben Betrag wieder aus
   der Zeilenbox: die Zeile rueckt keinen Pixel, der Daumen trifft trotzdem. */
@media (max-width: 640px) {
  .kt-fact a.kt-fact-value {
    display: inline-block;
    padding-block: 10px;
    margin-block: -10px;
    min-height: 44px;
    /* Unterlaenge am Text statt am gepolsterten Kasten. */
    border-bottom: 0;
    padding-bottom: 10px;
    text-decoration: underline;
    text-decoration-color: rgba(var(--clay-rgb), 0.5);
    text-underline-offset: 0.2em;
  }
  .kt-fact a.kt-fact-value:hover { text-decoration-color: var(--clay); }
}
