/* ============================================================
   Public forms (job applications, contact). Behaviour in forms.js.
   ============================================================ */

.site-form { margin-top: 20px; }
.site-form .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.site-form .field, .site-form .field-row { margin-top: 16px; }
.site-form .field-row .field { margin-top: 0; }
.site-form > :first-child { margin-top: 0; }
.site-form label, .site-form legend { display: block; font-size: 1.05rem; line-height: 1.25; font-weight: 700; color: var(--ink); }
.site-form .field__opt { font-weight: 400; color: var(--ink-3); }
.site-form input:not([type=checkbox]):not([type=radio]),
.site-form select,
.site-form textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 0 14px;
  height: 48px;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.site-form textarea { height: 128px; padding: 13px 14px; line-height: 1.5; resize: vertical; }
.site-form input[type=file] { height: auto; padding: 10px; cursor: pointer; }
.site-form input[type=file]::file-selector-button {
  margin-inline-end: 12px;
  height: 34px;
  padding-inline: 14px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  cursor: pointer;
}
.site-form .field__hint { margin-top: 6px; font-size: 0.925rem; color: var(--ink-3); }
.site-form input::placeholder, .site-form textarea::placeholder { color: var(--ink-3); }
.site-form input:focus, .site-form select:focus, .site-form textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240, 83, 35, 0.14);
}
.site-form.was-validated :invalid { border-color: #D2402A; }
.site-form fieldset { margin: 16px 0 0; padding: 0; border: 0; }
.site-form .choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.site-form .choices label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding-inline: 14px;
  font-weight: 600;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
}
.site-form .choices label:has(input:checked) { border-color: var(--orange); background: rgba(240, 83, 35, 0.06); }
.site-form input[type=checkbox], .site-form input[type=radio] { accent-color: var(--orange); width: 18px; height: 18px; }
.site-form .consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 0.975rem; font-weight: 400; line-height: 1.5; color: var(--ink-2); }
.site-form .consent input { flex: none; margin-top: 2px; }
.site-form .form-submit {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 20px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--paper-warm);
  background: var(--orange);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.site-form .form-submit:hover { background: var(--orange-hi); transform: translateY(-1px); }
.site-form .form-submit:disabled { opacity: 0.6; cursor: progress; transform: none; }
.site-form .form-status { margin-top: 12px; font-size: 1.05rem; line-height: 1.5; color: var(--ink-2); }
.site-form .form-status:empty { display: none; }
.site-form .form-status[data-state="error"] { color: #C0331E; }

/* the honeypot: off-screen for people, still filled in by naive bots */
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-done { padding: 28px; border-radius: 12px; background: rgba(5, 48, 48, 0.06); border: 1px solid rgba(5, 48, 48, 0.16); }
.form-done[hidden] { display: none; }
.form-done h3 { font-family: var(--font-heading); font-size: 1.375rem; line-height: 1.3; color: #053030; }
.form-done p { margin-top: 8px; font-size: 1.05rem; line-height: 1.55; color: var(--ink-2); }
.form-done:focus { outline: none; }

@media (max-width: 700px) {
  .site-form .field-row { grid-template-columns: minmax(0, 1fr); }
}
