/* ============================================================
   Lead form — match with a VA-accredited attorney
   ============================================================ */
.lead-section {
  padding: 72px 0 80px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-strong) 100%);
  color: #fff;
}
.lead-intro {
  max-width: 640px;
  margin: 0 auto 32px;
  text-align: center;
}
.lead-intro .eyebrow { color: #fff; opacity: 0.7; }
.lead-intro h2 {
  color: #fff;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  margin-bottom: 14px;
}
.lead-intro p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.02rem;
  max-width: 56ch;
  margin: 0 auto;
}

.lead-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-strong);
}
@media (max-width: 520px) { .lead-card { padding: 22px 18px; } }

.lead-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.lead-form-grid .full { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .lead-form-grid { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.field label .req { color: var(--red); margin-left: 2px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.96rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: #9ca3af; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.1);
}
.field textarea {
  resize: vertical;
  min-height: 110px;
  font-family: inherit;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(191, 10, 48, 0.1);
}
.field-error-msg {
  display: none;
  font-size: 0.82rem;
  color: var(--red);
  margin-top: 2px;
}
.field.has-error .field-error-msg { display: block; }

/* Honeypot — invisible to humans, visible to bots */
.lead-form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.lead-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 14px 22px;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lead-submit:hover:not(:disabled) {
  background: var(--red-strong);
  border-color: var(--red-strong);
}
.lead-submit:disabled {
  background: var(--muted);
  border-color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}
.lead-submit .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.lead-submit.is-loading .spinner { display: inline-block; }
.lead-submit.is-loading .label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

.lead-disclaimer {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}
.lead-disclaimer strong { color: var(--text); }

.lead-success,
.lead-error {
  display: none;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.95rem;
}
.lead-success {
  background: #f0fdf4;
  border-left: 3px solid #15803d;
  color: #14532d;
}
.lead-error {
  background: #fef2f2;
  border-left: 3px solid var(--red);
  color: #7f1d1d;
}
.lead-success.is-visible,
.lead-error.is-visible { display: block; }
.lead-success strong, .lead-error strong { display: block; margin-bottom: 4px; }


/* ============================================================
   Lead form (#get-help)
   ============================================================ */
.lead-section {
  padding: 72px 0;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.92);
}
.lead-section .container {
  max-width: 720px;
}
.lead-section .eyebrow { color: #ff9aa8; }
.lead-section h2 {
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  text-align: center;
  margin: 0 0 14px;
}
.lead-section .lede {
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.04rem;
  margin: 0 auto 8px;
  max-width: 56ch;
}
.lead-section .lede strong { color: #fff; }
.lead-section .lede-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 16px 0 32px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
}
.lead-section .lede-row li {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lead-section .lede-row li::before {
  content: "✓";
  color: #ff9aa8;
  font-weight: 700;
}

.lead-form {
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-strong);
}
.lead-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 580px) {
  .lead-form-row { grid-template-columns: 1fr; }
  .lead-form { padding: 24px; }
}
.lead-field { display: flex; flex-direction: column; gap: 6px; }
.lead-field-full { grid-column: 1 / -1; }
.lead-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.lead-field label .req { color: var(--red); margin-left: 2px; }
.lead-field input,
.lead-field select,
.lead-field textarea {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.98rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lead-field input:focus,
.lead-field select:focus,
.lead-field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.12);
}
.lead-field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}
.lead-field-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 2px 0 0;
}
.lead-field.has-error input,
.lead-field.has-error select,
.lead-field.has-error textarea {
  border-color: var(--red);
}
.lead-field-error {
  font-size: 0.78rem;
  color: var(--red);
  margin: 2px 0 0;
  display: none;
}
.lead-field.has-error .lead-field-error { display: block; }

/* Honeypot — invisible to humans, baited for bots */
.lead-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead-actions {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lead-submit {
  width: 100%;
  padding: 14px 24px;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lead-submit:hover:not(:disabled) {
  background: var(--red-strong);
  border-color: var(--red-strong);
}
.lead-submit:disabled {
  background: #9ca3af;
  border-color: #9ca3af;
  cursor: wait;
}
.lead-fineprint {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin: 0;
  line-height: 1.55;
}
.lead-form-error {
  margin-top: 14px;
  padding: 12px 16px;
  background: #fef2f2;
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  color: var(--red-strong);
  font-size: 0.9rem;
  display: none;
}
.lead-form-error.is-visible { display: block; }

.lead-success {
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-strong);
  display: none;
}
.lead-success.is-visible { display: block; }
.lead-success-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
}
.lead-success h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  color: var(--navy);
}
.lead-success p {
  margin: 0;
  color: var(--muted);
  max-width: 44ch;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   Lead form — "Get matched with an attorney"
   ============================================================ */
.help-features {
  list-style: none;
  padding: 0;
  margin: 22px 0 28px;
  display: grid;
  gap: 10px;
}
.help-features li {
  position: relative;
  padding-left: 30px;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.55;
}
.help-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.lead-form {
  display: grid;
  gap: 18px;
  margin: 32px 0 0;
  padding: 28px;
  background: var(--surface-muted);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.form-row { display: grid; gap: 6px; }
.form-row label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-row textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.14);
}
.form-row.has-error input,
.form-row.has-error select,
.form-row.has-error textarea {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(191, 10, 48, 0.12);
}
.form-row .field-error {
  display: none;
  color: var(--red);
  font-size: 0.85rem;
  margin-top: 2px;
}
.form-row.has-error .field-error { display: block; }
.form-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 2px 0 0;
}

/* Honeypot — off-screen, hidden from screen readers via aria-hidden + tabindex */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 22px;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.form-submit:hover { background: var(--red-strong); border-color: var(--red-strong); }
.form-submit:disabled { opacity: 0.7; cursor: progress; }
.submit-loader {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.submit-loader::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: lf-spin 0.7s linear infinite;
}
@keyframes lf-spin { to { transform: rotate(360deg); } }

.form-disclaimer {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.form-disclaimer a { color: var(--navy); text-decoration: underline; }

.form-result {
  margin: 24px 0 0;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.form-result h3 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 700; }
.form-result p  { margin: 0; font-size: 0.98rem; color: var(--muted); line-height: 1.55; }
.form-result a  { color: var(--navy); text-decoration: underline; }
.form-result.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.form-result.success h3 { color: #15803d; }
.form-result.error {
  background: #fef2f2;
  border-color: #fecaca;
}
.form-result.error h3 { color: var(--red-strong); }

/* ============================================================
   Lead capture form
   ============================================================ */
.lead-section {
  padding: 72px 0;
  background: var(--navy);
  color: #fff;
}
.lead-section h2 { color: #fff; }
.lead-intro {
  max-width: 640px;
  margin: 0 auto 32px;
  text-align: center;
}
.lead-intro .eyebrow { color: #ffffff; opacity: 0.7; }
.lead-intro h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  margin-bottom: 14px;
}
.lead-intro p {
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.lead-form-wrap {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  color: var(--text);
  padding: 32px 32px 28px;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.lead-form {
  display: grid;
  gap: 18px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}
.field label .req { color: var(--red); }
.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.08);
}
.field textarea {
  min-height: 110px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}
.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--red);
}
.field-error {
  display: none;
  font-size: 0.82rem;
  color: var(--red);
}
.field.has-error .field-error { display: block; }

/* Honeypot — hidden from humans, visible to bots */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.lead-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 14px 24px;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.lead-submit:hover { background: var(--red-strong); border-color: var(--red-strong); }
.lead-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.lead-submit .spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  margin-right: 8px;
  animation: spin 0.7s linear infinite;
}
.lead-submit.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.lead-disclaimer {
  margin: 18px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.lead-disclaimer strong { color: var(--text); }

.form-error-banner {
  display: none;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  color: var(--red-strong);
  font-size: 0.9rem;
}
.form-error-banner.is-visible { display: block; }

/* Success state — replaces form */
.lead-success {
  display: none;
  text-align: center;
  padding: 24px 16px;
}
.lead-success.is-visible { display: block; }
.lead-success .check {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lead-success h3 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 10px;
}
.lead-success p {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0 auto;
  max-width: 44ch;
}

/* Lead form alignment/width polish */
.lead-section .container {
  max-width: 840px;
}

.lead-section .lead-card {
  max-width: 760px;
  width: 100%;
}

@media (min-width: 521px) {
  .lead-section .lead-form-grid .field label {
    min-height: 2.4em;
    display: flex;
    align-items: flex-end;
    line-height: 1.25;
  }
  .lead-section .lead-form-grid .field label.label-tall {
    min-height: 2.4em;
    display: flex;
    align-items: flex-end;
    line-height: 1.25;
  }
}
