/* ==========================================================================
   velolab — Mehrstufiges Kontaktformular („Konfigurator-Dialog")
   Manufaktur-Look: PP Telegraf + Montserrat, Schwarz/Weiß, Linien statt Kästen
   ========================================================================== */

.kf {
  --kf-ink: #1a1a17;
  --kf-mute: #75756e;
  --kf-line: #e4e4de;
  --kf-bg: #ffffff;
  --kf-error: #b3261e;
  --kf-ease: cubic-bezier(.22, .61, .36, 1);
  max-width: 720px;
  margin-top: 88px;
  color: var(--kf-ink);
  font-family: 'Montserrat', Montserrat, sans-serif;
}

/* ── Kopf: große Schrittnummer + Titel + Fortschrittslinie ─────────────── */
.kf-head { margin-bottom: 8px; }
.kf-head-row { display: flex; align-items: baseline; gap: 16px; }
.kf-stepnum {
  font-family: 'Lane Narrow', sans-serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.kf-steptotal {
  font-family: 'Lane Narrow', sans-serif;
  font-size: 20px;
  color: var(--kf-mute);
  transform: translateY(-2px);
}
.kf-steptitle {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--kf-mute);
}
.kf-bar {
  height: 2px;
  background: var(--kf-line);
  margin: 18px 0 40px;
  overflow: hidden;
}
.kf-bar-fill {
  height: 100%;
  width: 33.33%;
  background: var(--kf-ink);
  transition: width .5s var(--kf-ease);
}

/* ── Schritte ──────────────────────────────────────────────────────────── */
.kf-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.kf { overflow-x: clip; }
@supports not (overflow-x: clip) { .kf { overflow-x: hidden; } }
.kf.kf-js .kf-step { display: none; }
.kf.kf-js .kf-step.is-active { display: block; animation: kf-in .38s var(--kf-ease); }
@keyframes kf-in {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .kf.kf-js .kf-step.is-active { animation: none; }
  .kf-bar-fill { transition: none; }
}
/* Ohne JS: alle Schritte untereinander, mit Zwischenlinien */
.kf:not(.kf-js) .kf-head, .kf:not(.kf-js) .kf-nav .kf-next, .kf:not(.kf-js) .kf-nav .kf-back { display: none; }
.kf:not(.kf-js) .kf-step + .kf-step { border-top: 1px solid var(--kf-line); margin-top: 40px; padding-top: 40px; }

.kf-q { margin-bottom: 40px; }
.kf-q-label {
  font-family: 'Lane Narrow', sans-serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 6px;
}
.kf-opt {
  font-family: 'Montserrat', Montserrat, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--kf-mute);
  margin-left: 10px;
  white-space: nowrap;
}
.kf-q-hint { font-size: 13px; line-height: 1.55; color: var(--kf-mute); margin: 0 0 18px; max-width: 54ch; }

/* ── Options-Karten ────────────────────────────────────────────────────── */
.kf-cards { display: grid; gap: 10px; margin-top: 18px; }
.kf-cards-3 { grid-template-columns: repeat(3, 1fr); }
.kf-cards-5 { grid-template-columns: repeat(5, 1fr); }
.kf-cards-2b { grid-template-columns: 1fr 1fr; }
.kf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px 12px 16px;
  border: 1px solid var(--kf-line);
  border-radius: 10px;
  background: var(--kf-bg);
  cursor: pointer;
  transition: border-color .18s var(--kf-ease), background .18s var(--kf-ease),
              color .18s var(--kf-ease), transform .18s var(--kf-ease);
  -webkit-user-select: none; user-select: none;
}
.kf-card:hover { border-color: var(--kf-ink); transform: translateY(-2px); }
.kf-card input { position: absolute; opacity: 0; pointer-events: none; }
.kf-card .kf-ico { display: block; height: 34px; }
.kf-card .kf-ico svg { height: 100%; width: auto; display: block; stroke: currentColor; }
.kf-card .kf-qmark {
  font-family: 'Lane Narrow', sans-serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 34px;
  display: block;
}
.kf-card span.kf-card-label { font-size: 13px; font-weight: 600; line-height: 1.3; }
.kf-card.is-checked {
  background: var(--kf-ink);
  border-color: var(--kf-ink);
  color: #fff;
}
.kf-card:has(input:focus-visible) { outline: 2px solid var(--kf-ink); outline-offset: 3px; }

/* Detail-Feld unter den Options-Karten (erscheint bei gewählter Option) */
.kf-details {
  margin: 14px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--kf-ink);
  animation: kf-note-in .3s var(--kf-ease);
}
.kf-details.kf-field { margin-bottom: 0; }
.kf-details input { font-size: 15px; }
@keyframes kf-note-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Radstand-Schema (Version) */
.kf-card .kf-wheelbase svg { height: 34px; }

/* ── Text-Inputs: Linien statt Boxen ───────────────────────────────────── */
.kf-field { margin-bottom: 30px; }
.kf-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--kf-mute);
  margin-bottom: 2px;
}
.kf-field input, .kf-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--kf-line);
  border-radius: 0;
  background: transparent;
  font-family: 'Montserrat', Montserrat, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--kf-ink);
  padding: 10px 0;
  transition: border-color .18s var(--kf-ease);
  -webkit-appearance: none; appearance: none;
}
.kf-field input:focus, .kf-field textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--kf-ink);
  margin-bottom: -1px;
}
.kf-field input::placeholder, .kf-field textarea::placeholder { color: #b9b9b2; }
.kf-field textarea { min-height: 96px; resize: vertical; }
.kf-field.kf-invalid input { border-bottom-color: var(--kf-error); }
.kf-field .kf-error-msg { display: none; font-size: 12px; color: var(--kf-error); margin-top: 6px; }
.kf-field.kf-invalid .kf-error-msg { display: block; }
.kf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }

/* ── Zusammenfassungs-Chips (Schritt 3) ────────────────────────────────── */
.kf-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 36px; }
.kf-chip {
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--kf-ink);
  border-radius: 100px;
  padding: 6px 14px;
  background: transparent;
  color: var(--kf-ink);
  cursor: pointer;
  font-family: inherit;
  transition: background .18s, color .18s;
}
.kf-chip:hover { background: var(--kf-ink); color: #fff; }
.kf-chip .kf-chip-x { margin-left: 6px; opacity: .55; }

/* ── Checkbox ──────────────────────────────────────────────────────────── */
.kf-consent { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 0; cursor: pointer; }
.kf-consent input { position: absolute; opacity: 0; }
.kf-consent .kf-box {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border: 1px solid var(--kf-ink);
  border-radius: 5px;
  margin-top: 1px;
  display: grid; place-items: center;
  transition: background .15s var(--kf-ease);
}
.kf-consent .kf-box svg { opacity: 0; stroke: #fff; transition: opacity .15s; }
.kf-consent input:checked + .kf-box { background: var(--kf-ink); }
.kf-consent input:checked + .kf-box svg { opacity: 1; }
.kf-consent input:focus-visible + .kf-box { outline: 2px solid var(--kf-ink); outline-offset: 2px; }
.kf-consent .kf-consent-text { font-size: 13px; line-height: 1.55; }
.kf-consent .kf-consent-text a { color: inherit; }
.kf-consent.kf-invalid .kf-box { border-color: var(--kf-error); box-shadow: 0 0 0 1px var(--kf-error); }

/* ── Navigation ────────────────────────────────────────────────────────── */
.kf-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--kf-line);
}
.kf-back {
  background: none; border: 0; padding: 0;
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--kf-mute);
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
.kf-back:hover { color: var(--kf-ink); }
.kf-next, .kf-submit {
  margin-left: auto;
  font-family: 'Montserrat', Montserrat, sans-serif;
  font-size: 15px; font-weight: 600;
  background: var(--kf-ink); color: #fff;
  border: 1px solid var(--kf-ink);
  border-radius: 100px;
  padding: 15px 36px;
  cursor: pointer;
  transition: background .18s var(--kf-ease), color .18s var(--kf-ease), transform .18s var(--kf-ease);
}
.kf-next:hover, .kf-submit:hover { background: #fff; color: var(--kf-ink); transform: translateY(-1px); }
.kf-next .kf-arrow { display: inline-block; transition: transform .18s var(--kf-ease); margin-left: 8px; }
.kf-next:hover .kf-arrow { transform: translateX(4px); }
.kf-hidden { display: none !important; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .kf { margin-top: 56px; }
  /* Fix des geerbten Original-Bugs: h1 "Kontaktformular" (6rem) ist breiter
     als der Viewport und erzwingt Horizontal-Scroll. Gilt nur auf /kontakt. */
  h1 { font-size: clamp(2.8rem, 12.5vw, 4.5rem); overflow-wrap: anywhere; }

  .kf-stepnum { font-size: 46px; }
  .kf-cards-5, .kf-cards-3 { grid-template-columns: repeat(2, 1fr); }
  .kf-cards-2b { grid-template-columns: 1fr; }
  .kf-grid-2 { grid-template-columns: 1fr; }
  .kf-bar { margin-bottom: 30px; }
  .kf-nav { flex-wrap: wrap; }
}

/* ALTCHA-Floating-Badge unsichtbar, solange kein Fehler vorliegt
   (Sicherheitsprüfung läuft komplett im Hintergrund) */
.altcha[data-floating][data-state="verified"],
.altcha[data-floating][data-state="verifying"],
.altcha[data-floating][data-state="unverified"] { visibility: hidden !important; }
