/* =========================================
   ROOFFLOW — Homepage Homeowner Funnel Styles
   ========================================= */

/* ---- Funnel hero split layout ---- */
.funnel-hero {
  background: var(--slate);
  color: var(--white);
  padding: 5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.funnel-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232,97,26,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.funnel-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* ---- Left: pitch column ---- */
.funnel-pitch {
  padding-top: 1rem;
}

.funnel-pitch-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta-light);
  margin-bottom: 1.25rem;
}

.funnel-pitch-headline {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.funnel-pitch-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 44ch;
  margin-bottom: 2rem;
}

.funnel-trust-badges {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.funnel-trust-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

.funnel-trust-badge svg {
  color: var(--terracotta-light);
  flex-shrink: 0;
}

/* ---- Right: multi-step form card ---- */
.funnel-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.25rem 2.5rem 2.5rem;
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

/* Progress bar */
.funnel-progress {
  margin-bottom: 2rem;
}

.funnel-progress-bar {
  height: 4px;
  background: var(--cream-dark);
  border-radius: 4px;
  overflow: hidden;
}

.funnel-progress-fill {
  height: 100%;
  background: var(--terracotta);
  border-radius: 4px;
  transition: width 0.35s ease;
}

.funnel-progress-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--ink-muted);
  text-align: right;
  margin-top: 0.4rem;
  letter-spacing: 0.05em;
}

/* Steps */
.funnel-step { display: none; }
.funnel-step.active { display: block; }

.funnel-step-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 0.4rem;
}

.funnel-step-sub {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

/* Icon buttons (step 1 & 3) */
.funnel-icon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.funnel-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  border: 2px solid var(--cream-dark);
  border-radius: 12px;
  background: var(--cream);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  line-height: 1.3;
}

.funnel-icon-btn:hover {
  border-color: var(--slate-light);
  background: var(--warm-bg);
}

.funnel-icon-btn.selected {
  border-color: var(--terracotta);
  background: #fff5f0;
  color: var(--terracotta);
}

.funnel-icon-btn svg {
  color: var(--ink-muted);
  transition: color 0.15s ease;
}

.funnel-icon-btn.selected svg {
  color: var(--terracotta);
}

/* Step 2 inputs */
.funnel-field {
  margin-bottom: 1rem;
}

.funnel-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.funnel-field input,
.funnel-field select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--cream-dark);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--cream);
  transition: border-color 0.15s ease;
  outline: none;
}

.funnel-field input:focus,
.funnel-field select:focus {
  border-color: var(--slate-light);
  background: var(--white);
}

.funnel-field-error {
  font-size: 0.75rem;
  color: #c0392b;
  margin-top: 0.25rem;
  display: none;
}

/* Property type toggle (step 2) */
.funnel-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.funnel-toggle-btn {
  padding: 0.6rem 1rem;
  border: 2px solid var(--cream-dark);
  border-radius: 8px;
  background: var(--cream);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-light);
  transition: all 0.15s ease;
  text-align: center;
}

.funnel-toggle-btn.selected {
  border-color: var(--terracotta);
  background: #fff5f0;
  color: var(--terracotta);
}

/* Step 4 contact fields */
.funnel-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Navigation buttons */
.funnel-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  align-items: center;
}

.funnel-btn-back {
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease;
}

.funnel-btn-back:hover { color: var(--ink); }

.funnel-btn-next {
  flex: 1;
  background: var(--terracotta);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.funnel-btn-next:hover:not(:disabled) { background: var(--terracotta-light); }
.funnel-btn-next:disabled { opacity: 0.6; cursor: not-allowed; }

/* Submit spinner */
.funnel-spinner {
  width: 16px;
  height: 16px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Success state */
.funnel-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.funnel-success.active {
  display: flex;
}

.funnel-success-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1.25rem;
}

.funnel-success h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  color: var(--slate);
  margin-bottom: 0.75rem;
}

.funnel-success p {
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 1.65;
  max-width: 34ch;
}

/* Form error banner */
.funnel-error-box {
  background: #fdf2f0;
  border: 1px solid #f0c8c0;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  color: #c0392b;
  margin-bottom: 1rem;
  display: none;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .funnel-hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .funnel-pitch {
    padding-top: 0;
  }

  .funnel-icon-grid {
    grid-template-columns: 1fr 1fr;
  }

  .funnel-field-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .funnel-hero { padding: 3rem 1.25rem 2.5rem; }
  .funnel-card { padding: 1.75rem 1.5rem 2rem; }
  .funnel-icon-grid { grid-template-columns: 1fr 1fr; }
}
