/* =========================================================================
   Teste rápido da home (#teste) — card premium, trilha numerada, transições
   Carregado depois de style.css: sobrescreve .quiz* de lá.
   ========================================================================= */

/* ---------- card ---------- */
.quiz {
  position: relative; isolation: isolate;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 30px;
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(208,176,42,.10), transparent 55%),
    radial-gradient(90% 60% at 0% 100%, rgba(21,93,126,.07), transparent 60%),
    linear-gradient(180deg, #FCFBF7, var(--paper));
  box-shadow:
    0 70px 120px -50px rgba(0,0,0,.85),
    0 30px 60px -40px rgba(208,176,42,.35),
    0 0 0 1px rgba(208,176,42,.45),
    0 0 0 9px rgba(255,255,255,.035),
    0 0 0 10px rgba(208,176,42,.16);
}
.quiz::before { left: 40px; right: 40px; height: 3px; background: var(--metal); background-size: 200% 100%; animation: sheen 6s ease-in-out infinite; }
/* filete interno */
.quiz::after { content: ""; position: absolute; inset: 8px; border-radius: 23px; border: 1px solid rgba(154,127,18,.14); pointer-events: none; z-index: -1; }

/* ---------- cabeçalho ---------- */
.quiz__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line-light); }
.quiz__brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.quiz__seal { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; color: var(--gold-light);
  background: linear-gradient(145deg, var(--ink-700), var(--ink-900)); box-shadow: inset 0 0 0 1px rgba(208,176,42,.45), 0 10px 20px -12px rgba(7,31,44,.8); }
.quiz__seal svg { width: 22px; height: 22px; }
.quiz__brand b { display: block; font: 600 17px/1.2 var(--f-display); color: var(--ink-900); letter-spacing: -.01em; }
.quiz__brand em { display: block; font-style: normal; font-size: 13px; color: var(--text-soft); }
.quiz__count { font: 500 15px var(--f-display); color: var(--text-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.quiz__count b { font: 500 34px/1 var(--f-serif); font-style: italic; color: var(--gold-deep); margin-right: 2px; }
.quiz.is-done .quiz__count { visibility: hidden; }

/* ---------- trilha numerada ---------- */
.quiz__track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 22px 0 26px; counter-reset: none; }
.quiz__track li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; }
.quiz__track li + li::before { /* linha entre etapas */
  content: ""; position: absolute; top: 16px; right: calc(50% + 22px); left: calc(-50% + 22px); height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep)) 0 0 / 0% 100% no-repeat, var(--paper-3);
  transition: background-size .6s var(--ease-out);
}
.quiz__track li.is-on::before, .quiz__track li.is-done::before, .quiz.is-done .quiz__track li::before { background-size: 100% 100%; }
.quiz__track i { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  font: 600 14px var(--f-display); font-style: normal; color: var(--text-soft); background: #fff; box-shadow: inset 0 0 0 1px var(--line-light);
  transition: background .4s, color .4s, box-shadow .4s, transform .4s var(--ease-out); }
.quiz__track i svg { position: absolute; width: 16px; height: 16px; opacity: 0; transform: scale(.4); transition: opacity .3s, transform .4s var(--ease-out); }
.quiz__track i span { transition: opacity .2s; }
.quiz__track small { font: 600 11.5px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); opacity: .7; transition: color .3s, opacity .3s; }
.quiz__track li.is-on i { color: var(--gold-light); background: var(--ink-900); transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(208,176,42,.18), inset 0 0 0 1px rgba(208,176,42,.6), 0 10px 20px -10px rgba(7,31,44,.8); }
.quiz__track li.is-on small { color: var(--ink-900); opacity: 1; }
.quiz__track li.is-done i, .quiz.is-done .quiz__track i { color: #2A2205; background: var(--metal); box-shadow: 0 6px 14px -8px rgba(154,127,18,.9); transform: none; }
.quiz__track li.is-done i span, .quiz.is-done .quiz__track i span { opacity: 0; }
.quiz__track li.is-done i svg, .quiz.is-done .quiz__track i svg { opacity: 1; transform: none; }
.quiz__track li.is-done small, .quiz.is-done .quiz__track small { color: var(--gold-deep); opacity: 1; }

/* ---------- perguntas ---------- */
.quiz__stage { position: relative; }
.quiz__step.is-on { animation: qNext .55s var(--ease-out) both; }
.quiz[data-dir="back"] .quiz__step.is-on { animation-name: qBack; }
@keyframes qNext { from { opacity: 0; transform: translateX(28px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes qBack { from { opacity: 0; transform: translateX(-28px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.quiz__step legend { margin-bottom: 20px; font: 500 clamp(1.4rem, 2.2vw, 1.75rem)/1.18 var(--f-display); letter-spacing: -.015em; color: var(--ink-900); }
.quiz__step legend small { margin-bottom: 10px; font: 700 11.5px var(--f-body); letter-spacing: .16em; color: var(--gold-deep); }

.quiz__opts { gap: 12px; }
.quiz__opts--3 button:last-child { grid-column: 1 / -1; }
.quiz__opts button {
  position: relative; overflow: hidden; min-height: 76px; padding: 14px 44px 14px 14px; gap: 14px;
  border-radius: 16px; border: 1px solid var(--line-light); background: #fff;
  font: 500 15.5px/1.3 var(--f-body); color: var(--text);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 8px 18px -16px rgba(7,31,44,.6);
  transition: border-color .25s, transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .25s;
}
.quiz__opts button::before { /* brilho dourado que corre no hover */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(233,212,122,.28) 48%, transparent 66%) -150% 0 / 200% 100% no-repeat;
  transition: background-position .8s var(--ease-out);
}
.quiz__opts button > * { position: relative; z-index: 1; }
.quiz__opts .qt { flex: 1; min-width: 0; }
.quiz__opts .qi { width: 44px; height: 44px; border-radius: 12px; color: var(--gold-light);
  background: linear-gradient(145deg, var(--ink-700), var(--ink-900)); box-shadow: inset 0 0 0 1px rgba(208,176,42,.3);
  transition: transform .35s var(--ease-out), box-shadow .3s, background .3s, color .3s; }
.quiz__opts .qk, .quiz__opts .qc { position: absolute; right: 14px; top: 50%; translate: 0 -50%; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; }
.quiz__opts .qk { font: 600 11.5px var(--f-display); color: var(--text-soft); box-shadow: inset 0 0 0 1px var(--line-light); transition: opacity .25s; }
.quiz__opts .qc { border-radius: 50%; color: #2A2205; background: var(--metal); opacity: 0; transform: scale(.4); transition: opacity .25s, transform .45s var(--ease-out); }
.quiz__opts .qc svg { width: 14px; height: 14px; stroke-width: 2.4; }

.quiz__opts button:hover { border-color: rgba(208,176,42,.75); transform: translateY(-3px); background: #FFFDF6;
  box-shadow: 0 1px 0 #fff inset, 0 22px 34px -22px rgba(7,31,44,.55), 0 0 0 3px rgba(208,176,42,.12); }
.quiz__opts button:hover::before { background-position: 150% 0; }
.quiz__opts button:hover .qi { transform: rotate(-6deg) scale(1.05); }
.quiz__opts button:hover .qk { color: var(--gold-deep); box-shadow: inset 0 0 0 1px var(--gold); }
.quiz__opts button:active { transform: translateY(-1px) scale(.99); }
.quiz__opts button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 16px; }

.quiz__opts button.is-picked { border-color: var(--gold); background: linear-gradient(180deg, #FFFBEA, #FBF3D2);
  box-shadow: 0 0 0 3px rgba(208,176,42,.22), 0 18px 30px -22px rgba(154,127,18,.8); }
.quiz__opts button.is-picked .qi { background: var(--metal); color: var(--ink-900); box-shadow: none; }
.quiz__opts button.is-picked .qk { opacity: 0; }
.quiz__opts button.is-picked .qc { opacity: 1; transform: none; }

.quiz__foot { display: flex; align-items: center; min-height: 24px; margin-top: 18px; }
.quiz__back { margin: 0; display: inline-flex; align-items: center; gap: 6px; font: 600 14px var(--f-body); color: var(--text-soft); transition: color .2s, transform .2s; }
.quiz__back:hover { color: var(--petrol); transform: translateX(-3px); }
.quiz__hint { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-soft); }
.quiz__hint svg { width: 16px; height: 16px; color: var(--gold-deep); }

/* ---------- resultado ---------- */
.quiz__result:not([hidden]) { animation: qRes .7s var(--ease-out) both; }
@keyframes qRes { from { opacity: 0; transform: translateY(18px) scale(.98); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
.quiz__rhead { display: flex; align-items: flex-start; gap: 18px; }
.quiz__rseal { position: relative; width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--ink-900); background: var(--metal);
  box-shadow: 0 0 0 5px rgba(208,176,42,.16), 0 16px 30px -14px rgba(154,127,18,.9); animation: qSeal .9s .15s var(--ease-out) both; }
.quiz__rseal::after { content: ""; position: absolute; inset: -11px; border-radius: 50%; border: 1px dashed rgba(154,127,18,.5); animation: spin 22s linear infinite; }
.quiz__rseal svg { width: 30px; height: 30px; }
@keyframes qSeal { from { opacity: 0; transform: scale(.5) rotate(-30deg); } to { opacity: 1; transform: none; } }
.quiz__tag { padding: 5px 11px; font-size: 11px; letter-spacing: .14em; background: var(--gold-pale); color: var(--gold-dark); box-shadow: inset 0 0 0 1px rgba(154,127,18,.25); }
.quiz__result h3 { margin: 12px 0 0; font: 500 clamp(1.5rem, 2.4vw, 1.95rem)/1.16 var(--f-display); letter-spacing: -.02em; color: var(--ink-900); }

.quiz__recap { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; }
.quiz__recap:empty { display: none; }
.quiz__recap li { padding: 5px 11px; border-radius: 99px; font: 500 12.5px var(--f-body); color: var(--text-soft); background: #fff; box-shadow: inset 0 0 0 1px var(--line-light); }

.quiz__result .quiz__points { gap: 12px; margin: 20px 0 0; padding: 18px 20px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-light); }
.quiz__points li { font-size: 15px; line-height: 1.55; animation: qItem .5s calc(.25s + var(--i, 0) * .09s) var(--ease-out) both; }
@keyframes qItem { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

.quiz__cta { margin-top: 22px; padding: 18px; border-radius: 20px; background: linear-gradient(150deg, var(--ink-800), var(--ink-950));
  box-shadow: inset 0 0 0 1px rgba(208,176,42,.35), 0 24px 40px -26px rgba(3,17,26,.9); }
.quiz__ready { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 14px; color: var(--on-dark-soft); }
.quiz__ready svg { width: 20px; height: 20px; flex: none; color: #5BD18B; }
.quiz__fine { margin-top: 16px; font-size: 12.5px; line-height: 1.55; }
.quiz__fine button { font-weight: 600; }

/* ---------- copy ao lado ---------- */
.quiz-copy h2 { margin-top: 0; }
.quiz-copy .lead { max-width: 48ch; }

/* ---------- responsivo ---------- */
@media (max-width: 720px) {
  .quiz { border-radius: 24px; padding: 20px 13px 22px; }
  .quiz::after { inset: 6px; border-radius: 19px; }
  .quiz__seal { width: 40px; height: 40px; border-radius: 12px; }
  .quiz__count b { font-size: 28px; }
  .quiz__track { margin: 18px 0 22px; }
  .quiz__track small { font-size: 10px; letter-spacing: .08em; }
  .quiz__opts button { min-height: 64px; }
  .quiz__opts--3 button:last-child { grid-column: auto; }
  .quiz__rhead { gap: 14px; }
  .quiz__rseal { width: 52px; height: 52px; }
  .quiz__rseal svg { width: 24px; height: 24px; }
  .quiz__cta { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .quiz__step.is-on, .quiz__result:not([hidden]), .quiz__rseal, .quiz__points li { animation: none !important; }
  .quiz::before, .quiz__rseal::after { animation: none; }
}

/* no resultado a trilha sai de cena para o botão do WhatsApp subir */
.quiz.is-done .quiz__track { display: none; }
.quiz.is-done .quiz__head { margin-bottom: 26px; }
.quiz-grid > * { min-width: 0; }
@media (max-width: 720px) {
  /* no celular o botão ocupa a largura toda do card (sem a caixa escura em volta) */
  .quiz__cta { padding: 0; background: none; box-shadow: none; }
  .quiz__ready { color: var(--text-soft); font-size: 13.5px; }
  .quiz__rseal::after { inset: -7px; }
}
