/* Karu Tech — site v2 (09/09/2026). Marca Noturna; composição Horizonte SEM régua (decisão do fundador):
   h2 à esquerda e corpo à direita a partir de 720 px, espaço e tipografia fazem a separação; hairlines só dentro de listas.
   Dois modos de cor, um layout. Motion 1 + 2 sem o traço (ver bloco "motion" no fim). Tokens em empresa/marca/DESIGN.md. */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --noite: #0B1830;
  --flor: #FAF7F0;      /* branco-flor: o acento */
  --luar: #DDE3EC;      /* texto corrido sobre Noite */
  --cac: #97A6BC;       /* apoio sobre Noite */
  --cae: #55657E;       /* apoio sobre Papel */
  --papel: #FFFFFF;
  --hl-n: #26344B;      /* hairline sobre Noite */
  --hl-p: #DCE1E8;      /* hairline sobre Papel */

  --m-fundo: var(--papel);
  --m-tinta: var(--noite);
  --m-titulo: var(--noite);
  --m-apoio: var(--cae);
  --m-hl: var(--hl-p);
  --m-botao-fundo: var(--noite);
  --m-botao-tinta: var(--flor);

  --serif: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Source Code Pro", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --mg: 16px;        /* margem lateral: 16 celular · 40 a partir de 720 */
  --resp: 64px;      /* respiro entre seções: 64 · 88 · 112 */
  --h1: 40px;        /* 40 · 56 · 72 */
  --conteudo: 1200px;
  --medida: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --m-fundo: var(--noite); --m-tinta: var(--luar); --m-titulo: var(--flor); --m-apoio: var(--cac);
    --m-hl: var(--hl-n); --m-botao-fundo: var(--flor); --m-botao-tinta: var(--noite);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --m-fundo: var(--noite); --m-tinta: var(--luar); --m-titulo: var(--flor); --m-apoio: var(--cac);
  --m-hl: var(--hl-n); --m-botao-fundo: var(--flor); --m-botao-tinta: var(--noite);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--m-fundo); color: var(--m-tinta);
  font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; text-wrap: balance; color: var(--m-titulo); }
h2 { font-size: 24px; line-height: 1.2; }
h3, .h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.25; color: var(--m-titulo); }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }
b { font-weight: 600; color: var(--m-titulo); }
.wrap { max-width: calc(var(--conteudo) + 2 * var(--mg)); margin-inline: auto; padding-inline: var(--mg); }
.meta { font: 400 15px/1.5 var(--mono); letter-spacing: .01em; color: var(--m-apoio); }
.rotulo { font: 500 14px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--m-apoio); }
.prosa { max-width: var(--medida); }
.prosa p + p { margin-top: 16px; }
.sub { margin-top: 12px; color: var(--m-apoio); max-width: 40ch; }
.ancora { margin-top: 16px; font: 500 15px/1.5 var(--mono); color: var(--m-apoio); max-width: 34ch; }
:focus-visible { outline: 2px solid var(--m-titulo); outline-offset: 2px; }
.pular { position: absolute; left: var(--mg); top: -100px; z-index: 20; min-height: 44px; display: inline-flex; align-items: center; padding: 12px 16px; background: var(--flor); color: var(--noite); border-radius: 2px; font: 500 16px/1 var(--sans); text-decoration: none; }
.pular:focus { top: 8px; }
[hidden] { display: none !important; }

/* ---------- ações ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 16px; border-radius: 2px; border: 0; cursor: pointer;
  font: 500 16px/1 var(--sans); text-decoration: none; white-space: nowrap;
  background: var(--m-botao-fundo); color: var(--m-botao-tinta);
}
.botao:hover { text-decoration: underline; text-underline-offset: 3px; }
.link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 500 16px/1 var(--sans); color: var(--m-tinta); text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-size: 100% 1px; background-position: 0 calc(50% + 11px);
}
.acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.resposta { font: 400 15px/1.5 var(--mono); color: var(--m-apoio); }
.email { text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; }
.canal-outro { margin-top: 16px; }

/* ---------- cabeçalho: lockup completo + nav + idioma + modo + ação ---------- */
.cabecalho { border-bottom: 1px solid var(--m-hl); }
.cab-fila {
  display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "marca idioma modo" "nav nav nav" "botao botao botao";
  align-items: center; gap: 8px 12px; padding-block: 12px;
}
.marca { grid-area: marca; display: inline-flex; align-items: flex-end; gap: 8px; min-height: 44px; padding-bottom: 8px; box-sizing: border-box; color: var(--m-titulo); text-decoration: none; }
.marca .simbolo { width: 28px; height: 28px; display: block; flex: none; }
.marca .wordmark { display: block; height: 20px; width: auto; flex: none; }
.nav { grid-area: nav; }
.nav ul { display: flex; flex-wrap: wrap; gap: 0 14px; }
.nav a { font-size: 15px; }
.nav a, .idioma, .modo { display: inline-flex; align-items: center; min-height: 44px; font: 500 16px/1 var(--sans); text-decoration: none; color: var(--m-tinta); }
.nav a { background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-size: 0 1px; background-position: 0 calc(50% + 11px); }
.nav a:hover, .nav a[aria-current="page"] { background-size: 100% 1px; }
.idioma { grid-area: idioma; color: var(--m-apoio); padding: 0 6px; }
.modo { grid-area: modo; color: var(--m-apoio); padding: 0 6px; background: none; border: 0; cursor: pointer; font-family: var(--sans); }
.cabecalho .botao { grid-area: botao; justify-self: start; }

/* ---------- hero: só tipografia e espaço ---------- */
.hero { padding-top: 48px; padding-bottom: 8px; }
h1 { font-size: var(--h1); line-height: 1.02; max-width: 20ch; }
.hero-baixo { display: grid; gap: 20px; padding-block: 28px 40px; }
.hero-texto { display: grid; gap: 16px; }
.lead { font-size: 19px; max-width: 58ch; }
.dest { font: 500 14px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--m-apoio); max-width: 56ch; }

/* ---------- seções: h2 à esquerda, corpo à direita ---------- */
.secao { padding-top: var(--resp); }
main > .secao:last-child { padding-bottom: var(--resp); }
.grade { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
.cabeca, .corpo { min-width: 0; }
.depois { margin-top: 20px; }

/* listas com hairline entre itens (dentro do corpo, nunca de borda a borda) */
.lista li { padding: 16px 0; max-width: var(--medida); }
.lista li + li { border-top: 1px solid var(--m-hl); }
.lista li:first-child { padding-top: 0; }
.lista li:last-child { padding-bottom: 0; }
.cap { display: grid; gap: 6px; }
.cap h3 a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; margin-block: -10px; }
.cap h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* capacidade (Soluções): prosa + "o que entrega" */
.entrega-rotulo { margin-top: 24px; }
/* "O que você recebe": um item por linha, marcador igual em todos; duas colunas a partir de 720px */
.entrega { margin-top: 8px; display: grid; grid-template-columns: 1fr; gap: 6px 24px; max-width: var(--medida); }
.entrega li { font: 400 15px/1.5 var(--mono); color: var(--m-tinta); position: relative; padding-left: 16px; }
.entrega li::before { content: "·"; position: absolute; left: 0; color: var(--m-apoio); }

/* tabela comparativa. Celular: mini-tabela por critério. Cabeça (duas colunas) uma vez no topo;
   cada critério é o título da linha e as duas respostas ficam lado a lado. A coluna da Karu Tech
   tem cor de título e peso; a do SaaS, cor de apoio. A partir de 720px volta a ser tabela cheia. */
table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; }
thead, tbody { display: block; }
thead { position: sticky; top: 0; background: var(--m-fundo); padding-top: 8px; z-index: 1; }
thead tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
thead th { display: block; text-align: left; padding: 0 0 10px; border: 0; border-bottom: 1px solid var(--m-hl); font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--m-apoio); }
thead th:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
thead th:last-child { color: var(--m-titulo); }
tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 14px 0 16px; border-top: 1px solid var(--m-hl); }
tbody tr:first-child { border-top: 0; }
tbody th, tbody td { display: block; text-align: left; padding: 0; border: 0; }
tbody th { grid-column: 1 / -1; font: 600 16px/1.4 var(--sans); color: var(--m-titulo); }
tbody td { color: var(--m-apoio); line-height: 1.45; }
tbody td b { color: var(--m-tinta); }
td.karu { color: var(--m-titulo); font-weight: 500; }

/* passos e itens com negrito */
.passos li { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; padding: 16px 0; max-width: var(--medida); }
.passos li + li { border-top: 1px solid var(--m-hl); }
.passos li:first-child { padding-top: 0; }
.passos .num { font: 500 15px/1.6 var(--mono); letter-spacing: .08em; color: var(--m-apoio); padding-top: 2px; }

/* empresa / contato */
.destaque { font: 600 32px/1.15 var(--serif); color: var(--m-titulo); }
.dados li { padding: 8px 0; }
.canais { display: grid; gap: 24px; margin: 0; }
.presenca-contato { margin-top: 24px; }
.canal { display: grid; gap: 8px; }
.canal dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.lista-links { display: grid; gap: 4px; margin-top: 16px; }

/* funil "Começar uma conversa" */
.conversa { max-width: var(--medida); }
.conversa:has(.funil:not([hidden])) .sem-js { display: none; }
.funil { display: grid; gap: 24px; }
.progresso { display: grid; gap: 8px; }
.barra { height: 2px; background: var(--m-hl); border-radius: 1px; overflow: hidden; }
.barra span { display: block; height: 100%; width: 100%; background: var(--m-titulo); transform-origin: left; transform: scaleX(var(--p, .25)); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.etapa { border: 0; margin: 0; padding: 0; min-width: 0; }
.etapa legend { padding: 0; margin-bottom: 16px; }
.opcoes { display: grid; gap: 8px; }
.opcao {
  display: flex; align-items: center; min-height: 48px; padding: 12px 16px; text-align: left; cursor: pointer;
  background: transparent; color: var(--m-tinta); border: 1px solid var(--m-apoio); border-radius: 2px; font: 500 16px/1.3 var(--sans);
}
.opcao:hover, .opcao[aria-checked="true"] { border-color: var(--m-titulo); color: var(--m-titulo); }
.opcao[aria-checked="true"] { background: var(--m-botao-fundo); color: var(--m-botao-tinta); }
.resultado { display: grid; gap: 16px; }
.mensagem { padding: 16px; border: 1px solid var(--m-hl); border-radius: 2px; font-size: 17px; }
.controles { margin: 0; }
.voltar { color: var(--m-apoio); background-image: none; }
.voltar:hover { text-decoration: underline; }

/* fecho */
.fecho { padding-top: var(--resp); padding-bottom: 56px; }
.fecho h2 { font-size: 32px; line-height: 1.15; max-width: 20ch; }
.fecho .lead { margin-top: 16px; }
.fecho .acoes { margin-top: 24px; }

/* rodapé: lockup pequeno, links, presença, legal */
.rodape { border-top: 1px solid var(--m-hl); padding-block: 32px 40px; color: var(--m-apoio); }
.marca-rodape .simbolo { width: 24px; height: 24px; }
.marca-rodape .wordmark { height: 17px; }
.rodape .links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 24px; }
.rodape .links a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; color: var(--m-tinta); text-decoration: none; }
.rodape .links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rodape .presenca { margin-top: 24px; font: 500 14px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--m-titulo); }
.rodape .legal { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; font: 400 15px/1.5 var(--mono); }

@media (max-width: 359px) { .nav ul { gap: 0 10px; } .nav a { font-size: 14px; } }
/* ================================ ≥ 720 ================================ */
@media (min-width: 720px) {
  .entrega { grid-template-columns: 1fr 1fr; }
  table { display: table; font-size: 16px; }
  thead { display: table-header-group; position: static; background: none; padding: 0; } tbody { display: table-row-group; }
  thead tr, tbody tr { display: table-row; }
  tbody tr, tbody tr:first-child { padding: 0; border-top: 0; }
  thead th, tbody th, tbody td { display: table-cell; text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-top: 1px solid var(--m-hl); }
  thead th, thead th:first-child { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; border-top: 0; border-bottom: 0; font: 500 14px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--m-apoio); padding-top: 0; }
  thead th:last-child { color: var(--m-apoio); }
  tbody th { font: 600 16px/1.5 var(--sans); color: var(--m-titulo); width: 26%; }
  tbody td { color: var(--m-tinta); line-height: 1.5; }
  td.ganha { color: var(--m-titulo); }
  td.karu { color: var(--m-titulo); font-weight: 400; }
  :root { --mg: 40px; --h1: 56px; --resp: 88px; }
  .cab-fila { display: flex; align-items: center; gap: 24px; min-height: 72px; padding-block: 0; }
  .nav { flex: 1 1 auto; }
  .nav ul { flex-wrap: nowrap; gap: 0 24px; }
  .nav a { font-size: 16px; }
  .idioma { margin-left: auto; }
  .hero { padding-top: 80px; }
  .hero-baixo { grid-template-columns: minmax(0, 1fr) auto; align-items: start; padding-block: 36px 56px; column-gap: 40px; }
  .hero-baixo .acoes { flex-direction: column; align-items: flex-start; gap: 12px; }
  .grade { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 16px; row-gap: 0; }
  .cabeca { grid-column: 1 / span 4; }
  .corpo { grid-column: 5 / span 8; }
  .canais { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opcoes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fecho h2 { font-size: 40px; }
}
/* ================================ ≥ 960 ================================ */
@media (min-width: 960px) {
  :root { --h1: 72px; --resp: 112px; }
  .cabeca { grid-column: 1 / span 3; }
  .cab-fila { min-height: 80px; }
  .hero { padding-top: 104px; }
}

/* ================================ motion (1 + 2 sem o traço) ================================
   Só sob html.js e sem prefers-reduced-motion. Estado de repouso = tudo visível.
   Entrada (uma vez): flor do lockup floresce por traço; h1 revela de baixo pra cima (clip-path);
   a segunda linha se escreve uma vez (clip-path, sem cursor); destinatário e ações assentam.
   Seções: itens .m assentam em cascata (opacity + 12 px) quando entram na tela, uma vez. */
@media screen and (prefers-reduced-motion: no-preference) {
  html.js .cabecalho .f-base { stroke-dasharray: 21; stroke-dashoffset: 21; animation: traco .35s cubic-bezier(.2,.7,.2,1) .05s forwards; }
  html.js .cabecalho .f-caule { stroke-dasharray: 8; stroke-dashoffset: 8; animation: traco .25s cubic-bezier(.2,.7,.2,1) .35s forwards; }
  html.js .cabecalho .f-raio { stroke-dasharray: 9; stroke-dashoffset: 9; animation: traco .3s cubic-bezier(.2,.7,.2,1) forwards; }
  html.js .cabecalho .f-raio:nth-of-type(3) { animation-delay: .55s; }
  html.js .cabecalho .f-raio:nth-of-type(4) { animation-delay: .62s; }
  html.js .cabecalho .f-raio:nth-of-type(5) { animation-delay: .69s; }
  html.js .cabecalho .f-raio:nth-of-type(6) { animation-delay: .76s; }
  html.js .cabecalho .f-raio:nth-of-type(7) { animation-delay: .83s; }
  @keyframes traco { to { stroke-dashoffset: 0; } }

  html.js .hero h1 { clip-path: inset(100% 0 -0.35em 0); animation: revelar .55s cubic-bezier(.2,.7,.2,1) 0s forwards; }
  html.js .hero .lead { clip-path: inset(-0.2em 100% -0.35em 0); animation: escrever .7s cubic-bezier(.3,.6,.4,1) .25s forwards; }
  html.js .hero .dest, html.js .hero .acoes, html.js .hero .lista-links { animation: assentar .5s cubic-bezier(.2,.7,.2,1) both; }
  html.js .hero .dest { animation-delay: .45s; }
  html.js .hero .acoes, html.js .hero .lista-links { animation-delay: .55s; }
  /* folga embaixo (-0.35em): descendentes (g, p, ç, j) ficam fora da caixa com entrelinha 1.02 e o recorte comia */
  @keyframes revelar { to { clip-path: inset(-0.2em 0 -0.35em 0); } }
  @keyframes escrever { to { clip-path: inset(-0.2em 0 -0.35em 0); } }
  @keyframes assentar { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

  /* seções: .m começa invisível só depois que o JS marcou a seção como "esperando" */
  html.js .espera .m { opacity: 0; transform: translateY(12px); }
  html.js .visto .m { animation: assentar .5s cubic-bezier(.2,.7,.2,1) calc(var(--i, 0) * 50ms) both; }
  html.js .visto tr.m { transform: none; animation-name: aparecer; }
  @keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }

  /* troca de modo: fundido só durante a troca */
  html.trocando, html.trocando body, html.trocando .cabecalho, html.trocando .rodape, html.trocando .botao, html.trocando .opcao, html.trocando .mensagem, html.trocando .barra span {
    transition: background-color .4s ease, color .4s ease, border-color .4s ease;
  }
  .nav a { transition: background-size .2s ease; }
  .opcao { transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- impressão ---------- */
@media print {
  :root { --m-fundo: #fff; --m-tinta: #0B1830; --m-titulo: #0B1830; --m-apoio: #55657E; --m-hl: #DCE1E8; }
  .cabecalho .botao, .modo, .pular, .funil { display: none !important; }
  .botao { display: inline; border: 1px solid #0B1830; background: #fff !important; color: #0B1830 !important; white-space: normal; padding: 4px 8px; }
  .botao::after { content: " (" attr(data-url) ")"; font: 400 12px var(--mono); word-break: break-all; }
  .link::after { content: " (https://karu.tec.br" attr(href) ")"; font: 400 12px var(--mono); }
  .sem-js { display: block !important; }
  .m { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
