body.lead-popup-open {
  overflow: hidden;
}

.lead-popup[hidden] {
  display: none;
}

.lead-popup {
  align-items: center;
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 1.5rem;
  position: fixed;
  z-index: 120;
}

.lead-popup__backdrop {
  background: rgba(4, 24, 17, 0.78);
  inset: 0;
  position: absolute;
}

.lead-popup__dialog {
  background: #fffdf8;
  border: 1px solid rgba(200, 155, 60, 0.35);
  border-radius: 8px;
  box-shadow: 0 24px 72px rgba(2, 14, 9, 0.42);
  display: grid;
  grid-template-columns: minmax(17rem, 0.84fr) minmax(24rem, 1.16fr);
  max-height: calc(100dvh - 3rem);
  max-width: 67rem;
  overflow: auto;
  position: relative;
  width: 100%;
  z-index: 1;
}

.lead-popup__close {
  align-items: center;
  background: #fffdf8;
  border: 1px solid rgba(13, 47, 35, 0.2);
  border-radius: 50%;
  color: #0d2f23;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.55rem;
  height: 2.35rem;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 1rem;
  top: 1rem;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
  width: 2.35rem;
  z-index: 2;
}

.lead-popup__close:hover,
.lead-popup__close:focus-visible {
  background: #0d2f23;
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.lead-popup__visual {
  background: #0d2f23;
  min-height: 32rem;
  overflow: hidden;
  position: relative;
}

.lead-popup__visual::after {
  background: linear-gradient(180deg, rgba(5, 24, 17, 0.08) 15%, rgba(5, 24, 17, 0.86) 100%);
  content: "";
  inset: 0;
  position: absolute;
}

.lead-popup__visual-image {
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: absolute;
  width: 100%;
}

.lead-popup__visual-copy {
  bottom: 0;
  color: #fff;
  left: 0;
  padding: 2rem;
  position: absolute;
  right: 0;
  z-index: 1;
}

.lead-popup__visual-logo {
  height: 3.25rem;
  object-fit: contain;
  object-position: left center;
  width: auto;
}

.lead-popup__visual-copy p,
.lead-popup__eyebrow {
  color: #c89b3c;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 1.1rem 0 0;
  text-transform: uppercase;
}

.lead-popup__visual-copy h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3.5vw, 2.85rem);
  font-weight: 500;
  line-height: 1.03;
  margin: 0.55rem 0 0;
}

.lead-popup__content {
  padding: clamp(2rem, 4vw, 3.5rem);
}

.lead-popup__eyebrow {
  color: #766f56;
  margin: 0;
}

.lead-popup__content h2 {
  color: #0d2f23;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.45rem, 4.4vw, 4rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.94;
  margin: 0.8rem 0 0;
  max-width: 11ch;
}

.lead-popup__intro {
  color: rgba(23, 34, 28, 0.72);
  font-size: 0.94rem;
  line-height: 1.65;
  margin: 1.3rem 0 0;
  max-width: 37rem;
}

.lead-popup__form {
  display: grid;
  gap: 0.85rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

/* Keep the success message visible while hiding the completed form. */
.lead-popup__form[hidden] {
  display: none !important;
}

.lead-popup__field {
  display: grid;
  gap: 0.42rem;
}

.lead-popup__field label {
  color: #0d2f23;
  font-size: 0.72rem;
  font-weight: 700;
}

.lead-popup__field input,
.lead-popup__field select {
  background: #fff;
  border: 1px solid rgba(13, 47, 35, 0.2);
  border-radius: 4px;
  color: #17221c;
  font: inherit;
  min-height: 2.8rem;
  padding: 0.65rem 0.8rem;
  width: 100%;
}

.lead-popup__field input:focus,
.lead-popup__field select:focus {
  border-color: #c89b3c;
  box-shadow: 0 0 0 3px rgba(200, 155, 60, 0.18);
  outline: none;
}

.lead-popup__submit {
  align-items: center;
  background: #0d2f23;
  border: 1px solid #0d2f23;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  grid-column: 1 / -1;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
  min-height: 3rem;
  text-transform: uppercase;
  transition: background-color 160ms ease, transform 160ms ease;
}

.lead-popup__submit:hover,
.lead-popup__submit:focus-visible {
  background: #526943;
  outline: none;
  transform: translateY(-1px);
}

.lead-popup__note,
.lead-popup__success {
  color: rgba(23, 34, 28, 0.62);
  font-size: 0.75rem;
  line-height: 1.55;
  margin: 0.9rem 0 0;
}

.lead-popup__success {
  background: rgba(31, 106, 74, 0.1);
  border: 1px solid rgba(31, 106, 74, 0.25);
  border-radius: 5px;
  color: #0d2f23;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.9rem 1rem;
}

@media (max-width: 700px) {
  .lead-popup {
    align-items: start;
    overflow-y: auto;
    padding: 0.75rem;
  }

  .lead-popup__dialog {
    grid-template-columns: minmax(0, 1fr);
    margin: auto;
    max-height: none;
    max-width: 29rem;
  }

  .lead-popup__visual {
    aspect-ratio: 16 / 8;
    min-height: 0;
  }

  .lead-popup__visual-copy {
    padding: 1rem 1.15rem;
  }

  .lead-popup__visual-logo {
    height: 2.35rem;
  }

  .lead-popup__visual-copy p {
    font-size: 0.59rem;
    margin-top: 0.5rem;
  }

  .lead-popup__visual-copy h2 {
    font-size: 1.45rem;
    margin-top: 0.3rem;
  }

  .lead-popup__content {
    padding: 1.35rem 1.1rem 1.25rem;
  }

  .lead-popup__content h2 {
    font-size: 2.25rem;
    line-height: 0.96;
  }

  .lead-popup__intro {
    font-size: 0.83rem;
    line-height: 1.55;
    margin-top: 0.9rem;
  }

  .lead-popup__form {
    gap: 0.72rem;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 1.1rem;
  }

  .lead-popup__submit {
    min-height: 2.8rem;
  }

  .lead-popup__close {
    height: 2.15rem;
    right: 0.7rem;
    top: 0.7rem;
    width: 2.15rem;
  }
}
