.contact-modal-open {
  overflow: hidden;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 3, 18, 0.68);
  backdrop-filter: blur(14px);
}

.contact-modal-panel {
  position: relative;
  width: min(100%, 720px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 10%, rgba(245, 158, 11, 0.16), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07)),
    rgba(18, 8, 42, 0.9);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(22px);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.24s ease;
}

.contact-modal.is-open .contact-modal-panel {
  transform: translateY(0) scale(1);
}

.contact-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.contact-modal-close:hover,
.contact-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.contact-modal-kicker,
.contact-modal-context {
  margin: 0;
  color: #ffd166;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contact-modal-context {
  margin-top: 10px;
  letter-spacing: 0.08em;
}

.contact-modal-title {
  margin: 10px 0 0;
  color: var(--text, #fbf7ff);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.08;
}

.contact-modal-copy,
.contact-modal-status {
  margin: 14px 0 0;
  color: var(--muted, #c9bedf);
  font-size: 1.04rem;
  line-height: 1.66;
}

.contact-modal-form {
  margin-top: 24px;
}

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

.contact-field {
  display: grid;
  gap: 8px;
}

.contact-field-full {
  grid-column: 1 / -1;
}

.contact-field label {
  color: var(--text, #fbf7ff);
  font-size: 0.98rem;
  font-weight: 600;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text, #fbf7ff);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #ffd166 50%),
    linear-gradient(135deg, #ffd166 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 50%,
    calc(100% - 13px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.contact-field option {
  background: #18092f;
  color: #fbf7ff;
}

.contact-field textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: rgba(245, 158, 11, 0.52);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.contact-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.contact-modal-note {
  margin: 14px 0 0;
  color: var(--muted, #c9bedf);
  font-size: 0.96rem;
  line-height: 1.6;
}

.contact-modal-status {
  min-height: 1.6em;
}

@media (max-width: 720px) {
  .contact-modal {
    padding: 18px;
  }

  .contact-modal-panel {
    padding: 24px 20px;
    border-radius: 24px;
  }

  .contact-modal-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-modal,
  .contact-modal-panel {
    transition: none;
  }
}
