/* =========================================================================
   NEBULA — Bewertungsrechner
   Ruhiges, vertrauenswürdiges Design. Markenviolett #4C1D95.
   ========================================================================= */

:root {
  --brand: #4C1D95;          /* Markenviolett — Logo, Überschriften, Buttons, Band */
  --brand-dark: #3a1574;     /* Hover */
  --brand-darker: #2c1059;
  --accent: #A78BFA;         /* helles Violett, sparsam */
  --surface: #FFFFFF;        /* Karten */
  --page: #F4F1FB;           /* sehr helles Violett */
  --page-2: #EEE9FA;
  --ink: #2B2733;            /* Fließtext */
  --ink-soft: #524d5e;
  --muted: #6B6577;          /* sekundärer Text */
  --disclaimer: #8A8A8A;     /* grauer Hinweis */
  --line: #E2DAF2;           /* dezente Rahmen */
  --line-strong: #D4C8EE;
  --field: #FFFFFF;
  --focus-ring: rgba(76, 29, 149, 0.16);
  --ok: #2f8f5b;
  --err: #c0392b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 1px 2px rgba(44, 16, 89, 0.05), 0 8px 28px rgba(44, 16, 89, 0.06);
  --font-head: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------------- Header ---------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
}
.site-header svg { display: block; height: 46px; width: auto; }

/* ---------------- Layout ---------------- */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ---------------- Hero ---------------- */
.hero {
  text-align: center;
  padding: 56px 0 40px;
}
.hero h1 {
  font-family: var(--font-head);
  color: var(--brand);
  font-weight: 600;
  font-size: clamp(2rem, 5.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  text-wrap: balance;
}
.hero .subtitle {
  font-size: clamp(1.05rem, 2.3vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 38ch;
  margin: 0 auto 22px;
  text-wrap: pretty;
}
.hero .reassurance {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--page-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 18px;
}
.hero .reassurance svg { width: 18px; height: 18px; flex: none; }

/* ---------------- Step indicator ---------------- */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin: 8px auto 36px;
  max-width: 520px;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
  position: relative;
}
.step-bubble {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--surface);
  color: var(--muted);
  border: 2px solid var(--line-strong);
  transition: all 0.25s ease;
  z-index: 1;
}
.step-item.active .step-bubble {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 5px var(--focus-ring);
}
.step-item.done .step-bubble {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.step-label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}
.step-item.active .step-label,
.step-item.done .step-label { color: var(--brand); }
/* connecting lines */
.step-item::before,
.step-item::after {
  content: "";
  position: absolute;
  top: 21px;
  height: 2px;
  background: var(--line-strong);
  z-index: 0;
}
.step-item::before { left: 0; right: 50%; margin-right: 22px; }
.step-item::after  { left: 50%; right: 0; margin-left: 22px; }
.step-item:first-child::before { display: none; }
.step-item:last-child::after { display: none; }
.step-item.done::after,
.step-item.done::before { background: var(--brand); }
.step-item.active::before { background: var(--brand); }

/* ---------------- Card ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 38px;
}
.card-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--brand);
  margin: 0 0 6px;
}
.card-intro {
  color: var(--ink-soft);
  margin: 0 0 28px;
  font-size: 1.05rem;
}

.stepwrap { animation: fadeUp 0.35s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------- Fields ---------------- */
.field { margin-bottom: 24px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 9px;
  color: var(--ink);
}
.field .helper {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 8px;
}
.field .computed {
  font-size: 0.98rem;
  color: var(--brand);
  font-weight: 600;
  margin-top: 10px;
  background: var(--page-2);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  display: inline-block;
}

.input,
.select-el {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.12rem;
  color: var(--ink);
  background: var(--field);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  min-height: 56px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
}
.input::placeholder { color: #a9a2b8; }
.input:focus,
.select-el:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus-ring);
}
.input:disabled { background: #f4f2f8; color: #9b95a7; }

.field.invalid .input,
.field.invalid .select-el { border-color: var(--err); }
.field .error-msg {
  color: var(--err);
  font-size: 0.92rem;
  margin-top: 8px;
}

/* currency input with € adornment */
.currency {
  position: relative;
  display: flex;
  align-items: center;
}
.currency .adorn {
  position: absolute;
  left: 16px;
  font-size: 1.12rem;
  color: var(--muted);
  pointer-events: none;
  font-weight: 600;
}
.currency .input { padding-left: 40px; }
.currency.no-adorn .input { padding-left: 16px; }

/* select wrapper for caret */
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.select-el { padding-right: 44px; cursor: pointer; }
.select-el:invalid { color: #a9a2b8; }

/* two-column rows on wider screens */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; gap: 0; } }

/* ---------------- Collapsible ---------------- */
.collapsible {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.collapsible-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: none;
  padding: 16px 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--brand);
  text-align: left;
}
.collapsible-trigger .chev {
  width: 12px; height: 12px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  flex: none;
}
.collapsible.open .collapsible-trigger .chev { transform: rotate(-135deg); }
.collapsible-body { padding: 12px 0 4px; animation: fadeUp 0.3s ease both; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand-darker);
  border: none;
  border-radius: var(--radius-sm);
  padding: 17px 24px;
  min-height: 60px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.05s ease;
}
.btn:hover { background: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn:disabled {
  background: #d9d1ec;
  color: #f3eefb;
  cursor: not-allowed;
}
.btn svg { width: 18px; height: 18px; }
.btn-row { margin-top: 32px; }
.btn-ghost {
  background: none;
  color: var(--brand);
  border: 1.5px solid var(--line-strong);
  min-height: 52px;
  font-size: 1.02rem;
  width: auto;
  padding: 12px 22px;
}
.btn-ghost:hover { background: var(--page-2); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px 0;
}
.back-link:hover { color: var(--brand); }

/* embedded Tally form (Step 2) */
.tally-frame {
  width: 100%;
  border: 0;
  margin: 4px 0 10px;
  min-height: 280px;
}

/* privacy note on gate */
.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 26px;
  font-size: 0.95rem;
  color: var(--muted);
  background: var(--page-2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.privacy-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--brand); }

/* ---------------- Result (Step 3) ---------------- */
.result-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 10px;
}
.result-range {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--brand);
  font-size: clamp(1.8rem, 6vw, 2.9rem);
  line-height: 1.08;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.result-range .dash { color: var(--accent); font-weight: 400; padding: 0 2px; }

/* range bar */
.range-bar {
  margin: 30px 0 8px;
}
.range-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--page-2);
  border: 1px solid var(--line);
}
.range-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--brand));
  opacity: 0.85;
}
.range-marker {
  position: absolute;
  top: 50%;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--brand);
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(44,16,89,0.25);
}
.range-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}
.range-point {
  margin-top: 22px;
  background: var(--page-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.range-point .lbl { font-size: 0.95rem; color: var(--ink-soft); }
.range-point .val {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.55rem;
  color: var(--brand);
}
.equity-box {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.equity-box .lbl { font-size: 0.95rem; color: var(--ink-soft); }
.equity-box .val {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.55rem;
  color: var(--ink);
}

.disclaimer {
  font-size: 12px;
  line-height: 1.5;
  color: var(--disclaimer);
  margin: 18px 0 0;
  text-wrap: pretty;
}

.cta-block {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.cta-block p {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0 0 20px;
  text-wrap: pretty;
}

.notice {
  background: var(--page-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.6;
}

.summary-line {
  font-size: 0.98rem;
  color: var(--muted);
  margin: 0 0 24px;
}
.summary-line strong { color: var(--ink); font-weight: 600; }

.confirm-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #eaf6ef;
  border: 1px solid #bfe4cd;
  color: #1f6e44;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 24px;
  font-weight: 600;
}
.confirm-banner svg { width: 22px; height: 22px; flex: none; }

/* footer */
.foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 34px;
}

@media (max-width: 560px) {
  .card { padding: 26px 20px; }
  .hero { padding: 40px 0 30px; }
  .step-label { font-size: 0.8rem; }
}

/* ---------------- Anfrage stellen / Kontakt (Seitenfuß) ---------------- */
.contact-band {
  background: var(--brand-darker);
  color: #fff;
  margin-top: 40px;
}
.contact-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 70px;
  text-align: center;
}
.contact-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 12px;
}
.contact-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: #fff;
}
.contact-lead {
  font-size: 1.1rem;
  color: #E4DBF6;
  max-width: 46ch;
  margin: 0 auto 34px;
  text-wrap: pretty;
}
.contact-methods {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-method {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  padding: 16px 22px;
  min-width: 240px;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.contact-method:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}
.cm-icon {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  color: #fff;
}
.cm-icon svg { width: 22px; height: 22px; }
.cm-text { display: flex; flex-direction: column; gap: 2px; }
.cm-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
}
.cm-value { font-size: 1.08rem; font-weight: 600; color: #fff; }
.contact-note {
  margin: 30px 0 0;
  font-size: 0.92rem;
  color: #BCAEDC;
}
@media (max-width: 560px) {
  .contact-inner { padding: 48px 20px 54px; }
  .contact-method { min-width: 0; width: 100%; }
}
