/* ==========================================================================
   Nexo, landing page
   Mobile-first: o CSS base e o do celular. As media queries so ACRESCENTAM.
   Isso importa porque a maior parte do trafego brasileiro chega pelo telefone, escrever desktop primeiro e corrigir depois deixa o caso majoritario como
   remendo.
   ========================================================================== */

/* ---------- Reset enxuto ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--nx-ink);
  color: var(--nx-text);
  font-family: var(--nx-font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }

/* 16px é o piso: abaixo disso o iOS dá zoom sozinho ao focar o campo, o layout
   salta e o visitante volta com dois dedos. Vale para o formulário que ainda vai
   entrar aqui, a regra fica pronta antes dele, não depois do bug. */
input, select, textarea { font: inherit; font-size: 16px; }

:focus-visible {
  outline: 3px solid var(--nx-primary-hi);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--nx-primary); color: var(--nx-text);
  padding: 12px 18px; border-radius: var(--nx-radius-pill);
  transition: top .2s var(--nx-ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--nx-max-width);
  margin-inline: auto;
  padding-inline: var(--nx-gutter);
}

.section { padding-block: var(--nx-section-y); }
.section--tint { background: var(--nx-surface); }
.section--ink { background: var(--nx-surface-2); color: var(--nx-text); }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--nx-text-muted);
  margin-bottom: 12px;
}
.section--ink .eyebrow { color: var(--nx-text-muted); }

/* ---------- Tipografia (mobile) ---------- */
.h1 {
  font-family: var(--nx-font-display);
  font-weight: 600;
  font-size: clamp(38px, 10.5vw, 56px);
  line-height: .95;
  letter-spacing: -.035em;
}
.h2 {
  font-family: var(--nx-font-display);
  font-weight: 600;
  font-size: clamp(30px, 8vw, 42px);
  line-height: .98;
  letter-spacing: -.03em;
}
.h3 {
  font-family: var(--nx-font-body);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--nx-text);
}
.lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--nx-text-muted);
  max-width: 58ch;
}
.section--ink .lead { color: var(--nx-text-muted); }
.small { font-size: 14px; line-height: 1.55; color: var(--nx-text-muted); }

/* Fundo preto inverte texto por regra, nao por style inline em cada titulo. */
.section--ink .h2,
.section--ink .h3,
.section--ink h3 { color: var(--nx-text); }
.section--ink .small { color: var(--nx-text-muted); }

/* Utilitarios de espaco vertical, o suficiente para nao inventar um framework. */
.mt-18 { margin-top: 18px; }
.mt-28 { margin-top: 28px; }
.mt-40 { margin-top: 40px; }
.mt-44 { margin-top: 44px; }
.mt-56 { margin-top: 56px; }

/* ---------- Botoes ---------- */
/* min-height 48: alvo de toque confortável no celular. O mínimo aceitável é 44,
   e 44 é o que sobra para o botão do header, que divide 360px com a marca. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  font-family: var(--nx-font-body); font-weight: 500; font-size: 16px;
  padding: 14px 24px; border: 1px solid transparent; cursor: pointer;
  border-radius: var(--nx-radius-pill);
  background: var(--nx-primary); color: var(--nx-text);
  text-decoration: none;
  transition: opacity .2s var(--nx-ease), transform .2s var(--nx-ease);
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--nx-text); border-color: var(--nx-line); }
.btn--ghost:hover { border-color: var(--nx-primary-hi); opacity: 1; }
.btn--invert { background: var(--nx-accent); color: var(--nx-ink); }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 17, 22, .86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .35s var(--nx-ease);
}
.site-header.is-stuck { border-bottom-color: var(--nx-line); }

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px;
}

/* Logotipo proprio: palavra em Sora + um no de dois tracos.
   Nada do wordmark do concorrente entra aqui. */
/* min-height 44: o logotipo é link, e link de 33px de altura é alvo de toque
   reprovado. Só a altura cresce, o desenho não muda. */
.brand { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; text-decoration: none; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand__word {
  font-family: var(--nx-font-display); font-weight: 600;
  font-size: 22px; letter-spacing: -.045em; color: var(--nx-text);
}

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: 28px; }
.nav a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--nx-text-muted);
  transition: color .2s var(--nx-ease);
}
.nav a:hover { color: var(--nx-text); }

.site-header .btn { min-height: 44px; padding: 11px 16px; font-size: 15px; }

/* Entrada do primeiro dobra, duplicada do CSS crítico embutido no index.html
   para que este arquivo continue se sustentando sozinho. Ver a explicação lá:
   o hero não usa `.nx-reveal` porque aquele utilitário adia o LCP até o JS. */
@keyframes nexo-hero-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-in { animation: nexo-hero-in .6s var(--nx-ease) both; animation-delay: var(--d, 0ms); }
@keyframes nexo-hero-lift { from { transform: translateY(16px); } to { transform: none; } }
.hero-in--lcp { animation: nexo-hero-lift .6s var(--nx-ease) both; }

/* ---------- Hero ---------- */
.hero { padding-block: 48px 8px; }
.hero__tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: var(--nx-radius-pill);
  border: 1px solid var(--nx-line); background: var(--nx-surface);
  font-size: 13px; font-weight: 500; color: var(--nx-text-muted);
  margin-bottom: 22px;
}
.hero__tag .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--nx-whatsapp);
}
.hero .lead { margin-top: 20px; }

.hero__proof {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--nx-line);
  display: grid; gap: 18px;
}
.proof-item strong {
  display: block; font-family: var(--nx-font-display); font-weight: 600;
  font-size: 26px; letter-spacing: -.03em; line-height: 1;
}
.proof-item span { font-size: 14px; color: var(--nx-text-muted); }

/* ---------- Mock de conversa (SVG proprio, sem foto de pessoa) ---------- */
.hero__art { margin-top: 44px; }
.chat {
  border: 1px solid var(--nx-line); border-radius: var(--nx-radius-lg);
  background: var(--nx-surface); padding: 18px; display: grid; gap: 12px;
}
.chat__head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px; border-bottom: 1px solid var(--nx-line);
}
.chat__head .avatar { width: 34px; height: 34px; }
.chat__who { font-weight: 600; font-size: 15px; }
.chat__who span { display: block; font-weight: 400; font-size: 12px; color: var(--nx-text-muted); }

.bubble {
  max-width: 86%; padding: 12px 15px; border-radius: var(--nx-radius-lg);
  font-size: 15px; line-height: 1.45;
}
.bubble--them { background: var(--nx-surface-2); border: 1px solid var(--nx-line); border-bottom-left-radius: 4px; }
.bubble--us { background: var(--nx-primary); color: var(--nx-text); margin-left: auto; border-bottom-right-radius: 4px; }
.bubble__meta { display: block; margin-top: 6px; font-size: 11px; opacity: .6; }

.chat__note {
  font-size: 12px; color: var(--nx-text-muted); text-align: center;
  padding-top: 6px; border-top: 1px dashed var(--nx-line);
}

/* ---------- O eixo: blocos alternados ---------- */
.axis { display: grid; gap: 56px; }

.axis-item { display: grid; gap: 24px; }
.axis-item__num {
  font-family: var(--nx-font-display); font-weight: 600; font-size: 15px;
  color: var(--nx-text-muted); letter-spacing: -.02em;
}
.axis-item .h2 { margin-top: 2px; }
.axis-item .lead { margin-top: 14px; font-size: 16px; }

.axis-item__list { display: grid; gap: 10px; margin-top: 18px; }
.axis-item__list li {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px;
  font-size: 15px; color: var(--nx-text-muted); line-height: 1.5;
}
.axis-item__list li::before {
  content: ""; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%;
  background: var(--nx-primary-hi);
}

/* O quadro tecnico ao lado de cada bloco: o que sustenta a frase.
   Aqui vive a diferenca entre promessa e mecanismo. */
/* `min-width: 0` não é enfeite: o <pre> de dentro tem `white-space: pre`, e item
   de grid nasce com `min-width: auto`, sem isto o bloco de código estica a
   coluna e empurra a página inteira para fora da tela do celular. O
   `overflow-x: hidden` do body esconderia o sintoma e não a causa. */
.mech {
  border: 1px solid var(--nx-line); border-radius: var(--nx-radius-lg);
  background: var(--nx-surface); padding: 22px;
  min-width: 0;
}
.axis-item__body { min-width: 0; }
.section--tint .mech { background: var(--nx-surface-2); }
.mech__label {
  font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--nx-text-muted); margin-bottom: 12px;
}
.mech__code {
  font-family: var(--nx-font-mono);
  font-size: 12.5px; line-height: 1.7; color: var(--nx-text);
  background: var(--nx-surface-2); border-radius: var(--nx-radius);
  padding: 14px; overflow-x: auto; white-space: pre;
}
.mech__code .c { color: var(--nx-text-muted); }

/* Num 360 de largura sobram ~250px para o código. A 12,5px a linha mais longa
   (`# engine/radar.py, varre em SQL puro,`) estoura e vira rolagem lateral
   dentro do quadro; a 11px ela cabe. O `overflow-x` continua como rede. */
@media (max-width: 400px) {
  .mech { padding: 18px; }
  .mech__code { font-size: 11px; padding: 12px; }
}
.mech p { margin-top: 12px; font-size: 14px; color: var(--nx-text-muted); }

/* ---------- Cards de agente ---------- */
.agents { display: grid; gap: 16px; }

.agent-card {
  border: 1px solid var(--nx-line); border-radius: var(--nx-radius-lg);
  padding: 24px; background: var(--nx-surface);
  transition: transform .18s var(--nx-ease), box-shadow .18s var(--nx-ease),
              border-color .18s var(--nx-ease);
  transform-style: preserve-3d; will-change: transform;
}
.agent-card:hover {
  border-color: var(--nx-primary);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .7);
}
.agent-card__top { display: flex; align-items: center; gap: 14px; }
.agent-card .avatar { width: 56px; height: 56px; flex: none; }
/* `.agent-card p` (0,1,1) vencia `.agent-card__name` (0,1,0) por especificidade:
   o nome saía a 15px com 16px de margem em cima, em vez de 24px colado na área.
   Selecionar pelo pai resolve sem `!important` e sem inventar hierarquia. */
.agent-card p { margin-top: 16px; font-size: 15px; color: var(--nx-text-muted); }
.agent-card__top .agent-card__name {
  margin-top: 0; font-family: var(--nx-font-display); font-weight: 600;
  font-size: 24px; line-height: 1.1; letter-spacing: -.03em; color: var(--nx-text);
}
.agent-card__top .agent-card__area { margin-top: 2px; font-size: 13px; color: var(--nx-text-muted); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag {
  font-size: 13px; padding: 6px 12px; border-radius: var(--nx-radius-pill);
  background: var(--nx-surface-2); color: var(--nx-text-muted);
}

/* ---------- Passos ---------- */
.steps { display: grid; gap: 28px; counter-reset: step; }
.step { display: grid; gap: 8px; padding-top: 22px; border-top: 2px solid var(--nx-primary); }
.step__n {
  font-family: var(--nx-font-display); font-weight: 600; font-size: 14px;
  letter-spacing: .04em;
}
.step p { color: var(--nx-text-muted); font-size: 15px; }
.section--ink .step { border-top-color: var(--nx-line); }
.section--ink .step p { color: var(--nx-text-muted); }

/* ---------- Limites ---------- */
.limits { display: grid; gap: 14px; }
.limit {
  border: 1px solid var(--nx-line); border-radius: var(--nx-radius-lg);
  padding: 22px;
}
.limit h3 { font-size: 17px; font-weight: 600; }
.limit p { margin-top: 8px; font-size: 15px; color: var(--nx-text-muted); }

/* ---------- Provas (`/seguranca`) ----------
   A pagina de seguranca e a unica que mostra `arquivo:linha` em texto VISIVEL,
   nao em comentario: quem le aquela pagina e exatamente quem vai conferir.
   Por isso o caminho precisa caber num celular de 360px sem empurrar a
   pagina para o lado. `overflow-wrap: anywhere` quebra
   `alembic/versions/0005_agents_conversations.py:557` no meio, que e feio e
   e melhor que rolagem lateral. */
.prova { display: grid; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--nx-line); }
.prova li { display: grid; gap: 3px; font-size: 14px; color: var(--nx-text-muted); }
.prova li span { font-weight: 500; color: var(--nx-text); }
.prova code,
.prova-inline code {
  font-family: var(--nx-font-mono);
  font-size: 12.5px; color: var(--nx-text-muted);
  overflow-wrap: anywhere; word-break: break-word;
}
.prova-inline { margin-top: 10px; }
/* No codigo em prosa (`confirm`, `SELECT *`) o fundo separa do texto sem
   virar caixa: e citacao, nao bloco. */
.lead code, .axis-item__list code, .faq__item p code, .step p code {
  font-family: var(--nx-font-mono);
  font-size: .88em; background: var(--nx-surface-2);
  padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere;
}
.section--ink .lead code, .section--ink .step p code { background: rgba(255,255,255,.12); }
@media (max-width: 400px) { .prova code, .prova-inline code { font-size: 11.5px; } }

/* Link de texto que precisa ser alvo de toque de verdade. Inline dentro de um
   paragrafo ele quebra em duas linhas e sai com 39px de altura; em bloco, com
   `min-height`, o dedo acerta. */
.link-forte {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 15px; font-weight: 500; color: var(--nx-text);
  text-decoration: none; border-bottom: 1px solid var(--nx-line);
  transition: border-color .2s var(--nx-ease);
}
.link-forte:hover { border-bottom-color: var(--nx-primary-hi); }

/* Trilha de navegacao, so existe nas paginas internas. */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--nx-text-muted); margin-bottom: 20px; }
/* `Inicio` tem 35px de largura de texto: sem `min-width` o alvo de toque fica
   abaixo dos 44px em um dos eixos, e no celular a pessoa erra o unico link que
   volta para a home. O `margin-inline` negativo devolve o alinhamento otico. */
.crumb a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding-inline: 4px; margin-inline: -4px;
  text-decoration: none; color: var(--nx-text-muted);
}
.crumb a:hover { color: var(--nx-text); }

.doc-hero { padding-block: 44px 8px; }
.doc-hero .lead { margin-top: 20px; }
@media (min-width: 768px) { .doc-hero { padding-block: 64px 0; } }
@media (min-width: 1025px) { .doc-hero { padding-block: 88px 0; } }

/* ---------- Marquee (faixa de capacidades, nao de logos alheios) ---------- */
/* O JS duplica a faixa; o gap de 40px aqui e o mesmo `- 40px` do keyframe
   `nx-marquee`, e e o que faz a emenda entre as duas copias sumir. */
.strip {
  border-block: 1px solid var(--nx-line);
  padding-block: 18px; overflow: hidden;
  display: flex; gap: 40px;
}
.strip__track {
  display: flex; gap: 40px; width: max-content; flex: none;
  animation: nx-marquee 32s linear infinite;
}
.strip:hover .strip__track { animation-play-state: paused; }
.strip__item {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500; color: var(--nx-text-muted); white-space: nowrap;
}
.strip__item::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--nx-primary);
}

/* ---------- Perguntas ---------- */
/* <details>/<summary> nativo: abre sem JS, o Ctrl+F do navegador encontra o texto
   fechado e o leitor de tela anuncia o estado sozinho. Acordeão em JS custa tudo
   isso para ganhar uma animação. */
.faq { display: grid; gap: 12px; max-width: 980px; }
.faq__item {
  border: 1px solid var(--nx-line); border-radius: var(--nx-radius-lg);
  padding: 4px 20px;
  transition: border-color .2s var(--nx-ease);
}
.faq__item[open] { border-color: var(--nx-primary); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px;                 /* alvo de toque largo: a linha inteira abre */
  padding-block: 14px; cursor: pointer;
  font-weight: 600; font-size: 16px; line-height: 1.35;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
/* A pergunta é <h3> dentro do <summary>: mantém a escada de títulos (h1 → h2 →
   h3) e deixa o Google casar cada pergunta do FAQPage com o texto visível. O
   estilo continua sendo o do summary. */
.faq__item summary h3 { font: inherit; color: inherit; }
.faq__item summary::after {
  content: "+"; flex: none;
  font-family: var(--nx-font-body); font-weight: 400; font-size: 22px;
  color: var(--nx-text-muted); line-height: 1;
  transition: transform .25s var(--nx-ease);
}
.faq__item[open] summary::after { content: "−"; }
.faq__item p {
  padding-bottom: 18px; max-width: 62ch;
  font-size: 15px; color: var(--nx-text-muted);
}

/* ---------- CTA final ---------- */
.cta { text-align: left; }
.cta .lead { margin-top: 18px; }
.cta__box {
  margin-top: 32px; padding: 24px; border-radius: var(--nx-radius-lg);
  border: 1px dashed var(--nx-line);
}
.cta__box .small { color: var(--nx-text-muted); }

/* ---------- Footer ---------- */
.site-footer { padding-block: 44px; border-top: 1px solid var(--nx-line); }
.site-footer__inner { display: grid; gap: 28px; }
.site-footer .small { max-width: 46ch; }
.footer-nav { display: grid; gap: 2px; }
/* Link de rodapé com 22px de altura é alvo de toque ruim: no celular a pessoa
   erra e volta. `min-height: 44px` alinhado à esquerda resolve sem parecer botão. */
.footer-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; font-size: 15px; color: var(--nx-text-muted);
}
.footer-nav a:hover { color: var(--nx-text); }

/* ==========================================================================
   Tablet, 768px
   ========================================================================== */
@media (min-width: 768px) {
  :root { --nx-gutter: 40px; --nx-section-y: 96px; }

  .btn-row { flex-direction: row; }
  .btn--block { width: auto; }

  .hero { padding-block: 72px 0; }
  .hero__proof { grid-template-columns: repeat(3, 1fr); gap: 24px; }

  .axis-item { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
  .axis-item--flip .axis-item__body { order: 2; }

  .agents { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .limits { grid-template-columns: repeat(2, 1fr); }
  .site-footer__inner { grid-template-columns: 1.4fr 1fr; }
  /* Fluxo em COLUNA com as LINHAS declaradas, nao as colunas. Com
     `grid-template-columns: repeat(2, auto)` a grade tinha duas colunas fixas e
     o sexto link (`Seguranca e isolamento`) espremia as duas ate "O que so ele
     faz" quebrar em cinco linhas de uma palavra. Declarando 3 linhas e deixando
     as colunas em `max-content`, a grade cresce para o lado conforme os itens
     entram e nenhum rotulo quebra. */
  .footer-nav {
    grid-auto-flow: column;
    grid-template-rows: repeat(3, auto);
    grid-auto-columns: max-content;
    justify-content: end; gap: 4px 48px;
  }
}

/* ==========================================================================
   Desktop, 1025px
   ========================================================================== */
@media (min-width: 1025px) {
  :root { --nx-gutter: 64px; --nx-section-y: 128px; }

  .nav { display: block; }
  .site-header__inner { min-height: 76px; }

  .h1 { font-size: clamp(56px, 5.4vw, 78px); line-height: .9; letter-spacing: -.04em; }
  .h2 { font-size: clamp(42px, 3.8vw, 54px); line-height: .9; letter-spacing: -.04em; }
  .lead { font-size: 18px; }

  .hero { padding-block: 96px 0; }
  .hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 72px; align-items: center; }
  .hero__art { margin-top: 0; }
  .hero__proof { margin-top: 56px; }

  .axis { gap: 96px; }
  .axis-item { gap: 80px; }
  .agents { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .limits { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   Reduced motion, o kit desliga tudo; a pagina obedece e continua legivel.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .strip__track { animation: none; }
  .btn:hover, .agent-card:hover { transform: none; }
  .hero-in, .hero-in--lcp { animation: none; }
}
