/* ---------------------------------------------------------------------------
   ZaIA — estilos compartilhados entre a landing e as páginas legais.
   Cores e tipografia vêm do design system do app, para o site e o produto
   parecerem a mesma coisa.
   --------------------------------------------------------------------------- */

:root {
  --bg: #0c0c14;
  --surface: #16161f;
  --surface-2: #1e1e2e;
  --input-bg: #1a1a28;
  --border: #2d2d44;
  --divider: #1e1e2e;

  --accent: #8b5cf6;
  --accent-strong: #7c3aed;
  --accent-soft: #a78bfa;
  --mint: #3fbfae;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;

  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --faint: #64748b;

  --max: 1120px;
  --radius: 20px;
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── Marca ──────────────────────────────────────────────────────────────── */
.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}
.marca-simbolo {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--mint));
  flex-shrink: 0;
}

/* ── Botões ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  text-align: center;
}
.btn-primario {
  background: var(--accent-strong);
  color: #fff;
}
.btn-primario:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.35);
}
.btn-contorno {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-contorno:hover { border-color: var(--accent-soft); color: var(--accent-soft); }
.btn-verde { background: #059669; color: #fff; }
.btn-verde:hover { background: #10b981; transform: translateY(-1px); }

/* ── Cabeçalho ──────────────────────────────────────────────────────────── */
header.topo {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 12, 20, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
header.topo .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
header.topo nav { display: flex; align-items: center; gap: 28px; }
header.topo nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}
header.topo nav a:hover { color: var(--text); }
header.topo .btn { padding: 10px 20px; font-size: 0.9rem; }

/* ── Seções ─────────────────────────────────────────────────────────────── */
section { padding: 96px 0; }

.rotulo {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 14px;
}
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.15; }
h2.titulo {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}
p.subtitulo {
  color: var(--muted);
  font-size: 1.03rem;
  max-width: 580px;
  line-height: 1.72;
}
.centro { text-align: center; }
.centro p.subtitulo { margin-left: auto; margin-right: auto; }

/* ── Aparelho (mockup) ──────────────────────────────────────────────────── */
.aparelho {
  position: relative;
  width: 268px;
  flex-shrink: 0;
  border-radius: 38px;
  padding: 10px;
  background: linear-gradient(160deg, #2b2b3d, #14141d);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.aparelho img { border-radius: 29px; }
.aparelho::after {
  content: '';
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 84px; height: 22px;
  background: #0c0c14;
  border-radius: 0 0 14px 14px;
}

/* ── Rodapé ─────────────────────────────────────────────────────────────── */
footer.rodape {
  border-top: 1px solid var(--divider);
  padding: 56px 0 44px;
}
footer.rodape .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.rodape-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
}
.rodape-links a { color: var(--muted); font-size: 0.9rem; }
.rodape-links a:hover { color: var(--text); }
.rodape-legal {
  color: var(--faint);
  font-size: 0.8rem;
  line-height: 1.7;
  max-width: 620px;
}

/* ── Aviso de segurança ─────────────────────────────────────────────────── */
.aviso-crise {
  background: rgba(248, 113, 113, 0.07);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.aviso-crise strong { color: var(--red); display: block; margin-bottom: 4px; }
.aviso-crise p { color: var(--text-2); font-size: 0.92rem; line-height: 1.6; }

/* ── Páginas legais ─────────────────────────────────────────────────────── */
.legal { max-width: 760px; padding: 56px 24px 96px; margin: 0 auto; }
.legal h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.legal .atualizado { color: var(--muted); font-size: 0.88rem; margin-bottom: 40px; }
.legal h2 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--accent-soft);
  margin: 36px 0 12px;
}
.legal p { color: var(--text-2); font-size: 0.97rem; margin-bottom: 14px; }
.legal ul { margin: 0 0 16px 22px; }
.legal li { color: var(--text-2); font-size: 0.97rem; margin-bottom: 7px; }
.legal a { color: var(--accent-soft); text-decoration: underline; }
.legal .destaque {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 20px 0;
}
.legal .destaque p { margin: 0; }
.legal .alerta {
  background: rgba(248, 113, 113, 0.07);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 20px 0;
}
.legal .alerta p { margin: 0; color: var(--text); }
.legal .voltar {
  display: inline-block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
  text-decoration: none;
}
.legal .voltar:hover { color: var(--text); }

@media (max-width: 780px) {
  section { padding: 72px 0; }
  header.topo nav a { display: none; }
}

/* ---------------------------------------------------------------------------
   Aparelho desenhado em HTML
   
   As telas exportadas do Figma vinham com as bolhas do chat estourando a
   borda — defeito do próprio arquivo, que tem frames de 1077px dentro de uma
   tela de 393px. Refeitas aqui: nada corta, fica nítido em qualquer densidade
   de tela e dá para animar.
   --------------------------------------------------------------------------- */

.fone {
  position: relative;
  width: 300px;
  flex-shrink: 0;
  aspect-ratio: 300 / 620;
  border-radius: 44px;
  padding: 11px;
  background: linear-gradient(160deg, #33334a, #15151f);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.fone-tela {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
/* Ilha dinâmica */
.fone::after {
  content: '';
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 76px; height: 20px;
  background: #08080d;
  border-radius: 999px;
  z-index: 3;
}

.tela-topo {
  padding: 42px 16px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  text-align: center;
  flex-shrink: 0;
}
.tela-topo .titulo-app { font-size: 0.82rem; font-weight: 700; }
.tela-topo .estado {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.6rem; color: var(--muted); margin-top: 2px;
}
.tela-topo .estado i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green); display: inline-block;
}

/* ── Conversa ─────────────────────────────────────────────────────────── */
.conversa { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.balao-linha { display: flex; gap: 7px; align-items: flex-end; }
.balao-linha.minha { justify-content: flex-end; }
.avatar-ia {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--avatar-bg, #4c1d95);
  color: #ede9fe;
  font-size: 0.53rem; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
}
.balao {
  max-width: 74%;
  padding: 8px 11px;
  border-radius: 14px;
  font-size: 0.63rem;
  line-height: 1.5;
  /* quebra a palavra em vez de estourar a borda */
  overflow-wrap: anywhere;
}
.balao.dela { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.balao.minha { background: var(--accent-strong); color: #fff; }

.digitando { display: flex; gap: 4px; padding: 11px 13px; }
.digitando span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted);
  animation: pulsar 1.3s infinite ease-in-out;
}
.digitando span:nth-child(2) { animation-delay: 0.18s; }
.digitando span:nth-child(3) { animation-delay: 0.36s; }
@keyframes pulsar {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.tela-campo {
  padding: 10px 12px 18px;
  background: var(--surface);
  border-top: 1px solid var(--divider);
  display: flex; gap: 8px; align-items: center;
  flex-shrink: 0;
}
.tela-campo .campo {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 0.6rem;
  color: var(--muted);
}
.tela-campo .enviar {
  width: 27px; height: 27px; border-radius: 50%;
  background: var(--accent-strong);
  display: grid; place-items: center; flex-shrink: 0;
}

/* ── Minha evolução ───────────────────────────────────────────────────── */
.tela-rolagem { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 11px; overflow: hidden; }
.mini-chips { display: flex; gap: 5px; }
.mini-chip {
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.53rem; color: var(--muted); white-space: nowrap;
}
.mini-chip.ativo {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent);
  color: var(--accent-soft);
}
.mini-destaque {
  background: var(--surface);
  border: 1.5px solid var(--green);
  border-radius: 11px;
  padding: 10px 11px;
}
.mini-destaque strong { color: var(--green); font-size: 0.63rem; display: block; margin-bottom: 4px; }
.mini-destaque p { color: var(--text-2); font-size: 0.56rem; line-height: 1.5; }
.mini-numeros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.mini-numero {
  background: var(--surface);
  border-radius: 9px;
  padding: 8px 3px;
  text-align: center;
}
.mini-numero b { display: block; font-size: 0.78rem; font-weight: 800; }
.mini-numero span { font-size: 0.45rem; color: var(--muted); }
.mini-numero.forte { border: 1px solid rgba(139, 92, 246, 0.45); }
.mini-numero.forte b { color: var(--accent-soft); }
.mini-secao { font-size: 0.48rem; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); }
.mini-grafico { background: var(--surface); border-radius: 11px; padding: 10px; }
.mini-grafico svg { width: 100%; height: auto; display: block; }

/* A linha se desenha quando a seção entra na tela */
.linha-grafico {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
}
.visivel .linha-grafico { animation: desenhar 1.6s 0.3s ease-out forwards; }
@keyframes desenhar { to { stroke-dashoffset: 0; } }
.ponto-grafico { opacity: 0; }
.visivel .ponto-grafico { animation: aparecer 0.4s ease-out forwards; }
.visivel .ponto-grafico:nth-of-type(1) { animation-delay: 0.6s; }
.visivel .ponto-grafico:nth-of-type(2) { animation-delay: 0.8s; }
.visivel .ponto-grafico:nth-of-type(3) { animation-delay: 1.0s; }
.visivel .ponto-grafico:nth-of-type(4) { animation-delay: 1.2s; }
.visivel .ponto-grafico:nth-of-type(5) { animation-delay: 1.4s; }
@keyframes aparecer { to { opacity: 1; } }

/* ---------------------------------------------------------------------------
   Entrada por rolagem
   --------------------------------------------------------------------------- */
.revelar {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.revelar.visivel { opacity: 1; transform: none; }
.revelar[data-atraso="1"] { transition-delay: 0.09s; }
.revelar[data-atraso="2"] { transition-delay: 0.18s; }
.revelar[data-atraso="3"] { transition-delay: 0.27s; }
.revelar[data-atraso="4"] { transition-delay: 0.36s; }
.revelar[data-atraso="5"] { transition-delay: 0.45s; }

/* As mensagens entram uma a uma, como numa conversa de verdade */
.conversa .balao-linha { opacity: 0; transform: translateY(10px); }
.visivel .balao-linha { animation: entrar-balao 0.5s ease-out forwards; }
.visivel .balao-linha:nth-child(1) { animation-delay: 0.35s; }
.visivel .balao-linha:nth-child(2) { animation-delay: 0.95s; }
.visivel .balao-linha:nth-child(3) { animation-delay: 1.55s; }
.visivel .balao-linha:nth-child(4) { animation-delay: 2.1s; }
@keyframes entrar-balao { to { opacity: 1; transform: none; } }

/* Quem pediu menos movimento não recebe movimento nenhum */
@media (prefers-reduced-motion: reduce) {
  .revelar, .revelar.visivel { opacity: 1; transform: none; transition: none; }
  .conversa .balao-linha, .visivel .balao-linha { opacity: 1; transform: none; animation: none; }
  .linha-grafico { stroke-dashoffset: 0; }
  .visivel .linha-grafico, .visivel .ponto-grafico { animation: none; }
  .ponto-grafico { opacity: 1; }
  .digitando span { animation: none; opacity: 0.6; }
  html { scroll-behavior: auto; }
}

@media (max-width: 900px) {
  .fone { width: 268px; }
}
