:root {
  --ink: #23004B;
  --ink-stone: #41329B;
  --ink-mist: #F7F6FF;
  --ink-shade-4: #F7F6FF;
  --neon-blue: #320FFF;
  --solar: #FFBE00;
  --white: #FFFFFF;
  --warm-gray: #B4B4B9;
  --error: #C5221F;
  --error-bg: #FBEAEA;
  --font: "Avenir Next LT Pro","Avenir Next",Avenir,"Segoe UI",Helvetica,Arial,sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
}

a { color: var(--neon-blue); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  padding: 48px 24px 72px;
}

.hero-oblique {
  position: absolute;
  left: -60px;
  top: 0;
  height: 100%;
  width: 220px;
  opacity: 0.35;
  pointer-events: none;
}
.hero-oblique svg { height: 130%; width: auto; display: block; }

.hero-inner {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
}

.logo-row {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 32px;
}

.logo-row svg { width: 108px; height: auto; flex: 0 0 auto; }

.hero-title {
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 34px);
  color: var(--white);
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  /* The logo artwork sits low in its box; this brings the title onto that same line. */
  transform: translateY(7px);
}

.hero-text {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero-text p {
  font-size: 16px;
  color: var(--white);
  margin: 0 0 16px;
}

.hero-text p:last-child { margin-bottom: 0; }

/* ---------- Form shell ---------- */
.form-shell {
  max-width: 1040px;
  margin: -40px auto 0;
  position: relative;
  padding: 0 24px 80px;
}

.intro-card {
  background: var(--ink-mist);
  border: 1px solid rgba(65, 50, 155, 0.16);
  border-radius: 10px;
  padding: 24px 32px;
  margin-bottom: 24px;
}

.intro-card p {
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 12px;
}

.intro-text {
  white-space: nowrap;
  letter-spacing: 0;
}

.required-note {
  font-size: 14px;
  color: var(--ink);
  margin: 0;
  font-weight: 600;
}

.required-note .req {
  margin-left: 0;
  margin-right: 4px;
}

form { margin: 0; }

.section-card {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(65, 50, 155, 0.16);
  border-top: 4px solid var(--ink-stone);
  border-radius: 10px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 8px 24px rgba(35, 0, 75, 0.045);
}

/* Subtle visual separator between major form sections */
.section-card:not(:last-of-type)::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(65, 50, 155, 0.28), transparent);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: var(--solar);
  margin: 0 0 12px;
  padding: 5px 10px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}

.section-desc {
  font-size: 14px;
  color: var(--ink-stone);
  margin: 0 0 28px;
}

.field {
  margin-bottom: 26px;
}
.field:last-child { margin-bottom: 0; }

.field-label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}

.req {
  color: var(--error) !important;
  margin-left: 2px;
}

.field-help {
  font-size: 14px;
  color: var(--ink-stone);
  margin: 0 0 10px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  max-width: 480px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--warm-gray);
  border-radius: 6px;
  padding: 12px 14px;
}

.field textarea { max-width: 100%; resize: vertical; min-height: 90px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px var(--ink-shade-4);
}

.field input.invalid,
.field select.invalid {
  border-color: var(--error);
  background: var(--error-bg);
}

.error-msg {
  display: none;
  font-size: 13px;
  color: var(--error);
  margin-top: 6px;
  font-weight: 500;
}
.error-msg.show { display: block; }
.sr-only { position: absolute; left: -9999px; }

/* Address row layout */
.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 26px;
}
.field-row .field { flex: 1 1 200px; margin-bottom: 0; }
.field-row .field input { max-width: 100%; }

/* Radio groups */
fieldset.field {
  border: none;
  margin: 0 0 26px;
  padding: 0;
}
fieldset.field legend {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  padding: 0;
}
.radio-group {
  display: flex;
  gap: 24px;
  margin-top: 10px;
}
.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
}
.radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}
.radio-option label {
  font-size: 15px;
  color: var(--ink);
}

/* Engagement path */
.path-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
}
.path-card {
  flex: 1 1 220px;
  border: 1.5px solid var(--warm-gray);
  border-radius: 8px;
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.path-card input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--ink);
  flex-shrink: 0;
}
.path-card-title { font-weight: 600; color: var(--ink); font-size: 15px; }
.path-card-sub { font-size: 13px; color: var(--ink-stone); margin-top: 2px; }
.path-card.selected { border-color: var(--ink); background: var(--ink-mist); }

#headcountWrap { margin-top: 22px; display: none; }
#headcountWrap.show { display: block; }

.headcount-hint {
  font-size: 13px;
  color: var(--ink-stone);
  margin-top: 8px;
}

/* Person cards (dynamic non-associate entries) */
.person-card {
  background: var(--ink-mist);
  border: 1px solid rgba(65, 50, 155, 0.14);
  border-top: 4px solid var(--solar);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}
.person-card:last-child { margin-bottom: 0; }
.person-heading {
  display: table;
  width: auto;
  max-width: 100%;
  margin: -4px auto 24px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 190, 0, 0.8);
  border-radius: 999px;
  background: var(--solar);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.01em;
}

.person-heading::before,
.person-heading::after {
  content: none;
}

/* File upload */
.file-drop {
  max-width: 480px;
  border: 1.5px dashed var(--ink-stone);
  border-radius: 6px;
  padding: 20px;
  background: var(--ink-mist);
  font-size: 14px;
  color: var(--ink-stone);
}
.file-drop input[type="file"] {
  display: block;
  margin-top: 0;
  font-family: var(--font);
  font-size: 14px;
}

.file-drop input[type="file"]::file-selector-button {
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--ink);
  border-radius: 5px;
  padding: 9px 14px;
  margin-right: 12px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.file-drop input[type="file"]::file-selector-button:hover {
  background: var(--ink-stone);
  border-color: var(--ink-stone);
}

.file-drop input[type="file"]::-webkit-file-upload-button {
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--ink);
  border-radius: 5px;
  padding: 9px 14px;
  margin-right: 12px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Person-level background check / drug screen attestation */
.attestation-block {
  background: var(--white);
  border: 1px solid var(--warm-gray);
  border-left: 4px solid var(--solar);
  border-radius: 8px;
  padding: 20px;
  margin: 4px 0 26px;
}

.attestation-heading {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.attestation-intro {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--ink);
}

.attestation-question {
  font-weight: 600;
  background: rgba(255, 190, 0, 0.12);
  border-left: 3px solid var(--solar);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.attestation-date {
  margin-top: 20px;
  margin-bottom: 0;
}

.attestation-list {
  margin: 0 0 16px 20px;
  padding: 0;
  color: var(--ink);
  font-size: 14px;
}

.attestation-list li {
  margin-bottom: 6px;
}

.agreement-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.agreement-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ink);
  flex-shrink: 0;
}

.agreement-row input[type="checkbox"].invalid {
  outline: 2px solid var(--error);
  outline-offset: 2px;
}

/* Submit */
.submit-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 4px 0;
}

.btn-primary {
  background: #FFBE00 !important;
  color: #23004B !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 14px 28px !important;
  font-family: "Avenir Next LT Pro","Avenir Next",Avenir,"Segoe UI",Helvetica,Arial,sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.btn-primary:hover  {
  background: var(--solar) !important;
  color: var(--ink) !important;
  box-shadow: 0 0 0 3px var(--ink-mist);
}
.btn-primary:active {
  background: var(--solar) !important;
  color: var(--ink) !important;
  transform: translateY(1px);
}
.btn-primary:focus-visible {
  background: var(--solar) !important;
  color: var(--ink) !important;
  outline: 2px solid var(--neon-blue) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 4px var(--ink-mist) !important;
}
.btn-primary:disabled {
  background: var(--warm-gray) !important;
  color: var(--white) !important;
  cursor: not-allowed !important;
  opacity: 1;
}

.validation-summary {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: min(720px, 100%);
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(197, 34, 31, 0.45);
  border-left: 4px solid var(--error);
  border-radius: 6px;
  background: var(--error-bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.validation-summary.show {
  display: block;
}

/* Submission confirmation modal */
.submission-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(35, 0, 75, 0.58);
  z-index: 9999;
}

.submission-modal.show {
  display: flex;
}

.submission-dialog {
  width: min(460px, 100%);
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(35, 0, 75, 0.22);
  padding: 30px;
  text-align: center;
}

.submission-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink-mist);
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
}

.submission-modal.error .submission-icon {
  background: var(--error-bg);
  color: var(--error);
}

.submission-modal.error .submission-dialog {
  border-top: 4px solid var(--error);
}

.submission-modal.success .submission-dialog {
  border-top: 4px solid var(--solar);
}

.submission-modal.submitting .submission-dialog {
  border-top: 4px solid var(--ink);
}

.submission-modal.submitting .submission-icon {
  background: transparent;
  border: 4px solid var(--ink-mist);
  border-top-color: var(--ink);
  animation: spin 0.9s linear infinite;
}

.submission-modal.confirm .submission-dialog {
  border-top: 4px solid var(--solar);
}

.submission-modal.confirm .submission-icon {
  display: none;
}

.failed-name-list {
  list-style: none;
  margin: 14px 0 18px;
  padding: 0;
  text-align: left;
}

.failed-name-list li {
  margin: 6px 0;
  padding: 8px 12px;
  background: #FFF8E1;
  border-left: 4px solid var(--solar);
  font-weight: 700;
  color: #5D4200;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn-ghost {
  min-width: 112px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.btn-ghost:hover {
  background: var(--ink-mist);
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

.submission-dialog h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

.submission-dialog p {
  margin: 0 0 22px;
  color: var(--ink-stone);
  font-size: 15px;
  white-space: pre-line;
}

.modal-close {
  min-width: 112px;
}

@media (max-width: 980px) {
  .intro-text { white-space: normal; }
}

@media (max-width: 700px) {
  .hero-oblique { display: none; }
}

@media (max-width: 600px) {
  .hero { padding: 32px 18px 56px; }
  .section-card { padding: 22px; }
  .intro-card { padding: 22px; }
  .logo-row { gap: 12px; margin-bottom: 28px; }
  .logo-row svg { width: 78px; }
}
