/* ──────────────────────────────────────────────────────────────
   EXP-014 — capture-first demo form
   Shared across all landing pages. Uses only existing :root tokens
   (--purple, --border, --muted, --text, --dark, --surface, --white,
   --shadow-card/-pop) so it matches both the home inline styles and
   category.css. Reuses .btn-primary / .section-tag from the page.
   ────────────────────────────────────────────────────────────── */

/* Breathing room between the final-CTA checklist above and the form card */
.lead-form-mount { margin-top: 56px; }

.lead-form {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

/* Card shell — mirrors the soft-card pattern used across the site */
.lead-form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-pop);
  padding: 40px 36px 36px;
}

.lead-form-head {
  text-align: center;
  margin-bottom: 26px;
}
.lead-form-head h3 {
  font-size: 26px;
  line-height: 1.15;
  color: var(--dark);
  letter-spacing: -0.03em;
  margin: 12px 0 8px;
}
.lead-form-head h3 em { font-style: normal; color: var(--purple); }
.lead-form-sub {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
}

/* Fields — single-column, large tappable targets */
.lead-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.lead-field { margin-bottom: 16px; }
.lead-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.01em;
  margin-bottom: 7px;
}
.lead-field label .req { color: var(--purple); margin-left: 2px; }

.lead-field input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;            /* >=16px avoids iOS zoom-on-focus */
  font-weight: 500;
  color: var(--text);
  background: var(--off-white, #FCFAFA);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.lead-field input::placeholder { color: var(--muted); opacity: 0.6; }
.lead-field input:hover { border-color: #C9CBDA; }
.lead-field input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(94, 23, 235, 0.12);
}

/* Inline validation */
.lead-field.has-error input {
  border-color: #D6336C;
  background: #FFF5F8;
}
.lead-field.has-error input:focus {
  box-shadow: 0 0 0 4px rgba(214, 51, 108, 0.12);
}
.lead-error {
  display: none;
  font-size: 12.5px;
  font-weight: 600;
  color: #D6336C;
  margin-top: 6px;
}
.lead-field.has-error .lead-error { display: block; }

/* Submit + "what happens next" */
.lead-submit {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  cursor: pointer;
  border: none;
}
.lead-submit[disabled] { opacity: 0.75; cursor: progress; }
.lead-submit .spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-right: 2px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -3px;
  animation: leadSpin 0.7s linear infinite;
}
.lead-submit.is-loading .spinner { display: inline-block; }

.lead-next {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin: 16px 0 0;
}
.lead-next svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 4px;
  stroke: var(--purple);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Entrance reveal — same feel as the site's .fade-in */
.lead-form-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.lead-form-mount.in-view .lead-form-card {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 520px) {
  .lead-form-mount { margin-top: 36px; }
  .lead-form-card { padding: 30px 22px 28px; border-radius: 20px; }
  .lead-row { grid-template-columns: 1fr; gap: 0; }
  .lead-form-head h3 { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .lead-form-card,
  .lead-field input,
  .lead-submit { transition: none; }
  .lead-form-mount .lead-form-card { opacity: 1; transform: none; }
  .lead-submit .spinner { animation: none; }
}
