.contact-modal {
  width: min(760px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: #f7fbfe;
  color: #102f46;
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(3, 24, 38, .38);
}

.contact-modal::backdrop {
  background: rgba(4, 25, 39, .84);
  backdrop-filter: blur(7px);
}

.contact-modal__panel {
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.contact-modal__header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 25px 32px 23px;
  border-bottom: 1px solid #d5e8f3;
  background: rgba(255, 255, 255, .96);
}

.contact-modal__header p {
  margin: 0 0 7px;
  color: #0069ad;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.contact-modal__header h2 {
  margin: 0;
  font: 650 clamp(27px, 4vw, 40px)/1.1 "Lexend", Arial, sans-serif;
  letter-spacing: -.035em;
}

.contact-modal__close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0 0 3px;
  border: 0;
  border-radius: 50%;
  background: #e5f4fc;
  color: #0069ad;
  font: 400 30px/1 "Lexend", Arial, sans-serif;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.contact-modal__close:hover {
  background: #0069ad;
  color: #fff;
}

.contact-modal__body {
  padding: 30px 32px 34px;
}

.contact-modal__intro {
  max-width: 610px;
  margin: 0 0 25px;
  color: #587385;
  font-size: 15px;
  line-height: 1.7;
}

.contact-modal__intro a,
.contact-form__actions a {
  color: #0069ad;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: #183f58;
  font-size: 13px;
  font-weight: 700;
}

.contact-form__message {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #b9d7e7;
  border-radius: 13px;
  background: #fff;
  color: #102f46;
  font: 450 15px/1.5 "Lexend", Arial, sans-serif;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.contact-form input {
  min-height: 50px;
  padding: 11px 14px;
}

.contact-form textarea {
  min-height: 154px;
  padding: 13px 14px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #0072b8;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(0, 114, 184, .13);
}

.contact-form__honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.contact-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 25px;
}

.contact-form__actions p {
  max-width: 380px;
  margin: 0;
  color: #6a8291;
  font-size: 11px;
  line-height: 1.6;
}

.contact-form__actions button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 50px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: #0072b8;
  color: #fff;
  font: 750 13px/1.4 "Lexend", Arial, sans-serif;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}

.contact-form__actions button:hover {
  background: #005f99;
  transform: translateY(-1px);
}

.contact-form__actions button:disabled {
  cursor: wait;
  opacity: .62;
  transform: none;
}

.contact-form__status {
  min-height: 24px;
  margin: 18px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.contact-form__status[data-state="success"] { color: #08764c; }
.contact-form__status[data-state="error"] { color: #b42318; }

.contact-modal__close:focus-visible,
.contact-form__actions button:focus-visible {
  outline: 3px solid #55bcec;
  outline-offset: 4px;
}

@media (max-width: 600px) {
  .contact-modal {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 20px;
  }

  .contact-modal__panel {
    max-height: calc(100dvh - 24px);
  }

  .contact-modal__header {
    padding: 20px 20px 18px;
  }

  .contact-modal__header h2 {
    font-size: 27px;
  }

  .contact-modal__body {
    padding: 24px 20px 26px;
  }

  .contact-form__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-form__message {
    grid-column: 1;
  }

  .contact-form__actions {
    align-items: stretch;
    flex-direction: column;
    gap: 17px;
  }

  .contact-form__actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-modal__close,
  .contact-form input,
  .contact-form textarea,
  .contact-form__actions button {
    transition: none;
  }
}
