/* Vértice CRM — site. Mesmas cores e fonte da plataforma (plataforma-crm/DESIGN.md, "Anel de espera"). */
@font-face {
  font-family: "Figtree";
  src: url("/fontes/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --ground: #f6f6f8;
  --surface: #ffffff;
  --ink: #16161c;
  --ink-strong: #0b0b0f;
  --muted: #5d5d68;
  --wash: #f1f1f4;
  --line: #e7e7ec;
  --ia-ink: #6d28d9;
  --ia-wash: #f0eaff;
  --ring-ok: #10b981;
  --ring-half: #f59e0b;
  --ring-over: #ef4444;
  --ring-empty: #e7e7ec;
  --on-strong: #ffffff;
  --radius: 16px;
  --wrap: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0e0e12;
    --surface: #17171d;
    --ink: #ececf1;
    --ink-strong: #f6f6f8;
    --muted: #a1a1ab;
    --wash: #1f1f26;
    --line: #2a2a33;
    --ia-ink: #b9a2ff;
    --ia-wash: #261d42;
    --ring-empty: #2a2a33;
    --on-strong: #0b0b0f;
  }
}

*, *::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(--ground);
  color: var(--ink);
  font: 400 16px/1.6 "Figtree", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, svg { display: block; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

.pular {
  position: absolute; left: 16px; top: -48px;
  background: var(--ink-strong); color: var(--on-strong);
  padding: 8px 12px; border-radius: 10px; z-index: 10;
}
.pular:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--ia-ink); outline-offset: 3px; border-radius: 6px; }

/* Topo */
.topo { border-bottom: 1px solid var(--line); background: var(--ground); }
.topo .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.marca svg { width: 26px; height: 26px; }
.topo nav { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 500; }
.topo nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.topo nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 640px) { .topo nav a:not(.btn) { display: none; } }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 12px;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none;
  transition: transform 160ms cubic-bezier(.2, .8, .2, 1), background-color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-forte { background: var(--ink-strong); color: var(--on-strong); }
.btn-forte:hover { background: color-mix(in srgb, var(--ink-strong) 86%, var(--ground)); }
.btn-leve { background: var(--wash); color: var(--ink); }
.btn-leve:hover { background: var(--line); }
.topo .btn { min-height: 38px; padding: 0 16px; font-size: 14px; }

/* Abertura */
.abertura { padding: 72px 0 88px; }
.abertura .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
h1 {
  font-size: clamp(36px, 5.2vw, 58px); line-height: 1.04; letter-spacing: -0.035em;
  font-weight: 700; margin: 0 0 20px; text-wrap: balance; color: var(--ink-strong);
}
.lide { font-size: 19px; color: var(--muted); margin: 0 0 32px; max-width: 34em; text-wrap: pretty; }
.acoes { display: flex; flex-wrap: wrap; gap: 12px; }
.nota { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
@media (max-width: 880px) {
  .abertura { padding: 48px 0 64px; }
  .abertura .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

/* Amostra da caixa de conversas */
.caixa {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 8px; box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 24px 48px -24px rgb(0 0 0 / .18);
}
.caixa-topo { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 10px; font-size: 14px; font-weight: 600; }
.caixa-topo span { font-size: 12px; font-weight: 600; color: var(--muted); }
.conversa { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; }
.conversa + .conversa { border-top: 1px solid var(--line); }
.conversa.sel { background: var(--wash); border-top-color: transparent; }
.conversa.sel + .conversa { border-top-color: transparent; }
.conversa b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.conversa p { margin: 2px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversa time { white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--muted); align-self: start; padding-top: 2px; }
.conversa time.estourou { color: #fff; background: #dc2626; border-radius: 999px; padding: 1px 8px; }
.selo-ia { color: var(--ia-ink); font-weight: 600; }

.anel {
  --p: 0; --cor: var(--ring-ok);
  width: 44px; height: 44px; border-radius: 50%; padding: 3px;
  background: conic-gradient(var(--cor) calc(var(--p) * 1%), var(--ring-empty) 0);
  display: grid; place-items: center;
}
.anel span {
  width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--surface);
  background: var(--wash); display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: var(--muted);
}
.anel.meio { --cor: var(--ring-half); }
.anel.cheio { --cor: var(--ring-over); --p: 100; }
.anel.vazio { --p: 0; }

@media (prefers-reduced-motion: no-preference) {
  @property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
  .caixa .anel:not(.cheio):not(.vazio) { animation: encher 1.2s cubic-bezier(.2, .8, .2, 1) both; animation-delay: 300ms; }
  @keyframes encher { from { --p: 0; } }
}

.legenda { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 4px 0; font-size: 13px; color: var(--muted); }
.legenda i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* Seções */
section { padding: 88px 0; }
.faixa { background: var(--surface); border-block: 1px solid var(--line); }
h2 {
  font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700;
  margin: 0 0 16px; max-width: 20em; text-wrap: balance; color: var(--ink-strong);
}
.sub { font-size: 18px; color: var(--muted); margin: 0 0 48px; max-width: 38em; text-wrap: pretty; }
@media (max-width: 640px) { section { padding: 64px 0; } .sub { margin-bottom: 36px; } }

/* Caminho do paciente */
.passos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: passo; }
.passos li { counter-increment: passo; border-top: 2px solid var(--ink-strong); padding-top: 18px; }
.passos li::before { content: counter(passo, decimal-leading-zero); display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.passos h3 { font-size: 18px; line-height: 1.3; margin: 0 0 8px; letter-spacing: -0.01em; }
.passos p { margin: 0; color: var(--muted); font-size: 15px; }
.passos li:nth-child(2) { border-top-color: var(--ia-ink); }
@media (max-width: 880px) { .passos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .passos { grid-template-columns: 1fr; gap: 28px; } }

/* Equipe de IA */
.agentes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.agente {
  flex: 1 1 300px; max-width: calc((100% - 32px) / 3);
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: var(--ia-wash); color: var(--ia-ink);
  font-size: 19px; font-weight: 700; letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ia-ink) 28%, transparent);
}
.avatar::after {
  content: "IA"; position: absolute; right: -6px; bottom: -4px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; line-height: 1;
  padding: 3px 5px; border-radius: 999px;
  background: var(--ia-ink); color: var(--surface); border: 2px solid var(--surface);
}
.agente h3 { font-size: 18px; line-height: 1.3; margin: 2px 0 6px; letter-spacing: -0.01em; }
.agente h3 span { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.agente p { margin: 0; color: var(--muted); font-size: 15px; text-wrap: pretty; }
@media (max-width: 1000px) { .agente { max-width: calc((100% - 16px) / 2); } }
@media (max-width: 660px) { .agente { max-width: 100%; } }
.agente .limite { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 500; }

/* Recursos */
.recursos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 48px; }
.recurso { padding: 24px 0; border-top: 1px solid var(--line); }
.recurso h3 { font-size: 17px; line-height: 1.35; margin: 0 0 6px; letter-spacing: -0.01em; }
.recurso p { text-wrap: pretty; margin: 0; color: var(--muted); font-size: 15px; }
.recurso .selo-ia { font-size: 12px; margin-left: 6px; letter-spacing: 0.02em; }
@media (max-width: 880px) { .recursos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .recursos { grid-template-columns: 1fr; } }

/* Origem e dados */
.dois { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.dois p { color: var(--muted); margin: 0 0 14px; max-width: 34em; }
.dois ul { margin: 0; padding-left: 20px; color: var(--muted); }
.dois li { margin-bottom: 8px; }
.dois h2 { font-size: clamp(24px, 3vw, 32px); }
@media (max-width: 880px) { .dois { grid-template-columns: 1fr; gap: 48px; } }

/* Fechamento */
.fecho { text-align: center; }
.fecho h2, .fecho .sub { margin-inline: auto; }
.fecho .sub { margin-bottom: 32px; }
.fecho .acoes { justify-content: center; }

/* Rodapé */
.rodape { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; color: var(--muted); }
.rodape .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.rodape nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.rodape a { text-decoration: none; }
.rodape a:hover { color: var(--ink); text-decoration: underline; }
.rodape p { margin: 0; }

/* Páginas de texto (privacidade, termos) */
.texto { padding: 56px 0 88px; }
.texto { font-size: 17px; }
.texto .wrap { max-width: 34em; }
.texto h1 { font-size: clamp(32px, 4.4vw, 44px); margin-bottom: 12px; }
.texto .data { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.texto h2 { font-size: 22px; letter-spacing: -0.015em; margin: 44px 0 12px; }
.texto h3 { font-size: 17px; margin: 28px 0 8px; }
.texto p, .texto li { color: var(--ink); text-wrap: pretty; }
.texto ul { padding-left: 22px; }
.texto li { margin-bottom: 8px; }
.texto .resumo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.texto .resumo p { margin: 0; }
.texto a { color: var(--ia-ink); }
