/* =============================================================================
   /contact — the standalone contact page.
   The .contact-form/.cf-* block MOVED HERE from enterprise.css when the form
   left the enterprise page (2026-08-06). Token-based, so it follows the site
   theme with no per-theme overrides. Every control is 16px+ (iOS auto-zoom
   rule). Posts to /api/contact via contact-page.js, which also drives the
   audience switcher (fields carry data-aud; the switcher shows and hides them).
   ========================================================================== */

.contact-hero {
  padding: clamp(56px, 7vw, 96px) 0 clamp(24px, 3vw, 36px);
}
.contact-hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(40px, 5.4vw, 66px);
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.contact-hero .lede {
  margin: 20px 0 0;
  max-width: 46rem;
}

/* ------------------------------------------------ audience switcher -----
   One segmented pill track (fab-style): three equal tabs inside a single
   rounded container, with a gradient thumb that slides under the active tab.
   contact-page.js moves the thumb by setting --i (0/1/2) on .aud-track. */
.aud-switch {
  margin: clamp(26px, 3.4vw, 38px) 0 0;
  padding: 0;
  border: 0;
}
.aud-switch legend {
  padding: 0;
  margin: 0 0 12px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.aud-track {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 760px);
  padding: 5px;
  border: 1px solid var(--line-hi);
  border-radius: var(--pill);
  background: var(--panel);
  box-shadow: var(--soft-shadow), inset 0 1px 3px rgba(20, 28, 60, 0.05);
}
.aud-thumb {
  position: absolute;
  z-index: 0;
  top: 5px;
  bottom: 5px;
  left: 5px;
  border-radius: var(--pill);
  background: var(--grad);
  box-shadow: 0 6px 18px rgba(73, 121, 239, 0.35);
  /* Size and position come from the active button, set by contact-page.js.
     Hardcoded column math broke the moment a fourth tab arrived, and it
     cannot express the 2x2 wrap this track uses on a phone. */
  transition: transform 280ms cubic-bezier(0.3, 0.9, 0.3, 1),
              width 280ms cubic-bezier(0.3, 0.9, 0.3, 1),
              height 280ms cubic-bezier(0.3, 0.9, 0.3, 1);
}
.aud-btn {
  appearance: none;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 200ms ease;
}
.aud-btn:hover { color: var(--text); }
.aud-btn[aria-pressed='true'] { color: #fff; }
.aud-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(73, 121, 239, 0.3);
}
.aud-short { display: none; }
@media (max-width: 680px) {
  /* One row, always (Adam). Equal 1fr cells cannot fit "Organizations" at this
     width, so cells size to their label and the row spreads edge to edge. */
  .aud-track {
    grid-template-columns: repeat(4, minmax(0, auto));
    justify-content: space-between;
    width: 100%;
  }
  .aud-long { display: none; }
  .aud-short { display: inline; }
  .aud-btn { font-size: 13px; padding-inline: 11px; letter-spacing: -0.01em; }
}
@media (prefers-reduced-motion: reduce) {
  .aud-thumb { transition: none; }
}

/* The per-audience lede swaps under the switcher. */
.aud-note {
  margin: 18px 0 0;
  max-width: 46rem;
  color: var(--dim);
  font-size: 15.5px;
  line-height: 1.65;
}
.aud-note a { color: var(--sky); }

.contact-body { padding: clamp(30px, 4vw, 48px) 0 clamp(84px, 10vw, 140px); }

/* Audience-conditional fields: contact-page.js sets data-audience on the form;
   a field marked data-aud only shows when its list contains that audience. */
.contact-form [data-aud] { display: none; }
.contact-form[data-audience='individual'] [data-aud~='individual'],
.contact-form[data-audience='enterprise'] [data-aud~='enterprise'],
.contact-form[data-audience='press'] [data-aud~='press'],
.contact-form[data-audience='partnership'] [data-aud~='partnership'] { display: grid; }

/* --------------------------------------------------------- form ---------- */
.contact-form {
  display: grid;
  gap: 16px;
  max-width: 640px;
}

.cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cf-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.cf-field > span {
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.cf-field em {
  margin-left: 4px;
  color: var(--soft);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.cf-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%236f7892' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.cf-field input,
.cf-field select,
.cf-field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-hi);
  border-radius: var(--r-sm);
  /* longhand on purpose: the background SHORTHAND would wipe the select's
     chevron (background-image in the rule above, same specificity) */
  background-color: var(--panel);
  box-shadow: var(--soft-shadow);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.cf-field textarea { resize: vertical; min-height: 120px; }

.cf-field input:focus-visible,
.cf-field select:focus-visible,
.cf-field textarea:focus-visible {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(73, 121, 239, 0.18);
}

.cf-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cf-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.cf-status { margin: 0; font-size: 14px; color: var(--dim); }
.cf-status.is-ok { color: #1d9d6f; font-weight: 600; }
.cf-status.is-err { color: var(--alarm); font-weight: 600; }

.contact-form.is-sent .cf-row,
.contact-form.is-sent .cf-field,
.contact-form.is-sent button { display: none !important; }
.contact-form.is-sent .cf-status { font-size: 17px; }

@media (max-width: 620px) {
  .cf-row { grid-template-columns: 1fr; }
}
