/* ═══════════════════════════════════════════════════════════════
   POLYNEXA LABS · CLIENT INTAKE WIZARD  ·  /start
   ───────────────────────────────────────────────────────────────
   Standalone stylesheet. Does NOT import the site's style.css —
   that file carries homepage-specific layout (fixed nav, bento
   grid, hero) that would fight a form. Instead the design tokens
   below are mirrored verbatim from style.css :root so the wizard
   reads as the same site.

   NO EXTERNAL REQUESTS. No @font-face, no font CDN, no remote
   images. Font families are NAMED (which makes no network request)
   with full system fallback chains, so a visitor who already has
   Inter / Crimson Pro / Space Mono installed gets an exact match
   and everyone else gets a close system equivalent.

   Type floors enforced: reading text >= 16px, labels >= 11px.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* — Palette: mirrored from ../style.css (Industrial Paper) — */
  --accent-blue: #243A73;
  --navy: #081F5B;
  --paper-white: #F9F9F7;
  --obsidian: #1A1C1B;
  --graphite: #757681;
  --rule-line: rgba(117, 118, 129, 0.2);
  --rule-strong: rgba(26, 28, 27, 0.22);
  --hairline: 0.5px;
  --diagonal-grid: rgba(36, 58, 115, 0.05);
  --accent-red: #5D0E0E;
  --accent-red-signal: #AC0014;

  /* — Trinity, named only. Zero network requests. — */
  --serif-font: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --sans-font: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono-font: 'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Courier New', monospace;

  /* — Motion — */
  --ease-expressive: cubic-bezier(0.16, 1, 0.3, 1);

  /* — Wizard-local tokens — */
  --field-bg: rgba(255, 255, 255, 0.55);
  --field-border: rgba(26, 28, 27, 0.22);
  --field-border-focus: var(--accent-blue);
  --gutter: 1.5rem;
  --measure: 44rem;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--paper-white);
  color: var(--obsidian);
  font-family: var(--sans-font);
  font-size: 1rem;              /* 16px reading floor */
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Diagonal grid, matched to the homepage but dialed back so long
   reading passages stay quiet. */
body::before {
  content: "";
  position: fixed;
  inset: -100%;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 200.5px, var(--diagonal-grid) 200px, var(--diagonal-grid) 201.5px),
    repeating-linear-gradient(-45deg, transparent, transparent 200.5px, var(--diagonal-grid) 200px, var(--diagonal-grid) 201.5px);
  z-index: -1;
  pointer-events: none;
}

/* ═════════════════════════════════════════
   SHELL — symmetric left/right margins at
   every breakpoint via a single --gutter.
   ═════════════════════════════════════════ */

.wiz-shell {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.wiz-head {
  border-bottom: var(--hairline) solid var(--rule-line);
  background: rgba(249, 249, 247, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.wiz-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.wiz-logo-link {
  display: block;
  line-height: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.wiz-logo {
  height: 26px;
  width: auto;
  max-width: 100%;
  shape-rendering: geometricPrecision;
}

.metadata {
  font-family: var(--mono-font);
  font-size: 0.6875rem;         /* 11px label floor */
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-blue);
  line-height: 1.4;
}

.wiz-head-meta {
  text-align: right;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ═════════════════════════════════════════
   PROGRESS
   ═════════════════════════════════════════ */

.wiz-progress {
  padding-top: 1.25rem;
  padding-bottom: 0.75rem;
}

.wiz-progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.wiz-progress-label,
.wiz-progress-count {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--graphite);
}

.wiz-progress-count {
  white-space: nowrap;
}

.wiz-progress-track {
  height: 2px;
  width: 100%;
  background: var(--rule-line);
  overflow: hidden;
}

.wiz-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-blue);
  transition: width 0.45s var(--ease-expressive);
}

/* ═════════════════════════════════════════
   SECTION / STEP
   ═════════════════════════════════════════ */

.wiz-main {
  padding-bottom: 5rem;
}

.wiz-step {
  max-width: var(--measure);
  padding-top: 2.25rem;
}

.wiz-step-eyebrow {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-blue);
  margin-bottom: 0.6rem;
}

.wiz-step-title {
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--obsidian);
  margin-bottom: 0.75rem;
}

.wiz-step-title:focus {
  outline: none;
}

.wiz-step-title:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 6px;
}

.wiz-step-intro {
  font-family: var(--serif-font);
  font-size: 1.25rem;
  line-height: 1.45;
  color: rgba(26, 28, 27, 0.72);
  margin-bottom: 2.25rem;
  max-width: 36rem;
}

.wiz-rule {
  border: 0;
  border-top: var(--hairline) solid var(--rule-line);
  margin: 0 0 2rem;
}

/* ═════════════════════════════════════════
   QUESTIONS
   ═════════════════════════════════════════ */

.wiz-q {
  margin-bottom: 2.5rem;
  border: 0;
  padding: 0;
  min-width: 0;                  /* fieldset default shrink fix */
}

.wiz-q:last-child {
  margin-bottom: 1rem;
}

.wiz-q-label,
.wiz-q legend.wiz-q-label {
  display: block;
  font-family: var(--sans-font);
  font-size: 1.0625rem;          /* 17px — this is read, not a micro-label */
  font-weight: 600;
  line-height: 1.35;
  color: var(--obsidian);
  margin-bottom: 0.35rem;
  padding: 0;
}

.wiz-req {
  color: var(--accent-red-signal);
  font-family: var(--mono-font);
  font-size: 0.75rem;
  margin-left: 0.35rem;
  vertical-align: 0.15em;
}

.wiz-optional {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--graphite);
  margin-left: 0.5rem;
  vertical-align: 0.1em;
  font-weight: 400;
}

.wiz-q-help {
  font-size: 1rem;               /* 16px reading floor */
  line-height: 1.5;
  color: rgba(26, 28, 27, 0.66);
  margin-bottom: 0.9rem;
  max-width: 36rem;
}

/* — Critical emphasis (email_on_domain) — */
.wiz-q--critical {
  border-left: 3px solid var(--accent-red-signal);
  padding-left: 1.15rem;
  background: rgba(172, 0, 20, 0.03);
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  padding-right: 1.1rem;
}

.wiz-critical-flag {
  display: inline-block;
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-red-signal);
  border: 1px solid rgba(172, 0, 20, 0.35);
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.7rem;
}

.wiz-q--critical .wiz-q-help {
  color: rgba(93, 14, 14, 0.85);
}

/* — Notice (display-only, never submitted) — */
.wiz-notice {
  border-left: 3px solid var(--accent-blue);
  background: rgba(36, 58, 115, 0.04);
  padding: 1.25rem 1.25rem 1.25rem 1.15rem;
  margin-bottom: 2.5rem;
}

.wiz-notice .wiz-q-label {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.wiz-notice .wiz-q-help {
  margin-bottom: 0;
}

/* ═════════════════════════════════════════
   TEXT INPUTS
   ═════════════════════════════════════════ */

.wiz-input,
.wiz-textarea,
.wiz-date {
  width: 100%;
  max-width: 34rem;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 0;
  color: var(--obsidian);
  font-family: var(--sans-font);
  font-size: 1rem;               /* 16px — also prevents iOS zoom-on-focus */
  line-height: 1.5;
  padding: 0.85rem 0.9rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wiz-textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.wiz-input::placeholder,
.wiz-textarea::placeholder {
  color: rgba(26, 28, 27, 0.32);
}

.wiz-input:focus,
.wiz-textarea:focus,
.wiz-date:focus {
  border-color: var(--field-border-focus);
  box-shadow: 0 0 0 3px rgba(36, 58, 115, 0.12);
}

.wiz-input[aria-invalid="true"],
.wiz-textarea[aria-invalid="true"],
.wiz-date[aria-invalid="true"] {
  border-color: var(--accent-red-signal);
}

.wiz-date {
  max-width: 16rem;
}

/* ═════════════════════════════════════════
   CHOICE CONTROLS — radio + checkbox
   ═════════════════════════════════════════ */

.wiz-choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 34rem;
}

.wiz-choices--grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  max-width: 40rem;
}

@media (min-width: 42rem) {
  .wiz-choices--grid {
    grid-template-columns: 1fr 1fr;
  }
}

.wiz-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--rule-line);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.wiz-choice:hover {
  border-color: rgba(36, 58, 115, 0.4);
  background: rgba(36, 58, 115, 0.03);
}

.wiz-choice input {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.2rem 0 0;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.wiz-choice:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(36, 58, 115, 0.12);
}

.wiz-choice.is-selected {
  border-color: var(--accent-blue);
  background: rgba(36, 58, 115, 0.06);
}

.wiz-choice-text {
  min-width: 0;
}

.wiz-choice-label {
  display: block;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--obsidian);
}

.wiz-choice-help {
  display: block;
  font-size: 0.9375rem;          /* 15px — secondary, not primary reading */
  line-height: 1.4;
  color: rgba(26, 28, 27, 0.6);
  margin-top: 0.2rem;
}

.wiz-choices--band .wiz-choice-label {
  font-family: var(--mono-font);
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
}

/* — tri-state renders as a compact segmented row — */
.wiz-choices--tri {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wiz-choices--tri .wiz-choice {
  flex: 1 1 8rem;
}

/* — "Other" free-text attached to a multi-select — */
.wiz-other {
  margin-top: 0.75rem;
  max-width: 34rem;
}

.wiz-other[hidden] {
  display: none;
}

.wiz-other-label {
  display: block;
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--graphite);
  margin-bottom: 0.35rem;
}

/* ═════════════════════════════════════════
   ERRORS
   ═════════════════════════════════════════ */

.wiz-q-error {
  display: block;
  font-family: var(--mono-font);
  font-size: 0.75rem;            /* 12px, above the 11px label floor */
  letter-spacing: 0.04em;
  line-height: 1.45;
  color: var(--accent-red-signal);
  margin-top: 0.55rem;
}

.wiz-q-error:empty {
  display: none;
}

.wiz-form-error {
  border: 1px solid rgba(172, 0, 20, 0.4);
  background: rgba(172, 0, 20, 0.05);
  color: var(--accent-red);
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.9rem 1rem;
  margin-bottom: 1.75rem;
  max-width: 34rem;
}

.wiz-form-error:empty {
  display: none;
  border: 0;
  padding: 0;
  margin: 0;
}

/* ═════════════════════════════════════════
   NAVIGATION BUTTONS
   ═════════════════════════════════════════ */

.wiz-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: var(--hairline) solid var(--rule-line);
  padding-top: 1.75rem;
  margin-top: 2rem;
}

.wiz-btn {
  font-family: var(--mono-font);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 400;
  padding: 1.05rem 2rem;
  border-radius: 0;
  border: 1px solid var(--accent-blue);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  min-height: 44px;
}

.wiz-btn--primary {
  background: var(--accent-blue);
  color: var(--paper-white);
  flex: 1 1 14rem;
}

.wiz-btn--primary:hover:not(:disabled) {
  background: var(--paper-white);
  color: var(--accent-blue);
}

.wiz-btn--ghost {
  background: transparent;
  color: var(--accent-blue);
  border-color: var(--rule-strong);
}

.wiz-btn--ghost:hover:not(:disabled) {
  border-color: var(--accent-blue);
  background: rgba(36, 58, 115, 0.05);
}

.wiz-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wiz-btn:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

.wiz-nav-note {
  flex: 1 1 100%;
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--graphite);
}

/* ═════════════════════════════════════════
   TURNSTILE (final step only)
   ═════════════════════════════════════════ */

.wiz-turnstile-block {
  margin-bottom: 2rem;
}

.wiz-turnstile {
  min-height: 66px;
}

/* ═════════════════════════════════════════
   SUCCESS SCREEN
   ═════════════════════════════════════════ */

.wiz-success {
  max-width: var(--measure);
  padding-top: 3rem;
}

.wiz-reference {
  font-family: var(--mono-font);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  border: 1px solid var(--rule-strong);
  background: rgba(255, 255, 255, 0.5);
  padding: 1rem 1.15rem;
  display: inline-block;
  margin: 0.5rem 0 1.75rem;
  word-break: break-all;
}

.wiz-success p {
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 34rem;
  margin-bottom: 1rem;
}

/* ═════════════════════════════════════════
   FALLBACKS — no JS, or a hard failure
   ═════════════════════════════════════════ */

.wiz-fallback {
  max-width: var(--measure);
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

.wiz-fallback p {
  font-size: 1.0625rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 34rem;
}

.wiz-fallback a,
.wiz-success a,
.wiz-step a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.wiz-fallback a:hover,
.wiz-success a:hover,
.wiz-step a:hover {
  color: var(--accent-red-signal);
}

/* ═════════════════════════════════════════
   FOOTER
   ═════════════════════════════════════════ */

.wiz-foot {
  border-top: var(--hairline) solid var(--rule-line);
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
}

.wiz-foot .metadata {
  color: var(--graphite);
}

/* ═════════════════════════════════════════
   RESPONSIVE — gutters stay symmetric
   ═════════════════════════════════════════ */

@media (min-width: 48rem) {
  :root { --gutter: 2.5rem; }
  .wiz-logo { height: 30px; }
}

@media (min-width: 72rem) {
  :root { --gutter: 3rem; }
}

@media (max-width: 30rem) {
  .wiz-head-meta { display: none; }

  /* Stack the nav. `flex: 1 1 14rem` on the primary button is a WIDTH basis in
     the row layout; in a column it becomes a HEIGHT basis and blows the button
     up to 14rem tall. Reset the basis, then order explicitly so the primary
     action is still the first thing under the thumb. */
  .wiz-nav {
    flex-direction: column;
    align-items: stretch;
  }
  .wiz-btn {
    width: 100%;
    flex: 0 0 auto;
  }
  .wiz-btn--primary { order: 1; }
  .wiz-btn--ghost { order: 2; }
  .wiz-nav-note { order: 3; margin-top: 0.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Screen-reader-only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Honeypot: off-canvas, never focusable, aria-hidden in markup. */
.wiz-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
