/* Lead form, states follow the Figma "Input" component set. */
.form-frame {
  align-self: start;
  padding: 16px;
  border: 1px solid var(--grey-blue);
  border-radius: var(--radius);
  background: var(--light-blue);
}
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--soft-black);
}
.lead-form__intro { margin-top: -10px; margin-bottom: 6px; }
.lead-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lead-form__note { font-size: var(--fs-small); line-height: 18px; }
.lead-form__note--captcha { opacity: 0.7; }
.lead-form__note--captcha a { text-decoration: underline; }
/* The invisible widget's badge: hidden, as Google allows while the form shows
   its reCAPTCHA note (data-captcha-note) instead. */
.grecaptcha-badge { visibility: hidden; }
/* The widget's host holds only that fixed badge: no gap of its own in the form. */
[data-captcha] { display: contents; }
.lead-form__status:empty { display: none; }
.lead-form__status { font-weight: 600; }
.lead-form__status.is-error { color: var(--error); }

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field__label { font-weight: 600; }
.field__hint { font-weight: 400; color: var(--soft-black-70); }

.field__control {
  width: 100%;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--soft-black-40);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--soft-black);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field__control::placeholder { color: var(--soft-black-40); opacity: 1; }
.field__control:hover { border-color: var(--soft-black); }
.field__control:focus {
  outline: none;
  border-color: var(--soft-black-40);
  box-shadow: 0 0 0 4px var(--focus);
}
.field__control--area {
  min-height: 94px;
  padding: 12px 14px;
  resize: vertical;
}
.field__control--area::placeholder { color: var(--soft-black-70); }

.field__error {
  margin-top: -4px;
  font-size: 14px;
  line-height: 22px;
  color: var(--error);
}
.field__error:empty { display: none; }
.field.is-invalid .field__control,
.field.is-invalid .upload { border-color: var(--error); }

/* File upload drop zone */
.upload {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 55px;
  padding: 16px;
  border: 1px dashed var(--soft-black-40);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.upload:hover,
.upload.is-dragover { border-color: var(--soft-black); background: var(--light-beige); }
.upload:focus-within { box-shadow: 0 0 0 4px var(--focus); }
.upload.has-file { border-style: solid; }
.upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.upload__text {
  font-size: 13.5px;
  line-height: 20.25px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .form-frame { padding: 8px; }
  .lead-form { padding: 20px 16px; }
  .lead-form__row { grid-template-columns: 1fr; gap: 16px; }
}

/* Honeypot: off-screen for people, still in the DOM for form-filling bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead-form { position: relative; }
.lead-form[hidden] { display: none; }
.lead-form.is-sending .btn[type="submit"] { opacity: 0.6; cursor: progress; }

/* Shown after a successful submit, in place of the form. */
.lead-success {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 24px;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--soft-black);
  animation: success-in 0.5s var(--ease-out, ease) both;
}
.lead-success[hidden] { display: none; }
.lead-success h3:focus { outline: none; }

@keyframes success-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lead-success { animation: none; }
}
