/* ============================================================
   Flowdesk Business-Fit Quiz — funnel styles
   ------------------------------------------------------------
   Loaded on top of styles.css (which provides the design tokens,
   base typography, .container, .site-header, .btn and .site-footer).
   Only the funnel-specific components live here.
   ============================================================ */

/* Solid, legible sticky header once the user scrolls off the light top.
   (This page has no script.js; quiz.js toggles .is-scrolled.) */
body[data-page="sobivustest"] .site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(15, 24, 41, 0.08);
}

/* Full-height brand gradient stage — the signature hero look */
.quiz-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) 20px 72px;
  background: radial-gradient(102.71% 126.37% at 15.53% 3.68%,
    #FFFFFF 0%, #ACBDFB 29.57%, #101833 97.12%);
  position: relative;
  overflow: hidden;
}

/* Soft floating blobs for depth (non-interactive) */
.quiz-page::before,
.quiz-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
}
.quiz-page::before {
  width: 420px; height: 420px;
  background: #4E7CFF;
  top: -120px; right: -80px;
}
.quiz-page::after {
  width: 380px; height: 380px;
  background: #ACBDFB;
  bottom: -140px; left: -100px;
}

.quiz-shell {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
}

/* ---- Card ---------------------------------------------------- */
.quiz-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(16, 24, 51, 0.28);
  padding: 40px;
  animation: quizFade 0.4s ease both;
}

@keyframes quizFade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Intro --------------------------------------------------- */
.quiz-eyebrow {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(78, 124, 255, 0.1);
  padding: 6px 14px;
  border-radius: 40px;
  margin-bottom: 20px;
}
.quiz-intro-title {
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 16px;
}
.quiz-intro-sub {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 24px;
}
.quiz-intro-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
.quiz-intro-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  color: var(--ink);
}
.quiz-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}
.quiz-start-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.quiz-start { justify-content: center; }
.quiz-start-meta { font-size: 0.85rem; color: var(--text-muted); }
.quiz-intro-trust {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.quiz-intro-trust::before {
  content: '★';
  color: var(--primary);
}

/* ---- Progress ------------------------------------------------ */
.quiz-progress { margin-bottom: 28px; }
.quiz-progress-bar {
  height: 6px;
  border-radius: 40px;
  background: rgba(16, 24, 51, 0.1);
  overflow: hidden;
}
.quiz-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 40px;
  background: linear-gradient(90deg, #4E7CFF, #597BF7);
  transition: width 0.4s ease;
}
.quiz-progress-label {
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ---- Question ------------------------------------------------ */
.quiz-q-title {
  font-size: clamp(1.35rem, 3.5vw, 1.7rem);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 10px;
}
.quiz-q-hint {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}
.quiz-q-multi {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
}
.quiz-q-hint + .quiz-options { margin-top: 20px; }

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.quiz-option:hover {
  border-color: #ACBDFB;
  box-shadow: 0 6px 18px rgba(78, 124, 255, 0.14);
  transform: translateY(-1px);
}
.quiz-option.is-selected {
  border-color: var(--primary);
  background: rgba(78, 124, 255, 0.06);
  box-shadow: 0 6px 18px rgba(78, 124, 255, 0.18);
}

.quiz-option-mark {
  flex-shrink: 0;
  width: 22px; height: 22px;
  margin-top: 2px;
  border: 2px solid var(--text-light);
  border-radius: 50%;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.quiz-option-mark.is-box { border-radius: 6px; }
.quiz-option.is-selected .quiz-option-mark {
  border-color: var(--primary);
  background: var(--primary);
}
.quiz-option.is-selected .quiz-option-mark::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.quiz-option-body { display: flex; flex-direction: column; gap: 3px; }
.quiz-option-label { font-weight: 600; color: var(--ink); line-height: 1.35; }
.quiz-option-note { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; }

/* ---- Nav row ------------------------------------------------- */
.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.quiz-back {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 4px;
  transition: color 0.15s ease;
}
.quiz-back:hover { color: var(--ink); }
.quiz-next.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- Gate (analysing + form) --------------------------------- */
.quiz-analysing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px 0;
}
.quiz-spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(78, 124, 255, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: quizSpin 0.8s linear infinite;
}
@keyframes quizSpin { to { transform: rotate(360deg); } }
.quiz-analysing-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--ink);
}
.quiz-gate-title { margin-bottom: 6px; }

.quiz-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 22px;
}
.quiz-field { display: flex; flex-direction: column; gap: 6px; }
.quiz-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.quiz-optional { font-weight: 400; color: var(--text-light); }
.quiz-field input {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.quiz-field input:focus { outline: none; border-color: var(--primary); }
.quiz-field.is-invalid input { border-color: #F65164; background: rgba(246, 81, 100, 0.04); }
.quiz-field-error { font-size: 0.78rem; color: #D63B4E; font-weight: 500; }
.quiz-submit { width: 100%; justify-content: center; margin-top: 6px; }
.quiz-submit.is-loading { opacity: 0.7; pointer-events: none; }
.quiz-privacy {
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: center;
}

/* ---- Result -------------------------------------------------- */
.quiz-result { text-align: center; }
.quiz-gauge {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
}
.quiz-gauge-track { stroke: rgba(16, 24, 51, 0.1); }
.quiz-gauge-fill {
  transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.quiz-gauge-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 2px;
  font-family: 'Poppins', sans-serif;
}
.quiz-gauge-num strong { font-size: 2.4rem; font-weight: 900; color: var(--ink); line-height: 1; }
.quiz-gauge-num span { font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.quiz-gauge-num small {
  flex-basis: 100%;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Tier colour accents on the gauge fill + badge */
.tier-perfect .quiz-gauge-fill { stroke: var(--accent); }
.tier-strong  .quiz-gauge-fill { stroke: var(--primary); }
.tier-weak    .quiz-gauge-fill { stroke: #F65164; }

.quiz-result-badge {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 40px;
  margin-bottom: 16px;
}
.tier-perfect .quiz-result-badge { background: rgba(16, 185, 129, 0.12); color: var(--accent-hover); }
.tier-strong  .quiz-result-badge { background: rgba(78, 124, 255, 0.12); color: var(--primary); }
.tier-weak    .quiz-result-badge { background: rgba(246, 81, 100, 0.12); color: #D63B4E; }

.quiz-result-heading {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 14px;
}
.quiz-result-body {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text);
  max-width: 480px;
  margin: 0 auto 28px;
}
/* Personalised proof — the user's bottlenecks echoed as solved features */
.quiz-solves {
  text-align: left;
  background: rgba(78, 124, 255, 0.05);
  border: 1px solid rgba(78, 124, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 0 auto 28px;
  max-width: 480px;
}
.quiz-solves-intro {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}
.quiz-solves-list { display: flex; flex-direction: column; gap: 10px; }
.quiz-solves-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}
.quiz-solves-list .quiz-tick { width: 22px; height: 22px; margin-top: 1px; }

.quiz-result-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}
.quiz-restart {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.quiz-restart:hover { color: var(--ink); }

/* ---- Responsive ---------------------------------------------- */
@media (max-width: 560px) {
  .quiz-card { padding: 28px 20px; border-radius: 20px; }
  .quiz-page { padding-top: calc(var(--header-h) + 20px); }
  .quiz-option { padding: 14px; }
}
