/* ============ Ímpeto — base: tokens, fontes, reset, componentes ============ */
@font-face { font-family: 'Poppins'; src: url('../fontes/poppins-300.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../fontes/poppins-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../fontes/poppins-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../fontes/poppins-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../fontes/poppins-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../fontes/poppins-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fontes/jetbrains-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fontes/jetbrains-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --preto: #0D0D0D;
  --preto-profundo: #060606;
  --grafite: #141414;
  --grafite-2: #1C1C1C;
  --vermelho: #EE0403;
  --vermelho-vivo: #F60000;
  --vermelho-escuro: #CF0000;
  --vermelho-sombra: #5A0000;
  --off-white: #F5F5F3;
  --cinza-medio: #888888;
  --cinza-texto: #333333;

  --fonte: 'Poppins', 'Liberation Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --largura: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease-saida: cubic-bezier(.16, 1, .3, 1);

  /* Ritmo de espaçamento (pedido do cliente, vale para toda a página): 10 px entre as linhas de um mesmo texto,
     15 px entre textos diferentes (rótulo → título → subtítulo → parágrafo → botão) e no máximo 48 px entre o
     título de uma seção e o conteúdo dela. */
  --entre-linhas: 10px;
  --entre-textos: 15px;
  --cabeca-conteudo: clamp(32px, 3.4vw, 48px);

  /* Seções fixadas (pin): o conteúdo inteiro precisa caber na altura da janela enquanto fixado.
     Ritmo vertical compacto, medido em svh; seções pinadas devem usar estas variáveis. */
  --pino-topo: clamp(84px, 12svh, 120px);   /* passa da barra fixa do topo (~76px) */
  --pino-base: clamp(20px, 5svh, 64px);
  --pino-respiro: clamp(12px, 3svh, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--preto); color-scheme: dark; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--preto); color: var(--off-white);
  font-family: var(--fonte); font-size: clamp(16px, 1.05vw, 18px);
  overflow-x: clip; -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
/* Entrelinha = tamanho da letra + 10 px em todo texto (corrido, títulos, listas). Declarada em cada elemento
   (calc com em é resolvido no próprio elemento; herdado, viraria o valor em px do pai). :where() = especificidade
   zero: números grandes de uma linha (contadores, funil) e botões ainda podem fixar a própria. */
:where(body, body *) { line-height: calc(1em + var(--entre-linhas)); }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--vermelho-vivo); outline-offset: 3px; }
/* destinos de foco programático (seções das âncoras): não são controles, sem anel */
[tabindex="-1"]:focus-visible { outline: none; }

.container { width: min(100% - 2 * var(--gutter), var(--largura)); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.rotulo { color: var(--vermelho-vivo); margin-bottom: var(--entre-textos); }
/* palavra composta que não se parte no hífen ("cliente-fundador") */
.sem-quebra { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- botões ---------- */
.botao {
  display: inline-flex; align-items: center; gap: .6em; min-height: 52px; padding: 0 28px;
  font: 600 15px/1 var(--fonte); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; position: relative;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: background-color .3s, color .3s, border-color .3s;
}
/* AA em todo estado: off-white sobre #CF0000 = 5,27:1. Passar o mouse/pressionar ESCURECE (camada de
   --vermelho-sombra por cima: ~7,6:1 e ~9,4:1), nunca clareia para #EE0403/#F60000 (4,13 e 3,91:1). */
.botao--primario { background: var(--vermelho-escuro); color: var(--off-white); }
.botao--primario:hover { background: linear-gradient(rgba(90, 0, 0, .45), rgba(90, 0, 0, .45)), var(--vermelho-escuro); }
.botao--primario:active { background: linear-gradient(rgba(90, 0, 0, .7), rgba(90, 0, 0, .7)), var(--vermelho-escuro); }
.botao:disabled, .botao[aria-disabled="true"] { background: var(--grafite-2); color: var(--cinza-medio); cursor: not-allowed; }
/* O clip-path do chanfro corta tudo o que fica fora da caixa, inclusive o outline comum:
   o anel de foco dos botões é interno (offset negativo maior que a espessura), off-white sobre o vermelho. */
.botao:focus-visible { outline: 2px solid var(--off-white); outline-offset: -6px; }

/* ---------- HUD ---------- */
.hud-cantos span { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(238, 4, 3, .8); pointer-events: none; }
.hud-cantos span:nth-child(1) { top: 76px; left: 16px; border-top-width: 1px; border-left-width: 1px; }
.hud-cantos span:nth-child(2) { top: 76px; right: 16px; border-top-width: 1px; border-right-width: 1px; }
.hud-cantos span:nth-child(3) { bottom: 16px; left: 16px; border-bottom-width: 1px; border-left-width: 1px; }
.hud-cantos span:nth-child(4) { bottom: 16px; right: 16px; border-bottom-width: 1px; border-right-width: 1px; }

/* ---------- topo ---------- */
/* Acima de todo o conteúdo (nada pinta por cima do logotipo), abaixo só do cursor-mira (10000). */
.topo {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9200;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--gutter);
  background: linear-gradient(to bottom, rgba(6, 6, 6, .9), rgba(6, 6, 6, 0));
}
/* Depois da abertura o texto das seções passa por baixo da barra: fundo opaco (o logo nunca fica sobre texto). */
.passou-abertura .topo { background: rgba(6, 6, 6, .97); box-shadow: 0 1px 0 var(--grafite-2); }
.topo__logo img { height: 30px; width: auto; }
.topo .botao { min-height: 44px; padding: 0 20px; font-size: 14px; }
@media (max-width: 640px) { .topo .botao { display: none; } }

/* ---------- CTA fixo no celular ---------- */
/* Só depois da abertura (home.js marca html.passou-abertura quando o pin termina). O espaço no fim da página
   é reservado sempre (sem salto de layout quando o botão aparece). */
.cta-fixo { display: none; }
@media (max-width: 640px) {
  .passou-abertura .cta-fixo { display: flex; justify-content: center; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; }
  .passou-abertura.no-diagnostico .cta-fixo { display: none; }
  body { padding-bottom: 76px; }
}

/* ---------- banner de cookies (só existe quando há GTM/Pixel configurado; rastreamento.js o cria) ---------- */
.cookies {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9300;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; max-width: 920px; margin-inline: auto;
  padding: 16px 20px; background: var(--grafite); border: 1px solid var(--cinza-texto); border-top: 2px solid var(--vermelho);
}
.cookies[hidden] { display: none; }
.cookies__texto { flex: 1 1 360px; margin: 0; font-size: 14px; color: var(--off-white); }
.cookies__texto a { color: var(--off-white); text-underline-offset: 3px; }
.cookies__acoes { display: flex; flex-wrap: wrap; gap: 10px; }
.cookies__botao {
  min-height: 44px; padding: 0 20px; font: 600 14px/1 var(--fonte); color: var(--off-white); cursor: pointer;
  background: transparent; border: 1px solid var(--cinza-medio);
}
.cookies__botao:hover { border-color: var(--off-white); }
.cookies__botao--aceitar { background: var(--vermelho-escuro); border-color: var(--vermelho-escuro); }
.cookies__botao--aceitar:hover { background: linear-gradient(rgba(90, 0, 0, .45), rgba(90, 0, 0, .45)), var(--vermelho-escuro); }
.cookies__botao--aceitar:active { background: linear-gradient(rgba(90, 0, 0, .7), rgba(90, 0, 0, .7)), var(--vermelho-escuro); }
.cookies__botao:focus-visible, .cookies__texto a:focus-visible { outline: 2px solid var(--off-white); outline-offset: 3px; }
@media (max-width: 640px) { .cookies__acoes, .cookies__botao { width: 100%; } .cookies__acoes { flex-direction: column; } }

/* ---------- cursor-mira ---------- */
html.tem-cursor, html.tem-cursor * { cursor: none !important; }
.cursor { position: fixed; inset: 0; z-index: 10000; pointer-events: none; opacity: 0; transition: opacity .3s; }
.cursor.visivel { opacity: 1; }
.cursor__mira {
  position: absolute; left: 0; top: 0; width: 6px; height: 6px; background: var(--vermelho-vivo);
  transform: translate(calc(var(--x, -100px) - 50%), calc(var(--y, -100px) - 50%));
}
.cursor__anel {
  position: absolute; left: 0; top: 0; width: 36px; height: 36px; border: 1px solid rgba(246, 0, 0, .7);
  transform: translate(calc(var(--ax, -100px) - 50%), calc(var(--ay, -100px) - 50%)) rotate(45deg);
  transition: width .25s, height .25s, border-color .25s;
}
.cursor--alvo .cursor__anel { width: 60px; height: 60px; border-color: var(--off-white); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
