.lead-modal[hidden] {
  display: none;
}

.lead-modal {
  position: fixed;
  z-index: 5000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  color: #170061;
}

.lead-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .59);
}

.lead-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1776px, calc(100vw - 64px));
  max-height: calc(100dvh - 64px);
  overflow: auto;
  padding: clamp(88px, 8vw, 138px) clamp(32px, 8vw, 150px) clamp(72px, 7vw, 112px);
  border-radius: 44px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(18, 0, 85, .18);
  overscroll-behavior: contain;
}

.lead-modal__close {
  position: absolute;
  top: clamp(32px, 3vw, 48px);
  right: clamp(32px, 3vw, 48px);
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  padding: 0 0 5px;
  border: 0;
  border-radius: 28px;
  background: #f0efff;
  color: #080808;
  font: 400 43px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

.lead-modal__close:hover {
  background: #e3e0ff;
  transform: scale(1.03);
}

.lead-modal__content {
  width: min(100%, 1260px);
  margin: 0 auto;
  text-align: center;
}

.lead-modal__content h2 {
  max-width: 1220px;
  margin: 0 auto;
  color: #170061;
  font-size: clamp(48px, 5vw, 86px);
  font-weight: 500;
  line-height: .99;
  letter-spacing: -.065em;
}

.lead-modal__subtitle {
  max-width: 1080px;
  margin: clamp(34px, 4vw, 68px) auto 0;
  color: #978ec2;
  font-size: clamp(20px, 1.65vw, 28px);
  font-weight: 400;
  line-height: 1.35;
}

.lead-modal__form {
  display: flex;
  width: min(800px, 100%);
  margin: clamp(46px, 5vw, 78px) auto 0;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.lead-modal__form input:not([type="checkbox"]) {
  width: 100%;
  height: 86px;
  padding: 0 40px;
  border: 0;
  border-radius: 25px;
  outline: 0;
  background: #f0efff;
  color: #170061;
  font: 400 25px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
}

.lead-modal__form input:not([type="checkbox"]):focus-visible {
  box-shadow: 0 0 0 3px rgba(23, 0, 97, .18);
}

.lead-modal__form input::placeholder {
  color: #978ec2;
  opacity: 1;
}

.lead-modal__form .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.lead-modal__consent {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 37px 0 34px;
  color: #170061;
  font-size: 19px;
  line-height: 1.42;
  cursor: pointer;
}

.lead-modal__consent input {
  width: 36px;
  height: 36px;
  margin: 0;
  flex: 0 0 36px;
  border: 2px solid #978ec2;
  border-radius: 9px;
  accent-color: #22006f;
}

.lead-modal__consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lead-modal__submit {
  align-self: center;
  min-width: 240px;
  min-height: 88px;
  padding: 20px 42px;
  border: 0;
  border-radius: 26px;
  background: #21006d;
  color: #fff;
  font: 400 25px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

.lead-modal__submit:hover {
  background: #2e078d;
  transform: translateY(-2px);
}

body.lead-modal-open {
  overflow: hidden;
}

@media (min-width: 821px) {
  .lead-modal__content h2 {
    white-space: nowrap;
  }
}

@media (min-width: 821px) and (max-width: 1280px) {
  .lead-modal {
    padding: 24px;
  }

  .lead-modal__dialog {
    width: min(1084px, calc(100vw - 48px));
    padding: 96px 48px 88px;
    border-radius: 40px;
  }

  .lead-modal__content h2 {
    max-width: 600px;
    white-space: normal;
  }

  .lead-modal__subtitle {
    max-width: 780px;
  }
}

@media (min-width: 1281px) and (max-height: 1100px) {
  .lead-modal__dialog {
    padding-top: 56px;
    padding-bottom: 48px;
  }

  .lead-modal__close {
    top: 28px;
    right: 28px;
    width: 64px;
    height: 64px;
    border-radius: 22px;
    font-size: 36px;
  }

  .lead-modal__content h2 {
    font-size: 66px;
  }

  .lead-modal__subtitle {
    margin-top: 28px;
    font-size: 22px;
  }

  .lead-modal__form {
    margin-top: 34px;
    gap: 10px;
  }

  .lead-modal__form input:not([type="checkbox"]) {
    height: 68px;
    border-radius: 21px;
    font-size: 21px;
  }

  .lead-modal__consent {
    margin: 24px 0 22px;
    font-size: 16px;
  }

  .lead-modal__consent input {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .lead-modal__submit {
    min-height: 68px;
    border-radius: 22px;
    font-size: 21px;
  }
}

@media (max-width: 820px) {
  .lead-modal {
    padding: 12px;
  }

  .lead-modal__dialog {
    width: min(626px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    padding: 55px 27px 54px;
    border-radius: 34px;
  }

  .lead-modal__close {
    top: 27px;
    right: 27px;
    width: 80px;
    height: 80px;
    border-radius: 28px;
    font-size: 40px;
  }

  .lead-modal__content {
    width: 100%;
  }

  .lead-modal__content h2 {
    max-width: 420px;
    font-size: clamp(37px, 7vw, 52px);
    white-space: normal;
  }

  .lead-modal__subtitle {
    max-width: 560px;
    margin-top: 29px;
    font-size: clamp(17px, 3.2vw, 23px);
  }

  .lead-modal__form {
    margin-top: 30px;
    gap: 14px;
  }

  .lead-modal__form input:not([type="checkbox"]) {
    height: 83px;
    padding: 0 40px;
    border-radius: 25px;
    font-size: clamp(21px, 3.2vw, 25px);
  }

  .lead-modal__consent {
    gap: 14px;
    margin: 27px 0 30px;
    font-size: clamp(16px, 2.4vw, 20px);
  }

  .lead-modal__consent input {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .lead-modal__submit {
    min-width: 217px;
    min-height: 84px;
    font-size: 23px;
  }
}

@media (max-width: 520px) {
  .lead-modal__dialog {
    padding: 56px 27px 54px;
  }

  .lead-modal__close {
    top: 27px;
    right: 27px;
    width: 80px;
    height: 80px;
  }

  .lead-modal__content h2 {
    max-width: 360px;
    font-size: 40px;
  }

  .lead-modal__subtitle {
    font-size: 17px;
    line-height: 1.4;
  }

  .lead-modal__form input:not([type="checkbox"]) {
    height: 83px;
    padding: 0 40px;
  }

  .lead-modal__consent {
    margin-top: 27px;
    font-size: 16px;
    line-height: 1.38;
  }
}

@media (max-width: 520px) and (max-height: 900px) {
  .lead-modal__dialog {
    padding: 88px 18px 28px;
    border-radius: 30px;
  }

  .lead-modal__close {
    top: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 19px;
    font-size: 31px;
  }

  .lead-modal__content h2 {
    max-width: 300px;
    font-size: 36px;
  }

  .lead-modal__subtitle {
    margin-top: 19px;
    font-size: 16px;
    line-height: 1.32;
  }

  .lead-modal__form {
    margin-top: 21px;
    gap: 8px;
  }

  .lead-modal__form input:not([type="checkbox"]) {
    height: 58px;
    padding: 0 22px;
    border-radius: 18px;
    font-size: 18px;
  }

  .lead-modal__consent {
    gap: 10px;
    margin: 20px 0 18px;
    font-size: 14px;
    line-height: 1.32;
  }

  .lead-modal__consent input {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    border-radius: 7px;
  }

  .lead-modal__submit {
    min-width: 180px;
    min-height: 60px;
    padding: 14px 28px;
    border-radius: 20px;
    font-size: 18px;
  }
}
