/* =====================================================================
   Tobias Nase – Erstgespräch-Funnel (/erstgespraech/)
   Struktur nach dem Recruiting-Partner-Kontaktfunnel, Optik = Marke:
   dunkles Violett, Pixelify-Headlines, Roboto-Mono-Meta, Radius 4px.
   Buttons (.btn/.btn--primary/.btn--ghost) kommen aus site.css.
   ===================================================================== */

/* ── Seiten-Layout ──────────────────────────────────────────────── */
.fpage {
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 24px);
  min-height: 100vh;
}

.shell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: calc(100vh - 48px);
}

/* ── Sidebar (Desktop) ──────────────────────────────────────────── */
.sidebar {
  background: rgba(0, 0, 0, 0.28);
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  text-decoration: none;
}
.brand-logo-img { height: 36px; width: auto; display: block; }

.steps-list { display: flex; flex-direction: column; flex: 1; }

.step-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 4px 0;
  position: relative;
  align-items: start;
}
.step-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 32px;
  bottom: -4px;
  width: 2px;
  background: var(--border);
}
.step-item.is-done:not(:last-child)::after { background: var(--violet-2); }

.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mut);
  transition: all .3s var(--ease);
  flex-shrink: 0;
}
.step-item.is-active .step-dot {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.step-item.is-done .step-dot {
  background: var(--violet-2);
  border-color: var(--violet-2);
  color: #fff;
}

.step-text { padding: 2px 0 16px; min-width: 0; }
.step-name {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  margin: 0 0 2px;
  line-height: 1.3;
}
.step-item.is-pending .step-name { color: var(--text-mut); font-weight: 500; }
.step-desc {
  font-size: 12.5px;
  color: var(--text-mut);
  line-height: 1.4;
  margin: 0;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-mut);
  line-height: 1.5;
}
.sf-line { margin: 0; }
.sf-line + .sf-line { margin-top: 8px; }
.sidebar-foot strong { color: var(--text); font-weight: 600; }

/* ── Hauptbereich ───────────────────────────────────────────────── */
.main {
  padding: 32px clamp(32px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.main-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all .2s ease;
}
.btn-back:hover { background: rgba(168, 85, 247, 0.16); }
.btn-back:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-back svg { width: 16px; height: 16px; }

.main-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mut);
}

.main-head { margin-bottom: 6px; }
.step-counter {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--violet-3);
  margin-bottom: 6px;
}
.step-title {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.15;
  letter-spacing: 0;
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0;
  background: var(--grad-head);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin: 0 0 6px;
}
.step-sub {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-soft);
  margin: 0 0 20px;
  max-width: 62ch;
  line-height: 1.55;
}
.head-divider { height: 1px; background: var(--border); margin: 0 0 24px; }

/* ── Schritt-Panels ─────────────────────────────────────────────── */
.step-content { flex: 1; min-width: 0; }

.step-panel { display: none; animation: panelIn .4s var(--ease); }
.step-panel.is-active { display: block; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Feld-Gruppen ───────────────────────────────────────────────── */
.field-group { margin-bottom: 22px; }
.field-label {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.field-label .req { color: var(--violet-3); }
.field-label .opt-hint { color: var(--text-mut); font-weight: 400; }
.field-help {
  font-size: 13px;
  color: var(--text-mut);
  margin: 0 0 10px;
  line-height: 1.5;
}

/* ── Options-Karten (Radio/Checkbox) ────────────────────────────── */
.options { display: grid; gap: 10px; }
.options--2 { grid-template-columns: repeat(2, 1fr); }
.options--3 { grid-template-columns: repeat(3, 1fr); }

.opt-card {
  position: relative;
  display: block;
  padding: 14px 16px;
  background: rgba(168, 85, 247, 0.05);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.opt-card:hover { border-color: var(--border-2); transform: translateY(-1px); }
.opt-card input { position: absolute; opacity: 0; pointer-events: none; }
.opt-card.is-checked {
  border-color: var(--violet-2);
  background: rgba(168, 85, 247, 0.14);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, .10);
}

.opt-row { display: flex; align-items: center; gap: 12px; }
.opt-indicator {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-2);
  flex-shrink: 0;
  position: relative;
  transition: all .2s var(--ease);
}
.opt-card.is-checked .opt-indicator {
  border-color: var(--violet-2);
  background: var(--violet-2);
}
.opt-card.is-checked .opt-indicator::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--bg-card);
}

/* Checkbox-Variante */
.opt-indicator--check { border-radius: var(--radius); }
.opt-card.is-checked .opt-indicator--check { background: var(--violet-2); }
.opt-card.is-checked .opt-indicator--check::after {
  content: "";
  position: absolute;
  /* inset zuerst zuruecksetzen – die Kurzschreibweise wuerde left/top sonst wieder ueberschreiben */
  inset: auto;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  border-radius: 0;
  background: none;
}

.opt-body { flex: 1; min-width: 0; }
.opt-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: block;
}
.opt-desc {
  font-size: 13.5px;
  color: var(--text-mut);
  margin-top: 2px;
  line-height: 1.45;
  display: block;
}
.opt-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: rgba(168, 85, 247, 0.12);
  color: var(--violet-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.opt-card.is-checked .opt-icon { background: var(--violet-2); color: #fff; }

/* ── Text-Inputs ────────────────────────────────────────────────── */
.input-row { display: grid; gap: 14px; }
.input-row--2 { grid-template-columns: 1fr 1fr; }

.input,
.textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14.5px;
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
  font-family: inherit;
}
.input::placeholder, .textarea::placeholder { color: var(--text-mut); }
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--violet-2);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, .16);
}
.textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
.input.has-error, .textarea.has-error {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

.input-error {
  display: none;
  font-size: 13px;
  color: #ff8a8a;
  margin-top: 6px;
}
.input-error.is-visible { display: block; }

/* ── Budget-Slider ──────────────────────────────────────────────── */
.range-wrap {
  background: rgba(168, 85, 247, 0.05);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.range-display {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.range-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--violet-3);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.range-unit { font-size: 13px; color: var(--text-mut); font-family: var(--font-mono); }
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(168, 85, 247, 0.22);
  border-radius: 3px;
  outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #A055FF 0%, #7B2FF7 100%);
  cursor: pointer;
  border: 3px solid var(--bg-card);
  box-shadow: 0 2px 10px rgba(123, 47, 247, .55);
  transition: transform .15s ease;
}
.range::-webkit-slider-thumb:hover { transform: scale(1.1); }
.range::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #A055FF 0%, #7B2FF7 100%);
  cursor: pointer;
  border: 3px solid var(--bg-card);
  box-shadow: 0 2px 10px rgba(123, 47, 247, .55);
}

/* ── Einwilligung (DSGVO) ───────────────────────────────────────── */
.field-group--consent {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s ease;
}
.consent:hover { border-color: var(--border-2); }
.consent input { position: absolute; opacity: 0; pointer-events: none; }
.consent-check {
  width: 20px; height: 20px;
  border-radius: var(--radius);
  border: 2px solid var(--border-2);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: all .2s ease;
}
.consent.is-checked .consent-check {
  background: var(--violet-2);
  border-color: var(--violet-2);
}
.consent.is-checked .consent-check::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent-text {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.55;
  flex: 1;
}
.consent-text a { color: var(--violet-3); font-weight: 500; }
.consent-text a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── Footer-Navigation (Zurück/Weiter) ──────────────────────────── */
.main-foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.main-foot .btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Lade-Spinner im Submit-Button */
.btn-spin {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btnSpin .7s linear infinite;
}
.btn.is-loading .btn-spin { display: inline-block; }
.btn.is-loading .btn-text,
.btn.is-loading .btn-arrow { display: none; }
@keyframes btnSpin { to { transform: rotate(360deg); } }
.btn-arrow { width: 16px; height: 16px; }

/* ── Submit-Fehler ──────────────────────────────────────────────── */
.submit-error {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(239, 68, 68, .10);
  border: 1px solid rgba(239, 68, 68, .35);
  border-radius: var(--radius);
  color: #ff8a8a;
  font-size: 14px;
  line-height: 1.5;
}
.submit-error.is-visible { display: block; }
.submit-error a { color: #ffb3b3; font-weight: 500; }

/* ── Mobile Fortschrittsbalken ──────────────────────────────────── */
.mobile-progress {
  display: none;
  padding: 20px 24px 16px;
  background: rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid var(--border);
}
.mp-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.mp-brand { display: inline-flex; align-items: center; gap: 8px; }
.mp-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mut);
}
.mp-bar {
  height: 4px;
  background: rgba(168, 85, 247, 0.18);
  border-radius: 2px;
  overflow: hidden;
}
.mp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--violet-2), var(--violet));
  width: 20%;
  transition: width .4s var(--ease);
  border-radius: 2px;
}

/* ── Danke-Seite ────────────────────────────────────────────────── */
.thanks-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(48px, 10vh, 120px) 24px 64px;
  text-align: center;
}
.thanks-title {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.12;
  letter-spacing: 0;
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0;
  background: var(--grad-head);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin: 0 0 14px;
}
.thanks-sub {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.65;
  margin: 0 0 28px;
}
.thanks-steps {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 28px;
  display: grid;
  gap: 14px;
}
.thanks-step {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
}
.thanks-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid var(--border-2);
  color: var(--violet-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.thanks-step p { margin: 0; font-size: 14.5px; color: var(--text-soft); line-height: 1.5; }
.thanks-step strong { color: var(--text); }
#calendlySlot { margin: 0 0 28px; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .fpage { padding: 0; }
  .shell {
    grid-template-columns: 1fr;
    border-radius: 0;
    border: 0;
    min-height: 100vh;
  }
  .sidebar { display: none; }
  .mobile-progress { display: block; }
  .main { padding: 28px 20px; }
  .options--2 { grid-template-columns: 1fr; }
  .options--3 { grid-template-columns: 1fr; }
  .input-row--2 { grid-template-columns: 1fr; }
  .main-foot { flex-direction: column-reverse; align-items: stretch; }
  .main-foot .btn { width: 100%; }
}
