:root {
  --azul: #1f3864; --azul-claro: #e8edf6; --vermelho: #b23a2d; --vermelho-fundo: #fbecea;
  --ambar: #a86a0c; --ambar-fundo: #fdf3e1; --cinza: #6e7582; --linha: #e3e6ec;
  --fundo: #f6f7f9; --texto: #1d2129; --verde: #2d7a46; --verde-fundo: #e9f5ed;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--fundo); color: var(--texto); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--azul); }
code { font: 0.92em ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--azul-claro); padding: 1px 5px; border-radius: 4px; }
.partir { word-break: break-all; }
.caixa { max-width: 820px; margin: 0 auto; padding: 0 16px; }
main.caixa { padding-top: 28px; padding-bottom: 56px; flex: 1; width: 100%; }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.topo { background: #fff; border-bottom: 1px solid var(--linha); }
.topo-dentro { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.marca { display: inline-flex; align-items: center; gap: 10px; color: var(--azul); text-decoration: none; }
.marca .logo-marca { width: 28px; height: 28px; flex: none; }
.marca .wm { font-weight: 700; font-size: 1.28rem; letter-spacing: -0.02em; }
.topo nav a { color: var(--cinza); text-decoration: none; font-size: 0.95rem; }
.topo nav a:hover { color: var(--azul); }
.rodape { border-top: 1px solid var(--linha); color: var(--cinza); font-size: 0.85rem; padding: 18px 0 28px; background: #fff; }
.rodape a { color: var(--cinza); }

h1 { font-size: 1.9rem; line-height: 1.2; margin: 6px 0 14px; letter-spacing: -0.02em; color: var(--azul); }
h2 { font-size: 1.15rem; margin: 26px 0 10px; color: var(--azul); }
h3 { font-size: 1rem; margin: 6px 0 4px; }
.sobretitulo { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--cinza); margin: 0; font-weight: 600; }
.lead { font-size: 1.1rem; color: #3b4150; margin: 0 0 18px; }
.nota { color: var(--cinza); font-size: 0.9rem; }
.forte { font-weight: 600; }

.heroi { padding: 26px 0 8px; }
.heroi h1 { font-size: 2.15rem; max-width: 720px; }
.pesquisa { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 6px; }
.pesquisa input { flex: 1 1 260px; }
input[type=text], input:not([type]), input[type=email], input[type=date], input[type=file] {
  font: inherit; padding: 11px 13px; border: 1px solid #c9ced8; border-radius: 8px; background: #fff; min-width: 0; width: 100%;
}
.pesquisa input { width: auto; }
input:focus { outline: 2px solid var(--azul); outline-offset: 1px; border-color: var(--azul); }
button, .botao {
  font: inherit; font-weight: 600; display: inline-block; padding: 11px 18px; border-radius: 8px; border: 0; cursor: pointer;
  background: var(--azul); color: #fff; text-decoration: none; line-height: 1.3;
}
button:hover, .botao:hover { background: #16294b; }
.botao.secundario { background: #fff; color: var(--azul); border: 1px solid var(--azul); }
.botao.secundario:hover { background: var(--azul-claro); }
button.copiar { padding: 4px 10px; font-size: 0.8rem; background: var(--azul-claro); color: var(--azul); }
button.ligacao { background: none; color: var(--vermelho); padding: 0; font-weight: 500; text-decoration: underline; font-size: 0.9rem; }

.passos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 30px; }
.passo { background: #fff; border: 1px solid var(--linha); border-radius: 12px; padding: 18px; }
.passo p { margin: 4px 0 0; color: #3b4150; font-size: 0.95rem; }
.num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--azul); color: #fff; font-size: 0.85rem; font-weight: 700; margin-right: 6px; vertical-align: 2px; }

.cartao { background: #fff; border: 1px solid var(--linha); border-radius: 12px; padding: 18px 20px; margin: 16px 0; }
.cartao h2 { margin-top: 2px; }
.chamada { border-color: var(--azul); background: linear-gradient(180deg, #fff, var(--azul-claro)); }
.etapa.feita { border-color: var(--verde); }
.etapa.feita .num { background: var(--verde); }
.etapa.bloqueada { opacity: 0.6; }

.aviso { padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.aviso.erro { background: var(--vermelho-fundo); color: var(--vermelho); }
.aviso.ok { background: var(--verde-fundo); color: var(--verde); }
.aviso.info { background: var(--azul-claro); color: var(--azul); }

.numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.numero { background: #fff; border: 1px solid var(--linha); border-radius: 12px; padding: 14px 16px; }
.numero .valor { display: block; font-size: 2.1rem; font-weight: 700; line-height: 1.1; color: var(--azul); }
.numero .rotulo { color: var(--cinza); font-size: 0.88rem; }
.numero.alta .valor { color: var(--vermelho); }
.numero.media .valor { color: var(--ambar); }
.numero.baixa .valor { color: var(--cinza); }

.etiquetas { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.etiquetas li { background: #fff; border: 1px solid var(--linha); border-radius: 999px; padding: 4px 12px; font-size: 0.9rem; }
.chip { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: #fff; border-radius: 5px; padding: 2px 8px; }
.chip.alta { background: var(--vermelho); }
.chip.media { background: var(--ambar); }
.chip.baixa { background: var(--cinza); }

.espera { display: flex; gap: 16px; align-items: center; }
.espera p { margin: 0; }
.roda { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--azul-claro); border-top-color: var(--azul);
  animation: roda 0.9s linear infinite; }
@keyframes roda { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .roda { animation: none; } }

.formulario label { display: block; font-weight: 600; font-size: 0.93rem; margin: 14px 0 6px; }
.formulario .caixa-sel { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.formulario button { margin-top: 16px; }
table.registo { border-collapse: collapse; margin: 10px 0; width: 100%; }
table.registo th { text-align: left; color: var(--cinza); font-weight: 600; padding: 7px 12px 7px 0; width: 70px; vertical-align: top; }
table.registo td { padding: 7px 8px 7px 0; vertical-align: top; }
.analise { border-top: 1px solid var(--linha); padding-top: 12px; margin-top: 16px; }
.descargas { display: flex; flex-wrap: wrap; gap: 8px; }
.termos li { margin-bottom: 10px; }

/* ============================================================
   Refinamentos globais + landing (redesenho)
   ============================================================ */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
::selection { background: var(--azul); color: #fff; }
::-moz-selection { background: var(--azul); color: #fff; }
input, textarea { caret-color: var(--azul); }
::placeholder { color: #8c95a8; opacity: 1; }
a { text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
html { scrollbar-width: thin; scrollbar-color: #c3cad7 transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #c3cad7; border-radius: 999px; border: 3px solid var(--fundo); }
::-webkit-scrollbar-thumb:hover { background: #a9b2c2; }
.ico { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Hero (banda escura) */
.heroi { margin: -28px calc(50% - 50vw) 0; padding: 58px 0 54px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1.4px) 0 0 / 24px 24px,
              linear-gradient(158deg, #21406f, #15274a); }
.heroi-dentro { max-width: 820px; margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }
.heroi-sonar { position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: 300px; height: 300px; color: #fff; opacity: .13; z-index: 0; pointer-events: none; }
@media (max-width: 620px) { .heroi-sonar { display: none; } }
.heroi h1 { color: #fff; font-size: clamp(2rem, 1.25rem + 2.8vw, 2.8rem); line-height: 1.12;
  letter-spacing: -0.028em; max-width: 660px; text-wrap: balance; margin: 0 0 16px; }
.heroi .lead { font-size: 1.12rem; line-height: 1.5; max-width: 54ch; color: #c4d2ea; margin: 0 0 24px; }
.heroi .pesquisa { gap: 10px; margin: 0 0 16px; max-width: 580px; }
.heroi .pesquisa input { font-size: 1.05rem; padding: 14px 16px; border-color: transparent;
  box-shadow: 0 8px 22px -10px rgba(0,0,0,.45); }
.heroi .pesquisa input:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 4px rgba(255,255,255,.22); }
.heroi .pesquisa button { padding: 14px 22px; font-size: 1.02rem; background: var(--ambar); }
.heroi .pesquisa button:hover { background: #8d590a; }
.confianca { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px;
  padding: 0; margin: 0 0 14px; font-size: 0.92rem; color: #aebcd6; }
.confianca li { display: flex; align-items: center; gap: 7px; }
.confianca .ico { color: #86d7a5; width: 1.05em; height: 1.05em; }
.heroi .nota { max-width: 56ch; color: #93a2c2; }

/* Secções */
.encontramos, .fluxo, .entregavel { margin-top: 52px; }
.encontramos h2, .fluxo h2, .entregavel h2 { color: var(--azul);
  font-size: 1.4rem; letter-spacing: -0.02em; text-wrap: balance; }
.encontramos h2 { max-width: 30ch; }

/* O que encontramos */
.achados { list-style: none; padding: 0; margin: 20px 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 28px; }
.achados li { display: flex; gap: 11px; }
.achados .ico { color: var(--ambar); width: 1.15em; height: 1.15em; margin-top: 3px; }
.achados h3 { margin: 0 0 2px; font-size: 0.98rem; color: var(--azul); }
.achados p { margin: 0; font-size: 0.92rem; color: #4a5160; line-height: 1.45; }
.achados code { font-size: 0.85em; }

/* Fluxo: prévia -> prova -> relatório */
.fluxo h2 { margin-bottom: 26px; max-width: 22ch; }
.etapas { list-style: none; padding: 0; margin: 0; position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
.etapas::before { content: ""; position: absolute; top: 17px; left: 17px; right: 17px;
  height: 2px; background: var(--linha); }
.etapas li { position: relative; }
.etapas li:nth-child(2) { text-align: center; }
.etapas li:nth-child(3) { text-align: right; }
.passo-num { position: relative; display: inline-flex; width: 34px; height: 34px; border-radius: 50%;
  align-items: center; justify-content: center; font-weight: 700; font-size: 0.95rem;
  background: var(--azul); color: #fff; margin-bottom: 14px; }
.etapas h3 { margin: 0 0 4px; color: var(--azul); font-size: 1rem; }
.etapas p { margin: 0; font-size: 0.92rem; color: #4a5160; line-height: 1.45; }

/* Entregável + mock do relatório */
.entregavel { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.entregavel h2 { margin: 0 0 10px; max-width: 30ch; }
.entregavel-txt p { margin: 0 0 16px; color: #3b4150; }
.formatos { display: flex; flex-wrap: wrap; gap: 8px; }
.formatos span { font-size: 0.8rem; font-weight: 600; color: var(--azul);
  background: var(--azul-claro); border-radius: 6px; padding: 4px 10px; }
.relatorio { margin: 0; }
.relatorio .ampliar { display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: 10px; }
.relatorio .ampliar:hover { background: none; }
.relatorio .ampliar:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; }
.relatorio img { display: block; width: 100%; height: auto; }
.relatorio figcaption { margin-top: 8px; text-align: center; }

.lightbox { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(13, 22, 41, .74); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1100px, 96vw); max-height: 92vh; width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
.lightbox-fechar { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; padding: 0;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .16); color: #fff; }
.lightbox-fechar:hover { background: rgba(255, 255, 255, .28); }
.lightbox-fechar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Um momento de entrada */
@media (prefers-reduced-motion: no-preference) {
  .heroi-dentro > * { animation: surgir .5s cubic-bezier(.22,.61,.36,1) backwards; }
  .heroi-dentro > *:nth-child(2) { animation-delay: .04s; }
  .heroi-dentro > *:nth-child(3) { animation-delay: .08s; }
  .heroi-dentro > *:nth-child(n+4) { animation-delay: .12s; }
  @keyframes surgir { from { opacity: 0; transform: translateY(8px); } }
}

@media (max-width: 560px) {
  h1, .heroi h1 { font-size: 1.7rem; }
  .pesquisa button, .heroi .pesquisa button { width: 100%; }
  .etapas { grid-template-columns: 1fr; gap: 18px; }
  .etapas::before { display: none; }
  .etapas li, .etapas li:nth-child(2), .etapas li:nth-child(3) { text-align: left; }
  .passo-num { margin-bottom: 8px; }
  .entregavel { grid-template-columns: 1fr; }
}
