/* ==== EcoScan — Funnel ==== */

.funnel-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
}
.funnel-page .site-header { background: rgba(245,247,246,.85); }

.funnel-shell {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(40px, 6vw, 80px) 16px;
}

.funnel-card {
  width: 100%;
  max-width: 720px;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.funnel-progress {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.funnel-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.funnel-progress-bar {
  height: 6px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
}
.funnel-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%);
  transition: width .4s var(--ease);
  border-radius: 999px;
}

.funnel-body {
  padding: clamp(28px, 5vw, 48px);
  min-height: 380px;
  position: relative;
}

.step-pane {
  display: none;
  animation: stepIn .35s var(--ease) both;
}
.step-pane.is-active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}

.step-eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 8px;
}
.step-pane h2 {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  margin: 0 0 10px;
}
.step-pane .step-help {
  color: var(--text-muted);
  margin: 0 0 28px;
  font-size: 15px;
}

/* Choice cards */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.choice {
  position: relative;
  padding: 22px 22px 22px 60px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  transition: all .2s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.4;
}
.choice small {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}
.choice::before {
  content: "";
  position: absolute;
  left: 22px; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: #fff;
  transition: all .2s var(--ease);
}
.choice:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.choice.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.choice.is-selected::before {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: inset 0 0 0 4px #fff;
}

/* Range buttons */
.range-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.range-btn {
  padding: 18px 12px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.range-btn:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.range-btn.is-selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

/* Inputs */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.field label .req { color: var(--brand-dark); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31,191,107,.12);
}
.field textarea {
  min-height: 90px;
  resize: vertical;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}
@media (max-width: 540px){ .field-row { grid-template-columns: 1fr; } }

.checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}
.checkbox input { margin-top: 3px; flex-shrink: 0; }
.checkbox a { color: var(--brand-dark); text-decoration: underline; }

/* Footer Actions */
.funnel-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  gap: 12px;
}
.funnel-actions .btn { padding: 12px 22px; }
.funnel-actions .spacer { flex: 1; }

/* Success Pane */
.funnel-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(48px, 8vw, 80px) 28px;
  animation: stepIn .5s var(--ease) both;
}
.funnel-success.is-active { display: flex; }
.success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-glow);
  animation: successPop .6s var(--ease) both;
}
@keyframes successPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.funnel-success h2 { margin: 0 0 12px; }
.funnel-success p { color: var(--text-muted); max-width: 38ch; margin: 0 0 28px; }

/* Error */
.funnel-error {
  display: none;
  margin-top: 14px;
  padding: 12px 16px;
  background: #fff5f5;
  border: 1px solid #ffd7d7;
  color: #b30404;
  border-radius: 10px;
  font-size: 13px;
}
.funnel-error.is-active { display: block; }

.funnel-aside {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
