/* =========================================================
   KwickBlocks for Veterinary Practices
   Pricing / get-started lead form — warm-clay theme
   (companion to styles.css; loaded only on get-started.html)
   ========================================================= */

.lead-section {
  background: var(--paper-2);
  padding: clamp(5.5rem, 9vw, 8rem) 0 clamp(3.5rem, 7vw, 6rem);
  min-height: calc(100vh - 72px);
}

/* ---------- Two-column lead layout ---------- */
.lead-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 33rem);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  max-width: 72rem;
  margin-inline: auto;
}

/* ---------- Pitch aside ---------- */
.lead-pitch {
  position: sticky;
  top: 7rem;
  padding-top: 0.25rem;
}
.lead-pitch-title {
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  line-height: 1.06;
  margin: 0 0 var(--space-16) 0;
}
.lead-pitch-lead {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 var(--space-32) 0;
  max-width: 40ch;
}
/* ---------- Price-lead (entry price, shaped-to-buyer, free-month badge) ---------- */
.price-lead {
  border: 1px solid var(--stone);
  border-left: 3px solid var(--clay-strong);
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 2.2vw, 1.5rem);
  margin: 0 0 var(--space-32) 0;
}
.price-lead-figure {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.2;
}
.price-lead-figure strong {
  font-weight: 800;
  font-size: 1.35em;
  color: var(--earth);
}
.price-lead-sub {
  margin: var(--space-12) 0 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 42ch;
}
.price-lead-sub a { color: var(--clay-deep); font-weight: 600; text-underline-offset: 3px; }
.price-lead-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-16);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--clay-soft);
  border: 1px solid var(--clay);
  color: var(--clay-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.price-lead-badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--clay-strong);
}

.lead-pitch-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  margin: 0 0 var(--space-32) 0;
}
.lead-pitch-steps li { display: flex; gap: var(--space-16); align-items: flex-start; }
.lead-pitch-step-num {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--clay-soft);
  border: 1px solid var(--clay);
  color: var(--clay-deep);
  font-weight: 800;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}
.lead-pitch-steps strong {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--earth);
  margin-bottom: 0.2rem;
}
.lead-pitch-steps p { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--ink-soft); max-width: 38ch; }

.lead-pitch-pills { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.lead-pitch-pills li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--stone);
  white-space: nowrap;
}
.lead-pitch-pills li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--clay-strong);
}

/* ---------- Form card ---------- */
.lead-card {
  background: var(--paper);
  border: 1px solid var(--stone);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  width: 100%;
  box-shadow: var(--lift);
}
.lead-card-header { margin-bottom: var(--space-32); }
.lead-card-title { font-size: clamp(1.45rem, 2.4vw, 1.8rem); line-height: 1.15; margin: 0 0 var(--space-8) 0; }
.lead-card-subtitle { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- Wizard progress ---------- */
.wizard-progress { margin-bottom: var(--space-32); }
.wizard-progress-track {
  height: 3px;
  background: var(--stone);
  border-radius: 3px;
  margin-bottom: var(--space-16);
  overflow: hidden;
}
.wizard-progress-fill {
  height: 100%;
  background: var(--clay-strong);
  border-radius: 3px;
  transition: width 0.4s var(--ease-out-quart);
}
.wizard-steps { display: flex; justify-content: space-between; }
.wizard-step { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; flex: 1; }
.wizard-step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  border: 2px solid var(--stone-2);
  background: var(--paper);
  color: var(--ink-soft);
  transition: all 0.3s var(--ease-out-quart);
}
.wizard-step.active .wizard-step-circle {
  border-color: var(--clay-strong);
  background: var(--clay-soft);
  color: var(--clay-deep);
}
.wizard-step.completed .wizard-step-circle {
  border-color: var(--clay-strong);
  background: var(--clay-strong);
  color: var(--cream);
}
.wizard-step-label {
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  text-align: center;
}
.wizard-step.active .wizard-step-label { color: var(--clay-strong); }

/* ---------- Form fields ---------- */
.lead-form-body .form-group { margin-bottom: var(--space-24); }
.lead-form-body .form-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--earth);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: var(--space-8);
}
.field-icon {
  flex: none;
  width: 18px; height: 18px;
  fill: none;
  stroke: var(--clay-strong);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lead-form-body .form-control,
.lead-form-body .form-select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--stone);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  transition: border-color 160ms var(--ease-out-quart), box-shadow 160ms var(--ease-out-quart);
}
.lead-form-body .form-control::placeholder { color: var(--ink-soft); opacity: 0.7; }
.lead-form-body .form-control:focus,
.lead-form-body .form-select:focus {
  outline: none;
  border-color: var(--clay-strong);
  box-shadow: 0 0 0 3px var(--clay-soft);
}
.lead-form-body .form-control.is-invalid,
.lead-form-body .form-select.is-invalid {
  border-color: oklch(55% 0.18 28);
}
.lead-form-textarea { resize: vertical; min-height: 7rem; line-height: 1.55; }
.form-control-sm, .form-select-sm { padding: 0.55rem 0.75rem !important; font-size: 0.92rem !important; border-radius: 10px !important; }

.phone-input-group { display: flex; gap: var(--space-8); }
.phone-country-code { flex: 0 0 7.5rem; }
.phone-number { flex: 1; }

/* ---------- Feature interest ---------- */
.feature-interest { display: flex; flex-direction: column; gap: 0.625rem; }
.feature-interest-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.6fr);
  gap: var(--space-16);
  align-items: center;
  padding: 0.9rem 1rem;
  background: var(--cream);
  border: 1.5px solid var(--stone);
  border-radius: var(--radius);
  transition: border-color 200ms var(--ease-out-quart), background 200ms var(--ease-out-quart);
}
.feature-interest-row.is-active {
  border-color: var(--clay);
  background: var(--clay-soft);
}
.feature-interest-row:not(.is-active) .feature-interest-detail { display: none; }

.feature-interest-check {
  display: flex; align-items: center; gap: 0.625rem;
  margin: 0; cursor: pointer; user-select: none;
}
.feature-interest-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--stone-2);
  background: var(--paper);
  position: relative; cursor: pointer; flex: 0 0 20px;
  transition: all 180ms var(--ease-out-quart);
}
.feature-interest-check input[type="checkbox"]:checked {
  background: var(--clay-strong);
  border-color: var(--clay-strong);
}
.feature-interest-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid var(--cream);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.feature-interest-name { font-weight: 600; font-size: 0.98rem; color: var(--earth); }
.feature-interest-sub-label {
  display: block;
  font-size: 0.8rem; font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.feature-interest-yesno, .feature-interest-platforms { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.feature-interest-pill {
  font: inherit;
  background: var(--paper);
  border: 1.5px solid var(--stone-2);
  color: var(--ink-soft);
  font-size: 0.85rem; font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 180ms var(--ease-out-quart);
}
.feature-interest-pill:hover { border-color: var(--clay); color: var(--earth); }
.feature-interest-pill.is-active {
  background: var(--clay-strong);
  border-color: var(--clay-strong);
  color: var(--cream);
}
.feature-interest-note { display: inline-block; font-size: 0.9rem; color: var(--ink-soft); font-style: italic; }
.lead-form-help { font-size: 0.85rem; color: var(--ink-soft); margin: -0.25rem 0 0.85rem 0; line-height: 1.5; }
.lead-form-optional { font-weight: 400; color: var(--ink-soft); font-style: italic; }

/* ---------- Validation ---------- */
.validation-summary {
  background: oklch(95% 0.04 28);
  border: 1px solid oklch(80% 0.09 28);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: var(--space-16);
}
.validation-error { color: oklch(48% 0.16 28); font-size: 0.85rem; line-height: 1.6; }

/* ---------- Wizard nav ---------- */
.wizard-nav {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  margin-top: var(--space-24);
}
.wizard-nav-spacer { flex: 1; }
.btn[disabled], .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
/* .btn sets display:inline-flex, which beats the UA [hidden] rule — restore it. */
.btn[hidden] { display: none !important; }

/* ---------- Success ---------- */
.lead-success-wrap { max-width: 38rem; margin-inline: auto; }
.lead-success { text-align: center; }
.lead-success-icon {
  width: 76px; height: 76px;
  margin: 0 auto var(--space-24);
  border-radius: 50%;
  background: var(--clay-soft);
  display: flex; align-items: center; justify-content: center;
}
.lead-success-icon svg { fill: none; stroke: var(--clay-strong); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Conversion moment: the badge settles, then the check draws itself in.
   Re-runs each time the panel is shown (hidden -> shown restarts the animation). */
.lead-success-icon { animation: success-pop 520ms var(--ease-out-expo) both; }
.lead-success-icon svg path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: success-draw 540ms var(--ease-out-quart) 200ms forwards; }
@keyframes success-pop { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: none; } }
@keyframes success-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .lead-success-icon, .lead-success-icon svg path { animation: none; }
  .lead-success-icon svg path { stroke-dashoffset: 0; }
}

.lead-success .lead-card-subtitle { font-size: 1.05rem; max-width: 40ch; margin-inline: auto; }
.lead-success-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  margin-top: var(--space-32);
}
.lead-success-actions .btn { width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .lead-page { grid-template-columns: 1fr; gap: var(--space-32); max-width: 36rem; }
  .lead-pitch { position: static; }
}
@media (max-width: 560px) {
  .feature-interest-row { grid-template-columns: 1fr; gap: 0.625rem; }
  .wizard-step-label { font-size: 0.6rem; }
  .wizard-step-circle { width: 30px; height: 30px; font-size: 0.75rem; }
  .wizard-nav { flex-wrap: wrap; }
  .wizard-nav .btn { flex: 1; }
}
