body.modal-open {
  overflow: hidden;
}

.contact-modal {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.contact-modal.is-open {
  display: flex;
}

.contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 16, .82);
  backdrop-filter: blur(8px);
}

.contact-card {
  position: relative;
  z-index: 1;
  width: min(100%, 690px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid rgba(21, 24, 28, .16);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .4);
}

.contact-card :focus-visible {
  outline-color: var(--blue2);
}

.contact-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(21, 24, 28, .25);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 26px;
  cursor: pointer;
}

.contact-card .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}

.contact-card .eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue2);
}

.contact-card h2 {
  max-width: 13ch;
  margin: 18px 52px 12px 0;
  font-size: clamp(32px, 5.5vw, 58px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.075em;
  text-wrap: balance;
}

.contact-intro {
  max-width: 58ch;
  margin: 0 0 22px;
  color: #565b61;
  font-size: 14px;
  line-height: 1.6;
}

.contact-availability {
  margin: 0 0 18px;
  padding: 12px 15px;
  border-left: 3px solid var(--blue2);
  background: rgba(21, 24, 28, .06);
  font-size: 13px;
  line-height: 1.5;
}

.contact-availability[hidden] {
  display: none;
}

.contact-availability a,
.form-disclosure a {
  color: var(--blue2);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-fields {
  display: grid;
  gap: 15px;
  margin-bottom: 18px;
}

.contact-fields label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .015em;
}

.contact-fields input,
.contact-fields select,
.contact-fields textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid rgba(21, 24, 28, .3);
  border-radius: 0;
  background: #fffefa;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}

.contact-fields textarea {
  min-height: 112px;
  resize: vertical;
}

.contact-fields :is(input, select, textarea):focus-visible {
  border-color: var(--blue2);
  outline: 2px solid var(--blue2);
  outline-offset: 2px;
}

.contact-turnstile:not(:empty) {
  margin-bottom: 16px;
}

.contact-form .button-primary {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.contact-form .button-primary:hover:not(:disabled) {
  border-color: var(--mint);
  background: var(--mint);
  color: var(--ink);
}

.contact-form button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.form-disclosure,
.form-feedback {
  margin: 12px 0 0;
  color: #565b61;
  font-size: 12px;
  line-height: 1.5;
}

.form-feedback:empty {
  display: none;
}

.contact-success[hidden] {
  display: none;
}

.contact-success-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 0 16px;
  border-radius: 50%;
  background: var(--mint);
  font-size: 26px;
  font-weight: 900;
}

.contact-success-description {
  margin: 0;
  color: #565b61;
  font-size: 15px;
  line-height: 1.6;
}

.contact-actions {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.contact-email {
  font-size: 11px;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 700px) {
  .contact-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .contact-card {
    max-height: calc(100dvh - 20px);
    padding: 26px 20px;
  }
}
