/* ==========================================================================
   THE CONTACT WIZARD — THE CORRIDOR
   Loaded only when the wizard_v2 flag is on. Every value comes from
   assets/tokens.css: this is the landing page's design language applied to a
   sequence, not a new one.

   Budget (locked decision D3): ≤ 9 KB gzipped over the current baseline.
   Nothing here animates a property outside transform / opacity /
   stroke-dashoffset.

   Logical properties only (margin-inline, inset-block) — the product is
   bidirectional and a hardcoded `left` is a bug in one of the two languages.
   ========================================================================== */

.wizard-v2{
  position:relative;
  display:grid;
  grid-template-columns:34px 1fr;
  gap:var(--s-4);
  align-items:start;
  padding:var(--s-6);
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  box-shadow:var(--card-sh);
}
@media(min-width:900px){
  .wizard-v2{ grid-template-columns:1fr; padding:var(--s-7); }
}

/* ---------------------------------------------------------------- spine --
   Vertical on mobile, horizontal on desktop. One element, flipped by CSS, so
   progress has exactly one source of truth. */

.wz-spine{ position:relative; height:100%; min-height:220px; }
.wz-spine svg{ width:20px; height:100%; overflow:visible; }
.wz-spine-track{
  stroke:var(--line-2); stroke-width:2; stroke-linecap:round;
}
.wz-spine-path{
  stroke:var(--steel); stroke-width:2; stroke-linecap:round;
  stroke-dasharray:180; stroke-dashoffset:180;
}
.wz-node{
  fill:#fff; stroke:var(--line-2); stroke-width:2;
  transition:fill var(--dur) var(--ease), stroke var(--dur) var(--ease);
}
.wz-node.on{ fill:var(--brass); stroke:var(--brass); }
.wz-spine-pct{ display:none; }

@media(min-width:900px){
  .wz-spine{ min-height:0; height:22px; margin-block-end:var(--s-5); }
  .wz-spine svg{
    width:100%; height:20px;
    /* the same path, laid on its side */
    transform:rotate(-90deg) scale(1);
    transform-origin:center;
  }
}

/* ----------------------------------------------------------------- body -- */

.wz-body{ min-width:0; }

.wz-recap{
  display:flex; flex-wrap:wrap; gap:var(--s-2);
  font-size:12.5px; font-weight:700; color:var(--soft);
  margin-block-end:var(--s-4);
}
.wz-recap span{
  padding:3px 10px;
  background:var(--sky-2);
  border:1px solid var(--sky);
  border-radius:var(--r-pill);
  animation:wzFade var(--dur) var(--ease) both;
}
@keyframes wzFade{ from{opacity:0} to{opacity:1} }

/* The v1 wizard in site.css renders all four fieldsets at once and reveals the
   current one with `.wz-step.on`, so it carries `.wz-step{display:none}`. v2
   renders exactly one step and never adds `.on` — so that rule hid the entire
   wizard body. Scoped to `.wizard-v2` to outrank it without touching v1, which
   still runs whenever the flag is off. */
.wizard-v2 .wz-step{ display:block; border:0; padding:0; margin:0; min-width:0; }
.wz-q{
  display:block; padding:0;
  font-size:clamp(19px,3.6vw,24px); font-weight:900; line-height:1.35;
  color:var(--ink-2); margin-block-end:var(--s-2);
  scroll-margin-block-start:calc(var(--nav-h) + var(--s-5));
}
.wz-q:focus-visible{ outline:2px solid var(--steel); outline-offset:6px; border-radius:var(--r-sm); }
.wz-hint{ font-size:13px; color:var(--faint); font-weight:600; margin-block-end:var(--s-5); }

.wz-group + .wz-group{ margin-block-start:var(--s-5); }
.wz-lbl{
  display:block; font-size:12px; font-weight:800; color:var(--soft);
  margin-block-end:var(--s-2);
}

/* --------------------------------------------------------------- options -- */

.wz-cards{ display:grid; grid-template-columns:1fr; gap:var(--s-2); }
@media(min-width:560px){ .wz-cards{ grid-template-columns:1fr 1fr; } }

.wz-chips{ display:flex; flex-wrap:wrap; gap:var(--s-2); }

.wz-card,.wz-chip{
  position:relative; overflow:hidden;
  display:flex; align-items:center; gap:var(--s-3);
  min-height:44px;                       /* the touch-target floor, no exceptions */
  padding:12px 16px;
  font-family:inherit; font-size:14.5px; font-weight:700; color:var(--ink);
  text-align:start;
  background:#fff;
  border:1.5px solid var(--line);
  border-radius:var(--r);
  cursor:pointer;
  transition:border-color var(--dur-fast) var(--ease),
             background-color var(--dur-fast) var(--ease),
             transform var(--dur-fast) var(--ease);
}
.wz-chip{ border-radius:var(--r-pill); }
.wz-card:hover,.wz-chip:hover{ border-color:var(--line-2); }
.wz-card:active,.wz-chip:active{ transform:scale(.985); }

.wz-card.on,.wz-chip.on{
  border-color:var(--steel);
  background:var(--sky-2);
  color:var(--ink-2);
}
.wz-card:focus-visible,.wz-chip:focus-visible{
  outline:2px solid var(--steel); outline-offset:2px;
}

/* the brass hairline that sweeps across a chosen option */
.wz-sweep{
  position:absolute; inset-inline:0; inset-block-end:0; height:2px;
  background:linear-gradient(90deg,var(--brass),var(--brass-grad));
  transform:scaleX(0); transform-origin:inline-start;
  pointer-events:none;
}
.wz-card.on .wz-sweep,.wz-chip.on .wz-sweep{ transform:scaleX(1); }

.wz-skip{
  margin-block-start:var(--s-2);
  background:none; border:0; padding:6px 0;
  font-family:inherit; font-size:12.5px; font-weight:800;
  color:var(--faint); cursor:pointer; text-decoration:underline;
}

/* ---------------------------------------------------------------- fields -- */

.wz-field + .wz-field{ margin-block-start:var(--s-4); }
.wz-field label{
  display:block; font-size:12px; font-weight:800; color:var(--soft);
  margin-block-end:5px;
}
.wz-field input{
  width:100%;
  min-height:48px;
  padding:12px 14px;
  font-family:inherit;
  /* 16px is the floor: below it iOS Safari zooms the page on focus and the
     client has to pinch back out mid-form. */
  font-size:var(--t-input-min);
  color:var(--ink);
  background:#fff;
  border:1.5px solid var(--line);
  border-radius:11px;
}
.wz-field input:focus{
  border-color:var(--steel);
  outline:none;
  box-shadow:0 0 0 4px rgba(44,100,173,.12);
}
.wz-field input[aria-invalid="true"]{ border-color:var(--danger); }

.wz-reassure{
  margin-block-start:6px; font-size:12.5px; font-weight:700; color:var(--success-ink);
}
.wz-reassure bdi{ font-family:'Poppins',sans-serif; }

.wz-cpn-row{ display:flex; gap:var(--s-2); align-items:stretch; }
.wz-cpn-row input{ flex:1; }
.wz-cpn-row .btn{ flex:0 0 auto; min-height:48px; }

.cpn-status{ margin-block-start:6px; font-size:12.5px; font-weight:700; min-height:1em; }
.cpn-status.ok{ color:var(--success-ink); }
.cpn-status.bad{ color:var(--danger); }

.wz-field-err{
  margin-block-start:6px; font-size:12.5px; font-weight:700; color:var(--danger);
}
.wz-field-err[hidden]{ display:none; }

/* The honeypot: present for a bot, invisible and unreachable for a human.
   Not display:none — some bots skip hidden fields, and this one must be
   tempting. */
.wz-hp{
  position:absolute!important; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip-path:inset(50%); white-space:nowrap; border:0;
}

/* ------------------------------------------------------------------- nav -- */

.wz-nav{
  display:flex; gap:var(--s-3); align-items:center;
  margin-block-start:var(--s-6);
  grid-column:1/-1;
}
.wz-nav .wz-next{ margin-inline-start:auto; min-height:48px; }
.wz-nav .wz-back{ min-height:48px; }
.wz-nav .btn[disabled]{ opacity:.6; pointer-events:none; }

/* ---------------------------------------------------------------- resume -- */

.wz-resume{
  grid-column:1/-1;
  padding:var(--s-4);
  background:var(--sky-2);
  border:1px solid var(--sky);
  border-radius:var(--r);
  margin-block-end:var(--s-4);
}
.wz-resume p{ font-size:14px; font-weight:800; color:var(--ink-2); margin-block-end:var(--s-3); }
.wz-resume-actions{ display:flex; gap:var(--s-2); flex-wrap:wrap; }

/* --------------------------------------------------------------- arrival --
   The only emphatic moment in the sequence — and then everything stops. */

.wz-done{
  grid-column:1/-1;
  text-align:center;
  padding:var(--s-4) 0;
}
.wz-done:focus-visible{ outline:2px solid var(--steel); outline-offset:8px; border-radius:var(--r); }
.wz-done h3{
  font-size:clamp(20px,4vw,26px); font-weight:900; color:var(--ink-2);
  margin-block-end:var(--s-4);
}

.wz-queued{
  display:inline-block;
  padding:8px 14px; margin-block-end:var(--s-4);
  font-size:12.5px; font-weight:800;
  color:var(--warn); background:var(--warn-bg);
  border:1px solid var(--warn-line); border-radius:var(--r-pill);
}

.wz-ref{
  display:inline-flex; flex-direction:column; align-items:center; gap:4px;
  padding:var(--s-4) var(--s-6);
  background:var(--paper-2);
  border:1px solid var(--line);
  border-radius:var(--r);
  margin-block-end:var(--s-4);
}
.wz-ref-lbl{ font-size:11.5px; font-weight:800; color:var(--faint); }
.wz-ref-num{
  position:relative;
  font-family:'Poppins',sans-serif; font-size:19px; font-weight:800;
  letter-spacing:.5px; color:var(--ink-2);
  background:none; border:0; padding:2px 4px; cursor:pointer;
}
.wz-ref-num::after{
  content:attr(data-copied);
  position:absolute; inset-block-start:-26px; inset-inline-start:50%;
  transform:translateX(-50%);
  font-size:11px; font-weight:800; color:var(--success-ink);
  white-space:nowrap;
}

.wz-promise{
  font-size:15px; font-weight:800; color:var(--ink);
  margin-block-end:var(--s-5); line-height:1.6;
}

.wz-consultant{
  display:inline-flex; align-items:center; gap:var(--s-3);
  padding:var(--s-3) var(--s-5);
  background:#fff; border:1px solid var(--line); border-radius:var(--r-pill);
  box-shadow:var(--card-sh);
  margin-block-end:var(--s-5);
}
.wz-consultant img{ width:40px; height:40px; border-radius:50%; object-fit:cover; }
.wz-consultant b{ display:block; font-size:14px; color:var(--ink-2); }
.wz-consultant small{ display:block; font-size:12px; color:var(--faint); font-weight:700; }

.wz-brief{
  text-align:start;
  padding:var(--s-4);
  background:var(--paper-2);
  border:1px solid var(--line);
  border-radius:var(--r);
  margin-block-end:var(--s-5);
}
.wz-brief h4{ font-size:12px; font-weight:800; color:var(--faint); margin-block-end:var(--s-2); }
.wz-brief ul{ list-style:none; padding:0; margin:0; display:grid; gap:6px; }
.wz-brief li{
  font-size:13.5px; font-weight:700; color:var(--ink); line-height:1.55;
  padding-inline-start:var(--s-4); position:relative;
}
.wz-brief li::before{
  content:''; position:absolute; inset-inline-start:0; inset-block-start:.6em;
  width:6px; height:6px; border-radius:50%; background:var(--brass);
}

.wz-arrival-actions{
  display:flex; flex-wrap:wrap; gap:var(--s-2); justify-content:center;
  margin-block-end:var(--s-4);
}
.wz-arrival-actions .btn{ min-height:48px; }

/* --------------------------------------------------------- reduced motion --
   A complete branch, not an afterthought. Haptics are suppressed in JS for
   the same reason: a vibration is motion too. */

@media (prefers-reduced-motion:reduce){
  .wizard-v2 *,
  .wizard-v2 *::before,
  .wizard-v2 *::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
  .wz-recap span{ animation:none; }
}

/* The floor: with this class set, no animation runs at all and the wizard
   must still be completable. Asserted by an E2E run. */
.wizard-no-anim .wizard-v2 *,
.wizard-no-anim .wizard-v2 *::before,
.wizard-no-anim .wizard-v2 *::after{
  animation:none!important;
  transition:none!important;
}
