/* ==========================================================================
   connect.css — the closing "Let's make something great!" band.
   Depends on: tokens.css, base.css (.button, .container, .visually-hidden)

   Built by js/modules/connectBand.js, which owns the markup and renders it
   into any <section data-connect-band> placeholder. It started as a
   landing-page-only block in pages/home.css and moved here on 2026-08-28 when
   Adam asked for it on the piece pages too.

   A page carrying this band should use .site-footer--minimal, or the pitch is
   made twice in a row.
   ========================================================================== */

.connect {
  padding-block: var(--section-y);
  background-color: var(--color-bg-sunken);
  border-top: 1px solid var(--color-border);
}

/* Pitch and form sit side by side once there is room for a 42rem form beside
   a readable column of copy; below that they stack, form last. */
.connect__inner {
  display: grid;
  gap: clamp(var(--space-6), 5vw, var(--space-8));
  align-items: start;
}
@media (min-width: 62rem) {
  .connect__inner { grid-template-columns: 1fr minmax(24rem, 34rem); }
}

.connect__title {
  font-family: var(--font-display-alt);
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-wrap: balance;
}

.connect__lede {
  margin-top: var(--space-4);
  max-width: var(--width-text);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.connect__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
  list-style: none;
  padding: 0;
}

/* --- Contact form ---------------------------------------------------------
   Lives here rather than in components/ because the landing page is the only
   page with a form. Promote it to components/contact-form.css the day a second
   page grows one.
   -------------------------------------------------------------------------- */
.contact-form {
  display: grid;
  gap: var(--space-4);
  padding: clamp(var(--space-5), 3vw, var(--space-6));
  background-color: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* Name and email share a row on anything but a phone. The breakpoint is a
   viewport width, so it is a rough proxy: at 62rem the form is only ~30rem
   wide and the two fields are snug. That is the worst case and it still
   reads — make this a container query if the layout gains another column. */
.contact-form__row { display: grid; gap: var(--space-4); }
@media (min-width: 34rem) {
  .contact-form__row { grid-template-columns: 1fr 1fr; }
}

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

.field__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.field__control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.field__control:hover { border-color: var(--color-text-subtle); }
.field__control:focus-visible {
  border-color: var(--color-accent);
  outline-offset: 1px;
}

.field__control--area {
  resize: vertical;
  min-height: 7rem;
  line-height: var(--leading-normal);
}

/* Only after the browser has actually validated a submit attempt — :invalid
   alone paints every required field red before the visitor has typed. */
.contact-form:has(:user-invalid) .field__control:user-invalid {
  border-color: var(--color-danger);
}

.contact-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}

.contact-form__status {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.contact-form__status[data-state="ok"]    { color: var(--color-success); font-weight: 600; }
.contact-form__status[data-state="error"] { color: var(--color-danger); }

/* Sending: the button stays put and stops accepting clicks. */
.contact-form[data-state="sending"] button[type="submit"] {
  opacity: 0.6;
  pointer-events: none;
}

/* The honeypot. display:none keeps it out of the tab order and off screen
   readers; a bot that fills every input trips it and Web3Forms drops the
   message. Do not "fix" this into a visually-hidden field — a real person
   using a screen reader would then be asked to leave it empty. */
.contact-form__botcheck { display: none; }
