/* ==========================================================================
   FORMS

   Written for the press release page and reusable by any other real form on
   the site. Nothing here is a raw colour: every value comes from tokens.css,
   which is the whole reason a form built in our own markup beats an embed.
   An iframe cannot be given the palette. This can.
   ========================================================================== */

/* The panel that sat beside the form is gone, so the form is held to a
   measure instead of spanning the container. At full width each half of a two
   up row runs past 500px, and a 500px box for a first name reads as a mistake:
   the size of a field is a promise about how much you are expected to type. */
.pr { max-width: 46rem; }

.pr__form { display: grid; gap: var(--s-5); }

/* Two fields to a row where the pair belongs together (a name, a way to reach
   someone), one where the answer is long. */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
}

.field { display: grid; gap: var(--s-2); margin: 0; }

.field__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-ink);
}
/* The asterisk is the one place orange appears as type, and it is not type in
   the readable sense: it is a marker one character wide, next to a word that
   already carries the meaning. Screen readers get `required` on the input. */
.req { color: var(--c-statement-ink); }

.field__hint {
  font-size: var(--fs-xs);
  color: var(--c-ink-3);          /* 6.7:1 */
  margin-top: calc(var(--s-2) * -1);
}

.field__input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-rule-strong);
  border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field__input--area { resize: vertical; min-height: 6rem; }

.field__input:hover { border-color: var(--c-ink-3); }
/* Focus is the accent doubled: the border changes AND a ring appears. A border
   change alone is too quiet at this border weight to be a reliable focus cue. */
.field__input:focus-visible,
.field__file:focus-visible {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-tint);
}

/* File inputs cannot be styled past a point in any browser, so the button part
   is styled where it can be and the rest is left alone rather than faked with
   a label-over-input trick, which breaks keyboard focus more often than it
   improves anything. */
.field__file {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--c-ink-2);
  padding: 0.55rem;
  border: 1px dashed var(--c-rule-strong);
  border-radius: var(--radius);
  background: var(--c-surface);
  cursor: pointer;
}
.field__file::file-selector-button {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-on-accent);
  background: var(--c-accent);
  border: 0;
  border-radius: var(--radius);
  padding: 0.5rem 0.9rem;
  margin-right: var(--s-4);
  cursor: pointer;
}
.field__file:hover { border-color: var(--c-accent); }
.field__file::file-selector-button:hover { background: var(--c-accent-hover); }

.pr__submit { margin-top: var(--s-3); }

/* The honeypot. Not display:none: some bots skip hidden fields, and some
   browsers skip validation on them. Pushed out of view instead, and out of
   the tab order via the tabindex on the input itself. */
.hp {
  position: absolute;
  left: -5000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Narrow ------------------------------------------------------------- */
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; gap: var(--s-5); }
}

/* ---- The free tag --------------------------------------------------------
   A filled block, not a coloured word. Orange is the statement colour and this
   is the job it exists for: one thing on the page caught before anything is
   read. Type on it takes --c-on-statement at 7.9:1, the same pairing as the
   primary button, so the page has one rule for ink on orange and not two. */
.tag {
  display: inline-block;
  margin: 0 0 var(--s-4);
  padding: 0.3rem 0.7rem;
  background: var(--c-statement);
  color: var(--c-on-statement);
  border-radius: var(--radius);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
