/* =================================
   NEXORYA Discovery — BP Boulet/Giroux
   ================================= */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #0a0a0f;
  color: #f3eaff;
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ========== TOPBAR ========== */
.topbar {
  background: linear-gradient(180deg, #0d0b1f 0%, #0a0a0f 100%);
  border-bottom: 1px solid #2a1f4d;
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.topbar-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { text-decoration: none; display: inline-block; }
.brand-logo { height: 28px; display: block; }
.brand-pill {
  display: inline-block;
  background: #1d1440;
  border: 1px solid #4c2fa3;
  border-radius: 100px;
  padding: 6px 14px;
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #c4b5fd;
  text-transform: uppercase;
}

/* ========== MAIN CONTAINER ========== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ========== HERO ========== */
.hero { margin-bottom: 28px; }
.hero-eyebrow {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: #8b5cf6;
  text-transform: uppercase;
  margin: 0 0 14px 0;
}
.hero-title {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-weight: 400;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0 0 18px 0;
}
.hero-title .grad {
  background: linear-gradient(90deg, #7a26fb 0%, #8b5cf6 40%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 16px;
  line-height: 1.6;
  color: #d8ccf2;
  margin: 0 0 18px 0;
}
.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.hero-saved {
  font-size: 13px;
  color: #06b6d4;
}

/* ========== INTRO CONTEXT ========== */
.intro-context {
  background: #1a1438;
  border: 1px solid #4c2fa3;
  border-radius: 18px;
  padding: 20px 22px;
  margin: 22px 0 28px;
}
.intro-context h3 {
  margin: 0 0 14px 0;
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #06b6d4;
  text-transform: uppercase;
}
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .problem-grid { grid-template-columns: 1fr; }
}
.problem-card {
  background: #1f1a42;
  border: 1px solid #2f2556;
  border-radius: 12px;
  padding: 14px 16px;
}
.problem-num {
  margin: 0 0 4px 0;
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 13px;
  color: #f87171;
  letter-spacing: 0.04em;
}
.problem-title {
  margin: 0 0 6px 0;
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
}
.problem-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #c8bde2;
}
.problem-text code {
  background: #0d0b1f;
  border: 1px solid #4c2fa3;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #c4b5fd;
}
.intro-bottom {
  margin: 14px 0 0 0;
  font-style: italic;
  color: #c8bde2;
  font-size: 14px;
}

/* ========== PROGRESS ========== */
.progress-wrap {
  position: sticky;
  top: 80px;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(10px);
  padding: 14px 0;
  margin: 0 0 24px;
  z-index: 50;
  border-bottom: 1px solid #241c48;
}
.progress-bar {
  height: 6px;
  background: #1f1a42;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7a26fb 0%, #06b6d4 100%);
  width: 9%;
  transition: width 0.4s ease;
}
.progress-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #9988b8;
}
.progress-label {
  margin-left: auto;
  color: #c4b5fd;
  font-weight: 600;
}

/* ========== STEPS ========== */
.step {
  background: #0d0b1f;
  border: 1px solid #2a1f4d;
  border-radius: 18px;
  padding: 28px 28px 22px;
  margin-bottom: 18px;
}
@media (max-width: 720px) {
  .step { padding: 22px 18px 18px; }
}
.step-head { margin-bottom: 18px; }
.step-eyebrow {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #8b5cf6;
  text-transform: uppercase;
  margin: 0 0 8px 0;
}
.step-title {
  margin: 0 0 6px 0;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}
.step-sub {
  margin: 0;
  font-size: 14px;
  color: #c8bde2;
  line-height: 1.5;
}

/* ========== FIELDS ========== */
.field {
  margin-bottom: 20px;
}
.field:last-child { margin-bottom: 4px; }
.lbl {
  display: block;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  font-size: 14.5px;
  line-height: 1.45;
}
.lbl .hint {
  font-weight: 400;
  color: #9988b8;
  font-style: italic;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
  display: block;
  width: 100%;
  background: #14122c;
  border: 1.5px solid #2f2556;
  border-radius: 10px;
  color: #f3eaff;
  font-size: 14.5px;
  padding: 11px 14px;
  margin-bottom: 7px;
  font-family: inherit;
  transition: border 0.2s ease, background 0.2s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus {
  outline: none;
  border-color: #7a26fb;
  background: #1a1438;
}
textarea {
  resize: vertical;
  min-height: 80px;
}

/* ========== CHECKS / RADIOS ========== */
.checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.checks label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #14122c;
  border: 1.5px solid #2f2556;
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
  font-size: 14.5px;
  line-height: 1.45;
}
.checks label:hover {
  border-color: #4c2fa3;
}
.checks label:has(input:checked) {
  border-color: #7a26fb;
  background: #1a1438;
}
.checks input[type="checkbox"],
.checks input[type="radio"] {
  margin: 3px 0 0 0;
  flex-shrink: 0;
  accent-color: #7a26fb;
}

/* ========== PRIORITY GRID (for CRITIQUE/Important/Nice/NA) ========== */
.priority-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.priority-grid label {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #14122c;
  border: 1.5px solid #2f2556;
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
  font-size: 14.5px;
}
.priority-grid label:has(input:checked) {
  border-color: #7a26fb;
  background: #1a1438;
}
.priority-grid input[type="radio"] {
  flex-shrink: 0;
  accent-color: #7a26fb;
}
.prio {
  display: inline-block;
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  margin-right: 4px;
}
.prio-critique {
  background: #b91c1c;
  color: #ffffff;
}
.prio-important {
  background: #b45309;
  color: #ffffff;
}
.prio-nice {
  background: #1e40af;
  color: #ffffff;
}
.prio-na {
  background: #374151;
  color: #d1d5db;
}

/* ========== SECTIONS TABLE (Q23) ========== */
.sections-table {
  display: grid;
  grid-template-columns: 1fr 80px 80px;
  gap: 1px;
  background: #2a1f4d;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2a1f4d;
}
.sec-row {
  display: contents;
}
.sec-row > div {
  background: #14122c;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  font-size: 13.5px;
}
.sec-head > div {
  background: #1a1438;
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #c4b5fd;
  text-transform: uppercase;
  justify-content: center;
}
.sec-name {
  font-weight: 600;
  color: #ffffff;
}
.sec-row > div:not(.sec-name):not(:first-child) {
  justify-content: center;
}
.sec-row input[type="radio"] {
  display: none;
}
.sec-check {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 1.5px solid #4c2fa3;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  background: #14122c;
  transition: all 0.15s ease;
}
.sec-check::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.sec-check-red {
  border-color: #7f1d1d;
}
.sec-check-red::after {
  content: '✗';
  color: #fca5a5;
}
.sec-row input:checked + .sec-check {
  background: #7a26fb;
  border-color: #8b5cf6;
}
.sec-row input:checked + .sec-check::after {
  opacity: 1;
}
.sec-row input:checked + .sec-check-red {
  background: #7f1d1d;
  border-color: #b91c1c;
}
.sec-row input:checked + .sec-check-red::after {
  opacity: 1;
}

@media (max-width: 720px) {
  .sections-table {
    grid-template-columns: 1fr 60px 60px;
  }
  .sec-row > div { padding: 9px 8px; font-size: 13px; }
  .sec-check { width: 20px; height: 20px; }
}

/* ========== SEPARATOR ========== */
.sep {
  border: 0;
  border-top: 1px solid #2a1f4d;
  margin: 24px 0 18px;
}

/* ========== NAV ========== */
.step-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 14px;
}
@media (max-width: 480px) {
  .step-nav { flex-direction: column-reverse; }
  .step-nav .btn { width: 100%; }
}

.btn {
  display: inline-block;
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 14px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 400;
  padding: 14px 24px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: #7a26fb;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(122, 38, 251, 0.4);
}
.btn-primary:hover {
  background: #8b5cf6;
  box-shadow: 0 6px 20px rgba(122, 38, 251, 0.55);
}
.btn-primary:disabled {
  background: #374151;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-ghost {
  background: #14122c;
  color: #c4b5fd;
  border: 1.5px solid #8b5cf6;
}
.btn-ghost:hover {
  background: #1a1438;
}
.btn-ghost:disabled {
  color: #4d3f77;
  border-color: #2a1f4d;
  cursor: not-allowed;
}

.reset-link {
  text-align: center;
  margin: 8px 0 0;
}
.link-reset {
  background: none;
  border: 0;
  color: #736894;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 6px;
}
.link-reset:hover { color: #c4b5fd; }

/* ========== SUBMIT STATE ========== */
.submit-state {
  text-align: center;
  padding: 40px 20px;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #2a1f4d;
  border-top-color: #7a26fb;
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.submit-error {
  background: #2a0e0e;
  border: 1.5px solid #b91c1c;
  border-radius: 12px;
  padding: 18px 22px;
  font-size: 14.5px;
  color: #fee2e2;
}
.submit-error a {
  color: #fca5a5;
  text-decoration: underline;
}

/* ========== FOOTER ========== */
.footer {
  background: #0f0b22;
  border-top: 1px solid #241c48;
  padding: 36px 20px 32px;
  text-align: center;
  margin-top: 48px;
}
.footer-inner {
  max-width: 800px;
  margin: 0 auto;
}
.footer-logo {
  height: 26px;
  display: block;
  margin: 0 auto 14px;
  opacity: 0.85;
}
.footer-tag {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #736894;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.footer-meta {
  margin: 0 0 14px;
  font-size: 13px;
  color: #9988b8;
}
.footer-meta a {
  color: #a592d3;
  text-decoration: none;
}
.footer-meta a:hover { color: #c4b5fd; }
.footer-meta span { color: #3a2f5e; margin: 0 8px; }
.footer-copy {
  margin: 0;
  font-size: 11px;
  color: #5e5580;
}

/* ========== RESPONSIVE TWEAKS ========== */
@media (max-width: 480px) {
  .hero-title { font-size: 32px; }
  .step-title { font-size: 20px; }
  .container { padding: 20px 14px 60px; }
}
