/* Cases — listagem e case completo.
   Reusa os tokens de home.css; só acrescenta os blocos que não existiam:
   filtros, cartão de case, painel de números, tabela antes/depois e timeline. */

/* ---------- breadcrumb ---------- */
.crumb {
  font-family: "Barlow Condensed", "DM Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  color: var(--mute);
  margin: 0 0 20px;
}
.crumb a { color: var(--mute); text-decoration: none; border-bottom: 1px solid transparent; }
.crumb a:hover { color: var(--gold-bright); border-bottom-color: var(--gold-border); }
.crumb span { color: var(--gold); }

/* ---------- filtros ---------- */
.filters { border-bottom: 1px solid var(--line); padding-bottom: 32px; margin-bottom: 40px; }
.filters-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1.4fr;
  gap: 28px;
  align-items: start;
}
.filters-sep { background: var(--line); width: 1px; height: 100%; min-height: 56px; }
.filter-group > span {
  display: block;
  font-family: "Barlow Condensed", "DM Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12.5px;
  color: var(--mute);
  margin-bottom: 12px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.chip {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 0;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  color: var(--faint);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.chip:hover { color: var(--light); }
.chip[aria-pressed="true"] { color: var(--gold-bright); border-bottom-color: var(--gold); }
.count { color: var(--mute); font-size: 15px; margin: 0 0 28px; }

/* O cartao de case (.case-grid/.case-card) mora em home.css: a home tambem o
   usa, e nao valia puxar este arquivo inteiro la so por ele. */

/* ---------- cabeçalho do case ---------- */
.case-head h1 { font-family: "Sora", sans-serif; font-weight: 800; font-size: 46px; line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 20px; }
.case-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--mute); font-size: 15px; margin-top: 28px; }
.case-meta b { color: var(--faint); font-weight: 500; }

/* ---------- painel de números ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stat { background: var(--soft); padding: 30px 26px; }
.stat b { display: block; font-family: "Sora", sans-serif; font-weight: 800; font-size: 38px; line-height: 1; letter-spacing: -0.03em; color: var(--gold-bright); margin-bottom: 10px; }
.stat span { color: var(--faint); font-size: 15px; line-height: 1.5; display: block; }
.stat em { display: block; color: var(--mute); font-size: 13.5px; font-style: normal; margin-top: 6px; }

/* ---------- tabela antes e depois ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.ba { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 560px; }
table.ba th, table.ba td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--paper-line); }
table.ba thead th {
  font-family: "Barlow Condensed", "DM Sans", sans-serif;
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
}
table.ba td:nth-child(n+2), table.ba th:nth-child(n+2) { text-align: right; white-space: nowrap; }
table.ba td:last-child { font-weight: 500; }
table.ba .up { color: #1F7A4C; }
table.ba .down { color: var(--gold-deep); }
table.ba caption { caption-side: bottom; text-align: left; color: var(--ink-soft); font-size: 14px; padding-top: 14px; line-height: 1.6; }

/* ---------- passos da execução ---------- */
.exec { list-style: none; margin: 0; padding: 0; counter-reset: exec; }
.exec li { position: relative; padding: 0 0 26px 62px; counter-increment: exec; }
.exec li::before {
  content: counter(exec, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-family: "Barlow Condensed", "DM Sans", sans-serif; font-weight: 700;
  font-size: 15px; letter-spacing: 0.1em; color: var(--gold);
  border: 1px solid var(--gold-border); border-radius: 999px;
  width: 42px; height: 42px; display: grid; place-items: center;
}
.exec li h3 { font-family: "Sora", sans-serif; font-size: 19px; margin: 8px 0 6px; letter-spacing: -0.01em; }
.exec li p { margin: 0; }

/* ---------- caixa de ressalva ---------- */
.note { border-left: 3px solid var(--gold); background: var(--gold-dim); padding: 24px 26px; border-radius: 0 12px 12px 0; }
.note h3 { font-family: "Sora", sans-serif; font-size: 19px; margin: 0 0 10px; }
.note p:last-child { margin-bottom: 0; }

.sec--light .note { background: rgba(200,142,88,0.09); border-left-color: var(--gold-deep); }

/* ---------- geral ---------- */
.mt-40 { margin-top: 40px; }
.mt-56 { margin-top: 56px; }
.empty { color: var(--mute); padding: 40px 0; }

/* faixa de cinco numeros. O auto-fit de .stats nao resolve aqui: em 1080 de
   wrap cabem quatro colunas de 210, e a quinta cairia sozinha numa linha
   inteira. Grade de seis fracoes entao: 3 + 2, sem celula vazia (celula vazia
   aparece como bloco cinza, porque o fundo do grid e a cor da linha). */
.stats--cinco { grid-template-columns: repeat(6, 1fr); }
.stats--cinco .stat { grid-column: span 2; }
.stats--cinco .stat:nth-child(4),
.stats--cinco .stat:nth-child(5) { grid-column: span 3; }

@media (max-width: 860px) {
  .filters-grid { grid-template-columns: 1fr; gap: 24px; }
  .filters-sep { display: none; }
  .case-head h1 { font-size: 34px; }
  .stat b { font-size: 32px; }
  /* duas colunas: os quatro primeiros em duas linhas, o quinto ocupa a linha */
  .stats--cinco { grid-template-columns: repeat(2, 1fr); }
  .stats--cinco .stat,
  .stats--cinco .stat:nth-child(4) { grid-column: auto; }
  .stats--cinco .stat:nth-child(5) { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .stats--cinco { grid-template-columns: 1fr; }
  .stats--cinco .stat:nth-child(5) { grid-column: auto; }
}

/* variante da tabela sobre fundo escuro */
table.ba--dark th, table.ba--dark td { border-bottom-color: var(--line); }
table.ba--dark thead th { color: var(--mute); border-bottom: 2px solid var(--faint); }
table.ba--dark caption { color: var(--mute); }
table.ba--dark .up { color: var(--green); }
table.ba--dark .down { color: var(--gold-bright); }

/* resumo antes e depois, no lugar da tabela detalhada */
.compare { display: grid; gap: 14px; margin-top: 40px; }
.compare-row {
  display: grid;
  grid-template-columns: 1.3fr auto auto auto;
  align-items: center;
  gap: 10px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 26px;
}
.compare-row .rot { color: var(--faint); font-size: 16.5px; }
.compare-row .de {
  font-family: "Sora", sans-serif; font-weight: 700; font-size: 21px;
  color: var(--mute); letter-spacing: -0.02em; text-decoration: line-through;
  text-decoration-color: var(--line); white-space: nowrap;
}
.compare-row .seta { color: var(--gold); font-size: 19px; line-height: 1; }
.compare-row .para {
  font-family: "Sora", sans-serif; font-weight: 800; font-size: 27px;
  color: var(--gold-bright); letter-spacing: -0.03em; white-space: nowrap;
}
.compare-row .para.plain { text-decoration: none; }
.compare-note { color: var(--mute); font-size: 14.5px; margin-top: 18px; line-height: 1.6; }

@media (max-width: 700px) {
  .compare-row { grid-template-columns: auto auto auto; }
  .compare-row .rot { grid-column: 1 / -1; }
  .compare-row .de { font-size: 18px; }
  .compare-row .para { font-size: 23px; }
}

/* ---------- grafico de curva mensal (retorno por mes) ----------
   Barras proporcionais ao retorno, sem eixo numerico: a leitura e a forma
   da curva, nao a planilha. Usado na pagina de case de eventos. */
.curva { margin: 44px 0 0; }
.curva-legenda { color: var(--mute); font-size: 14.5px; margin: 0 0 26px; }
.curva-plot {
  position: relative;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
  align-items: end; height: 280px;
  border-bottom: 1px solid var(--line);
}
.curva-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 10px; height: 100%; }
.curva-val { font-family: "Sora", sans-serif; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--gold-bright); white-space: nowrap; }
.curva-bar { width: 100%; max-width: 104px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%); }
.curva-col.vale .curva-val { color: var(--mute); }
.curva-col.vale .curva-bar { background: var(--line); }
.curva-col.pico .curva-bar { background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 100%); }
.curva-media { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--gold-border); pointer-events: none; }
.curva-x { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 16px; }
.curva-x span { text-align: center; color: var(--mute); font-size: 14px; line-height: 1.35; }
.curva-x b { display: block; color: var(--faint); font-weight: 500; font-size: 15.5px; margin-bottom: 3px; }

@media (max-width: 640px) {
  .curva-plot { height: 210px; gap: 7px; }
  .curva-x { gap: 7px; }
  .curva-val { font-size: 14px; }
  .curva-x span { font-size: 12px; }
  .curva-x b { font-size: 13px; }
}
