.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.contact-overlay::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.contact-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: auto;
}

.contact-modal {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: min(calc(100vw - 24px), 540px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  padding: 26px 28px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.contact-modal::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.contact-form {
  overflow: hidden;
}

.contact-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease;
}

.contact-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.contact-title {
  margin: 0 44px 16px 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #fff;
}

.contact-field {
  margin-bottom: 11px;
}

.contact-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.94);
}

.contact-label .req {
  color: #6eb5ff;
}

.contact-input,
.contact-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.contact-input::placeholder,
.contact-textarea::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.contact-input:focus,
.contact-textarea:focus {
  border-color: rgba(110, 181, 255, 0.55);
  background: rgba(0, 0, 0, 0.28);
}

.contact-textarea {
  display: block;
  min-height: 76px;
  max-height: 76px;
  resize: none;
  overflow: hidden;
  line-height: 1.4;
}

.contact-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 14px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.contact-check input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: #8ec8f5;
  cursor: pointer;
}

.contact-submit {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a1a1a;
  background: linear-gradient(180deg, #b8dff8 0%, #8ec8f5 100%);
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.contact-submit:hover {
  filter: brightness(1.05);
}

.contact-submit:active {
  transform: scale(0.99);
}

.contact-error {
  margin: 0 0 8px;
  font-size: 12px;
  color: #ff8a8a;
  min-height: 0;
}

.contact-error:empty {
  display: none;
}

html.contact-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  height: 100%;
}

html.contact-modal-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

html.contact-modal-open .hero,
html.contact-modal-open main {
  overflow: hidden !important;
}

@media (max-width: 552px) {
  .contact-modal {
    width: calc(100vw - 20px);
    padding: 20px 18px 18px;
    border-radius: 22px;
  }

  .contact-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .contact-title {
    font-size: 19px;
    margin-bottom: 12px;
  }

  .contact-field {
    margin-bottom: 9px;
  }

  .contact-textarea {
    min-height: 68px;
    max-height: 68px;
  }
}

@media (max-height: 680px) {
  .contact-modal {
    padding: 18px 18px 16px;
    border-radius: 20px;
  }

  .contact-title {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .contact-field {
    margin-bottom: 8px;
  }

  .contact-input,
  .contact-textarea {
    padding: 9px 12px;
    font-size: 13px;
  }

  .contact-textarea {
    min-height: 60px;
    max-height: 60px;
  }

  .contact-submit {
    padding: 12px 16px;
  }
}
