/* ============================================================
   COPV Technical Requirements Questionnaire — intake page
   Reuses brand tokens + chrome from styles.css; this file
   styles the multi-step form only.
   ============================================================ */

/* Page scaffold ------------------------------------------------ */
.intake-main { padding-top: 120px; }
.intake-head {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 44px;
  margin-bottom: 48px;
}
.intake-head .eyebrow { margin-bottom: 20px; }
.intake-head h1 {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.04;
  font-size: clamp(32px, 4.4vw, 52px);
  margin: 0;
}
.intake-head .lede {
  color: var(--text-2);
  font-size: 19px;
  line-height: 1.55;
  max-width: 60ch;
  margin: 22px 0 0;
  text-wrap: pretty;
}
.intake-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 26px;
}
.intake-meta .m {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-3);
}
.intake-meta .m svg { color: var(--gold); flex-shrink: 0; }

/* Form column -------------------------------------------------- */
.intake-wrap { max-width: 880px; }
.copv-form { padding-bottom: 110px; }

/* Progress rail ------------------------------------------------ */
.progress {
  position: sticky;
  top: 96px;
  z-index: 10;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 0 18px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--hairline);
}
.progress-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.progress-step {
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font: inherit;
}
.progress-step .bar {
  height: 3px;
  background: var(--hairline-strong);
  border-radius: 2px;
  transition: background 240ms ease;
}
.progress-step .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color 200ms ease;
  line-height: 1.3;
}
.progress-step .num { color: var(--text-3); }
.progress-step.active .bar { background: var(--gold); }
.progress-step.active .lbl { color: var(--text); }
.progress-step.done .bar { background: color-mix(in oklab, var(--gold) 55%, var(--hairline-strong)); }
.progress-step.done .num { color: var(--gold); }
.progress-step:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 2px; }

/* Steps -------------------------------------------------------- */
.fstep { display: none; }
.fstep.current { display: block; animation: fstep-in 0.4s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes fstep-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fstep.current { animation: none; } }

.fstep > .step-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}
.fstep > h2 {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: clamp(25px, 3vw, 33px);
  margin: 0 0 8px;
}
.fstep > .step-note {
  color: var(--text-2);
  font-size: 16px;
  margin: 0 0 34px;
  max-width: 56ch;
}

/* Fields ------------------------------------------------------- */
.field { margin-bottom: 26px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

.field label.flabel,
.fieldset-legend {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 9px;
  letter-spacing: -0.005em;
}
.field .req { color: var(--gold); margin-left: 2px; }
.field .hint {
  display: block;
  font-size: 13px;
  color: var(--text-3);
  margin: -3px 0 9px;
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  padding: 13px 15px;
  transition: border-color 150ms ease, background 150ms ease;
  -webkit-appearance: none;
  appearance: none;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--surface-2);
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid transparent; /* border handles it */
}
/* number spinners off */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* Value + unit composite ------------------------------------- */
.with-unit { display: flex; gap: 10px; align-items: stretch; }
.with-unit input { flex: 1 1 auto; min-width: 0; }
.with-unit .unit-toggle { flex: 0 0 auto; }

/* Range (from–to) -------------------------------------------- */
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input { flex: 1 1 0; min-width: 0; }
.range-row .to { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); }

/* Segmented unit toggle -------------------------------------- */
.unit-toggle {
  display: inline-flex;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
}
.unit-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.unit-toggle label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  min-height: 100%;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-3);
  cursor: pointer;
  border-right: 1px solid var(--hairline);
  transition: background 140ms ease, color 140ms ease;
  white-space: nowrap;
}
.unit-toggle label:last-of-type { border-right: none; }
.unit-toggle input:checked + label { background: var(--nav-navy); color: #fff; }
.unit-toggle input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: -2px; }

/* Chip groups (checkbox / radio) ----------------------------- */
.chip-group { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  position: relative;
  display: inline-flex;
}
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  font-size: 15px;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
  min-height: 44px;
}
.chip label:hover { border-color: var(--text-3); color: var(--text); }
.chip input:checked + label {
  border-color: var(--gold);
  color: var(--text);
  background: color-mix(in oklab, var(--gold) 12%, transparent);
}
.chip input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }
.chip input:checked + label::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

/* "Other, specify" inline field ------------------------------ */
.specify { margin-top: 12px; display: none; }
.specify.show { display: block; }

/* Footer nav of the form ------------------------------------- */
.form-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--hairline);
}
.form-nav .spacer { flex: 1 1 auto; }
.btn-step {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  padding: 13px 24px;
  border-radius: 4px;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}
.btn-step:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn-step.primary {
  background: var(--nav-navy);
  border: 1.5px solid var(--gold);
  color: #fff;
  font-weight: 600;
}
.btn-step.primary:hover { background: color-mix(in oklab, var(--nav-navy) 84%, white); }
.btn-step:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn-step[hidden] { display: none; }
.btn-step .arrow { transition: transform 200ms cubic-bezier(0.16,1,0.3,1); }
.btn-step.primary:hover .arrow { transform: translateX(4px); }

/* Validation --------------------------------------------------- */
input:invalid.touched, textarea:invalid.touched { border-color: var(--danger, #ee5555); }
.field-error {
  display: none;
  color: #ee7777;
  font-size: 13px;
  margin-top: 7px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.field.has-error .field-error { display: block; }

/* Success / error panels -------------------------------------- */
.form-status { display: none; text-align: center; padding: 40px 0 20px; }
.form-status.show { display: block; }
.form-status .icon {
  width: 64px; height: 64px;
  margin: 0 auto 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold);
  color: var(--gold);
}
.form-status h2 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 30px;
  margin: 0 0 12px;
}
.form-status p { color: var(--text-2); font-size: 17px; max-width: 46ch; margin: 0 auto 28px; }
.form-status.error .icon { border-color: #ee5555; color: #ee5555; }

.submitting { opacity: 0.6; pointer-events: none; }

/* Admin note (shown only if Web3Forms key is not configured) --- */
.admin-note {
  display: none;
  margin-top: 22px;
  padding: 14px 18px;
  border: 1px dashed var(--hairline-strong);
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.admin-note.show { display: block; }
.admin-note code { color: var(--gold); }

@media (max-width: 760px) {
  .intake-main { padding-top: 100px; }
  .progress { top: 84px; }
  .progress-step .lbl { display: none; }
  .progress-track { gap: 6px; }
}
