/* =============================================
   MENTAL FORMULA — Diagnóstico de Influência
   ============================================= */

:root {
  --navy:      #010C42;
  --red:       #F6462C;
  --red-dark:  #d93b23;
  --white:     #FFFFFF;
  --w70:       rgba(255,255,255,0.70);
  --w40:       rgba(255,255,255,0.40);
  --w12:       rgba(255,255,255,0.12);
  --w07:       rgba(255,255,255,0.07);
  --r10:       rgba(246,70,44,0.10);
  --r25:       rgba(246,70,44,0.25);
  --font:      'Montserrat', sans-serif;
  --ease:      0.28s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Confetti Canvas ---- */
#confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1000;
  display: none;
}

/* =============================================
   MILESTONE OVERLAY
   ============================================= */
.milestone-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.milestone-overlay.visible { opacity: 1; pointer-events: auto; }

.milestone-box {
  background: rgba(1, 12, 66, 0.97);
  border: 1px solid var(--r25);
  border-radius: 24px;
  padding: 36px 48px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transform: scale(0.88);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.milestone-overlay.visible .milestone-box { transform: scale(1); }

.milestone-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 14px;
}
.milestone-text {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--white);
  white-space: pre-line;
}

/* =============================================
   SCREENS
   ============================================= */
.screen { display: none; min-height: 100vh; }
.screen.active {
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.4s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

/* ---- Logo ---- */
.logo       { height: 48px; width: auto; margin-bottom: 36px; }
.logo-small { height: 34px; margin-bottom: 0; }

/* ---- Badge pill ---- */
.badge {
  display: inline-block;
  background: var(--r10);
  border: 1px solid var(--r25);
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 24px;
}

/* ---- Intro ---- */
h1 {
  font-size: clamp(26px, 5.5vw, 44px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}
.highlight { color: var(--red); }

.subtitle {
  font-size: 16px;
  line-height: 1.75;
  color: var(--w70);
  max-width: 520px;
  margin-bottom: 40px;
}

.intro-form {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.intro-form input {
  width: 100%;
  padding: 16px 20px;
  background: var(--w07);
  border: 1px solid var(--w12);
  border-radius: 12px;
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: border-color var(--ease);
}
.intro-form input::placeholder { color: var(--w40); }
.intro-form input:focus { border-color: var(--red); }
.intro-form input.invalid { border-color: #ff6b6b; }

.form-error {
  font-size: 13px;
  font-weight: 600;
  color: #ff6b6b;
  text-align: left;
  min-height: 18px;
  margin-top: -4px;
}

.hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--w40);
  letter-spacing: 0.3px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  display: block;
  width: 100%;
  padding: 18px 32px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  text-decoration: none;
  text-align: center;
}
.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(246,70,44,0.35);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 440px;
  padding: 16px 32px;
  background: #25D366;
  color: var(--white);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  margin-top: 12px;
}
.btn-whatsapp:hover {
  background: #1ebe5a;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37,211,102,0.35);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--w12);
  color: var(--w40);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--ease);
  margin-top: 12px;
}
.btn-ghost:hover { border-color: var(--w40); color: var(--w70); }

.btn-answer:disabled { opacity: 0.5; pointer-events: none; }

/* =============================================
   QUIZ SCREEN
   ============================================= */
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--w12);
}
.progress-info { font-size: 13px; font-weight: 700; color: var(--w40); }

.progress-bar-wrap { width: 100%; height: 3px; background: var(--w07); }
.progress-bar {
  height: 100%;
  background: var(--red);
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
}

.quiz-container {
  justify-content: center;
  padding-top: 48px;
  padding-bottom: 48px;
  min-height: calc(100vh - 60px);
}

/* ---- Question Card ---- */
.question-card { width: 100%; max-width: 580px; }

/* Slide IN — default state */
.question-card { animation: slideIn 0.32s ease both; }

/* Slide OUT — triggered via class */
.question-card.exiting { animation: slideOut 0.26s ease forwards; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-28px); }
}

.question-number {
  font-size: 48px;
  font-weight: 900;
  color: var(--red);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.9;
}
.question-text {
  font-size: clamp(18px, 3.2vw, 24px);
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 44px;
  color: var(--white);
}

.answer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.btn-answer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 20px;
  border-radius: 16px;
  border: 2px solid transparent;
  font-family: var(--font);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-answer:active  { transform: scale(0.97) !important; }
.btn-answer:focus   { outline: none; }
.btn-answer:focus-visible { outline: 2px solid var(--w40); outline-offset: 3px; }

.btn-sim,
.btn-nao {
  background: var(--w07);
  border-color: var(--w12);
  color: var(--white);
}
.btn-sim:hover,
.btn-nao:hover {
  background: var(--w12);
  border-color: var(--w40);
  transform: translateY(-4px);
}

.answer-icon  { font-size: 26px; line-height: 1; }
.answer-label { font-size: 14px; font-weight: 800; letter-spacing: 3px; }

/* =============================================
   RESULT SCREEN
   ============================================= */
.result-container { padding-top: 48px; }

.result-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--red);
  margin-bottom: 10px;
}
.result-greeting {
  font-size: 20px;
  font-weight: 700;
  color: var(--w70);
  margin-bottom: 28px;
  min-height: 28px;
}

/* ---- Score ---- */
.score-block {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 380px;
  margin-bottom: 32px;
}
.score-number-wrap { display: flex; align-items: baseline; gap: 3px; flex-shrink: 0; }
.score-number { font-size: 80px; font-weight: 900; color: var(--red); line-height: 1; letter-spacing: -3px; }
.score-denom  { font-size: 28px; font-weight: 700; color: var(--w40); }

.score-bar-wrap { flex: 1; height: 6px; background: var(--w12); border-radius: 100px; overflow: hidden; }
.score-bar-fill {
  height: 100%;
  background: var(--red);
  border-radius: 100px;
  width: 0%;
  transition: width 1.1s cubic-bezier(0.4,0,0.2,1) 0.3s;
}

/* ---- Badge ---- */
.result-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, rgba(246,70,44,0.14), rgba(246,70,44,0.04));
  border: 1px solid var(--r25);
  border-radius: 20px;
  padding: 24px 40px 20px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 380px;
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 1.4s both;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
.badge-icon-large { font-size: 48px; line-height: 1; margin-bottom: 10px; }
.badge-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--red);
}

/* ---- Result text ---- */
.result-title {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--white);
}
.result-description {
  font-size: 15px;
  line-height: 1.80;
  color: var(--w70);
  text-align: left;
  width: 100%;
  margin-bottom: 36px;
}
.result-description p + p { margin-top: 14px; }

/* ---- Tips ---- */
.tips-card {
  width: 100%;
  background: var(--w07);
  border: 1px solid var(--w12);
  border-radius: 18px;
  padding: 28px 28px 32px;
  margin-bottom: 48px;
  text-align: left;
}
.tips-heading {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--red);
  margin-bottom: 24px;
}
.tips-list { display: flex; flex-direction: column; gap: 24px; }
.tip-item  { display: flex; gap: 16px; align-items: flex-start; }
.tip-num {
  width: 26px; height: 26px;
  background: var(--red);
  color: var(--white);
  font-size: 12px; font-weight: 800;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.tip-body h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--white); }
.tip-body p  { font-size: 14px; line-height: 1.65; color: var(--w70); }

/* ---- CTA ---- */
.cta-block {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta-rule { width: 56px; height: 3px; background: var(--red); border-radius: 2px; margin: 0 auto 32px; }
.cta-line1 { font-size: 14px; color: var(--w70); margin-bottom: 8px; }
.cta-line2 { font-size: 24px; font-weight: 900; color: var(--white); margin-bottom: 18px; }
.cta-line3 { font-size: 15px; line-height: 1.75; color: var(--w70); max-width: 520px; margin-bottom: 28px; }
.cta-line3 strong { color: var(--white); }

.event-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 32px; }
.pill {
  background: var(--w07);
  border: 1px solid var(--w12);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--w70);
}

.btn-cta {
  width: 100%;
  max-width: 440px;
  font-size: 17px;
  padding: 20px 32px;
  box-shadow: 0 8px 32px rgba(246,70,44,0.35);
}

/* ---- Course Image ---- */
.curso-img {
  width: 100%;
  max-width: 520px;
  border-radius: 16px;
  margin-bottom: 24px;
  display: block;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 520px) {
  .container { padding: 32px 20px 48px; }
  .quiz-header { padding: 16px 20px; }
  .quiz-container { padding-top: 0; padding-bottom: 0; }
  .btn-answer { padding: 24px 16px; }
  .answer-icon { font-size: 22px; }
  .score-block { flex-direction: column; align-items: flex-start; gap: 14px; }
  .score-bar-wrap { width: 100%; }
  .tips-card { padding: 22px 20px 26px; }
  .event-pills { gap: 8px; }
  .pill { font-size: 12px; padding: 7px 14px; }
  .milestone-box { padding: 28px 32px; margin: 20px; }
  .result-badge { padding: 20px 28px 18px; }
}
