/* contact-form — the theme's own form.
   Inputs are drawn as a ruled line rather than a box: the page is already made
   of hairlines and cards, and five outlined boxes stacked up read as a database
   screen rather than as part of this site. */
.cform__body { width: 100%; }
.cform__body--narrow { max-width: 640px; }

.cform__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
  margin: 0;
}
.cform__field { display: flex; flex-direction: column; gap: 7px; margin: 0; min-width: 0; }
/* The message runs the full width whatever the column count: a long answer in
   half a row wraps into a column of five words. */
.cform__field--wide,
.cform__actions { grid-column: 1 / -1; }

.cform__label { color: var(--text-subtle); margin: 0; }
.cform__optional { text-transform: none; letter-spacing: 0; opacity: .75; }

.cform__input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.4;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: 8px 2px;
  transition: border-color var(--transition-fast);
}
.cform__input:hover { border-bottom-color: var(--text-subtle); }
.cform__input:focus {
  outline: none;
  /* Two pixels of the accent, not a glow: the line is the control, so the line
     is what should change. */
  border-bottom-color: var(--accent-deep);
  box-shadow: 0 1px 0 0 var(--accent-deep);
}
/* Keyboard focus still gets a real ring, because the border change alone is
   easy to miss when tabbing. */
.cform__input:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 3px; }
textarea.cform__input { resize: vertical; min-height: 120px; }

.tone--navy .cform__input { border-bottom-color: #ffffff4d; }
.tone--navy .cform__input:focus { border-bottom-color: var(--accent-decor); box-shadow: 0 1px 0 0 var(--accent-decor); }

.cform__actions { margin: 6px 0 0; }

/* Off screen rather than display:none, which some bots test for. */
.cform__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cform__notice {
  margin: 0 0 24px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent-deep);
  background: var(--gray-50);
  color: inherit;
}
.cform__notice--bad { border-left-color: var(--color-red); }
.tone--navy .cform__notice { background: #ffffff14; }

@media (max-width: 599px) {
  .cform__form { grid-template-columns: 1fr; gap: 18px; }
}
