/* ============================================================
   QUIZ OAB 01 — Diagnóstico OAB Estudo Direcionado
   Tema: azul institucional + dourado (autoridade jurídica)
   ============================================================ */

:root {
  --bg:         #f7f8fc;
  --bg-card:    #ffffff;
  --ink:        #0d1b2a;
  --ink-soft:   #3d4f63;
  --ink-mute:   #7a8ea0;
  --accent:     #1a3a6e;
  --accent-soft:#e8edf7;
  --accent-deep:#0e2247;
  --gold:       #c9a84c;
  --gold-soft:  #faf3e0;
  --ok:         #1a7a4a;
  --warn:       #c0392b;
  --warn-soft:  #fdecea;
  --line:       #dce4f0;
  --shadow:     0 4px 24px rgba(14, 34, 71, 0.08);
  --shadow-lg:  0 8px 40px rgba(14, 34, 71, 0.14);
}

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

html, body {
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- SCREENS ---- */
.screen {
  display: none;
  flex: 1;
  padding: 32px 20px 64px;
  animation: fadeIn .3s ease;
}
.screen.active { display: flex; }

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

.container {
  max-width: 540px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.container.center {
  align-items: center;
  text-align: center;
  justify-content: center;
  min-height: 60vh;
}

/* Bridge / dark screens */
.screen.bridge    { background: var(--accent-soft); }
.screen.bridge-dk { background: var(--accent-deep); color: #fff; }

/* ---- TYPOGRAPHY ---- */
.kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
}
.screen.bridge-dk .kicker { color: var(--gold); }

h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.3px;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
h3 { font-size: 18px; font-weight: 700; }
h1 em, h2 em { color: var(--gold); font-style: normal; }

.lede       { font-size: 16px; color: var(--ink-soft); }
.lede strong { color: var(--ink); }
.lede.small { font-size: 13px; color: var(--ink-mute); }
.hint       { font-size: 13px; color: var(--ink-mute); margin-top: -8px; }
.footnote   { font-size: 12px; color: var(--ink-mute); text-align: center; margin-top: 16px; }

/* Bridge elements */
.bridge-stat {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.bridge-quote {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent-deep);
  border-left: 4px solid var(--gold);
  padding-left: 16px;
}
.bridge-body { font-size: 16px; color: var(--ink-soft); line-height: 1.65; }
.bridge-body strong { color: var(--ink); }

/* ---- PROGRESS BAR ---- */
.progress {
  background: var(--line);
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width .4s ease;
}
.qcount {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: .5px;
}

/* ---- PROMISE BOX ---- */
.promise-box {
  background: var(--gold-soft);
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.promise-icon { font-size: 22px; flex-shrink: 0; }
.promise-box p { font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
.promise-box strong { color: var(--ink); }

/* ---- INTRO GRID (4 cards) ---- */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.intro-card {
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 18px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: border-color .15s, transform .1s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow);
}
.intro-card:hover, .intro-card:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.intro-card:active { transform: scale(.97); }
.intro-card .emoji { font-size: 30px; }
.intro-card .label { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }

/* ---- OPTION BUTTONS (radio) ---- */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.opt {
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: border-color .15s, background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 6px rgba(14,34,71,.05);
}
.opt:hover  { border-color: var(--accent); background: var(--accent-soft); }
.opt:active { transform: scale(.98); }
.opt.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.opt .opt-emoji { font-size: 22px; flex-shrink: 0; }
.opt .opt-text  { line-height: 1.4; }

/* ---- CTA BUTTON ---- */
.cta {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .5px;
  text-align: center;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(26,58,110,.25);
  text-decoration: none;
}
.cta:hover  { background: var(--accent-deep); box-shadow: 0 6px 24px rgba(26,58,110,.35); }
.cta:active { transform: scale(.98); }

.cta.gold {
  background: var(--gold);
  color: #0d1b2a;
  box-shadow: 0 4px 16px rgba(201,168,76,.35);
}
.cta.gold:hover { background: #b8922e; box-shadow: 0 6px 24px rgba(201,168,76,.45); }

.cta.large { font-size: 17px; padding: 20px 28px; border-radius: 14px; }
.cta:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---- CALC SCREEN ---- */
.calc-loading { display: flex; flex-direction: column; gap: 20px; }
.calc-item { display: flex; flex-direction: column; gap: 6px; }
.calc-label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.calc-bar-wrap {
  background: var(--line);
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
}
.calc-bar-inner {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 6px;
  transition: width 1s ease;
}
.calc-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-mute);
  text-align: right;
}
#calc-done {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.calc-check { font-size: 48px; }

/* ---- SCORE SCREEN ---- */
.score-box {
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
}
#score-display {
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -2px;
}
#score-display.warn { color: var(--warn); }
#score-label {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
}
#score-label.warn { color: var(--warn); }
#score-sublabel { font-size: 13px; color: var(--ink-mute); }

.score-meter-wrap {
  background: var(--line);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
  margin-top: 4px;
}
#score-meter-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 4px;
  transition: width 1s ease;
}
#score-meter-fill.warn { background: var(--warn); }

.score-anchor {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  font-style: italic;
  text-align: center;
  line-height: 1.5;
  padding: 12px 16px;
  background: var(--accent-soft);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}

/* ---- DIAGNOSIS TABLE ---- */
.diag-table { display: flex; flex-direction: column; gap: 8px; }
.diag-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
}
.diag-attr { font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.diag-val  { color: var(--ink); font-weight: 500; }

/* ---- DIAGNOSIS PROSE ---- */
.diag-prose {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.7;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 18px;
  border: 1px solid var(--line);
}

/* ---- EMAIL SCREEN ---- */
.email-box {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.input-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-wrap label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.input-wrap input {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
.input-wrap input:focus { border-color: var(--accent); }
.input-wrap input::placeholder { color: var(--ink-mute); }

/* ---- VENDAS SCREEN ---- */
.timer-bar {
  background: var(--warn-soft);
  border: 1.5px solid var(--warn);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.timer-label { font-size: 13px; font-weight: 700; color: var(--warn); text-transform: uppercase; letter-spacing: .5px; }
#timer-display {
  font-size: 22px;
  font-weight: 900;
  color: var(--warn);
  font-variant-numeric: tabular-nums;
}

.vendas-personal {
  display: none;
  font-size: 14px;
  color: var(--ink-soft);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  line-height: 1.6;
}

.preco-box {
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.preco-header {
  background: var(--accent);
  color: #fff;
  padding: 20px 24px;
  text-align: center;
}
.preco-header .oferta-tag {
  display: inline-block;
  background: var(--gold);
  color: #0d1b2a;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: .5px;
}
.preco-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.preco-body { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.preco-numero { text-align: center; }
.preco-numero .valor {
  display: block;
  font-size: 52px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -2px;
}
.preco-numero .parcel { font-size: 15px; color: var(--ink-mute); margin-top: 4px; }
.preco-numero .de {
  font-size: 14px;
  color: var(--ink-mute);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.beneficios { display: flex; flex-direction: column; gap: 10px; }
.beneficio-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--ink);
}
.beneficio-item::before {
  content: "✓";
  color: var(--ok);
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.garantia {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--gold-soft);
  border-radius: 10px;
  border: 1px solid var(--gold);
}
.garantia-icon { font-size: 24px; flex-shrink: 0; }
.garantia p { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.garantia strong { color: var(--ink); }

/* ---- TRUST ICONS ---- */
.trust-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.trust-item .t-icon { font-size: 20px; }

/* ---- OBRIGADO ---- */
.obrigado-icon { font-size: 56px; text-align: center; }

/* ---- RESPONSIVE ---- */
@media (max-width: 380px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  .intro-grid { grid-template-columns: 1fr; }
  #score-display { font-size: 52px; }
  .preco-numero .valor { font-size: 42px; }
}
