/* ==========================================================================
   Contact form + "Get in touch" modal — the component contact.js renders. Shared by the site
   pages (linked) and /start (api/flow_pages.py inlines it with contact.js). Colours come from
   tokens.css. The modal carries its own eyebrow/button styles so it renders the same on a page
   without site.css.
   ========================================================================== */
.field{ margin-bottom: 18px; }
.field label{
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--heading);
  margin-bottom: 7px;
}
.field .optional{ font-weight: 500; color: var(--text-faint); }
.field input, .field textarea{
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 4px);
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 1px 2px rgb(var(--rgb-shadow) / .04);
  transition: border-color .15s var(--ease, cubic-bezier(.2,.7,.2,1)), box-shadow .15s var(--ease, cubic-bezier(.2,.7,.2,1)), background-color .15s var(--ease, cubic-bezier(.2,.7,.2,1));
}
.field input::placeholder, .field textarea::placeholder{ color: var(--text-faint); }
.field input:hover, .field textarea:hover{ border-color: var(--border-hover); }
.field input:focus, .field textarea:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}
.field textarea{ resize: vertical; min-height: 110px; line-height: 1.5; }
.field-hint{ font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }
.modality-field{ border: 0; padding: 0; min-width: 0; }
.modality-field legend{ font-size: 13px; font-weight: 650; color: var(--heading); margin-bottom: 9px; padding: 0; }
.modality-options{ display: flex; flex-wrap: wrap; gap: 8px 18px; }
.modality-field .modality-option{ display: inline-flex; margin: 0; font-weight: 500; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text); cursor: pointer; }
.field .modality-option input[type=checkbox]{ width: 16px; height: 16px; padding: 0; margin: 0; box-shadow: none; accent-color: var(--accent); }
.hp-field{ position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status{
  display: none;
  align-items: flex-start;
  gap: 10px;
  border-radius: var(--radius-md, 10px);
  padding: 14px 16px;
  font-size: 14px;
  margin-top: 18px;
}
.form-status svg{ width: 18px; height: 18px; flex: none; margin-top: 1px; }
.form-status.show{ display: flex; }
.form-status.success{ background: color-mix(in srgb, var(--success-text) 10%, transparent); color: var(--success-text); }
.form-status.error{ background: var(--tint-danger); color: var(--danger-text); }
.form-status a{ text-decoration: underline; font-weight: 600; }


/* ---- Contact modal (native <dialog>: focus trap, Esc and inert page come built in) ---- */
.contact-modal{
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl, 20px);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
  overflow: auto;
  overscroll-behavior: contain;
}
.contact-modal::backdrop{
  background: rgb(var(--rgb-navy) / .45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.contact-modal[open]{ animation: contact-modal-in .28s var(--ease, cubic-bezier(.2,.7,.2,1)); }
.contact-modal[open]::backdrop{ animation: contact-backdrop-in .28s var(--ease, cubic-bezier(.2,.7,.2,1)); }
@keyframes contact-modal-in{ from{ opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes contact-backdrop-in{ from{ opacity: 0; } }
html:has(.contact-modal[open]){ overflow: hidden; }
.contact-modal-panel{ position: relative; padding: 36px 36px 32px; }
@media (max-width: 560px){ .contact-modal-panel{ padding: 28px 22px 24px; } }
.contact-modal h2{ font-size: 1.6rem; margin-bottom: 8px; padding-right: 36px; }
.contact-modal-lead{ color: var(--text-muted); font-size: 14.5px; line-height: 1.6; margin-bottom: 24px; }
.contact-modal-close{
  position: absolute;
  top: 16px; right: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s var(--ease, cubic-bezier(.2,.7,.2,1)), border-color .15s var(--ease, cubic-bezier(.2,.7,.2,1));
}
.contact-modal-close:hover{ color: var(--heading); border-color: var(--border-hover); }
.contact-modal-close:focus-visible{ outline: none; box-shadow: var(--ring); }
.contact-modal-close svg{ width: 16px; height: 16px; }
.contact-modal .eyebrow{
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 0;
  font-family: var(--font-mono); font-size: 12px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); background: none; border: 0;
}
.contact-modal h2{ margin-top: 0; color: var(--heading); font-family: var(--font-display, Georgia, serif); font-size: 1.75rem; font-weight: 400; letter-spacing: -0.015em; line-height: 1.15; text-transform: none; }
.contact-modal p{ margin-top: 0; }
.contact-modal .btn-primary.btn-block{
  display: flex; align-items: center; justify-content: center; width: 100%; padding: 13px 20px;
  font: inherit; font-size: 15px; font-weight: 500; line-height: 1.2; cursor: pointer;
  border-radius: var(--radius-sm, 4px); border: 1px solid var(--btn-primary-border); color: var(--text-on-accent);
  background: var(--btn-primary-bg);
  box-shadow: 0 8px 22px -10px rgb(var(--rgb-indigo) / .65);
}
.contact-modal .btn-primary.btn-block:hover{ background: var(--btn-primary-bg-hover); }
.contact-modal .btn-primary.btn-block[disabled]{ opacity: .6; cursor: not-allowed; }
