/* =====================================================
   Feldmann Funnel - Apple-Feel + Feldmann CI
   Weicher Karten-Stil, sanfte Schatten, smoother Step-Wechsel
   ===================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body.page-funnel {
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* === TOPBAR === */
.ed-topbar {
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(29,29,27,0.06);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.ed-topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ed-topbar-logo img {
  height: 44px;
  width: auto;
  display: block;
}
.ed-topbar-meta {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* === STAGE === */
.ed-stage {
  flex: 1;
  padding: 56px 20px 80px;
}
.ed-stage-inner {
  max-width: 600px;
  margin: 0 auto;
}

/* === HERO === */
.ed-hero {
  text-align: center;
  margin-bottom: 40px;
}
.ed-hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.ed-hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 14px;
  color: var(--color-text-primary);
}
.ed-hero p.sub {
  font-size: 18px;
  color: var(--color-text-soft);
  line-height: 1.5;
  margin: 0 auto;
  max-width: 520px;
}

/* === TRUST-ROW === */
.ed-trust {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 28px 0 0;
}
.ed-trust-item {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(29,29,27,0.06);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.ed-trust-item .ed-trust-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
  line-height: 1;
}
.ed-trust-item .ed-trust-lbl {
  font-size: 12px;
  color: var(--color-text-soft);
  font-weight: 500;
  margin-top: 6px;
  line-height: 1.35;
}

/* === FUNNEL-CARD === */
.ed-card {
  background: #fff;
  border-radius: 22px;
  padding: 40px 36px 32px;
  margin-top: 36px;
  box-shadow:
    0 1px 2px rgba(29,29,27,0.04),
    0 6px 20px rgba(29,29,27,0.06),
    0 24px 48px rgba(29,29,27,0.04);
  border: 1px solid rgba(29,29,27,0.04);
}

/* === PROGRESS === */
.ed-progress-wrap { margin-bottom: 36px; }
.ed-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.ed-progress-meta strong { color: var(--color-text-primary); font-weight: 600; }
.ed-progress {
  display: flex;
  gap: 5px;
  height: 3px;
}
.ed-progress-step {
  flex: 1;
  background: rgba(29,29,27,0.08);
  border-radius: 999px;
  transition: background 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ed-progress-step.is-done,
.ed-progress-step.is-active { background: var(--color-primary); }

/* === STEP === */
.ed-step {
  display: none;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  min-inline-size: 0;
}
.ed-step.is-active {
  display: block;
  animation: edSlide 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes edSlide {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ed-q {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--color-text-primary);
}
.ed-q-sub {
  font-size: 15px;
  color: var(--color-text-soft);
  margin: 0 0 28px;
  line-height: 1.55;
}

/* === CHOICES (Apple-Feel) === */
.ed-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ed-choice {
  display: flex;
  align-items: center;
  background: rgba(247,245,242,0.5);
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition:
    transform 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background 0.18s ease,
    border-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.ed-choice:hover {
  background: rgba(230,238,245,0.6);
  border-color: rgba(0,69,123,0.2);
}
.ed-choice:active { transform: scale(0.985); }

.ed-choice input[type="radio"],
.ed-choice input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(29,29,27,0.25);
  border-radius: 50%;
  margin-right: 16px;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.ed-choice input[type="checkbox"] { border-radius: 6px; }
.ed-choice input:checked {
  border-color: var(--color-primary);
  background: var(--color-primary);
}
.ed-choice input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 5px; left: 5px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
}
.ed-choice input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 4px; left: 7px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ed-choice:has(input:checked) {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
}
.ed-choice-body { flex: 1; min-width: 0; }
.ed-choice-title {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.4;
}
.ed-choice-desc {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* === FORM INPUTS === */
.ed-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.ed-form-group { margin-bottom: 16px; }
.ed-form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-soft);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.ed-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 16px;
  background: rgba(247,245,242,0.5);
  border: 1.5px solid transparent;
  border-radius: 12px;
  color: var(--color-text-primary);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}
.ed-input:hover { background: rgba(247,245,242,0.85); }
.ed-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(0,69,123,0.10);
}

/* === DSGVO === */
.ed-dsgvo {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(247,245,242,0.5);
  border-radius: 12px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-soft);
}
.ed-dsgvo input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(29,29,27,0.25);
  border-radius: 5px;
  margin-top: 1px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  background: #fff;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.ed-dsgvo input[type="checkbox"]:checked {
  border-color: var(--color-primary);
  background: var(--color-primary);
}
.ed-dsgvo input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 3px; left: 6px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ed-dsgvo label { cursor: pointer; flex: 1; }
.ed-dsgvo a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* === NAV === */
.ed-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(29,29,27,0.06);
}
.ed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.08s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: -0.005em;
}
.ed-btn:active { transform: scale(0.97); }
.ed-btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(0,69,123,0.22);
}
.ed-btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: 0 6px 18px rgba(0,69,123,0.28);
}
.ed-btn-primary:disabled {
  background: rgba(29,29,27,0.2);
  border-color: rgba(29,29,27,0.2);
  cursor: not-allowed;
  box-shadow: none;
}
.ed-btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: transparent;
  padding-left: 8px;
  padding-right: 8px;
}
.ed-btn-ghost:hover {
  color: var(--color-text-primary);
  background: rgba(29,29,27,0.04);
}

/* === SHAKE on error === */
.shake { animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes shake {
  10%, 90%   { transform: translateX(-2px); }
  20%, 80%   { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60%   { transform: translateX(6px); }
}

/* === FOOTER === */
.ed-footer {
  background: var(--color-text-primary);
  color: #fff;
  padding: 28px 20px;
  margin-top: 40px;
}
.ed-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
}
.ed-footer-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}
.ed-footer-brand img { display: block; opacity: 0.95; }
.ed-footer-copy { opacity: 0.72; }
.ed-footer-nav { display: flex; gap: 0; }
.ed-footer-nav a {
  color: #fff;
  opacity: 0.78;
  text-decoration: none;
  margin-right: 22px;
  transition: opacity 0.18s ease;
}
.ed-footer-nav a:last-child { margin-right: 0; }
.ed-footer-nav a:hover { opacity: 1; text-decoration: underline; }

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .ed-stage { padding: 32px 16px 56px; }
  .ed-card { padding: 28px 22px 24px; border-radius: 18px; }
  .ed-hero h1 { font-size: 28px; }
  .ed-hero p.sub { font-size: 16px; }
  .ed-trust { grid-template-columns: 1fr; gap: 8px; }
  .ed-form-row { grid-template-columns: 1fr; }
  .ed-q { font-size: 20px; }
  .ed-choice { padding: 14px 16px; }
  .ed-footer-inner { flex-direction: column; align-items: flex-start; }
  .ed-footer-brand { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ed-footer-nav { gap: 16px; }
  .ed-footer-nav a { margin-right: 0; }
  .ed-btn { padding: 12px 22px; }
}

/* === TEST-COUNTDOWN === */
.ed-timer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--color-bg-muted);
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--color-text-soft);
  transition: background 0.3s ease, color 0.3s ease;
}
.ed-timer-icon { font-size: 18px; }
.ed-timer-label { font-weight: 500; }
.ed-timer-value {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}
.ed-timer.is-warning {
  background: #FFF4E5;
  color: #B45309;
}
.ed-timer.is-warning .ed-timer-value { color: #B45309; }
.ed-timer.is-critical {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.ed-timer.is-critical .ed-timer-value {
  color: var(--color-primary);
  animation: edPulse 1s ease infinite;
}
@keyframes edPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* === Fehlermeldung Submit === */
.ed-msg {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FFF4E5;
  color: #8A4B08;
  font-size: 14px;
  line-height: 1.5;
}
