/* Contact modal — follows DESIGN.md token system */
.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(29, 33, 41, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.contact-overlay.is-open { display: flex; }

.contact-modal {
  background: var(--color-surface, #FFFFFF);
  max-width: 520px;
  width: 100%;
  padding: 36px 32px 28px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.contact-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--color-mute, #6B6B6B);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--dur-fast, 0.15s) ease;
}
.contact-modal__close:hover { color: var(--color-ink, #1d2129); }

.contact-modal h2 {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--color-ink, #1d2129);
  margin: 0 0 4px;
}
.contact-modal p {
  font-size: 0.8125rem;
  color: var(--color-ink-soft, #6B6B6B);
  margin: 0 0 22px;
  line-height: 1.5;
}

.contact-modal .form { margin: 0; }

.contact-modal .field {
  margin-bottom: 14px;
}
.contact-modal .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.contact-modal .field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-mute, #6B6B6B);
  margin-bottom: 6px;
}
.contact-modal .field input,
.contact-modal .field select,
.contact-modal .field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--color-ink, #1d2129);
  border: 1px solid var(--color-rule, #D6D2CB);
  border-radius: 0;
  padding: 10px 12px;
  background: var(--color-surface, #FFFFFF);
  transition: border-color var(--dur-medium, 0.2s) ease;
}
.contact-modal .field input:focus,
.contact-modal .field select:focus,
.contact-modal .field textarea:focus {
  outline: none;
  border-color: var(--color-ink, #1d2129);
}
.contact-modal .field textarea {
  resize: vertical;
  min-height: 64px;
}
.contact-modal .field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236B6B6B' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.contact-modal .btn-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}

.contact-modal .success {
  display: none;
  text-align: center;
  padding: 24px 0;
}
.contact-modal .success.is-showing { display: block; }
.contact-modal .success h3 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-ink, #1d2129);
  margin: 0 0 8px;
}
.contact-modal .success p {
  color: var(--color-ink-soft, #6B6B6B);
  margin: 0;
}

/* ---- Mobile ---- */
@media (max-width: 560px) {
  .contact-modal {
    padding: 28px 20px 22px;
    max-height: 92vh;
  }

  /* Stack side-by-side fields so each gets full width for typing. */
  .contact-modal .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* CTA row: stack vertically and let the button go full-width. */
  .contact-modal .btn-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .contact-modal .btn-row .btn {
    width: 100%;
    justify-content: center;
  }
}
