/* ═══════════════════════════════════════════════════════════════
   NemoRadar — Valuation Funnel Styles
   Multi-step form: dark gold theme, matching main.css tokens
═══════════════════════════════════════════════════════════════ */

/* ═══ FUNNEL PAGE LAYOUT ═══ */
.val-page {
  min-height: 100vh;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}

.val-page .site-nav {
  position: relative; /* not sticky on funnel page */
  border-bottom: 1px solid var(--accent-dim);
}

/* ═══ FUNNEL HEADER ═══ */
.val-header {
  text-align: center;
  padding: 72px 24px 48px;
  background: var(--bg-primary);
  position: relative;
}

.val-header::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
}

.val-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  padding: 6px 14px;
  border: 1px solid var(--accent-dim);
  border-radius: 100px;
}

.val-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.val-header h1 em { font-style: normal; color: var(--accent); }

.val-header p {
  color: var(--fg-secondary);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ═══ PROGRESS BAR ═══ */
.progress-wrap {
  padding: 0 24px 48px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.progress-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.3s;
}

.progress-label.active { color: var(--accent); }

.progress-track {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(201,168,76,0.6));
  border-radius: 100px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* ═══ FORM CONTAINER ═══ */
.val-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 80px;
}

.val-step {
  display: none;
  width: 100%;
  max-width: 640px;
  animation: stepIn 0.3s ease;
}

.val-step.active { display: block; }

@keyframes stepIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.step-hint {
  color: var(--fg-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

/* ═══ SELECT GRID (districts, property type, layout, condition) ═══ */
.select-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.select-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.select-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.select-grid.cols-4 { grid-template-columns: 1fr 1fr; }

.select-option {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  text-align: left;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg-primary);
  position: relative;
}

.select-option:hover {
  border-color: rgba(201,168,76,0.4);
  background: rgba(201,168,76,0.04);
  transform: translateY(-1px);
}

.select-option.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.select-option .opt-label {
  font-weight: 500;
  display: block;
}

.select-option .opt-desc {
  font-size: 13px;
  color: var(--fg-muted);
  display: block;
  margin-top: 4px;
}

/* District dropdown for step 1 */
.district-select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg-primary);
  appearance: none;
  cursor: pointer;
  margin-bottom: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c9a84c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  transition: border-color 0.2s;
}

.district-select:focus {
  outline: none;
  border-color: var(--accent);
}

.district-select option {
  background: #1a1a26;
  color: var(--fg-primary);
}

/* ═══ SIZE INPUT (step 3) ═══ */
.size-input-wrap {
  position: relative;
  margin-bottom: 16px;
}

.size-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 20px 64px 20px 24px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg-primary);
  text-align: left;
  transition: border-color 0.2s;
}

.size-input:focus {
  outline: none;
  border-color: var(--accent);
}

.size-unit {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--fg-muted);
  font-weight: 500;
  pointer-events: none;
}

.size-hint {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

/* Quick-pick buttons */
.size-presets {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.size-preset {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fg-secondary);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.size-preset:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ═══ CONTACT FORM (step 4) ═══ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-field label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.contact-field input {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg-primary);
  transition: border-color 0.2s;
  width: 100%;
}

.contact-field input::placeholder { color: var(--fg-muted); }

.contact-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-gate-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--fg-secondary);
}

.gate-icon {
  font-size: 18px;
  line-height: 1.4;
  flex-shrink: 0;
}

/* ═══ NAV BUTTONS ═══ */
.step-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: var(--accent);
  color: #0a0a0f;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-next:hover:not(:disabled) {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-next:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-back {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 16px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg-secondary);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.btn-back:hover {
  color: var(--fg-primary);
  border-color: rgba(255,255,255,0.25);
}

/* ═══ RESULT CARD ═══ */
.val-result {
  display: none;
  width: 100%;
  max-width: 640px;
  animation: stepIn 0.4s ease;
}

.val-result.active { display: block; }

.result-card {
  background: var(--bg-card);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(201,168,76,0.4), var(--accent));
}

.result-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.result-range {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--fg-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.result-range .separator { color: var(--accent); margin: 0 12px; }

.result-caveat {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

.result-next-steps {
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 24px 28px;
  text-align: left;
}

.result-next-steps h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.next-step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.next-step-list li {
  font-size: 14px;
  color: var(--fg-secondary);
  padding-left: 24px;
  position: relative;
}

.next-step-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.result-cta-area {
  display: flex;
  gap: 12px;
  flex-direction: column;
  align-items: center;
}

.result-cta-area .btn-primary { width: 100%; justify-content: center; }

.result-cta-note {
  font-size: 13px;
  color: var(--fg-muted);
}

/* ═══ LOADING STATE ═══ */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,15,0.85);
  z-index: 200;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--accent-dim);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  font-size: 15px;
  color: var(--fg-secondary);
  font-weight: 500;
}

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

/* ═══ ERROR TOAST ═══ */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2a1a1a;
  border: 1px solid rgba(220,80,80,0.4);
  border-radius: var(--radius);
  padding: 14px 24px;
  font-size: 14px;
  color: #f08080;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 300;
  white-space: nowrap;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 640px) {
  .select-grid.cols-2 { grid-template-columns: 1fr; }
  .select-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .select-grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .result-card { padding: 32px 24px; }
  .result-range { font-size: 1.8rem; }
  .step-actions { flex-direction: column-reverse; }
  .btn-next, .btn-back { width: 100%; text-align: center; justify-content: center; }
  .progress-labels { display: none; }
}
