/* Contact extends the site's existing white / navy / blue visual language. */
.contact-dialog {
  width: min(640px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 1px solid #1a6fd455;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  overflow: hidden;
}
.contact-dialog[open] { display: flex; flex-direction: column; animation: contact-enter 160ms ease-out; }
.contact-dialog::backdrop { background: #0f23408c; }
.contact-dialog .contact-heading {
  position: relative;
  inset: auto;
  height: auto;
  flex: 0 0 auto;
  padding: 24px 24px 24px 32px;
  background: linear-gradient(120deg, #e3f0fd, #f5fbff 70%);
  backdrop-filter: none;
  border-top: 2px solid var(--cyan);
  border-bottom: 1px solid var(--line);
  gap: 16px;
  z-index: 1;
}
.contact-heading h2 { margin: 0; font-size: 30px; line-height: 1.5; letter-spacing: .02em; }
.contact-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid #1a6fd455;
  border-radius: 0;
  background: #ffffff80;
  color: var(--accent2);
  cursor: pointer;
}
.contact-close:hover { background: var(--bg2); color: var(--ink); }
.contact-body { padding: 24px 32px 32px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #8095ad #f1f6fb; }
.contact-notice { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.8; color: var(--mute); }
.contact-notice a { color: var(--accent2); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.contact-field + .contact-field { margin-top: 20px; }
.contact-field label { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.contact-required { color: var(--accent2); background: var(--bg2); padding: 1px 6px; font-size: 11px; font-weight: 500; }
.contact-field input, .contact-field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #91a5bc;
  border-radius: 0;
  background: #f6faff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  caret-color: var(--accent2);
  scroll-margin-block: 16px;
}
.contact-field textarea { min-height: 144px; height: 144px; resize: vertical; }
.contact-dialog :focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }
.contact-field input:focus, .contact-field textarea:focus { border-color: var(--accent2); background: #fff; }
.contact-field [aria-invalid="true"] { border-color: #b12d36; }
.contact-error { margin-top: 6px; color: #a02730; font-size: 13px; line-height: 1.7; }
.contact-count { margin-top: 6px; text-align: right; color: var(--mute); font-size: 12px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.contact-count.is-over { color: #a02730; }
.contact-actions { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
/* Same cut-corner action as the site's CTA; clip only the paint so focus stays visible. */
.contact-submit { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; gap: 24px; width: 100%; min-height: 56px; padding: 14px 24px; border: 0; border-radius: 0; color: #fff; background: transparent; font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .08em; cursor: pointer; }
.contact-submit::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, var(--accent2), #087b9b); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }
.contact-submit:hover::before { background: linear-gradient(100deg, #093f80, #096883); }
.contact-submit:active::before { background: var(--accent2); }
.contact-submit svg { flex-shrink: 0; }
.contact-status { color: var(--body); font-size: 13px; line-height: 1.8; }
.contact-status:not(:empty) { margin-top: 16px; }
.contact-dialog ::selection { background: #dbeafa; color: var(--ink); }
@keyframes contact-enter { from { opacity: .7; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .contact-dialog .contact-heading { padding: 16px 12px 16px 20px; }
  .contact-heading h2 { font-size: 24px; }
  .contact-body { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .contact-dialog[open] { animation: none; } }

.contact-submit:disabled { cursor: wait; opacity: .7; }
.contact-submit:disabled::before { background: var(--accent2); }
.contact-field input:disabled, .contact-field textarea:disabled { opacity: 1; color: var(--mute); background: var(--bg2); cursor: wait; }
