/* ============================================================
   Forms — connect.html
   ============================================================
   Loaded only by the pages that carry a form, so main.css does not grow a
   large block that nine pages never use. Same reasoning as hero-carousel.css.

   The site rule against generic rounded panels applies here as much as
   anywhere: there are no floating cards and no soft radii. Fields are ruled
   boxes on the site's own surface, sections are separated by hairlines, and
   the chosen option is marked by a clay bar down its edge, which is the same
   stratum language as the seams and the fit-content heading rules. */

.cform { margin-top: var(--space-md); max-width: 940px; }

/* Honeypot. `display: none` is skipped by some bots precisely because it is
   the obvious tell, so this is taken out of flow instead and pushed off
   screen. It is aria-hidden and untabbable in the markup as well. */
.cform__pot {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* --- Step 1: the choice ------------------------------------------------ */
.choices { border: none; padding: 0; }
.choices__legend {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--step-3); line-height: 1.08; letter-spacing: -0.015em;
  padding: 0;
}
.choices__note { margin-top: var(--space-sm); color: var(--text-muted); max-width: var(--measure); }

.choice-list {
  list-style: none; padding-left: 0;
  margin-top: var(--space-md);
  display: grid; gap: 0;
  border-top: 1px solid var(--rule);
}
@media (min-width: 820px) {
  .choice-list { grid-template-columns: 1fr 1fr; column-gap: var(--space-lg); }
}

/* The radio itself is left visible and simply moved into the row: a
   hand-drawn replacement would have to reimplement focus, keyboard arrows and
   the checked state for no gain. `accent-color` tints the native control to
   clay, which is all that was needed. */
.choice {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 0.75rem;
  padding: var(--space-sm) var(--space-sm) var(--space-sm) 0.9rem;
  border-bottom: 1px solid var(--rule);
  /* The selected bar lives here as a transparent border so nothing shifts by
     a pixel when it becomes visible. */
  border-left: 3px solid transparent;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.choice:hover { background: rgba(140, 87, 41, 0.05); }
.choice:has(input:checked) {
  background: rgba(140, 87, 41, 0.09);
  border-left-color: var(--clay);
}
.choice input[type="radio"] {
  width: 1.15rem; height: 1.15rem;
  accent-color: var(--clay);
  cursor: pointer;
}
.choice label {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--step-1); line-height: 1.15;
  cursor: pointer;
}
/* Column 2 of the grid, under the label rather than under the radio. */
.choice__note {
  grid-column: 2;
  margin-top: 0.25rem;
  font-size: var(--step--1); color: var(--text-muted);
}
.choice__note a { color: var(--clay-deep); text-decoration: underline; text-underline-offset: 3px; }

/* --- Step 2: the panels ------------------------------------------------ */
.panel {
  border: none; padding: 0;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 2px solid var(--sandstone);
}
.panel[hidden] { display: none; }
.panel__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--step-2); line-height: 1.1; letter-spacing: -0.015em;
  padding: 0;
}

.notice {
  margin-top: var(--space-sm);
  padding-left: var(--space-sm);
  border-left: 3px solid var(--clay);
  color: var(--text-muted);
  max-width: var(--measure);
}
.notice strong { color: var(--text); font-weight: 600; }
.notice a { color: var(--clay-deep); text-decoration: underline; text-underline-offset: 3px; }
.notice--quiet { border-left-color: var(--sandstone); margin-top: var(--space-md); }
.notice--stop { border-left-color: var(--clay-deep); }

/* --- Fields ------------------------------------------------------------ */
.grid-2 { display: grid; gap: var(--space-md); margin-top: var(--space-md); }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .field--wide { grid-column: 1 / -1; }
}
.field { display: grid; gap: 0.4rem; align-content: start; }
.field + .field { margin-top: var(--space-md); }
.grid-2 .field + .field { margin-top: 0; }

.field label,
.subgroup legend,
.yesno legend {
  font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  /* --clay-deep at 5.9:1. --clay is 4.17:1 and fails at this size. */
  color: var(--clay-deep);
}
.opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-muted); }

/* Nothing on this site is white, and a default input is. These sit on
   --surface with a real rule around them, so they read as part of the page
   rather than as browser furniture punched through it. */
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font-family: var(--font-body); font-size: var(--step-0); color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(25, 27, 29, 0.28);
  border-radius: var(--radius);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
/* A select keeps the platform's own dropdown behaviour, which is the right
   call on a phone, but the closed control is restyled so it does not sit on
   the page as a grey browser widget. The caret is drawn here because
   suppressing the native appearance also removes the native arrow. */
.field select {
  appearance: none; -webkit-appearance: none;
  padding-right: 2.4rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 3l4 4 4-4' fill='none' stroke='%236B3F1D' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px;
}
/* The placeholder option is disabled, so it only shows while nothing is
   chosen; greying it keeps it from reading as a real answer. */
.field select:has(option[value=""]:checked) { color: var(--text-muted); }
.field textarea { resize: vertical; min-height: 7rem; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(75, 73, 65, 0.62); }
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(140, 87, 41, 0.28);
}
/* :user-invalid, not :invalid — :invalid paints every empty required field
   red before the visitor has typed a single character. */
.field input:user-invalid,
.field textarea:user-invalid,
.field select:user-invalid { border-color: #8E2C1B; }

.field__help { font-size: var(--step--1); color: var(--text-muted); }
.field__help a { color: var(--clay-deep); }
.field__error {
  font-size: var(--step--1); font-weight: 500;
  color: #8E2C1B;
  max-width: var(--measure);
}
.field__error[hidden] { display: none; }
.field__error a { color: #8E2C1B; text-decoration: underline; text-underline-offset: 3px; }
.field__count { font-size: var(--step--1); color: var(--text-muted); justify-self: end; }
.field__count.is-near { color: var(--clay-deep); font-weight: 600; }

/* --- Radio rows and yes/no --------------------------------------------- */
.subgroup, .yesno { border: none; padding: 0; margin-top: var(--space-md); }
.radio-row, .yesno__opts {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem 1.4rem;
  margin-top: 0.5rem;
}
.radio-row input[type="radio"],
.yesno__opts input[type="radio"] {
  width: 1.1rem; height: 1.1rem; accent-color: var(--clay); cursor: pointer;
}
.radio-row label,
.yesno__opts label {
  font-size: var(--step-0); font-weight: 400;
  text-transform: none; letter-spacing: 0; color: var(--text);
  cursor: pointer;
  /* Pull each label against the radio it belongs to, so the pairs read as
     pairs rather than as an evenly spaced row of six things. */
  margin-left: -1rem;
}
.subfield { margin-top: var(--space-sm); max-width: 34rem; }
.subfield[hidden] { display: none; }

/* Four yes/no questions in a row of prose all look alike, so they are ruled
   off from each other and given room. */
.yesno-set { margin-top: var(--space-lg); border-top: 1px solid var(--rule); }
.yesno-set .yesno {
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--rule);
  margin-top: 0;
}
.yesno legend { max-width: var(--measure); }
.yesno legend a { color: var(--clay-deep); text-decoration: underline; }
.yesno--gate { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--rule); }
.yesno--gate .field__error { margin-top: var(--space-sm); }

/* --- Send -------------------------------------------------------------- */
.cform__send {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 2px solid var(--sandstone);
  display: grid; gap: var(--space-md);
  /* `start`, not the default stretch: a stretched grid item flattens the
     button's oval into a lens, which is the documented trap with this shape. */
  justify-items: start;
}
.cform__send[hidden] { display: none; }
.cform__send .btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.cform__privacy { font-size: var(--step--1); color: var(--text-muted); max-width: var(--measure); }

/* The Turnstile widget renders in an iframe of its own and cannot be themed
   past the light/dark switch, so it is simply given room rather than fought. */
.cf-turnstile { min-height: 65px; }

.cform__done {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-left: 3px solid var(--moss-deep);
  background: rgba(122, 138, 80, 0.14);
  max-width: var(--measure);
}
.cform__done h2 { font-size: var(--step-2); }
.cform__done p { margin-top: var(--space-sm); color: var(--text-muted); }
