/* Form fields, status messages and the lead popup. */

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.field {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--white);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s ease;
}
.field:focus { border-color: var(--blue); }
textarea.field { height: auto; min-height: 110px; padding: 14px 18px; line-height: 1.5; resize: vertical; }
select.field { appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a877e' stroke-width='3'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E") no-repeat right 18px center; padding-right: 42px; }

/* Underlined fields on dark backgrounds (home contact block). */
.field--line {
  height: auto;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid #35415a;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
  color: var(--white);
}
.field--line:focus { border-color: var(--gold); }
.field-label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--night-muted); }

.form-status { min-height: 1.4em; margin-top: 12px; font-size: 14px; line-height: 1.4; }
.form-status:empty { display: none; }
.form-status[data-kind='error'] { color: #d0532f; }
.form-status[data-kind='success'] { color: #1f7a5a; }
.on-dark .form-status[data-kind='success'] { color: #57c9a5; }
.on-dark .form-status[data-kind='error'] { color: #f0a07a; }

/* ---------- phone country selector (intl-tel-input) ----------
   Light skin for every [data-phone-input] field (assets/js/phone-input.js).
   Scoped to .iti: on phones the country list opens as a fullscreen popup
   appended to <body>. */

.iti {
  --iti-border-color: var(--line-2);
  --iti-hover-color: var(--blue-tint);
  --iti-icon-color: var(--stone);
  --iti-arrow-color: var(--stone);
}

.iti__selected-dial-code { color: var(--ink); font-size: 15.5px; }

.iti__country-selector,
.iti--fullscreen-popup .iti__dropdown-content {
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 24px 48px -20px rgb(20 20 22 / 35%);
}

/* At least wide enough for long country names; never a sideways scrollbar. */
.iti__country-selector { min-width: min(320px, calc(100vw - 32px)); }
.iti__country-list { overflow-x: hidden; }

.iti .iti__search-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.iti .iti__search-input:focus { outline: none; }
.iti__country { font-size: 15px; color: var(--ink); }
.iti__country.iti__highlight { background: var(--blue-tint); }
.iti__dial-code { color: var(--stone); }

/* ---------- lead popup ---------- */

.lead-pop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 24px;
  background: rgb(12 14 20 / 62%);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .38s var(--ease);
}
.lead-pop.is-open { opacity: 1; pointer-events: auto; }

.lead-pop__box {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  width: min(920px, 100%);
  max-height: 94vh;
  overflow-y: auto;
  border-radius: 26px;
  background: var(--white);
  box-shadow: 0 50px 90px -40px rgb(10 12 20 / 70%);
  transform: translateY(22px) scale(.97);
  transition: transform .5s var(--ease) .06s;
}
.lead-pop.is-open .lead-pop__box { transform: none; }
.lead-pop__pitch { padding: 38px 36px 32px; }
.lead-pop__kicker { font-size: 11.5px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--blue); }
.lead-pop__title { margin-top: 14px; font-weight: 600; font-size: 25px; line-height: 1.28; letter-spacing: -.01em; }
.lead-pop__title span { color: var(--blue); }
.lead-pop__note { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 13.5px; font-style: italic; color: #5f6570; }
.lead-pop__note span { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.lead-pop__options { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 20px; }
.lead-pop__option { padding: 16px 18px; border: 1px solid #e8e5dd; border-radius: 12px; transition: border-color .2s ease, box-shadow .2s ease; }
.lead-pop__option:hover { border-color: #c9d8f7; box-shadow: 0 10px 22px -16px rgb(20 20 22 / 40%); }
.lead-pop__option div { font-weight: 600; font-size: 16.5px; }
.lead-pop__option p { margin-top: 4px; font-size: 14px; color: #5f6570; }
.lead-pop__option b { color: var(--blue); }
.lead-pop__fine { font-size: 13px; color: #8e9299; }
.lead-pop__fine--center { margin-top: 12px; text-align: center; font-size: 12.5px; }

.lead-pop__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 38px 36px 32px;
  border-left: 1px solid #eae7df;
  background: #faf8f3;
}
.lead-pop__form-title { font-weight: 600; font-size: 19px; }
.lead-pop__form-lead { margin-bottom: 10px; font-size: 14px; line-height: 1.55; color: #5f6570; }

.lead-pop__submit { margin-top: 4px; }

.lead-pop__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e5e2da;
  border-radius: 50%;
  background: #f4f2ec;
  font-size: 15px;
  line-height: 1;
  color: #6b6f76;
  cursor: pointer;
}

@media (max-width: 760px) {
  .lead-pop { padding: 16px; }
  .lead-pop__box { grid-template-columns: minmax(0, 1fr); }

  /* Phones: headline and form only, so the popup fits one screen without scrolling. */
  .lead-pop__pitch { padding: 26px 22px 18px; }
  .lead-pop__title { margin-top: 10px; padding-right: 32px; font-size: 22px; }
  .lead-pop__options,
  .lead-pop__pitch .lead-pop__fine { display: none; }
  .lead-pop__form { gap: 10px; padding: 20px 22px 22px; border-left: 0; border-top: 1px solid #eae7df; }
  .lead-pop__form .field { height: 48px; }
  .lead-pop__form textarea.field { min-height: 76px; }
}

/* Short phones (iPhone SE): drop the form's intro line so nothing scrolls. */
@media (max-width: 760px) and (max-height: 700px) {
  .lead-pop__form-lead { display: none; }
}

/* While a form sends: the button keeps its size (forms.js locks the width) and colour, label centred. */
.btn.is-busy { justify-content: center; padding-right: 20px; padding-left: 20px; }
.btn.is-busy:disabled { opacity: 1; }

/* A field that failed validation (forms.js): translucent red outline, no message text. */
input[aria-invalid='true'], select[aria-invalid='true'], textarea[aria-invalid='true'],
.iti:has(input[aria-invalid='true']) input {
  border-color: rgb(229 72 72 / 55%) !important;
  box-shadow: 0 0 0 3px rgb(229 72 72 / 16%) !important;
}
