/* Contact and Client Intake share every rule here, and borrow the menu panel's glass, radii and type. */

.form-page {
  --ink: #171a17;
  --muted: #464842;
  --field-bg: rgb(255 255 255 / 48%);
  --field-line: rgb(23 26 23 / 20%);
  --field-radius: calc(12 * var(--u, 1px));
  --error: #9b2c22;
}
.form-page [hidden] { display: none !important; }
.form-shell :where(input, select, textarea, button) { font: inherit; }

.form-stage { height: auto; min-height: 100svh; }
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr);
  align-items: end;
  gap: clamp(1.5rem, 5vw, 5rem);
  width: 89.84375%;
  max-width: 82rem;
  min-height: calc(100svh - 3.75rem);
  margin-inline: auto;
  padding-block: clamp(7rem, 16svh, 12rem) clamp(2rem, 7.8svh, 5.5rem);
}

/* Intro mirrors the home page hero, and stays in view while a tall form scrolls. */
.page-intro {
  position: sticky;
  bottom: clamp(2rem, 7.8svh, 5.5rem);
}
.page-intro h1 {
  margin: 0 0 .45em;
  font-size: clamp(2.125rem, 3.75vw, 3rem);
  font-weight: 380;
  letter-spacing: -.012em;
  line-height: 1.1;
}
.page-intro p {
  max-width: 28rem;
  margin: 0;
  font-size: clamp(1.0625rem, 1.7vw, 1.5rem);
  font-weight: 380;
  letter-spacing: -.014em;
  line-height: 1.33;
}
.page-intro .brand-line {
  max-width: 30rem;
  margin-top: 1rem;
  color: #dfd2bc;
  font-size: .875rem;
  letter-spacing: 0;
  line-height: 1.55;
}

/* Card: the same glass panel as the Services and Approach menus. */
.form-shell {
  min-width: 0;
  padding: clamp(1.375rem, 3vw, 2.5rem);
  border-radius: calc(22 * var(--u, 1px));
  background: var(--panel-glass);
  backdrop-filter: blur(calc(19 * var(--u, 1px)));
  box-shadow: var(--panel-edge);
  color: var(--ink);
}
.agentec-form { display: grid; gap: 1.25rem; }

.form-step,
.choice-group {
  display: grid;
  min-width: 0;
  gap: 1rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.form-title {
  max-width: 100%;
  margin: 0 0 .25rem;
  padding: 0;
  font-size: clamp(1.375rem, 2.3vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.15;
}
.form-step > .form-title { margin-bottom: 1rem; }
.form-title:focus { outline: none; }
.form-lead { margin: -.5rem 0 0; color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.form-eyebrow {
  margin: 0 0 .75rem;
  color: var(--muted);
  font: .75rem / 1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.form-eyebrow strong { color: var(--ink); font-weight: 600; }

/* Steps: thin bars, like the menu's dividers. */
.form-progress {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: .5rem;
  margin: 0 0 .25rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.25;
}
.form-progress li { padding-top: .5rem; border-top: 2px solid rgb(23 26 23 / 16%); }
.form-progress li[data-complete] { border-color: rgb(10 16 69 / 45%); }
.form-progress li[aria-current="step"] { border-color: var(--navy); color: var(--ink); font-weight: 600; }

/* Fields */
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.field { display: grid; align-content: start; gap: .375rem; min-width: 0; }
.field label,
.field-label { padding: 0; font-size: .875rem; font-weight: 500; }
.field-label { margin-bottom: .125rem; }
.optional { color: var(--muted); font-size: .8125rem; font-weight: 400; }

.field :where(input, select, textarea) {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: .625rem .8rem;
  border: 1px solid var(--field-line);
  border-radius: var(--field-radius);
  background-color: var(--field-bg);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.field :where(input, select, textarea)::placeholder { color: #6a6c66; }
.field :where(input, select, textarea):hover { background-color: rgb(255 255 255 / 62%); }
.field :where(input, select, textarea):focus {
  border-color: var(--navy);
  background-color: rgb(255 255 255 / 72%);
  box-shadow: 0 0 0 3px rgb(10 16 69 / 16%);
  outline: none;
}
.field select {
  appearance: none;
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--navy) 50%),
    linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 19px) center, calc(100% - 14px) center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--error); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgb(155 44 34 / 16%); }
.field-error { margin: 0; color: var(--error); font-size: .8125rem; line-height: 1.35; }

/* Checkbox choices: the menu tiles' rounded glass. */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.choice {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: .6rem;
  padding: .5rem .75rem;
  border: 1px solid var(--field-line);
  border-radius: var(--field-radius);
  background: var(--field-bg);
  font-size: .9375rem;
  line-height: 1.25;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.choice:hover { background: rgb(255 255 255 / 62%); }
.choice:has(:checked) { border-color: var(--navy); background: rgb(255 255 255 / 78%); }
.choice:has(:focus-visible) { box-shadow: 0 0 0 3px rgb(10 16 69 / 16%); }
.choice input { width: 1rem; height: 1rem; flex: none; margin: 0; accent-color: var(--navy); }

/* Pickers (Client Intake): a search box with a results list, in the same glass as the fields. */
.field.is-enhanced select { display: none; }
.picker-box { position: relative; }
.picker-results {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(22rem, 52svh);
  margin: 0;
  padding: .375rem;
  overflow: auto;
  overscroll-behavior: contain;
  list-style: none;
  border: 1px solid var(--field-line);
  border-radius: var(--field-radius);
  background: rgb(248 248 244 / 97%);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgb(10 16 69 / 18%), var(--panel-edge);
}
.picker-results [role="option"] {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .25rem .6rem;
  padding: .55rem .65rem;
  border-radius: calc(var(--field-radius) - 4px);
  cursor: pointer;
}
#industry-results [role="option"] { grid-template-columns: minmax(0, 1fr) auto; }
.picker-results [role="option"]:hover,
.picker-results [role="option"].is-active { background: rgb(10 16 69 / 7%); }
.picker-results [role="option"][aria-selected="true"] { background: rgb(10 16 69 / 10%); }
.option-body { display: grid; min-width: 0; }
.option-name { overflow: hidden; font-size: .9375rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.option-meta { overflow: hidden; color: var(--muted); font-size: .8125rem; text-overflow: ellipsis; white-space: nowrap; }
#industry-results .option-meta { text-align: right; }
.option-check {
  width: 1rem;
  height: 1rem;
  border: 1.5px solid rgb(23 26 23 / 40%);
  border-radius: 4px;
}
[aria-selected="true"] > .option-check {
  border-color: var(--navy);
  background: var(--navy) url("/assets/check.svg") center / 100% no-repeat;
}
.option-tag {
  padding: .15rem .4rem;
  border: 1px solid rgb(10 16 69 / 25%);
  border-radius: 6px;
  color: var(--navy);
  font: .6875rem / 1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .02em;
  white-space: nowrap;
}
.option-tag.is-partner { border-style: dashed; color: var(--muted); }
.option-apps {
  margin-top: .1rem;
  color: var(--navy);
  font: .6875rem / 1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .01em;
}
.option-group {
  padding: .65rem .65rem .3rem;
  color: var(--muted);
  font: .6875rem / 1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.option-empty { padding: .7rem .65rem; color: var(--muted); font-size: .875rem; }
.picker-results .option-add { grid-template-columns: 1fr; color: var(--navy); font-weight: 500; }

.picker-summary { display: grid; gap: .6rem; }
.picker-count { margin: 0; font-size: .875rem; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.chips:empty { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 34px;
  padding: .3rem .4rem .3rem .75rem;
  border: 1px solid rgb(10 16 69 / 22%);
  border-radius: 99px;
  background: rgb(255 255 255 / 70%);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1;
}
.chip.is-connected { border-color: rgb(10 16 69 / 55%); }
.chip-x {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgb(10 16 69 / 8%);
  font-size: 1rem;
}
.chip:hover .chip-x { background: var(--navy); color: var(--ivory); }
.picker-insight {
  margin: 0;
  padding: .7rem .85rem;
  border-radius: var(--field-radius);
  background: rgb(10 16 69 / 7%);
  color: var(--navy);
  font-size: .875rem;
  line-height: 1.4;
}

.tool-picker { display: grid; gap: 1.1rem; min-width: 0; }
.picker-browse { display: grid; gap: .65rem; min-width: 0; }
.category-chips {
  display: flex;
  gap: .4rem;
  margin-inline: -.25rem;
  padding: .1rem .25rem .5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  mask-image: linear-gradient(90deg, transparent 0, #000 .5rem, #000 calc(100% - 2rem), transparent);
}
.category-chip { flex: none; scroll-snap-align: start; white-space: nowrap; }
.category-chip {
  min-height: 32px;
  padding: .35rem .75rem;
  border: 1px solid var(--field-line);
  border-radius: 99px;
  background: var(--field-bg);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 450;
}
.category-chip:hover { background: rgb(255 255 255 / 70%); }
.category-chip[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: var(--ivory); }
.tool-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-choices .choice { min-height: 42px; font-size: .875rem; }
.connect-dot {
  flex: none;
  width: .45rem;
  height: .45rem;
  margin-left: auto;
  border-radius: 50%;
  background: var(--navy);
}
.browse-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.connect-key { display: flex; align-items: center; gap: .4rem; margin: 0 0 0 auto; color: var(--muted); font-size: .8125rem; }
.connect-key .connect-dot { margin: 0; }
.text-button {
  justify-self: start;
  padding: .25rem 0;
  border: 0;
  background: none;
  color: var(--navy);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Spam trap: off-screen for people, still filled in by bots. */
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Footer, buttons and messages */
.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .875rem 1.25rem;
}
.form-note { flex: 1 1 14rem; margin: 0; color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.form-note a, .doc a { color: var(--navy); }
.form-note a, .doc a, .brand-line a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* Footer under the form pages: the home page's footer, in the page flow. */
.form-stage .site-footer {
  position: static;
  width: 89.84375%;
  max-width: 82rem;
  min-height: 3.75rem;
  margin-inline: auto;
  padding-bottom: 1.25rem;
}

/* Privacy policy and other text pages: the same glass card, set for reading. */
.doc { color: var(--ink); font-size: .9375rem; line-height: 1.6; }
.doc > :first-child { margin-top: 0; }
.doc h2 { margin: 2rem 0 .5rem; font-size: 1.125rem; font-weight: 560; letter-spacing: -.005em; line-height: 1.3; }
.doc p, .doc ul { margin: 0 0 .85rem; }
.doc ul { padding-left: 1.2rem; }
.doc li + li { margin-top: .3rem; }
.doc .doc-meta { color: var(--muted); font-size: .8125rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .625rem; align-items: center; }
.solid-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 99px;
  font-size: .9375rem;
  font-weight: 520;
  line-height: 1;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.solid-button { background: var(--navy); color: var(--ivory); }
.solid-button:hover { background: var(--navy-hover); }
.solid-button:disabled { opacity: .7; cursor: progress; }
.outline-button { border-color: rgb(23 26 23 / 32%); background: transparent; color: var(--ink); }
.outline-button:hover { border-color: rgb(23 26 23 / 55%); background: rgb(255 255 255 / 40%); }
.form-error {
  margin: 0;
  padding: .7rem .85rem;
  border-radius: var(--field-radius);
  background: rgb(155 44 34 / 9%);
  color: var(--error);
  font-size: .9375rem;
  line-height: 1.4;
}

.submission-result:focus { outline: none; }
.submission-result .form-lead { margin: 0 0 1.5rem; }

@media (max-width: 790px) {
  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    align-items: start;
    width: min(100% - 2rem, 38rem);
    padding-top: 6.25rem;
  }
  .page-intro { position: static; }
  .form-stage .site-footer { width: min(100% - 2rem, 38rem); padding-top: 1.25rem; }
  .tool-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-shell { border-radius: 16px; }
}

@media (max-width: 460px) {
  .page-layout { padding-top: 7.25rem; }
  .field-row, .choices { grid-template-columns: minmax(0, 1fr); }
  .option-tag { display: none; }
  .form-progress { gap: .25rem; font-size: .75rem; }
  .form-actions, .form-actions > * { flex: 1 1 auto; }
}
