/* First-party contact form and modal. Messages are submitted to /api/contact. */

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.contact-modal[hidden] { display: none; }

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, .76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.contact-modal__panel {
  position: relative;
  width: min(100%, 640px);
  max-height: min(90vh, 820px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  background: #0a0a09;
  padding: clamp(26px, 4vw, 42px);
  box-shadow: 0 28px 90px rgba(0,0,0,.55);
}

.contact-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.contact-modal__close:hover { color: var(--text); border-color: var(--line-strong); }

.contact-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 52px 10px 0;
  color: var(--gold-bright);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.contact-modal__eyebrow::before {
  content: "";
  display: block;
  width: 17px;
  flex: 0 0 17px;
  aspect-ratio: 900 / 1100;
  background: url('/assets/brand/pallas-ventures/v1.0/mark-reversed.svg') center / contain no-repeat;
}

.contact-modal h2 {
  margin: 0 52px 12px 0;
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 560;
  letter-spacing: -.045em;
}

.contact-modal__intro {
  margin: 0 0 28px;
  max-width: 540px;
  color: var(--text-soft);
  font-size: 15px;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #050505;
  color: var(--text);
  padding: 12px 13px;
  font: inherit;
  font-size: 15px;
  border-radius: 0;
  outline: none;
}

.contact-form select {
  min-height: 46px;
  color-scheme: dark;
}

.contact-form textarea {
  min-height: 156px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.contact-form__honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.contact-form__note,
.contact-form__status {
  margin: -2px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.55;
}

.contact-form__note a { color: var(--text-soft); }

.contact-form__status {
  min-height: 1.55em;
  margin-top: -10px;
}

.contact-form__status[data-state="success"] { color: #bcd7b7; }
.contact-form__status[data-state="error"] { color: #e3aaa5; }

.contact-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 2px;
}

.contact-form__submit {
  min-height: 46px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #080706;
  padding: 0 20px;
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
}

.contact-form__submit:hover:not(:disabled) {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.contact-form__submit:disabled {
  cursor: wait;
  opacity: .72;
}

.contact-page {
  padding-top: clamp(72px, 9vw, 128px);
  padding-bottom: clamp(84px, 11vw, 150px);
}

.contact-page__grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(360px, 1.18fr);
  gap: clamp(44px, 8vw, 112px);
  align-items: start;
}

.contact-page h1 {
  margin: 10px 0 18px;
  max-width: 640px;
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 84px);
  font-weight: 560;
  line-height: .98;
  letter-spacing: -.05em;
}

.contact-page__lead {
  max-width: 560px;
  color: var(--text-soft);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
}

.contact-page__form {
  border: 1px solid var(--line-strong);
  background: #0a0a09;
  padding: clamp(24px, 4vw, 40px);
}

body.contact-modal-open { overflow: hidden; }

@media (max-width: 820px) {
  .contact-page__grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .contact-modal { padding: 12px; align-items: end; }
  .contact-modal__panel { width: 100%; max-height: 94vh; padding: 26px 20px 22px; }
  .contact-form__row { grid-template-columns: 1fr; }
  .contact-form__actions { align-items: stretch; flex-direction: column; }
  .contact-form__submit { width: 100%; }
  .contact-page { padding-top: 52px; }
  .contact-page__form { padding: 22px 18px; }
}
