html:has(.contact-dialog) { scrollbar-gutter: stable; }
body.contact-is-open { overflow: hidden; }
.contact-dialog {
  --contact-ease: cubic-bezier(.3, 0, .1, 1);
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(198, 202, 208, .2);
  border-radius: 4px;
  background: #0b0c0f;
  color: #f2efe8;
  box-shadow: 0 20px 80px #0008;
  overflow: auto;
  overscroll-behavior: contain;
  color-scheme: dark;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 200ms var(--contact-ease), transform 200ms var(--contact-ease);
}
.contact-dialog::backdrop {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.contact-dialog.is-open { opacity: 1; transform: none; }
.contact-dialog-inner { position: relative; padding: 48px; }
.contact-dialog button,
.contact-dialog input,
.contact-dialog select,
.contact-dialog textarea { font-family: Barlow, Arial, sans-serif; }
.contact-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: #a3a9b1;
  border: 0;
  border-radius: 2px;
  transition: color 120ms ease, background-color 120ms ease;
}
.contact-close:hover { color: #f2efe8; background: #ffffff08; }
.contact-dialog-heading { margin-bottom: 30px; padding-right: 12px; }
.contact-dialog-heading h2 {
  margin: 0;
  font: 400 clamp(34px, 4vw, 44px)/1.15 Caslon, Georgia, serif;
  letter-spacing: -.035em;
}
.contact-dialog-heading h2:focus { outline: 0; }
.contact-dialog-heading p { margin: 14px 0 0; color: #a3a9b1; font-size: 17px; line-height: 1.5; }
.contact-form { display: flex; flex-direction: column; gap: 22px; }
.contact-field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-field { min-width: 0; }
.contact-field label { display: block; margin-bottom: 8px; color: #c6cad0; font-size: 14px; line-height: 1.4; font-weight: 500; }
.contact-field label span { color: #a3a9b1; font-size: 12px; font-weight: 400; margin-left: 4px; }
.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid rgba(198, 202, 208, .22);
  border-radius: 2px;
  background: #14171d;
  color: #f2efe8;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.contact-field input:hover,
.contact-field select:hover,
.contact-field textarea:hover { border-color: rgba(198, 202, 208, .4); }
.contact-dialog :focus-visible { outline: 2px solid #ffb000; outline-offset: 3px; }
.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus { border-color: #ffb000; outline: 1px solid #ffb000; outline-offset: 0; }
.contact-field textarea { resize: vertical; min-height: 124px; max-height: 260px; }
.contact-field textarea::placeholder { color: #8e959f; opacity: 1; }
.contact-select-wrap { position: relative; }
.contact-select-wrap select { padding-right: 44px; }
.contact-select-wrap svg { position: absolute; right: 15px; top: 17px; pointer-events: none; color: #c6cad0; }
.contact-field [aria-invalid="true"] { border-color: #e3868b; }
.contact-field-hint,
.contact-field-error { margin: 7px 0 0; font-size: 12px; line-height: 1.5; }
.contact-field-hint { color: #a3a9b1; }
.contact-field-error { color: #e3868b; }
.contact-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; pointer-events: none; }
.contact-form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 2px; }
.contact-reply-note { color: #a3a9b1; font-size: 12px; line-height: 1.5; max-width: 170px; margin: 0; }
.contact-submit { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: 28px; min-height: 48px; padding: 12px 20px; border: 1px solid #ffb000; border-radius: 2px; background: #ffb000; color: #14161a; font-size: 15px; font-weight: 500; transition: background-color 120ms ease, border-color 120ms ease; }
.contact-submit:hover { background: #ffc133; border-color: #ffc133; }
.contact-submit:disabled { cursor: wait; background: #d7a330; border-color: #d7a330; }
.contact-submit-arrow { font-size: 21px; line-height: 1; }
.contact-feedback { margin: 0; font-size: 14px; line-height: 1.5; }
.contact-feedback:empty { display: none; }
.contact-feedback-error { color: #e3868b; }
.contact-feedback-status { color: #c6cad0; }
@media (max-width: 600px) {
  .contact-dialog-inner { padding: 40px 24px 28px; }
  .contact-dialog-heading { margin-bottom: 26px; }
  .contact-dialog-heading p { font-size: 16px; }
  .contact-form { gap: 20px; }
  .contact-field-pair { grid-template-columns: 1fr; gap: 20px; }
  .contact-form-bottom { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  .contact-submit { width: 100%; }
  .contact-reply-note { max-width: none; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-dialog { transition: none; transform: none; }
}
/* Keep the close target above the heading on the narrowest phones. */
@media (max-width: 360px) {
  .contact-dialog-inner { padding-top: 64px; }
  .contact-select-wrap select { padding-left: 12px; padding-right: 32px; }
  .contact-select-wrap svg { right: 10px; }
}
