/* LexisNexis · Central de Performance — Impero Solutions
   Identidade: preto & dourado (continuidade do relatório mensal PDF) */

:root {
  --bg: #0E0D0B;
  --surface: #161411;
  --surface-2: #1D1A15;
  --line: #2A2620;
  --ink: #F2EDE3;
  --ink-2: #A89F8D;
  --ink-3: #6E675A;
  --gold: #D4AF37;
  --gold-soft: #E4C670;
  --lexis: #E4002B; /* vermelho institucional LexisNexis */
  --c-google: #B5872F;
  --c-linkedin: #5586CD;
  --c-meta: #C4708F;
  --radius: 10px;
  --pad: clamp(20px, 4vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* ---------- topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 28px;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-client { font-family: "Fraunces", serif; font-weight: 600; font-size: 17px; }
.brand-client::after {
  content: ""; display: inline-block; width: 7px; height: 7px;
  background: var(--lexis); border-radius: 2px; margin-left: 7px;
}
.brand-by { font-size: 11px; color: var(--ink-2); letter-spacing: .06em; }
.topnav { display: flex; gap: 22px; margin-left: auto; }
.topnav a { text-decoration: none; font-size: 14px; color: var(--ink-2); }
.topnav a:hover { color: var(--gold-soft); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lang button { padding: 6px 12px; font-size: 12px; letter-spacing: .08em; color: var(--ink-2); }
.lang button.on { background: var(--gold); color: #171307; font-weight: 600; }
.lang button:not(.on):hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 110px) var(--pad) clamp(40px, 6vw, 72px); max-width: 1200px; margin: 0 auto; }
.eyebrow {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
  animation: rise .7s ease both;
}
.hero-title {
  font-family: "Fraunces", serif; font-weight: 700;
  font-size: clamp(44px, 7.5vw, 92px);
  line-height: 1.02; letter-spacing: -.015em;
  max-width: 14ch;
  animation: rise .7s .08s ease both;
}
.hero-title::after {
  content: ""; display: block; width: 96px; height: 4px; border-radius: 2px;
  margin-top: 26px;
  background: linear-gradient(90deg, var(--lexis), var(--gold));
}
.hero-sub {
  margin-top: 22px; max-width: 52ch; color: var(--ink-2); font-size: 17px;
  animation: rise .7s .16s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero-stats {
  margin-top: clamp(36px, 5vw, 60px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  animation: rise .7s .24s ease both;
}
.stat { background: var(--surface); padding: 26px 28px; display: flex; flex-direction: column; gap: 6px; }
.stat-lead { background: var(--surface-2); }
.stat-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.stat-value {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: clamp(30px, 3.6vw, 44px);
  font-variant-numeric: lining-nums tabular-nums;
}
.stat-value.gold { color: var(--gold-soft); }
.stat-note { font-size: 13px; color: var(--ink-3); }

/* ---------- seções ---------- */
.section { padding: clamp(48px, 7vw, 88px) var(--pad); max-width: 1200px; margin: 0 auto; }
.sec-head { margin-bottom: 30px; display: flex; flex-wrap: wrap; align-items: end; gap: 16px 32px; }
.sec-head h2 {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.01em;
}
.sec-head h2::before {
  content: ""; display: block; width: 44px; height: 3px; border-radius: 2px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--lexis), var(--gold));
}
.sec-sub { color: var(--ink-2); font-size: 15px; max-width: 56ch; }

/* abas */
.tabs { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-left: auto; }
.tab { padding: 8px 18px; font-size: 14px; color: var(--ink-2); }
.tab.on { background: var(--surface-2); color: var(--gold-soft); font-weight: 600; }
.tab:not(.on):hover { color: var(--ink); }

/* ---------- gráficos ---------- */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 14px;
}
.chart-card.wide { grid-column: 1 / -1; }
.chart-card figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.chart-title { font-weight: 600; font-size: 15px; }
.tbl-toggle { font-size: 12px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.tbl-toggle:hover { color: var(--gold-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 4px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .bar-seg { stroke: var(--surface); stroke-width: 2; }
.chart .bar-seg:hover, .chart .dot:hover { filter: brightness(1.18); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--ink-3); font-size: 11px; font-family: "Archivo", sans-serif; }
.chart .val-label { fill: var(--ink-2); font-size: 11px; font-family: "Archivo", sans-serif; font-variant-numeric: tabular-nums; }
.chart .dl { fill: var(--ink-2); font-size: 11.5px; font-family: "Archivo", sans-serif; }
.tblwrap { overflow-x: auto; margin-top: 8px; }
.tblwrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tblwrap th, .tblwrap td { text-align: right; padding: 7px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tblwrap th:first-child, .tblwrap td:first-child { text-align: left; }
.tblwrap th { color: var(--ink-2); font-weight: 500; font-size: 12px; letter-spacing: .04em; }

.foot-note { margin-top: 18px; font-size: 12.5px; color: var(--ink-3); }

/* ---------- trimestres ---------- */
.quarters { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.qcard.current { border-top: 2px solid var(--gold); }
.q-tag { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.q-months { font-size: 13px; color: var(--ink-3); margin: 2px 0 18px; }
.q-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin-bottom: 18px; }
.q-num .l { font-size: 12px; color: var(--ink-2); }
.q-num .v { font-family: "Fraunces", serif; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.q-delta { font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 14px; }
.q-delta b { color: var(--gold-soft); font-weight: 600; }
.qcard table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.qcard td, .qcard th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.qcard td:first-child, .qcard th:first-child { text-align: left; }
.qcard th { color: var(--ink-2); font-weight: 500; font-size: 12px; }
.chip { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; }

/* ---------- canais ---------- */
.channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ch-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; border-top: 2px solid var(--chc, var(--gold)); }
.ch-name { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 9px; }
.ch-sub { font-size: 12.5px; color: var(--ink-3); margin: 2px 0 16px; }
.ch-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 16px; }
.ch-kpi .l { font-size: 11.5px; color: var(--ink-2); }
.ch-kpi .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: "Fraunces", serif; }
.ch-kpi .d { font-size: 11.5px; }
.d.up { color: #8FBF8A; } .d.down { color: #D98B7E; } .d.flat { color: var(--ink-3); }
.ch-card table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ch-card td, .ch-card th { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.ch-card td:first-child, .ch-card th:first-child { text-align: left; }
.ch-card th { color: var(--ink-2); font-weight: 500; font-size: 11.5px; }

/* ---------- estante de relatórios (assinatura: dossiês) ---------- */
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.dossier {
  position: relative;
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 55%);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 6px var(--radius) var(--radius) 6px;
  padding: 24px 22px 20px;
  display: flex; flex-direction: column; gap: 0;
  transition: transform .25s ease, border-color .25s ease;
}
.dossier:hover { transform: translateY(-4px); border-left-color: var(--gold-soft); }
.folio {
  font-family: "Fraunces", serif; font-weight: 500; font-size: 13px;
  letter-spacing: .28em; color: var(--gold);
}
.dossier h3 { font-family: "Fraunces", serif; font-weight: 600; font-size: 24px; margin: 6px 0 2px; }
.dossier .d-sub { font-size: 12px; color: var(--ink-3); margin-bottom: 16px; }
.d-nums { display: flex; gap: 18px; margin-bottom: 20px; }
.d-num .v { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.d-num .l { font-size: 11px; color: var(--ink-2); }
.d-actions { margin-top: auto; display: flex; gap: 8px; }
.d-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--gold); color: var(--gold-soft);
  border-radius: 6px; padding: 9px 10px; font-size: 13px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.d-btn:hover { background: var(--gold); color: #171307; }
.d-btn.ghost { border-color: var(--line); color: var(--ink-2); }
.d-btn.ghost:hover { background: none; border-color: var(--gold); color: var(--gold-soft); }
.d-btn svg { width: 14px; height: 14px; flex: none; }

/* ---------- acessos ---------- */
.access { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.acc-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}
.acc-card:hover { border-color: var(--gold); background: var(--surface-2); }
.acc-top { display: flex; align-items: center; justify-content: space-between; }
.acc-name { font-weight: 600; font-size: 15px; }
.acc-arrow { color: var(--ink-3); transition: color .2s, transform .2s; }
.acc-card:hover .acc-arrow { color: var(--gold-soft); transform: translate(2px, -2px); }
.acc-desc { font-size: 13px; color: var(--ink-2); }

/* ---------- calculadora ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.calc-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.calc-result { background: var(--surface-2); border-top: 2px solid var(--gold); display: flex; flex-direction: column; }
.calc-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 22px 0 10px; display: block; }
.calc-panel .calc-label:first-child, .calc-result .calc-label:first-child { margin-top: 0; }
.calc-budget { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; }
.calc-cur { color: var(--gold); font-weight: 600; }
.calc-budget input {
  flex: 1; background: none; border: none; color: var(--ink);
  font-family: "Fraunces", serif; font-size: 30px; font-weight: 600;
  font-variant-numeric: tabular-nums; padding: 4px 0; width: 100%;
}
.calc-budget input:focus { outline: none; }
.calc-budget:focus-within { border-color: var(--gold); }
.calc-budget input::-webkit-outer-spin-button, .calc-budget input::-webkit-inner-spin-button { -webkit-appearance: none; }
.calc-presets { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.calc-presets button {
  font-size: 12.5px; color: var(--ink-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; font-variant-numeric: tabular-nums;
}
.calc-presets button:hover { color: var(--gold-soft); border-color: var(--gold); }
.basis { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.basis button { padding: 7px 14px; font-size: 13px; color: var(--ink-2); }
.basis button.on { background: var(--bg); color: var(--gold-soft); font-weight: 600; }
.alloc { display: flex; flex-direction: column; gap: 16px; }
.alloc-row .alloc-head { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; margin-bottom: 6px; }
.alloc-row .alloc-head b { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.alloc-row .alloc-head small { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.alloc-row input[type="range"] { width: 100%; accent-color: var(--ac, var(--gold)); }
.camp-toggle { margin-top: 6px; font-size: 12px; color: var(--ink-3); display: inline-flex; gap: 5px; align-items: center; }
.camp-toggle:hover { color: var(--gold-soft); }
.camp-toggle .tri { font-size: 10px; }
.camp-list { margin: 8px 0 4px 10px; padding-left: 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.camp-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.camp-row input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--ac, var(--gold)); height: 14px; }
.camp-name {
  font-size: 12.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px;
}
.camp-nums { display: flex; gap: 10px; align-items: baseline; font-size: 12px; }
.camp-nums small { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.camp-nums b { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.calc-equiv { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
.calc-equiv b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-equiv span.on { color: var(--gold-soft); }
.calc-equiv span.on b { color: var(--gold-soft); }
.calc-req { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.req-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--gold); color: #171307; font-weight: 600; font-size: 14px;
  border-radius: 8px; padding: 11px 18px; text-decoration: none;
}
.req-btn:hover { background: var(--gold-soft); }
.req-btn svg { width: 15px; height: 15px; }
.req-copy {
  font-size: 13px; color: var(--ink-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 14px;
}
.req-copy:hover { color: var(--gold-soft); border-color: var(--gold); }
.req-hint { margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.calc-hero { display: flex; align-items: baseline; gap: 14px; margin: 4px 0 16px; }
.calc-hero-num {
  font-family: "Fraunces", serif; font-weight: 700; color: var(--gold-soft);
  font-size: clamp(52px, 6vw, 76px); line-height: 1; font-variant-numeric: tabular-nums;
}
.calc-hero-lbl { color: var(--ink-2); font-size: 15px; }
.calc-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin-bottom: 18px; background: var(--bg); }
.calc-bar i { display: block; height: 100%; }
.calc-rows { display: flex; flex-direction: column; }
.calc-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.calc-row .r-name { display: flex; align-items: center; gap: 8px; }
.calc-row .r-num { margin-left: auto; display: flex; gap: 18px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.calc-row .r-num b { color: var(--ink); font-weight: 600; min-width: 64px; text-align: right; }
.calc-foot { display: flex; gap: 32px; margin-top: auto; padding-top: 18px; }
.calc-mini .l { display: block; font-size: 11.5px; color: var(--ink-2); }
.calc-mini .v { font-family: "Fraunces", serif; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-mini .v.up { color: #8FBF8A; } .calc-mini .v.down { color: #D98B7E; }

/* ---------- leitor de PDF ---------- */
.pdf-modal[hidden] { display: none; }
.pdf-modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(8, 7, 5, .82); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: clamp(8px, 3vw, 40px);
}
.pdf-box {
  width: min(1000px, 100%); height: 100%; max-height: 92vh;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
}
.pdf-head {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
}
.pdf-title { font-weight: 600; font-size: 14.5px; }
.pdf-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 13px; }
.pdf-actions a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.pdf-actions a:hover { color: var(--gold-soft); }
.pdf-actions .pdf-dl { color: var(--gold-soft); font-weight: 600; text-decoration: none; }
.pdf-actions button { color: var(--ink-2); font-size: 13px; }
.pdf-actions button:hover { color: var(--ink); }
.pdf-box iframe { flex: 1; border: none; background: #444; }

/* ---------- rodapé ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 36px var(--pad) 48px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  color: var(--ink-3); font-size: 13px; text-align: center;
}
.footer-logo { height: 26px; opacity: .85; }

/* ---------- tooltip ---------- */
.tooltip {
  position: fixed; z-index: 70; pointer-events: none;
  background: #24201A; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 13px; font-size: 12.5px; line-height: 1.5;
  box-shadow: 0 8px 28px rgba(0,0,0,.5);
  max-width: 260px;
}
.tooltip .tt-title { font-weight: 600; color: var(--gold-soft); margin-bottom: 3px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tooltip .tt-row b { color: var(--ink); font-weight: 600; margin-left: auto; padding-left: 14px; }

/* ---------- responsivo ---------- */
@media (max-width: 980px) {
  .charts, .quarters, .calc { grid-template-columns: 1fr; }
  .channels { grid-template-columns: 1fr; }
  .shelf { grid-template-columns: repeat(2, 1fr); }
  .access { grid-template-columns: repeat(2, 1fr); }
  .topnav { display: none; }
}
@media (max-width: 560px) {
  .hero-stats { grid-template-columns: 1fr; }
  .shelf, .access { grid-template-columns: 1fr; }
  .topbar { gap: 12px; }
}
