/* Lead-capture dialog — Wix Forms surface.
   Built on the existing v3 tokens so it reads as part of the same system. */

.lead {
  width: min(34rem, calc(100vw - 2rem));
  /* The field list runs taller than a phone viewport — let the dialog scroll,
     or the submit button is clipped off the bottom with no way to reach it. */
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  background: var(--surface);
  color: var(--body);
  font-family: var(--font-sans);
  box-shadow: var(--shadow-panel);
}

.lead::backdrop {
  background: rgba(var(--scrim-rgb), 0.55);
  backdrop-filter: blur(2px);
}

.lead__close {
  /* Sticky, not absolute — the dialog scrolls, and an absolute close button
     would scroll out of reach on a long form. */
  position: sticky;
  top: 0;
  float: right;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--body-quiet);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.lead__close:hover {
  background: var(--surface-tint);
  color: var(--ink);
}

.lead__title {
  margin: 0 0 0.5rem;
  color: var(--navy);
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.lead__blurb {
  margin: 0 0 1.5rem;
  max-width: 42ch;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--body-quiet);
}

.lead__form {
  display: grid;
  gap: 1rem;
}

.lead__row {
  display: grid;
  gap: 0.375rem;
}

.lead__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.lead__row input,
.lead__row select,
.lead__row textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-btn);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.lead__row textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.lead__row input:focus-visible,
.lead__row select:focus-visible,
.lead__row textarea:focus-visible {
  outline: none;
  border-color: var(--accent-mid);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.15);
}

.lead__row.is-invalid input,
.lead__row.is-invalid select,
.lead__row.is-invalid textarea {
  border-color: #c0392b;
}

.lead__error,
.lead__formError {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #c0392b;
}

.lead__submit {
  justify-self: start;
  margin-top: 0.25rem;
}

.lead__submit[disabled] {
  opacity: 0.6;
  cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
  .lead__close,
  .lead__row input,
  .lead__row select,
  .lead__row textarea {
    transition: none;
  }
}
