:root {
  --bg: #0f0d0b;
  --panel: #1a1714;
  --panel2: #221d18;
  --brand: #9b3922;
  --brand-2: #c4502f;
  --text: #f2ece4;
  --muted: #a89b8c;
  --ok: #3f8f5b;
  --warn: #c9a227;
  --line: #2f2823;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
kbd { background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: .8em; }

/* ===== Fundo com movimento (aurora) ===== */
.bg-aurora {
  position: fixed; inset: -20%; z-index: -1; filter: blur(70px); opacity: .55;
  background:
    radial-gradient(40% 40% at 20% 30%, rgba(196,80,47,.45), transparent 60%),
    radial-gradient(45% 45% at 80% 25%, rgba(155,57,34,.40), transparent 60%),
    radial-gradient(40% 40% at 60% 80%, rgba(201,162,39,.22), transparent 60%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translate(0,0) scale(1); }
  50% { transform: translate(3%, -2%) scale(1.08); }
  100% { transform: translate(-3%, 2%) scale(1.04); }
}

/* ===== Quiz estilo Typeform ===== */
.quiz-body { min-height: 100vh; overflow-x: hidden; }
.progress-wrap { position: fixed; top: 0; left: 0; right: 0; height: 5px; background: rgba(255,255,255,.06); z-index: 10; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .5s cubic-bezier(.4,0,.2,1); box-shadow: 0 0 12px rgba(196,80,47,.6); }

.stage { position: relative; min-height: 100vh; }
.step {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center; padding: 28px 20px;
}
.step.active { display: flex; animation: stepIn .42s cubic-bezier(.16,1,.3,1) both; }
.step.to-left { display: flex; animation: stepOutLeft .42s cubic-bezier(.4,0,1,1) both; }
.step.to-right { display: flex; animation: stepOutRight .42s cubic-bezier(.4,0,1,1) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(28px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes stepOutLeft { to { opacity: 0; transform: translateX(-40px) scale(.98); } }
@keyframes stepOutRight { to { opacity: 0; transform: translateX(40px) scale(.98); } }

.step-inner { width: 100%; max-width: 640px; }
.kicker { color: var(--brand-2); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .78rem; margin-bottom: 12px; }
.step-inner h1 { font-size: 2.1rem; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 22px; font-size: 1.05rem; }
.qnum { color: var(--brand-2); font-weight: 700; margin-bottom: 10px; font-size: .95rem; }
.qnum .of { color: var(--muted); font-weight: 400; }
.qtitle { font-size: 1.6rem; line-height: 1.3; margin: 0 0 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; }
input[type=text], input[type=tel] {
  width: 100%; padding: 14px 16px; border-radius: 12px; font-size: 1.05rem;
  border: 1px solid var(--line); background: rgba(34,29,24,.7); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(196,80,47,.18); }

.options { display: flex; flex-direction: column; gap: 12px; }
.opt-card {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 16px 18px; border-radius: 14px; cursor: pointer; width: 100%;
  border: 1px solid var(--line); background: rgba(34,29,24,.65); color: var(--text);
  font-size: 1.05rem; transition: transform .15s, border-color .15s, background .15s, box-shadow .15s;
  animation: cardIn .4s both; backdrop-filter: blur(4px);
}
.opt-card:nth-child(1){animation-delay:.04s}.opt-card:nth-child(2){animation-delay:.10s}
.opt-card:nth-child(3){animation-delay:.16s}.opt-card:nth-child(4){animation-delay:.22s}
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.opt-card:hover { border-color: var(--brand-2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.opt-card.sel { border-color: var(--brand-2); background: #2a201b; box-shadow: 0 0 0 2px rgba(196,80,47,.4); }
.opt-card .key {
  flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
  background: rgba(196,80,47,.16); color: var(--brand-2); font-weight: 700; border: 1px solid var(--line);
}
.opt-card.sel .key { background: var(--brand); color: #fff; }
.otext { flex: 1; }

.cta {
  margin-top: 22px; background: var(--brand); color: #fff; border: 0; border-radius: 12px;
  padding: 15px 26px; font-size: 1.05rem; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; transition: background .2s, transform .15s;
}
.cta:hover { background: var(--brand-2); transform: translateY(-1px); }
.cta .arrow { transition: transform .2s; } .cta:hover .arrow { transform: translateX(4px); }
.hint { color: var(--muted); font-size: .85rem; margin-top: 12px; }
.navrow { margin-top: 20px; }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 9px 16px; cursor: pointer; }
.ghost:hover { color: var(--text); border-color: var(--brand-2); }

/* Resultado */
.result { text-align: center; }
.result-ring {
  width: 150px; height: 150px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center;
  background: conic-gradient(var(--brand-2) 0, var(--brand) 100%); position: relative; animation: pop .5s cubic-bezier(.16,1.4,.3,1) both;
}
.result-ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--panel); }
.result-ring.no { background: conic-gradient(var(--warn), #8a6d12); }
.result-ring .nota { position: relative; z-index: 1; font-size: 2.6rem; font-weight: 800; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result h2 { margin: 6px 0; }
.small { font-size: .85rem; }

.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--brand-2); margin: 30px auto 16px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

.badge { display: inline-block; padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.badge.ok { background: rgba(63,143,91,.18); color: #6fce8e; }
.badge.no { background: rgba(201,162,39,.18); color: #e6c84d; }
.erro { color: #e57b5a; margin: 10px 0; min-height: 1.2em; }
.muted { color: var(--muted); }

/* ===== Landing (raiz) ===== */
.landing-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.land-card {
  display: block; text-decoration: none; color: var(--text);
  padding: 22px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(34,29,24,.6); backdrop-filter: blur(6px);
  transition: transform .18s, border-color .18s, box-shadow .18s; animation: cardIn .4s both;
}
.land-card:nth-child(2) { animation-delay: .1s; }
.land-card:hover { transform: translateY(-3px); border-color: var(--brand-2); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.lc-tag { color: var(--brand-2); font-weight: 700; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.lc-title { font-size: 1.4rem; font-weight: 700; margin: 4px 0 6px; }
.lc-desc { color: var(--muted); margin-bottom: 16px; }
.lc-go { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-2); font-weight: 700; }
.land-card:hover .arrow { transform: translateX(4px); } .lc-go .arrow { transition: transform .2s; }
@media (max-width: 560px) { .landing-cards { grid-template-columns: 1fr; } }

/* ===== Página simples / Painel ===== */
.wrap { max-width: 760px; margin: 0 auto; padding: 28px 20px 64px; }
.wrap-wide { max-width: 1160px; }
header h1 { font-size: 1.55rem; margin: 0 0 4px; display: flex; align-items: center; gap: 12px; }
header p { color: var(--muted); margin: 0 0 22px; }
.live { font-size: .72rem; color: #6fce8e; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
button { background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 12px 22px; font-size: 1rem; font-weight: 600; cursor: pointer; }
button:hover { background: var(--brand-2); }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; }
.stat .n { font-size: 1.7rem; font-weight: 800; }
.stat .l { color: var(--muted); font-size: .8rem; }

.charts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.chart-card { height: 280px; display: flex; flex-direction: column; }
.chart-card h3 { margin: 0 0 10px; font-size: .95rem; color: var(--muted); font-weight: 600; }
.chart-card canvas { flex: 1; min-height: 0; }

.tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; }
.tab.active { background: var(--brand); border-color: var(--brand); }
button.danger { background: transparent; border: 1px solid #6b2d24; color: #e57b5a; padding: 8px 16px; border-radius: 999px; font-size: .85rem; }
button.danger:hover { background: rgba(229,123,90,.12); border-color: #e57b5a; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); font-size: .92rem; }
th { color: var(--muted); font-weight: 600; }

@media (max-width: 920px) { .charts { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .step-inner h1 { font-size: 1.7rem; } .qtitle { font-size: 1.3rem; }
  th:nth-child(2), td:nth-child(2) { display: none; }
}
