/* ============================================
   INTAKE FORMS — Design System
   Antigravity Digital
   ============================================ */

/* ── FORM SECTION WRAPPER ────────────────────── */
.intake-section {
  padding: var(--section-pad) 0;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-root) 100%);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.intake-section::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(200, 168, 75, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.intake-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.intake-header .badge {
  margin-bottom: 20px;
}

.intake-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 3.5vw, 2.875rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.intake-header p {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.75;
}

/* ── SERVICE SELECTOR ────────────────────────── */
.service-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.service-option {
  position: relative;
  cursor: pointer;
}

.service-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}

.service-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.service-option input:checked+.service-card {
  border-color: var(--gold);
  background: rgba(200, 168, 75, 0.06);
  box-shadow: 0 0 0 1px rgba(200, 168, 75, 0.3), 0 4px 20px rgba(200, 168, 75, 0.1);
}

.service-card-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.service-card-title {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.service-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.service-card-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-hover);
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  align-self: flex-start;
  margin-left: auto;
}

.service-option input:checked+.service-card .service-card-check {
  background: var(--gold);
  border-color: var(--gold);
}

.service-option input:checked+.service-card .service-card-check::after {
  content: '✓';
  font-size: 0.6875rem;
  color: #0A1828;
  font-weight: 800;
}

/* ── FORM CONTAINER ──────────────────────────── */
.intake-form-wrap {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* ── FORM STEP TABS ──────────────────────────── */
.form-steps-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.form-step-tab {
  flex: 1;
  padding: 16px 12px;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  cursor: default;
  letter-spacing: 0.02em;
}

.form-step-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(200, 168, 75, 0.04);
}

.form-step-tab.completed {
  color: var(--text-secondary);
  border-bottom-color: rgba(200, 168, 75, 0.3);
}

/* ── FORM BODY ───────────────────────────────── */
.form-step {
  display: none;
  padding: 40px;
  animation: stepIn 0.3s var(--ease-out);
}

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

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-step-title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-step-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ── FORM GRID ───────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid.single {
  grid-template-columns: 1fr;
}

.form-grid.thirds {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-field-full {
  grid-column: 1 / -1;
}

/* ── FORM FIELD ──────────────────────────────── */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-label .required {
  color: var(--gold);
  margin-left: 3px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(10, 24, 40, 0.6);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  transition: all 0.2s var(--ease-smooth);
  outline: none;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  background: rgba(10, 24, 40, 0.85);
  box-shadow: 0 0 0 3px rgba(200, 168, 75, 0.12);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%238B9DC3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-select option {
  background: #0A1828;
  color: var(--text-primary);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* ── FORM ERROR MESSAGE ──────────────────────── */
.form-error-msg {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: -3px;
}

/* ── CHECKBOX & RADIO GROUPS ─────────────────── */
.check-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s;
}

.check-item:hover {
  border-color: var(--border-hover);
  background: rgba(200, 168, 75, 0.03);
}

.check-item input[type="checkbox"],
.check-item input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}

.check-item input:checked~.check-label {
  color: var(--text-primary);
}

.check-item:has(input:checked) {
  border-color: rgba(200, 168, 75, 0.4);
  background: rgba(200, 168, 75, 0.04);
}

.check-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

/* ── SCALE SLIDER ────────────────────────────── */
.budget-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.budget-slider {
  width: 100%;
  height: 4px;
  appearance: none;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold) var(--pct, 0%), var(--border-subtle) var(--pct, 0%));
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.budget-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--bg-card);
  box-shadow: 0 2px 8px rgba(200, 168, 75, 0.4);
  cursor: pointer;
}

.budget-slider-value {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--gold);
  text-align: right;
}

/* ── FORM NAV BUTTONS ────────────────────────── */
.form-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.form-nav-left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.form-nav-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.form-progress {
  display: flex;
  gap: 6px;
  align-items: center;
}

.form-progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.2s;
}

.form-progress-dot.active {
  background: var(--gold);
  width: 20px;
  border-radius: 3px;
}

.form-progress-dot.done {
  background: rgba(200, 168, 75, 0.4);
}

/* ── SUCCESS STATE ───────────────────────────── */
.form-success {
  display: none;
  padding: 60px 40px;
  text-align: center;
  animation: stepIn 0.4s var(--ease-out);
}

.form-success.visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(200, 168, 75, 0.12);
  border: 2px solid rgba(200, 168, 75, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.form-success h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
}

.form-success p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 440px;
  line-height: 1.7;
}

.form-success-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 400px;
  text-align: left;
}

.form-success-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid rgba(200, 168, 75, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.step-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.step-text strong {
  color: var(--text-primary);
}

/* ── LOADING ─────────────────────────────────── */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(10, 24, 40, 0.3);
  border-top-color: #0A1828;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── FORM SECTION DIVIDER ────────────────────── */
.form-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 20px;
  grid-column: 1 / -1;
}

.form-section-divider::before,
.form-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.form-section-divider span {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid.thirds {
    grid-template-columns: 1fr 1fr;
  }

  .form-step {
    padding: 28px 20px;
  }

  .form-nav {
    padding: 20px;
    flex-direction: column;
    gap: 16px;
  }

  .form-nav-left,
  .form-nav-right {
    width: 100%;
    justify-content: center;
  }

  .service-selector {
    grid-template-columns: 1fr;
  }

  .form-success {
    padding: 40px 20px;
  }
}

@media (max-width: 480px) {
  .form-grid.thirds {
    grid-template-columns: 1fr;
  }
}