/* ==========================================================================
   PRIMAX — DATA-VIZ · STORYTELLING · PROVA DE AUTORIDADE
   ========================================================================== */

/* ---------- contadores ---------- */
.counters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.counter { padding: 26px 20px; border-right: 1px solid var(--line); text-align: center; }
.counter:last-child { border-right: 0; }
.counter__v {
  display: block;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 700;
  line-height: 1;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.counter__l { display: block; margin-top: 9px; font-size: 13.4px; color: var(--muted); line-height: 1.4; }

/* ---------- graficos ---------- */
.chart { background: #fff; }
.chart__legend { display: flex; gap: 22px; margin-bottom: 22px; font-size: 13.5px; color: var(--graphite); }
.chart__legend span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot--o { background: var(--orange); }
.dot--g { background: #cfcfcf; }
.chart__unit { font-size: 12.5px; color: #9a9a9a; margin-top: 10px; }

.bar-row + .bar-row { margin-top: 24px; }
.bar-row__label { font-size: 14.6px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.bar-row__track { display: grid; gap: 8px; }
.bar {
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  width: 0;
  transition: width 1.1s cubic-bezier(.22, .8, .28, 1);
}
.reveal.is-in .bar { width: var(--w); }
.bar--o { background: linear-gradient(90deg, #ff8a2b, #ff6a00); }
.bar--g { background: #e2e2e2; transition-delay: .12s; }
.bar span { font-size: 13.4px; font-weight: 700; color: #fff; white-space: nowrap; }
.bar--g span { color: #6f6f6f; }
.bar-row__note { font-size: 12.6px; color: #9a9a9a; margin-top: 8px; }

.chart--area svg { width: 100%; height: auto; }
.chart--area .grid { stroke: #eeeeee; stroke-width: 1; }
.chart--area .axis { font-family: var(--font); font-size: 11px; fill: #9a9a9a; }
.chart--area .area-line {
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  transition: stroke-dashoffset 1.6s ease .1s;
}
.chart--area .area-fill { opacity: 0; transition: opacity .9s ease .6s; }
.chart--area .area-dot {
  fill: #fff;
  stroke: #ff6a00;
  stroke-width: 2.4;
  opacity: 0;
  transition: opacity .4s ease;
  transition-delay: calc(.5s + var(--i) * .09s);
}
.reveal.is-in .area-line { stroke-dashoffset: 0; }
.reveal.is-in .area-fill { opacity: 1; }
.reveal.is-in .area-dot { opacity: 1; }

.chart--donut { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 34px; align-items: center; }
.chart--donut svg { width: 230px; height: 230px; }
.donut__arc { opacity: 0; transition: opacity .5s ease; transition-delay: calc(var(--i) * .08s); }
.reveal.is-in .donut__arc { opacity: 1; }
.donut__big { font-family: var(--font); font-size: 40px; font-weight: 700; fill: var(--ink); }
.donut__small { font-family: var(--font); font-size: 12px; fill: #9a9a9a; letter-spacing: .12em; text-transform: uppercase; }
.donut__key { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 11px 26px; }
.donut__key li { display: flex; align-items: center; gap: 9px; font-size: 13.8px; color: var(--graphite); }
.donut__key i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut__key span { margin-left: auto; font-weight: 700; color: var(--ink); }

/* ---------- storytelling ---------- */
.story { display: grid; gap: 22px; }
.story__act {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
}
.story__act:nth-child(even) { grid-template-columns: 1fr 0.85fr; }
.story__act:nth-child(even) .story__img { order: 2; }
.story__img { position: relative; min-height: 330px; background-size: cover; background-position: center; }
.story__n {
  position: absolute;
  left: 22px;
  top: 22px;
  background: var(--orange);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 7px 13px;
  border-radius: 6px;
}
.story__txt { padding: 34px 40px 34px 6px; }
.story__act:nth-child(even) .story__txt { padding: 34px 6px 34px 40px; }
.story__txt h3 { font-size: clamp(22px, 2.1vw, 29px); line-height: 1.2; }
.story__txt p { margin-top: 14px; font-size: 15.6px; color: var(--muted); line-height: 1.68; }
.story__stat {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.story__stat strong { font-size: 27px; color: var(--orange); line-height: 1; }
.story__stat span { font-size: 13.6px; color: var(--muted); }

/* ---------- tabela comparativa ---------- */
.cmp { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.cmp table { width: 100%; border-collapse: collapse; min-width: 660px; }
.cmp th, .cmp td { padding: 15px 18px; text-align: left; font-size: 14.4px; border-bottom: 1px solid var(--line-soft); }
.cmp thead th { font-size: 13.6px; font-weight: 700; color: var(--ink); background: #fafafa; }
.cmp thead th.is-primax { background: var(--orange); color: #fff; }
.cmp tbody td { color: var(--graphite); }
.cmp tbody td:first-child { font-weight: 500; color: var(--ink); width: 38%; }
.cmp td.is-primax { background: var(--orange-soft); }
.cmp tbody tr:last-child td { border-bottom: 0; }
.cmp .yes svg { width: 20px; height: 20px; color: var(--orange); }
.cmp .no { color: #c5c5c5; font-size: 18px; }
.cmp .txt { font-size: 13.8px; }
.cmp td.is-primax .txt { color: var(--ink); font-weight: 600; }

/* ---------- simulador ---------- */
.sim {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.sim__form { padding: 38px; background: #fff; display: grid; gap: 16px; align-content: start; }
.sim__form h3 { font-size: clamp(22px, 2.1vw, 29px); line-height: 1.18; }
.sim__form .s-lead { margin-bottom: 8px; font-size: 15px; }
.sim__out {
  padding: 38px;
  background: linear-gradient(150deg, #141416 0%, #1d1d20 52%, #7a2c05 100%);
  color: #fff;
  display: grid;
  gap: 22px;
  align-content: start;
}
.sim__risk-l { font-size: 12.6px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .6); font-weight: 700; }
.sim__risk strong {
  display: block;
  font-size: clamp(34px, 3.6vw, 48px);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  margin: 8px 0;
  font-variant-numeric: tabular-nums;
}
.sim__risk-s { font-size: 13.4px; color: rgba(255, 255, 255, .66); line-height: 1.5; display: block; }
.sim__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sim__list li { display: flex; gap: 11px; font-size: 14px; color: rgba(255, 255, 255, .84); line-height: 1.5; }
.sim__list svg { width: 18px; height: 18px; color: var(--orange); flex: none; margin-top: 2px; }
.sim__list strong { color: #fff; }
.sim__vs { border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 20px; }
.sim__vs > div:first-child { display: flex; justify-content: space-between; gap: 14px; font-size: 13.8px; color: rgba(255, 255, 255, .78); flex-wrap: wrap; }
.sim__vs strong { color: #fff; }
.sim__bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .14); margin: 12px 0 10px; overflow: hidden; }
.sim__bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff8a2b, #ff6a00); transition: width .6s ease; }
.sim__vs small { font-size: 12.2px; color: rgba(255, 255, 255, .5); }
.sim .btn { justify-content: center; }

/* ---------- linha do tempo de case ---------- */
.ctl { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.ctl::before { content: ""; position: absolute; top: 26px; left: 8%; right: 8%; height: 2px; background: var(--line); }
.ctl__item { position: relative; padding: 0 14px; text-align: center; }
.ctl__mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--orange);
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
  transform: scale(.6);
  opacity: 0;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), opacity .35s ease;
  transition-delay: calc(var(--i) * .12s);
}
.reveal.is-in .ctl__mark { transform: scale(1); opacity: 1; }
.ctl__mark svg { width: 24px; height: 24px; color: var(--orange); }
.ctl__when { display: block; font-size: 11.6px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--orange); margin-bottom: 6px; }
.ctl__body strong { display: block; font-size: 15.4px; color: var(--ink); line-height: 1.3; margin-bottom: 7px; }
.ctl__body p { font-size: 13.2px; color: var(--muted); line-height: 1.55; }

/* ---------- faixa de credibilidade ---------- */
.trust {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 22px 26px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fafafa;
}
.trust div { display: flex; align-items: center; gap: 10px; font-size: 13.8px; color: var(--graphite); }
.trust svg { width: 20px; height: 20px; color: var(--orange); }

@media (max-width: 1180px) {
  .counters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .counter:nth-child(3n) { border-right: 0; }
  .ctl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 0; }
  .ctl::before { display: none; }
}

@media (max-width: 980px) {
  .chart--donut { grid-template-columns: 1fr; justify-items: center; }
  .story__act, .story__act:nth-child(even) { grid-template-columns: 1fr; }
  .story__act:nth-child(even) .story__img { order: 0; }
  .story__txt, .story__act:nth-child(even) .story__txt { padding: 28px 26px 32px; }
  .sim { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .counters { grid-template-columns: 1fr 1fr; }
  .counter { border-right: 0; border-bottom: 1px solid var(--line); }
  .ctl { grid-template-columns: 1fr; }
  .donut__key { grid-template-columns: 1fr; }
  .sim__form, .sim__out { padding: 26px 22px; }
}

/* ==========================================================================
   CORRECAO RESPONSIVA — grids definidos por style inline nas paginas
   (o atributo inline vence a media query, entao forcamos aqui)
   ========================================================================== */
@media (max-width: 980px) {
  .grid[style*="grid-template-columns"],
  .timeline__row[style*="grid-template-columns"],
  .card[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  .card[style*="grid-template-columns"] img { max-height: 260px; width: 100%; object-fit: cover; }
}

/* ---------- formulário: honeypot e aviso ---------- */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.aviso {
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}
.aviso--ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.aviso--erro {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
