/* ===========================
   KLIN TECH — QUIZ STYLES (light theme)
   =========================== */

:root {
  --azul:        #4F46E5;
  --roxo:        #7C3AED;
  --fundo:       #F8F7FF;
  --branco:      #FFFFFF;
  --roxo-suave:  #EEF2FF;
  --texto-dark:  #1E1B4B;
  --texto-muted: #6B7280;
  --borda:       #E5E7EB;
  --radius:      16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--fundo);
  min-height: 100vh;
  color: var(--texto-dark);
  -webkit-font-smoothing: antialiased;
}

/* ===========================
   HEADER
   =========================== */

.quiz-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--branco);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--borda);
  padding: 0 20px;
}

.quiz-header-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--texto-dark);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.logo strong { color: var(--roxo); }

.logo-img { height: 40px; width: auto; display: block; }

@media (min-width: 768px) {
  .logo-img { height: 52px; }
}

/* progress bar precisa ocupar largura total mesmo com align-items: center */
.progress-wrap { width: 100%; }

/* ===========================
   PROGRESS BAR
   =========================== */

.progress-wrap { display: flex; flex-direction: column; gap: 6px; }

.progress-text-row { display: flex; justify-content: space-between; align-items: center; }

.progress-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--azul);
  letter-spacing: 0.02em;
}

.progress-bar {
  height: 4px;
  background: var(--roxo-suave);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--azul), var(--roxo));
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ===========================
   MAIN / CONTAINER
   =========================== */

.quiz-main {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 20px 60px;
}

.container {
  width: 100%;
  max-width: 520px;
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(79, 70, 229, 0.08);
  padding: 32px 28px;
}

/* ===========================
   SCREENS
   =========================== */

.screen { display: none; }
.screen.active {
  display: flex;
  flex-direction: column;
  animation: fadeSlideIn 0.35s ease both;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ===========================
   SCREEN 0 — INTRO
   =========================== */

.intro-badge {
  display: inline-block;
  background: var(--roxo-suave);
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: var(--azul);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.intro-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(26px, 6vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--texto-dark);
}

.highlight {
  background: linear-gradient(135deg, var(--azul), var(--roxo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro-sub {
  font-size: 16px;
  color: var(--texto-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.intro-name-wrap {
  margin-bottom: 24px;
}

.intro-name-input {
  width: 100%;
  background: var(--fundo);
  border: 1.5px solid var(--borda);
  border-radius: 12px;
  padding: 15px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--texto-dark);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.intro-name-input::placeholder { color: #9CA3AF; }

.intro-name-input:focus {
  border-color: var(--azul);
  background: var(--branco);
}

.btn-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.pain-card {
  background: var(--fundo);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  padding: 16px;
}

.pain-emoji { font-size: 22px; margin-bottom: 8px; }

.pain-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--texto-dark);
}

.pain-text {
  font-size: 12px;
  color: var(--texto-muted);
  line-height: 1.4;
}

.intro-note {
  text-align: center;
  font-size: 13px;
  color: var(--texto-muted);
  margin-top: 14px;
}

/* ===========================
   QUESTIONS
   =========================== */

.question-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--azul);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.question-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 24px;
  color: var(--texto-dark);
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--branco);
  border: 1.5px solid var(--borda);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
}

.option-card:hover {
  border-color: var(--azul);
  background: var(--roxo-suave);
  transform: translateX(2px);
}

.option-card.selected {
  border: 2px solid var(--roxo);
  background: var(--roxo-suave);
}

.option-card.selected .option-text strong {
  color: var(--azul);
}

.option-card.selected::after {
  content: '✓';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: var(--roxo);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 22px;
  text-align: center;
}

.option-icon { font-size: 22px; flex-shrink: 0; }

.option-text { display: flex; flex-direction: column; gap: 2px; }

.option-text strong {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--texto-dark);
}

.option-text span {
  font-size: 12px;
  color: var(--texto-muted);
  line-height: 1.4;
}

/* ===========================
   SCREEN 6 — CAPTURA
   =========================== */

.capture-icon { font-size: 48px; margin-bottom: 16px; }

.capture-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--texto-dark);
}

.capture-sub {
  font-size: 15px;
  color: var(--texto-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.capture-form { display: flex; flex-direction: column; gap: 12px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-input {
  width: 100%;
  background: var(--fundo);
  border: 1.5px solid var(--borda);
  border-radius: 12px;
  padding: 15px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--texto-dark);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-input::placeholder { color: #9CA3AF; }

.form-input:focus {
  border-color: var(--azul);
  background: var(--branco);
}

.form-input.error { border-color: #EF4444; }

.form-error {
  font-size: 12px;
  color: #EF4444;
  padding-left: 4px;
}

.capture-note {
  text-align: center;
  font-size: 12px;
  color: var(--texto-muted);
  margin-top: 4px;
}

/* ===========================
   BUTTON CTA
   =========================== */

.btn-cta {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--azul), var(--roxo));
  color: var(--branco);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 18px 32px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-cta:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.4);
}

.btn-cta:active { transform: scale(0.99); }

.btn-cta-demo {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--azul);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  border: 2px solid var(--azul);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  margin-top: 10px;
  transition: background 0.2s ease;
}

.btn-cta-demo:hover {
  background: var(--roxo-suave);
}

/* ===========================
   SCREEN 7 — RESULTADO
   =========================== */

.result-emoji { font-size: 52px; margin-bottom: 16px; }

.result-perfil-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.result-perfil-a { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.result-perfil-b { background: #FFFBEB; color: #D97706; border: 1px solid #FDE68A; }
.result-perfil-c { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }

.result-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
  color: var(--texto-dark);
}

.result-desc {
  font-size: 15px;
  color: var(--texto-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.result-highlight-box {
  background: var(--roxo-suave);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
}

.result-highlight-box strong {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--azul);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.result-highlight-box p {
  font-size: 14px;
  color: var(--texto-dark);
  line-height: 1.6;
}

.result-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.result-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

.result-bullets li::before {
  content: '✅';
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

.result-testimonial {
  background: var(--fundo);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 28px;
}

.result-testimonial blockquote {
  font-size: 14px;
  font-style: italic;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 10px;
}

.result-testimonial cite {
  display: block;
  font-size: 12px;
  color: var(--texto-muted);
  font-style: normal;
  font-weight: 500;
}

.result-stars {
  color: #FBBF24;
  font-size: 13px;
  margin-bottom: 8px;
}

.btn-cta-result {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--azul), var(--roxo));
  color: var(--branco);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 18px 32px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-cta-result:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.4);
}

.result-below-cta {
  text-align: center;
  font-size: 12px;
  color: var(--texto-muted);
  margin-top: 12px;
}

/* Stagger animation for result items */
.result-animate {
  opacity: 0;
  animation: resultFadeIn 0.4s ease forwards;
}

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

/* ===========================
   RESPONSIVE
   =========================== */

@media (min-width: 560px) {
  .pain-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .pain-grid { grid-template-columns: 1fr; }
  .intro-title { font-size: 24px; }
  .container { padding: 24px 18px; border-radius: 16px; }
}

@media (min-width: 640px) {
  .quiz-main { padding: 48px 40px 80px; }
  .quiz-header-inner { padding: 16px 0; }
}

/* ===========================
   VSL
   =========================== */
.vsl-title {
  text-align: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--texto-dark);
  margin-bottom: 14px;
}

.vsl-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.2);
}

.vsl-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.vsl-unmute {
  position: absolute;
  inset: 0;
  margin: auto;
  width: max-content;
  height: max-content;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--azul), var(--roxo));
  color: var(--branco);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  cursor: pointer;
  animation: vslPulse 1.4s ease-in-out infinite;
}

@keyframes vslPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

.vsl-bar {
  height: 8px;
  margin-top: 12px;
  background: var(--borda);
  border-radius: 999px;
  overflow: hidden;
}

.vsl-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--azul), var(--roxo));
  border-radius: 999px;
  transition: width 0.4s linear;
}

.vsl-offer { margin-top: 24px; }
.vsl-offer[hidden] { display: none; }
.vsl-offer-in { animation: resultFadeIn 0.5s ease both; }
