/* page-kontakt.css - nur seitenspezifische Ergänzungen für /kontakt.
   Hero, Breadcrumb, Section, Eyebrow und Container kommen aus lociv.css +
   markenstory.css. Hier: Formularkarte, Felder, Anliegen-Auswahl, Fehlerdarstellung,
   Seitenspalte. Mobile First, nur CI-Tokens - mit einer Ausnahme: Die CI kennt keine
   Fehlerfarbe, deshalb steht sie unten als Seiten-Token (--form-error). */

body.page-contact main { flex: 1; }

.page-contact {
  /* Fehlerrot: 6,6:1 auf Weiß (WCAG AA für Fließtext). Nicht in der CI definiert. */
  --form-error: #B42318;
}

/* ─── Hero kompakter: Das Formular soll früh im Blick sein ─────────── */
.page-contact .hero { padding: 16px 0 40px; }
.page-contact .hero > .container { padding-top: 24px; padding-bottom: 8px; }
.page-contact .hero-wordmark {
  font-size: clamp(2.6rem, 9vw, 4rem);      /* CI: H1 höchstens 4,0rem */
  line-height: 1.02;
  margin-bottom: 22px;
}
.page-contact .hero-claim { margin-bottom: 0; }
@media (min-width: 801px) {
  .page-contact .hero { padding: 32px 0 64px; }
  .page-contact .hero > .container { padding-top: 48px; padding-bottom: 16px; }
}

/* ─── Layout: Formular + Seitenspalte ─────────────────────────────── */
.page-contact .contact-section { padding: 32px 0 64px; }
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
@media (min-width: 801px) {
  .page-contact .contact-section { padding: 64px 0 100px; }
}
@media (min-width: 980px) {
  .contact-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
}
/* Mitlaufen nur, wenn die Seitenspalte ganz in den Bildschirm passt - sonst bliebe ihr
   unteres Ende auf kleinen Laptops (1366x650) bis zum Formularende verdeckt. */
@media (min-width: 980px) and (min-height: 820px) {
  .contact-aside { position: sticky; top: 104px; }
}

/* Die Scroll-Einblendung aus markenstory.css (section h2, section .eyebrow) nicht in Karte
   und Seitenspalte: Dort verschob sie Überschriften und ignorierte „reduzierte Bewegung". */
.contact-card h2,
.contact-card h3,
.contact-card .eyebrow,
.contact-aside h2 { animation: none; }
/* Container-Padding auf kleinen Schirmen an den Seitenrand der übrigen Seiten angleichen */
@media (max-width: 640px) {
  .page-contact .contact-section > .container { padding: 0 16px; }
}

/* ─── Formularkarte ────────────────────────────────────────────────── */
.contact-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 28px 20px 24px;
  font-family: var(--font-ui);
  color: var(--text-body);
  overflow: hidden;
}
.contact-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--civic-gradient-h);
}
@media (min-width: 641px) {
  .contact-card { padding: 40px 40px 36px; }
}

/* Auf weißem Grund ist der globale Lime-Fokusrahmen (1,2:1) unsichtbar -
   in der Karte trägt ihn Civic Blue Deep (6,8:1). */
.contact-card :focus-visible {
  outline: 3px solid var(--civic-blue-deep);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Civic Blue ist auf Weiß für Fließtextgröße zu schwach (4,23:1) */
/* Nur Textlinks - Buttons behalten ihre eigene Schrift (auf Lime immer Neutral Black). */
.contact-card a:not(.btn) { color: var(--civic-blue-deep); text-decoration-color: rgba(48, 73, 216, 0.4); }
.contact-card a:not(.btn):hover { text-decoration-color: currentColor; }

.contact-card h2 {
  font-size: var(--fs-2xl);
  line-height: 1.25;
  margin: 0 0 8px;
  max-width: none;
}
.contact-card-intro {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
}

/* ─── Formular ─────────────────────────────────────────────────────── */
.contact-form {
  display: grid;
  gap: 26px;
  margin-top: 28px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.field label,
.field legend {
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.4;
}
.field-optional { font-weight: 400; color: var(--text-muted); }
.field-hint {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: var(--fs-md);               /* mind. 16 px - verhindert das Hineinzoomen auf iOS */
  line-height: 1.45;
  color: var(--text-strong);
  background: var(--white);
  border: 1.5px solid var(--text-soft);  /* 3,17:1 - Rahmen von Bedienelementen brauchen 3:1 */
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.field textarea { min-height: 180px; resize: vertical; }
.field input:hover,
.field textarea:hover { border-color: var(--text-muted); }
/* Fokus nur für Textfelder hier - Radio und Checkbox behalten den Rahmen aus
   .contact-card :focus-visible. Gilt ausdrücklich auch im Fehlerzustand, sonst bliebe
   der rote Rahmen stehen und der Fokus wäre kaum zu erkennen. */
.field input:is([type="text"], [type="email"], [type="tel"]):focus-visible,
.field textarea:focus-visible,
.field.has-error input:is([type="text"], [type="email"], [type="tel"]):focus-visible,
.field.has-error textarea:focus-visible {
  border-color: var(--civic-blue-deep);
  outline: 2px solid var(--civic-blue-deep);
  outline-offset: 2px;
}

/* ─── Anliegen: drei Auswahlkarten mit echten Radio-Buttons ─────────── */
/* Bewusst untereinander: Nebeneinander wurden die Karten in der Formularspalte so schmal,
   dass die Erläuterungen über bis zu acht Zeilen liefen. */
.field--topics legend { padding: 0; margin-bottom: 10px; }
.topic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.field .topic-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1.5px solid var(--border-1);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
.field .topic-option:hover { border-color: var(--text-soft); }
.field .topic-option:has(input:checked) {
  border-color: var(--civic-blue-deep);
  background: rgba(98, 112, 229, 0.07);
  box-shadow: inset 0 0 0 1px var(--civic-blue-deep);
}
.topic-option input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--civic-blue-deep);
  cursor: pointer;
}
.topic-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.topic-title { font-weight: 600; color: var(--text-strong); line-height: 1.35; }
.topic-hint { font-size: var(--fs-sm); line-height: 1.45; color: var(--text-muted); }

/* ─── Einwilligung ─────────────────────────────────────────────────── */
.consent-note {
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text-body);
  margin: 0 0 4px;
}
.consent-check { display: flex; gap: 12px; align-items: flex-start; }
.consent-check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--civic-blue-deep);
  cursor: pointer;
}
.field .consent-check label {
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-body);
  cursor: pointer;
}

/* ─── Fehler: Text + Randmarke, nie nur über die Farbe ─────────────── */
.field.has-error {
  padding-left: 14px;
  border-left: 4px solid var(--form-error);
}
.field.has-error input[type="text"],
.field.has-error input[type="email"],
.field.has-error input[type="tel"],
.field.has-error textarea {
  border-color: var(--form-error);
  border-width: 2px;
}
.field-error {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.45;
  color: var(--form-error);
  margin: 0;
}

.form-summary {
  margin-top: 24px;
  padding: 18px 20px;
  border: 3px solid var(--form-error);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.form-summary h3 {
  font-size: var(--fs-lg);
  line-height: 1.35;
  margin: 0 0 8px;
}
.form-summary p { font-size: var(--fs-sm); line-height: 1.55; margin: 0 0 8px; }
.form-summary p:last-child { margin-bottom: 0; }
.form-summary ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.form-summary li { font-size: var(--fs-sm); line-height: 1.5; }
.contact-card .form-summary a { color: var(--form-error); font-weight: 600; text-decoration-color: currentColor; }
.form-summary:focus { outline: 3px solid var(--civic-blue-deep); outline-offset: 3px; }

/* ─── Absenden ─────────────────────────────────────────────────────── */
.contact-submit-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding-top: 4px;
}
@media (min-width: 641px) {
  .contact-submit-row { flex-direction: row; align-items: center; gap: 20px; }
}
.contact-submit { flex: none; justify-content: center; white-space: nowrap; }
/* Sendezustand ohne Transparenz: Die Schrift bleibt Neutral Black auf Lime, der Text
   „Wird gesendet …" zeigt den Zustand. */
.contact-submit[aria-disabled="true"],
.contact-submit[aria-disabled="true"]:hover { cursor: progress; transform: none; box-shadow: none; }
.contact-submit-note {
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

/* Prüffeld gegen Programme - aus dem sichtbaren Bereich geschoben, nicht display:none,
   weil manche Programme ausgeblendete Felder bewusst auslassen. */
.contact-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─── Bestätigung und Ausweichhinweis ─────────────────────────────── */
.contact-success .eyebrow { margin-bottom: 12px; color: var(--civic-blue-deep); }
.contact-success h2:focus,
.contact-unavailable h2:focus { outline: none; }
.contact-success p,
.contact-unavailable p { font-size: var(--fs-md); line-height: 1.65; margin: 12px 0 0; }
.contact-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.contact-lost-label {
  display: block;
  margin: 20px 0 6px;
  font-weight: 600;
  color: var(--text-strong);
}
.contact-lost {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-strong);
  background: var(--surface-1);
  border: 1.5px solid var(--text-soft);
  border-radius: var(--radius-sm);
  resize: vertical;
}

/* ─── Seitenspalte: dunkle Karten ──────────────────────────────────── */
.contact-aside { display: grid; gap: 20px; }
.contact-aside-block {
  background-color: var(--deep-bg);
  background-image: linear-gradient(135deg, var(--deep-bg-soft) 0%, var(--deep-bg) 100%);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 24px 22px;
  font-family: var(--font-ui);
  color: rgba(255, 255, 255, 0.82);
}
.contact-aside .contact-aside-title {
  font-size: var(--fs-lg);
  line-height: 1.3;
  color: var(--white);
  margin: 0 0 16px;
  max-width: none;
}
.contact-facts { display: grid; gap: 16px; margin: 0; }
.contact-facts dt {
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--civic-blue-pale);
}
.contact-facts dd {
  margin: 4px 0 0;
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--white);
  overflow-wrap: anywhere;
}
.contact-aside a { color: var(--civic-lime); text-decoration-color: rgba(208, 249, 98, 0.4); }
.contact-aside a:hover { color: var(--civic-lime); text-decoration-color: currentColor; }

.contact-steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
}
.contact-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.contact-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--civic-lime);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--civic-lime);
}
.contact-steps strong { display: block; color: var(--white); font-weight: 600; }
