html.has-newsletter-modal,
body.has-newsletter-modal {
  overflow: hidden;
}

.home-newsletter-modal,
.home-newsletter-modal * {
  box-sizing: border-box;
}

.home-newsletter-modal {
  --newsletter-blue: #064393;
  --newsletter-action: #0877ef;
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  place-items: center;
  padding: 24px;
  font-family: "Lato", Arial, sans-serif;
}

.home-newsletter-modal.is-open {
  display: grid;
}

.home-newsletter-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 20, 48, 0.68);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.home-newsletter-modal__dialog {
  position: relative;
  isolation: isolate;
  width: min(100%, 980px);
  max-height: calc(100dvh - 48px);
  aspect-ratio: 16 / 9;
  overflow: auto;
  color: #fff;
  background: var(--newsletter-blue);
  box-shadow: 0 24px 72px rgba(0, 18, 44, 0.38);
}

.home-newsletter-modal__dialog::before,
.home-newsletter-modal__dialog::after {
  position: absolute;
  z-index: 2;
  width: 64px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  content: "";
  pointer-events: none;
}

.home-newsletter-modal__dialog::before {
  top: 0;
  left: 0;
  border-top: 0;
  border-left: 0;
}

.home-newsletter-modal__dialog::after {
  right: 34%;
  bottom: 0;
  border-right: 0;
  border-bottom: 0;
}

.home-newsletter-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 5;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 28, 70, 0.32);
  font: 300 30px/1 Arial, sans-serif;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.home-newsletter-modal__close:hover,
.home-newsletter-modal__close:focus-visible {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 28, 70, 0.72);
  outline: 0;
}

.home-newsletter-modal__logo {
  position: relative;
  z-index: 3;
  display: block;
  width: 300px;
  height: auto;
  margin: -50px auto -45px;
}

.home-newsletter-modal__body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 54%) minmax(0, 46%);
  min-height: 405px;
}

.home-newsletter-modal__content {
  position: relative;
  z-index: 3;
  align-self: center;
  padding: 12px 16px 58px 66px;
}

.home-newsletter-modal__content h2 {
  max-width: 440px;
  margin: 0 0 8px;
  color: #fff;
  font-family: "PT Serif", Georgia, serif;
  font-size: clamp(38px, 4.5vw, 50px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.home-newsletter-modal__description {
  max-width: 390px;
  margin: 0 0 38px;
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.22;
}

.home-newsletter-modal__content h3 {
  margin: 0 0 18px;
  color: #fff;
  font-family: "Lato", Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.home-newsletter-modal__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
  width: min(100%, 420px);
}

.home-newsletter-modal__field,
.home-newsletter-modal__input,
.home-newsletter-modal__submit {
  min-width: 0;
  width: 100%;
}

.home-newsletter-modal__input,
.home-newsletter-modal__submit {
  min-height: 43px;
  border: 0;
  border-radius: 6px;
  font-family: "Lato", Arial, sans-serif;
  font-size: 15px;
}

.home-newsletter-modal__input {
  padding: 0 14px;
  color: #1c2b3e;
  background: #fff;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.home-newsletter-modal__input::placeholder {
  color: #a2a2a2;
}

.home-newsletter-modal__input:focus {
  outline-color: #8ec5ff;
}

.home-newsletter-modal__submit {
  padding: 0 14px;
  color: #fff;
  background: var(--newsletter-action);
  font-weight: 700;
  cursor: pointer;
  transition: filter 160ms ease, transform 160ms ease;
}

.home-newsletter-modal__submit:hover,
.home-newsletter-modal__submit:focus-visible {
  filter: brightness(1.1);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.home-newsletter-modal__submit:active {
  transform: translateY(1px);
}

.home-newsletter-modal__submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.home-newsletter-modal__message,
.home-newsletter-modal__error {
  grid-column: 1 / -1;
  min-height: 0;
  font-size: 13px;
  line-height: 1.3;
}

.home-newsletter-modal__message:not(:empty),
.home-newsletter-modal__error:not(:empty) {
  min-height: 18px;
}

.home-newsletter-modal__message {
  color: #d7efff;
}

.home-newsletter-modal__error {
  color: #ffd0d0;
}

.home-newsletter-modal__image {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.home-newsletter-modal__privacy {
  position: absolute;
  z-index: 4;
  bottom: 13px;
  left: 66px;
  max-width: 430px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  line-height: 1.35;
}

.home-newsletter-modal__privacy a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.home-newsletter-modal .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .home-newsletter-modal {
    padding: 12px;
  }

  .home-newsletter-modal__dialog {
    width: min(100%, 500px);
    max-height: calc(100dvh - 24px);
    aspect-ratio: auto;
    overflow: auto;
  }

  .home-newsletter-modal__dialog::before {
    width: 42px;
    height: 30px;
  }

  .home-newsletter-modal__dialog::after {
    right: 18px;
    width: 48px;
    height: 30px;
  }

  .home-newsletter-modal__close {
    top: 10px;
    right: 10px;
  }

  .home-newsletter-modal__logo {
    width: min(250px, 72vw);
    margin: -41px auto -39px;
  }

  .home-newsletter-modal__body {
    display: block;
    min-height: 0;
  }

  .home-newsletter-modal__content {
    padding: 18px 24px 20px;
    text-align: center;
  }

  .home-newsletter-modal__content h2 {
    max-width: 390px;
    margin-right: auto;
    margin-left: auto;
    font-size: clamp(34px, 10.5vw, 44px);
    line-height: 1.02;
  }

  .home-newsletter-modal__description {
    max-width: 340px;
    margin: 0 auto 28px;
    font-size: 16px;
  }

  .home-newsletter-modal__content h3 {
    margin-bottom: 14px;
    font-size: 18px;
  }

  .home-newsletter-modal__form {
    grid-template-columns: 1fr;
    gap: 9px;
    width: 100%;
    margin: 0 auto;
  }

  .home-newsletter-modal__input,
  .home-newsletter-modal__submit {
    min-height: 46px;
  }

  .home-newsletter-modal__image {
    display: none;
  }

  .home-newsletter-modal__privacy {
    position: relative;
    bottom: auto;
    left: auto;
    padding: 0 24px 18px;
    margin: 0 auto;
    text-align: center;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-newsletter-modal__close,
  .home-newsletter-modal__submit {
    transition: none;
  }
}
