/* Lead capture modal */

.lead-modal[hidden] { display: none; }
.lead-modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 24px 16px;
}
.lead-modal.is-open { display: grid; }
.lead-modal-backdrop {
  position: absolute; inset: 0; background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(6px);
}
.lead-modal-dialog {
  position: relative; z-index: 1; width: min(600px, 100%);
  max-height: min(90vh, 820px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--r-2xl); box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.lead-modal-close {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  width: 36px; height: 36px; border-radius: var(--r-full);
  display: grid; place-items: center; color: var(--text-secondary);
  background: var(--secondary); border: 1px solid var(--border-light);
  transition: color .2s, background .2s, border-color .2s;
}
.lead-modal-close:hover {
  color: var(--text-primary); background: var(--surface); border-color: var(--border);
}
.lead-modal-close svg { width: 18px; height: 18px; }
.lead-modal-body {
  overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(28px, 4vw, 36px) clamp(20px, 4vw, 32px);
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.lead-modal-body::-webkit-scrollbar { width: 6px; }
.lead-modal-body::-webkit-scrollbar-track { background: transparent; margin: 12px 0; }
.lead-modal-body::-webkit-scrollbar-thumb {
  background: var(--border); border-radius: var(--r-full);
}
.lead-modal-dialog h2 {
  font-size: clamp(22px, 3vw, 26px); margin-bottom: 8px; padding-right: 44px;
  letter-spacing: -0.02em;
}
.lead-modal-sub {
  color: var(--text-secondary); font-size: 15px; line-height: 1.6; margin-bottom: 22px;
}
.lead-form { display: grid; gap: 16px; }
.lead-form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.lead-field { display: grid; gap: 7px; }
.lead-field > span {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.lead-field > span em { font-style: normal; color: var(--text-tertiary); }
.lead-field input,
.lead-field select,
.lead-field textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--text-primary);
  background: var(--secondary); border: 1px solid var(--border-light);
  border-radius: var(--r-md); padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none;
}
.lead-field select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19.5 8.25-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  background-size: 16px;
}
.lead-field textarea { resize: vertical; min-height: 104px; line-height: 1.5; }
.lead-field input:hover,
.lead-field select:hover,
.lead-field textarea:hover {
  border-color: var(--border);
}
.lead-field input:focus,
.lead-field select:focus,
.lead-field textarea:focus {
  outline: none; background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .1);
}
.lead-form.was-validated .lead-field input:invalid,
.lead-form.was-validated .lead-field select:invalid,
.lead-form.was-validated .lead-field textarea:invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .08);
}
.lead-consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12px; color: var(--text-secondary); line-height: 1.55;
  padding: 4px 0;
}
.lead-consent input {
  width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; accent-color: var(--primary);
}
.lead-submit { width: 100%; margin-top: 2px; }
.lead-modal-success {
  text-align: center; padding: 16px 8px 8px;
}
.lead-modal-success[hidden] { display: none; }
.lead-success-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--success-light); color: var(--success);
  display: grid; place-items: center;
}
.lead-success-icon svg { width: 28px; height: 28px; }
.lead-modal-success h2 { padding-right: 0; margin-bottom: 10px; }
.lead-modal-success p {
  color: var(--text-secondary); font-size: 15px; line-height: 1.65; margin-bottom: 24px;
}
body.lead-modal-open { overflow: hidden; }

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