/* perse.scoras.com.br — tema escuro Scoras/Hinnig, acento dourado #C9A227.
   Mobile-first, sem libs externas. Estados visuais por tier do veredito. */

:root {
  --bg: #0e1117;
  --bg-elev: #161b22;
  --bg-card: #12171f;
  --bg-inset: #0b0f15;
  --border: #262d38;
  --border-soft: #1e242e;
  --text: #e6e9ef;
  --text-dim: #b6bEC8;
  --muted: #8b95a4;
  --gold: #C9A227;
  --gold-2: #e0b83e;
  --gold-soft: rgba(201, 162, 39, 0.14);
  --gold-line: rgba(201, 162, 39, 0.35);

  --green: #3fb950;
  --amber: #e0a82e;
  --blue: #58a6ff;
  --neutral: #8b95a4;

  --danger: #f85149;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --maxw: 720px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(201, 162, 39, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(14, 17, 23, 0.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; display: block; }
.brand small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.3px;
}
.brand-name { font-size: 15px; line-height: 1.1; }
.header-tag {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero { padding: 40px 0 8px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(26px, 6.4vw, 40px);
  line-height: 1.14;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -0.6px;
}
.hero h1 .accent { color: var(--gold); }
.hero .lead {
  font-size: clamp(15px, 3.7vw, 18px);
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 18px;
}
.urgency {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #f0d488;
  background: rgba(201, 162, 39, 0.10);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  margin-bottom: 6px;
}
.urgency .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px rgba(201,162,39,0.18);
}

/* ---------- Tool card ---------- */
.tool {
  margin: 26px auto 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  text-align: left;
}
.tool h2 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 700;
}
.tool .sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

/* Animação de spin (usada pelo .btn-spin dos botões em estado loading) */
@keyframes spin { to { transform: rotate(360deg); } }

/* Form */
.field { margin-bottom: 15px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dim);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
  width: 100%;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  padding: 13px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder { color: #5c6673; }
.field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.field input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.15);
}
.field .err {
  display: none;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--danger);
}
.field .err.show { display: block; }

/* Consent */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  margin: 4px 0 18px;
}
.consent input[type="checkbox"] {
  width: 20px; height: 20px; margin-top: 1px;
  accent-color: var(--gold);
  flex: 0 0 auto;
  cursor: pointer;
}
.consent label {
  font-size: 12.8px;
  color: var(--text-dim);
  line-height: 1.5;
  cursor: pointer;
}
.consent.err-box { border-color: var(--danger); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 15px 18px;
  cursor: pointer;
  width: 100%;
  transition: transform 0.06s, filter 0.15s, background 0.15s;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #201800;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.28);
}
.btn-primary:hover { filter: brightness(1.05); text-decoration: none; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; filter: none; }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg-elev); text-decoration: none; }
.btn-wa {
  background: #1e7e46;
  color: #fff;
  border-color: transparent;
}
.btn-wa:hover { filter: brightness(1.08); text-decoration: none; }
.btn-mail {
  background: transparent;
  border-color: var(--gold-line);
  color: var(--gold-2);
}
.btn-mail:hover { background: var(--gold-soft); text-decoration: none; }
.btn .btn-spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.25); border-top-color: #201800;
  animation: spin 0.8s linear infinite; display: none;
}
.btn.loading .btn-spin { display: inline-block; }
/* No botão ghost (fundo escuro) o spinner precisa de cores claras — as do
   primário (calibradas p/ fundo dourado) ficam invisíveis no tema escuro. */
.btn-ghost .btn-spin { border-color: rgba(255,255,255,0.22); border-top-color: var(--text); }
.btn.loading .btn-label { opacity: 0.7; }

.form-note {
  margin: 12px 2px 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.form-error {
  display: none;
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--danger);
  background: rgba(248, 81, 73, 0.10);
  border: 1px solid rgba(248, 81, 73, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.form-error.show { display: block; }

/* Return panel */
.greet { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.greet .name { color: var(--gold); }
.return-sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.return-actions { display: grid; gap: 10px; }
.check-other {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.check-other summary {
  cursor: pointer; color: var(--text-dim); font-size: 13.5px; font-weight: 600;
  list-style: none;
}
.check-other summary::-webkit-details-marker { display: none; }
.check-other summary::before { content: "+ "; color: var(--gold); }
.check-other[open] summary::before { content: "− "; }
.check-other .inner { margin-top: 12px; }

/* ---------- Result ---------- */
/* A seção #result fica SEMPRE renderizada (região aria-live confiável); o card
   vazio some via :empty e a seção não ocupa espaço enquanto não há veredito. */
.result { padding: 8px 0 6px; }
.result[hidden] { display: none; }
.result-card:empty { display: none; }
.result:has(.result-card:empty) { padding: 0; }
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 5px solid var(--neutral);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
}
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.tier-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neutral); }

.result-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.result-detail { color: var(--text-dim); font-size: 15px; margin: 0 0 16px; }

.identity {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.chip {
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
}
.chip b { color: var(--text); font-weight: 600; }

.block { margin: 14px 0; }
.block-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.principal {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
}
.principal .code { font-weight: 700; color: var(--text); }
.principal .ok { color: var(--green); font-weight: 600; }
.principal .no { color: var(--muted); }

.cnae-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cnae-list li {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 13.8px;
}
.cnae-list .code { font-weight: 700; color: var(--gold-2); }
.cnae-list .desc { color: var(--text-dim); }
.cnae-list .anexo {
  display: inline-block; margin-top: 4px;
  font-size: 11.5px; color: var(--muted);
}
.cnae-list .noise-tag { color: var(--amber); font-weight: 600; }

.note {
  font-size: 13px;
  color: var(--text-dim);
  background: rgba(224, 168, 46, 0.08);
  border: 1px solid rgba(224, 168, 46, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 12px 0;
}

.disclaimer {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
  margin-top: 18px;
}

.cta {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.cta-lead {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 2px;
}
@media (min-width: 480px) {
  .cta-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* Tier accents */
.tier-recoverable { border-left-color: var(--gold); }
.tier-recoverable .tier-badge { color: #f0d488; border-color: var(--gold-line); background: var(--gold-soft); }
.tier-recoverable .tier-badge .dot { background: var(--gold); }
.tier-recoverable h3 { color: var(--gold-2); }

.tier-eligible_review { border-left-color: var(--amber); }
.tier-eligible_review .tier-badge { color: #f3c968; border-color: rgba(224,168,46,0.4); background: rgba(224,168,46,0.10); }
.tier-eligible_review .tier-badge .dot { background: var(--amber); }

.tier-eligible_non_lrp { border-left-color: var(--blue); }
.tier-eligible_non_lrp .tier-badge { color: #93c1ff; border-color: rgba(88,166,255,0.4); background: rgba(88,166,255,0.10); }
.tier-eligible_non_lrp .tier-badge .dot { background: var(--blue); }

.tier-not_eligible { border-left-color: #e5534b; }
.tier-not_eligible .tier-badge { color: #f0918b; border-color: rgba(229,83,75,0.4); background: rgba(229,83,75,0.10); }
.tier-not_eligible .tier-badge .dot { background: #e5534b; }

.tier-not_found { border-left-color: var(--neutral); }

/* Motivos do veredito ("Por que não se enquadra" / "Pontos de atenção") */
.reason-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.reason-list li {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-left: 3px solid var(--neutral);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 13.8px;
  color: var(--text-dim);
}
.tier-not_eligible .reason-list li { border-left-color: rgba(229,83,75,0.55); }
.tier-eligible_review .reason-list li { border-left-color: rgba(224,168,46,0.55); }

/* ---------- FAQ ---------- */
.section { padding: 34px 0; }
.section h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 18px;
  letter-spacing: -0.3px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 16px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--gold); font-size: 20px; font-weight: 700; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .answer {
  padding: 0 16px 16px;
  color: var(--text-dim);
  font-size: 14.5px;
}
.faq-item .answer p { margin: 0 0 10px; }
.faq-item .answer ol { margin: 0 0 10px; padding-left: 20px; }
.faq-item .answer ol li { margin: 0 0 6px; }

/* Item em DESTAQUE do FAQ (dourado, com selo "leitura recomendada") */
.faq-item.destaque {
  border-color: var(--gold-line);
  background: linear-gradient(rgba(201, 162, 39, 0.07), rgba(201, 162, 39, 0.02)), var(--bg-card);
  border-left: 4px solid var(--gold);
}
.faq-item.destaque summary { color: var(--gold-2); font-weight: 700; }
.faq-item.destaque .selo {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  padding: 2px 9px;
  margin-right: 4px;
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-elev);
  padding: 30px 0 40px;
  margin-top: 10px;
}
.partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.partners b { color: var(--text); }
.footer-warnings {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 22px;
}
.privacy {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  scroll-margin-top: 80px;
}
.privacy h3 { margin: 0 0 10px; font-size: 16px; color: var(--text); }
.privacy p { font-size: 12.8px; color: var(--muted); margin: 0 0 10px; }
.privacy p:last-child { margin-bottom: 0; }
.copyright {
  margin-top: 22px;
  font-size: 12px;
  color: #5c6673;
  text-align: center;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (min-width: 640px) {
  :root { --maxw: 760px; }
  .tool { padding: 30px 28px; }
  .result-card { padding: 26px 28px; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
}
