/* ============================================================
   DESCUBRA SUA PERSONALIDADE — Quiz Styles
   Depende de tokens.css + components.css
============================================================ */

/* ══════════════════════════════════════════
   TIPOGRAFIA — anti-viúvas
══════════════════════════════════════════ */

/* Títulos: distribui linhas de forma equilibrada */
.intro__title,
.capture__title,
.result-hero__name,
.result-hero__tagline,
.result-ctas__title,
.wing-card__title,
.result-section__title {
  text-wrap: balance;
}

/* Parágrafos: evita palavra solitária na última linha */
.intro__sub,
.q-text,
.result-hero__desc,
.result-ctas__sub,
.wing-card__desc,
.capture__sub,
.result-list li {
  text-wrap: pretty;
}

/* ══════════════════════════════════════════
   BASE — app sem scroll
══════════════════════════════════════════ */
html, body {
  height: 100%;
  overflow: hidden;
  background: var(--dark-900);
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* ══════════════════════════════════════════
   BARRA SUPERIOR (progress + counter)
══════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: rgba(26, 27, 31, 0.92);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-normal) var(--ease);
}

.topbar.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--sp-4);
}

.topbar__logo {
  height: 22px;
  width: auto;
}

.topbar__counter {
  font: var(--text-label-sm);
  letter-spacing: var(--ls-widest);
  color: var(--text-dark);
}

.topbar__progress {
  height: 2px;
  background: rgba(255, 253, 246, 0.08);
}

.topbar__fill {
  height: 100%;
  background: var(--brand-400);
  transition: width 0.5s var(--ease-out);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

/* ══════════════════════════════════════════
   SCREENS
══════════════════════════════════════════ */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;

  opacity: 0;
  pointer-events: none;
  transform: translateX(40px);
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.45s var(--ease-out);
}

.screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.screen.is-exiting {
  opacity: 0;
  transform: translateX(-40px);
  pointer-events: none;
  transition:
    opacity 0.28s var(--ease-in),
    transform 0.28s var(--ease-in);
}

.screen__inner {
  width: 100%;
  max-width: 680px;
  padding: var(--sp-8) var(--sp-4) var(--sp-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-block: auto;
}

.screen__inner--narrow {
  max-width: 520px;
  padding-block: var(--sp-5);
}

.screen__inner--test {
  max-width: 760px;
  padding-top: 72px;
}

/* ══════════════════════════════════════════
   INTRO
══════════════════════════════════════════ */
.intro__logo {
  height: 36px;
  width: auto;
  margin-bottom: var(--sp-6);
  opacity: 0.88;
}

.intro__icon {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-full);
  background: var(--brand-ghost);
  border: 2px solid rgba(255, 212, 38, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-400);
  margin-bottom: var(--sp-5);
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 212, 38, 0.15); }
  50%       { box-shadow: 0 0 0 18px rgba(255, 212, 38, 0); }
}

.intro__title {
  font: var(--text-display-sm);
  letter-spacing: var(--ls-tight);
  color: var(--light-100);
  margin-bottom: var(--sp-4);
  line-height: 1.1;
}

.intro__sub {
  font: var(--text-body-lg);
  color: var(--text-dark);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: var(--sp-5);
}

.intro__pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}

.intro__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font: var(--text-label-sm);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--text-dark);
  background: rgba(255, 253, 246, 0.05);
  border: 1px solid rgba(255, 253, 246, 0.10);
  border-radius: var(--radius-full);
  padding: 5px var(--sp-15);
}

.intro__pill svg {
  color: var(--brand-400);
  flex-shrink: 0;
}

.intro__cta {
  width: 100%;
  max-width: 360px;
  justify-content: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.intro__trust {
  font: var(--text-body-xs);
  color: var(--text-dark);
  opacity: 0.60;
}

/* ══════════════════════════════════════════
   TESTE — PERGUNTA
══════════════════════════════════════════ */
.q-region {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.q-counter {
  font: var(--text-label-sm);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--brand-400);
  margin-bottom: var(--sp-4);
  opacity: 0.85;
}

.q-card {
  width: 100%;
  max-width: 800px;
  padding: var(--sp-5) var(--sp-2);
  margin-bottom: var(--sp-4);
}

.q-card.q-enter {
  animation: qSlideIn 0.32s var(--ease-out) forwards;
}

.q-card.q-exit {
  animation: qSlideOut 0.20s var(--ease-in) forwards;
}

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

@keyframes qSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-16px); }
}

.q-text {
  font-size: clamp(19px, 2.6vw, 26px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--light-100);
  font-family: var(--font);
  margin: 0;
}

.q-scale {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
  padding: 0 var(--sp-1);
  margin-bottom: var(--sp-2);
}

.q-scale span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dark);
  opacity: 0.75;
}

/* Grid de opções */
.q-options {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 800px;
  margin-bottom: var(--sp-5);
}

.q-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--sp-4) var(--sp-2);
  min-height: 140px;
  background: rgba(255, 253, 246, 0.04);
  border: 1px solid rgba(255, 253, 246, 0.08);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  transition:
    background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    transform 180ms var(--ease-bounce),
    box-shadow var(--dur-fast) var(--ease);
}

.q-option:hover {
  background: var(--brand-ghost);
  border-color: rgba(255, 212, 38, 0.40);
  transform: translateY(-3px);
}

.q-option:active {
  transform: translateY(0) scale(0.96);
}

.q-option.is-selected {
  background: var(--brand-400);
  border-color: var(--brand-500);
  box-shadow: 0 4px 16px rgba(255, 212, 38, 0.35);
  transform: translateY(-2px);
}

.q-option__num {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  color: var(--brand-400);
  font-family: var(--font);
  transition: color var(--dur-fast) var(--ease);
}

.q-option.is-selected .q-option__num {
  color: var(--dark-900);
}

.q-option__label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 253, 246, 0.82);
  text-align: center;
  line-height: 1.35;
  transition: color var(--dur-fast) var(--ease);
}

.q-option.is-selected .q-option__label {
  color: rgba(26, 27, 31, 0.85);
}

@media (max-width: 600px) {
  .q-options {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .q-option { min-height: 100px; gap: 8px; }
  .q-option__num { font-size: 30px; }
  .q-option__label { font-size: 11px; }
}

/* Botão voltar */
.q-back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-15);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: rgba(255, 253, 246, 0.72);
  background: transparent;
  border: 1px solid rgba(255, 253, 246, 0.14);
  cursor: pointer;
  padding: 10px var(--sp-4);
  border-radius: var(--radius-full);
  transition:
    color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.q-back:hover {
  color: var(--light-100);
  background: rgba(255, 253, 246, 0.07);
  border-color: rgba(255, 253, 246, 0.28);
}

.q-back:disabled {
  opacity: 0.18;
  pointer-events: none;
}

/* ══════════════════════════════════════════
   CAPTURA
══════════════════════════════════════════ */
.capture__check {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: rgba(76, 175, 80, 0.12);
  border: 2px solid rgba(76, 175, 80, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  margin-bottom: var(--sp-4);
  animation: checkPop 0.5s var(--ease-bounce) both;
}

@keyframes checkPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.capture__title {
  font: var(--text-h3);
  color: var(--light-100);
  margin-bottom: var(--sp-2);
}

.capture__sub {
  font: var(--text-body);
  color: var(--text-dark);
  margin-bottom: var(--sp-5);
}

.capture__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: var(--sp-2);
}

.form-field--uf .input--select {
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  cursor: pointer;
  padding-inline: var(--sp-2);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-05);
  text-align: left;
}

.form-label {
  font: var(--text-label);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--text-dark);
}

.form-error {
  font: var(--text-body-xs);
  color: var(--error-md);
  min-height: 16px;
}

.capture__submit {
  width: 100%;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}

.capture__privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  font: var(--text-body-xs);
  color: var(--text-dark);
  opacity: 0.55;
}

#screen-capture .input {
  background: rgba(255, 253, 246, 0.05);
  border-color: rgba(255, 253, 246, 0.15);
  color: var(--light-100);
}
#screen-capture .input::placeholder {
  color: var(--text-dark);
  opacity: 0.55;
}
#screen-capture .input:focus {
  background: rgba(255, 253, 246, 0.08);
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(255, 212, 38, 0.15);
}

/* ══════════════════════════════════════════
   RESULTADO
══════════════════════════════════════════ */
#screen-results {
  overflow-y: auto;
  overscroll-behavior: contain;
  align-items: flex-start;
  justify-content: flex-start;
}

#resultsContent {
  width: 100%;
  min-height: 100%;
}

.result-hero {
  background: var(--dark-900);
  padding: var(--sp-12) var(--sp-4) var(--sp-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.result-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 212, 38, 0.12) 0%, transparent 65%);
  pointer-events: none;
}

.result-hero__logo {
  height: 44px;
  width: auto;
  margin-bottom: var(--sp-8);
  opacity: 0.75;
  position: relative;
}

.result-hero__greeting {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: rgba(255, 253, 246, 0.82);
  margin-bottom: var(--sp-3);
  position: relative;
}

.result-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  background: rgba(255, 212, 38, 0.09);
  border: 1px solid rgba(255, 212, 38, 0.28);
  border-radius: var(--radius-full);
  padding: var(--sp-2) var(--sp-5);
  margin-bottom: var(--sp-4);
  position: relative;
  animation: badgePop 0.6s var(--ease-bounce) 0.25s both;
}

@keyframes badgePop {
  from { transform: scale(0.75); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.result-hero__number {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  color: var(--brand-400);
  font-family: var(--font);
  letter-spacing: var(--ls-tight);
}

.result-hero__name {
  font: var(--text-h3);
  color: var(--light-100);
}

.result-hero__tagline {
  font: var(--text-body-sm);
  color: rgba(255, 253, 246, 0.82);
  letter-spacing: var(--ls-wide);
  margin-bottom: var(--sp-5);
  position: relative;
}

.result-hero__desc {
  font: var(--text-body-lg);
  color: rgba(255, 253, 246, 0.90);
  line-height: 1.70;
  max-width: 640px;
  position: relative;
}

/* Seções */
.result-section {
  padding: var(--sp-10) var(--sp-6);
  max-width: 800px;
  margin-inline: auto;
}

.result-section + .result-section {
  border-top: 1px solid rgba(255, 253, 246, 0.06);
}

.result-section__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font: var(--text-label);
  font-size: 15px;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--brand-400);
  margin-bottom: var(--sp-5);
}

/* Gráfico de scores */
.score-chart {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.score-chart__sub {
  font: var(--text-body-xs);
  color: var(--text-dark);
  opacity: 0.45;
  text-align: right;
  margin-bottom: var(--sp-3);
  padding-right: 60px; /* alinha com o valor */
}

.score-row {
  display: grid;
  grid-template-columns: 200px 1fr 72px;
  align-items: center;
  gap: var(--sp-3);
}

.score-row__label {
  text-align: right;
  line-height: 1.25;
}

.score-row__label-num {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--text-dark);
  opacity: 0.60;
}

.score-row__label-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.score-row.is-dominant .score-row__label-num  { color: var(--brand-400); opacity: 0.80; }
.score-row.is-dominant .score-row__label-name { color: var(--brand-400); }

.score-row__track {
  height: 10px;
  background: rgba(255, 253, 246, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.score-row__fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: rgba(255, 253, 246, 0.18);
  width: 0;
  transition: width 0.9s var(--ease-out) var(--delay, 0s);
}

.score-row.is-dominant .score-row__fill {
  background: var(--grad-brand-h);
}

.score-row__val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: right;
  white-space: nowrap;
  line-height: 1;
}

.score-row__val small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.45;
}

.score-row.is-dominant .score-row__val {
  color: var(--brand-400);
}

@media (max-width: 560px) {
  .score-chart__sub { padding-right: 46px; }
  .score-row { grid-template-columns: 110px 1fr 46px; gap: var(--sp-1); }
  .score-row__label-name { font-size: 12px; }
  .score-row__val { font-size: 13px; }
}

/* Split Pontos Fortes + Desafios */
.result-section--split {
  max-width: 960px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
}

.result-split__col {}

@media (max-width: 640px) {
  .result-section--split {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
}

/* Listas */
.result-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.result-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font: var(--text-body-lg);
  color: rgba(255, 253, 246, 0.82);
  line-height: 1.60;
}

.result-list__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 3px;
}

.result-list--strengths .result-list__icon { color: var(--brand-400); }
.result-list--challenges .result-list__icon { color: var(--dark-400); }

/* Asa */
.wing-card {
  background: rgba(255, 253, 246, 0.03);
  border: 1px solid rgba(255, 253, 246, 0.08);
  border-left: 3px solid var(--brand-400);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--sp-4);
}

.wing-card__label {
  font: var(--text-label-sm);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--brand-400);
  margin-bottom: var(--sp-1);
}

.wing-card__title {
  font: var(--text-h5);
  color: var(--light-100);
  margin-bottom: var(--sp-1);
}

.wing-card__desc {
  font: var(--text-body);
  color: rgba(255, 253, 246, 0.82);
  line-height: 1.65;
}

/* CTAs finais */
.result-ctas {
  padding: var(--sp-8) var(--sp-4) var(--sp-10);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  text-align: center;
  background: var(--dark-800);
}

.result-ctas__title {
  font: var(--text-h3);
  color: var(--light-100);
  max-width: 540px;
}

.result-ctas__sub {
  font: var(--text-body-lg);
  color: rgba(255, 253, 246, 0.75);
  margin-bottom: var(--sp-1);
  max-width: 520px;
}

.result-ctas__btns {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 560px;
}

.result-ctas__btns .btn {
  flex: 1;
  min-width: 220px;
  justify-content: center;
}

.result-footer {
  background: var(--dark-900);
  padding: var(--sp-5) var(--sp-4) var(--sp-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.result-footer img {
  height: 24px;
  opacity: 0.50;
}

.result-footer p {
  font: var(--text-body-xs);
  color: var(--text-dark);
  opacity: 0.40;
  text-align: center;
}

/* ══════════════════════════════════════════
   TOOLTIP DE INFORMAÇÃO
══════════════════════════════════════════ */
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: var(--sp-1);
  cursor: help;
}

.info-tip__icon {
  width: 19px;
  height: 19px;
  color: var(--brand-400);
  opacity: 0.45;
  flex-shrink: 0;
  transition:
    opacity var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease-bounce);
}

.info-tip:hover .info-tip__icon {
  opacity: 1;
  transform: scale(1.15);
}

.info-tip__box {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%);
  width: 290px;
  background: var(--dark-800);
  border: 1px solid rgba(255, 253, 246, 0.12);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  font-size: 13.5px;
  font-weight: 400;
  font-family: var(--font);
  color: rgba(255, 253, 246, 0.82);
  line-height: 1.65;
  text-transform: none;
  letter-spacing: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s var(--ease);
  z-index: 200;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  white-space: normal;
}

/* seta */
.info-tip__box::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--dark-800);
}

.info-tip:hover .info-tip__box {
  opacity: 1;
}

/* ══════════════════════════════════════════
   FADE-UP (reveal no resultado)
══════════════════════════════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up.d1 { transition-delay: 0.10s; }
.fade-up.d2 { transition-delay: 0.20s; }
.fade-up.d3 { transition-delay: 0.30s; }
.fade-up.d4 { transition-delay: 0.40s; }
.fade-up.d5 { transition-delay: 0.50s; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 767px) {
  .screen__inner--test { padding-top: 64px; padding-inline: var(--sp-3); }
  .intro__title { font-size: 36px; }
  .result-hero { padding: var(--sp-10) var(--sp-3) var(--sp-6); }
  .result-hero__number { font-size: 40px; }
  .result-hero__name { font-size: 22px; }
  .result-ctas__btns { flex-direction: column; }
  .result-ctas__btns .btn { min-width: unset; }
}

@media (max-width: 480px) {
  .intro__pills { gap: var(--sp-1); }
  .intro__pill { font-size: 9px; padding: 3px 10px; }
  .screen__inner { padding-inline: var(--sp-3); }
}
