/* Paleta vinda de src/lib/tema/cores.dart */
:root {
  --azul: #00288E;
  --azul-2: #1565C0;
  --azul-claro: #DDE1FF;
  --laranja: #FD761A;
  --laranja-tinta: #5C2400;
  --laranja-texto: #9D4300;
  --fundo: #F8F9FF;
  --superficie: #FFFFFF;
  --superficie-2: #EFF4FF;
  --superficie-3: #E5EEFF;
  --tinta: #0B1C30;
  --tinta-2: #444653;
  --contorno: #C4C5D5;
  --concluida: #126B33;
  --sombra: 0 8px 24px rgb(0 40 142 / 0.10), 0 2px 8px rgb(0 0 0 / 0.05);
  --sombra-alta: 0 24px 48px -12px rgb(0 18 70 / 0.45), 0 4px 12px rgb(0 18 70 / 0.18);
  --hero: linear-gradient(160deg, #00288E 0%, #0B3FA8 55%, #1565C0 100%);
  --raio: 16px;
  --largura: 1160px;
  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --azul: #8AA6FF;
    --azul-claro: #142759;
    --laranja-texto: #FFB68C;
    --fundo: #0E1420;
    --superficie: #171D2C;
    --superficie-2: #1B2233;
    --superficie-3: #262D40;
    --tinta: #DCE2F9;
    --tinta-2: #B8BDD4;
    --contorno: #454C5F;
    --concluida: #4ADE80;
    --sombra: 0 8px 24px rgb(0 0 0 / 0.35), 0 2px 8px rgb(0 0 0 / 0.25);
    --hero: linear-gradient(160deg, #0A1A52 0%, #102A6E 55%, #123F86 100%);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--fundo);
  color: var(--tinta);
  font: 400 1.0625rem/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-optical-sizing: auto;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
svg { width: 1em; height: 1em; flex: none; }
code { font: 500 0.92em ui-monospace, "Cascadia Mono", Menlo, monospace; }

::selection { background: var(--laranja); color: var(--laranja-tinta); }

a { color: var(--azul); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.pular {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--superficie); color: var(--tinta);
  padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.pular:focus { top: 16px; }

.largura {
  width: 100%;
  max-width: var(--largura);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ───────── Topo / hero ───────── */

/* O azul ocupa a primeira tela inteira; o resto só aparece ao rolar */
.topo {
  display: flex; flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--hero);
  color: #fff;
  padding-top: env(safe-area-inset-top);
  overflow: hidden;
}

.topo-barra {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: var(--largura); margin-inline: auto;
  padding: 14px var(--gutter);
}

.marca {
  display: inline-flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none;
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em;
}
.marca img { border-radius: 9px; }

.topo-baixar {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  border: 1px solid rgb(255 255 255 / 0.45); border-radius: 999px;
  color: #fff; text-decoration: none; font-weight: 600; font-size: 0.9375rem;
  transition: background-color 160ms ease-out;
}
.topo-baixar:hover { background: rgb(255 255 255 / 0.12); }
.topo .marca:focus-visible, .topo-baixar:focus-visible { outline-color: #fff; }

.hero {
  flex: 1;
  width: 100%; max-width: var(--largura); margin-inline: auto;
  padding: 20px var(--gutter) 0;
  display: grid; gap: 40px;
  align-content: center; /* sobra de altura vai para fora, não entre texto e celular */
}

.hero h1 {
  font-size: clamp(2.125rem, 1.25rem + 4.2vw, 4.25rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 14ch;
}

.hero-sub {
  margin-top: 18px;
  max-width: 52ch;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: #DCE4FF;
}

.acao { margin-top: 28px; }

.botao-baixar {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  background: var(--laranja); color: var(--laranja-tinta);
  border-radius: 12px;
  font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 10px 22px -10px rgb(0 10 50 / 0.55);
  transition: transform 160ms ease-out, box-shadow 160ms ease-out, background-color 160ms ease-out;
  user-select: none;
  -webkit-user-select: none;
}
.botao-baixar svg { width: 1.3em; height: 1.3em; }
.botao-baixar:hover { background: #FF8A3A; box-shadow: 0 14px 26px -10px rgb(0 10 50 / 0.6); text-decoration: none; }
.botao-baixar:active { transform: scale(0.98); }
.topo .botao-baixar:focus-visible { outline-color: #fff; }

.acao-info, .download-info {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 14px;
  font-size: 0.9375rem; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.acao-info { color: #fff; }

.selo-beta {
  display: inline-block;
  padding: 2px 9px; border-radius: 999px;
  background: var(--laranja); color: var(--laranja-tinta);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
}

.acao-nota { margin-top: 6px; font-size: 0.9375rem; color: #C7D3FF; }
.acao-nota a { color: #fff; font-weight: 600; }
.acao-nota a:focus-visible { outline-color: #fff; }

/* Moldura de celular: o print entra por cima do aviso de "tela vazia" */
.celular {
  position: relative;
  width: min(280px, 72vw);
  border-radius: 40px;
  padding: 9px;
  background: #0B1C30;
  box-shadow: var(--sombra-alta), inset 0 0 0 1.5px #34445C;
}
.celular img {
  position: absolute; inset: 9px;
  width: calc(100% - 18px); height: calc(100% - 18px);
  object-fit: cover; object-position: top;
  border-radius: 31px;
  z-index: 1;
}
.tela-vazia {
  aspect-ratio: 738 / 1440;
  border-radius: 31px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px;
  padding: 34% 24px 24px; text-align: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgb(0 40 142 / 0.05) 14px 28px),
    #F2F5FF;
  outline: 2px dashed #9AAAD8; outline-offset: -12px;
  color: #445; font-size: 0.875rem; line-height: 1.4;
}
.tela-vazia strong { color: #00288E; font-size: 1rem; }
.tela-vazia code { margin-top: 8px; font-size: 0.75rem; color: #556; word-break: break-all; }

.hero-visual {
  position: relative;
  display: flex; justify-content: center; align-items: flex-start;
  padding-bottom: 40px;
}

.card-prestador {
  position: absolute;
  left: 50%; bottom: 40px;
  transform: translateX(-50%);
  z-index: 2;
  width: min(18.75rem, calc(100vw - 2 * var(--gutter)));
  padding: 16px;
  background: var(--superficie);
  color: var(--tinta);
  border-radius: var(--raio);
  box-shadow: var(--sombra-alta);
}
.cp-topo { display: flex; gap: 12px; align-items: center; }
.cp-avatar {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #00288E, #1565C0);
  color: #fff; font-weight: 600; font-size: 1.3rem;
}
.cp-nome { display: flex; align-items: center; gap: 5px; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.cp-selo { color: var(--azul); width: 18px; height: 18px; }
.chip {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--azul) 11%, transparent);
  color: var(--azul);
  font-size: 0.75rem; font-weight: 600; line-height: 1.6;
}
.cp-base {
  display: flex; align-items: end; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--contorno);
}
.cp-rotulo { display: block; font-size: 0.75rem; color: var(--tinta-2); }
.cp-preco { display: block; font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.cp-botao {
  padding: 9px 16px; border-radius: 8px;
  background: linear-gradient(90deg, #00288E, #1565C0); color: #fff;
  font-size: 0.875rem; font-weight: 600;
}
.cp-exemplo { margin-top: 10px; font-size: 0.75rem; color: var(--tinta-2); }

/* ───────── Seções ───────── */

.secao { padding: 72px 0; }

.secao h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 22ch;
}
.intro { margin-top: 14px; max-width: 58ch; color: var(--tinta-2); font-size: 1.125rem; }

/* Abas */
.abas {
  display: inline-flex; gap: 4px;
  margin-top: 32px; padding: 4px;
  background: var(--superficie-3);
  border-radius: 999px;
  max-width: 100%;
}
.abas button {
  appearance: none; border: 0; cursor: pointer;
  min-height: 44px; padding: 0 18px;
  border-radius: 999px;
  background: transparent; color: var(--tinta-2);
  font: inherit; font-size: 0.9375rem; font-weight: 600;
  transition: background-color 180ms ease-out, color 180ms ease-out;
}
.abas button[aria-selected="true"] { background: var(--superficie); color: var(--azul); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }

.painel {
  margin-top: 36px;
  display: grid; gap: 48px;
}
.painel[hidden] { display: none; }
.painel + .painel { margin-top: 56px; } /* sem JS os dois painéis aparecem */

.passos { counter-reset: passo; display: grid; gap: 28px; }
.passos > li {
  counter-increment: passo;
  position: relative;
  padding-left: 52px;
}
.passos > li::before {
  content: counter(passo);
  position: absolute; left: 0; top: -2px;
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--azul-claro); color: var(--azul);
  font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums;
}
.passos > li:not(:last-child)::after {
  content: "";
  position: absolute; left: 17px; top: 42px; bottom: -22px;
  width: 2px; background: var(--superficie-3);
}
.passos h3 { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
.passos p { margin-top: 6px; color: var(--tinta-2); max-width: 54ch; }

.celular-lateral { justify-self: center; }

/* Categorias */
.secao-categorias { background: var(--superficie-2); }
.fotos {
  margin-top: 32px;
  display: grid; gap: 12px;
}
.fotos li {
  position: relative; overflow: hidden;
  border-radius: var(--raio);
  aspect-ratio: 16 / 9;
  background: var(--superficie-3);
}
.fotos img, .fotos video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 600px) { .fotos { grid-template-columns: repeat(2, 1fr); } }
.fotos span {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 14px 12px;
  background: linear-gradient(to top, rgb(0 18 64 / 0.85), transparent);
  color: #fff; font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em;
}
.tambem {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 24px;
  color: var(--tinta-2); font-weight: 600;
}
.tambem .chip { margin: 0; padding: 6px 14px; font-size: 0.875rem; background: var(--superficie); box-shadow: inset 0 0 0 1px var(--contorno); }

/* Selo */
.secao-selo {
  background: var(--hero);
  color: #fff;
  overflow: hidden;
}
.secao-selo .intro { color: #DCE4FF; }
.selo-grade { display: grid; gap: 56px; }

.etapas { margin-top: 32px; display: grid; gap: 22px; }
.etapas div { padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 0.22); }
.etapas dt { font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.015em; }
.etapas dd { margin-top: 4px; color: #DCE4FF; max-width: 52ch; }

.selo-limite {
  margin-top: 32px; padding: 16px 18px;
  border-radius: 12px;
  background: rgb(0 10 50 / 0.28);
  color: #DCE4FF; font-size: 0.9375rem;
  max-width: 60ch;
}

.selo-visual { position: relative; display: flex; justify-content: center; padding-bottom: 150px; } /* checklist cobre só a base do print */

.checklist {
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: min(20rem, calc(100vw - 2 * var(--gutter)));
  z-index: 2;
  padding: 18px;
  background: var(--superficie); color: var(--tinta);
  border-radius: var(--raio);
  box-shadow: var(--sombra-alta);
}
.ck-titulo { font-weight: 700; font-size: 0.9375rem; }
.checklist ul { margin-top: 12px; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; line-height: 1.4; }
.ck-marca {
  display: grid; place-items: center; flex: none;
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--concluida); color: #fff;
  box-shadow: inset 0 0 0 2px var(--concluida);
}
@media (prefers-color-scheme: dark) { .ck-marca { color: #0E1420; } }
.ck-marca svg { width: 15px; height: 15px; }
.ck-status {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--contorno);
  color: var(--azul); font-weight: 700;
}
.ck-status svg { width: 22px; height: 22px; }

/* Momento de assinatura: o checklist é marcado item a item e o selo aparece.
   Estado padrão (sem JS ou com movimento reduzido) já é o final. */
.checklist.aguardando .ck-marca { background: transparent; color: transparent; box-shadow: inset 0 0 0 2px var(--contorno); }
.checklist.aguardando .ck-marca svg { transform: scale(0.4); }
.checklist.aguardando .ck-status { opacity: 0; transform: translateY(6px); }
.checklist.aguardando .ck-status svg { transform: scale(0.3) rotate(-25deg); }

.checklist .ck-marca { transition: background-color 220ms ease-out, box-shadow 220ms ease-out, color 220ms ease-out; }
.checklist .ck-marca svg { transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1); }
.checklist li:nth-child(2) .ck-marca, .checklist li:nth-child(2) .ck-marca svg { transition-delay: 380ms; }
.checklist li:nth-child(3) .ck-marca, .checklist li:nth-child(3) .ck-marca svg { transition-delay: 760ms; }
.checklist li:nth-child(4) .ck-marca, .checklist li:nth-child(4) .ck-marca svg { transition-delay: 1140ms; }
.checklist li:nth-child(5) .ck-marca, .checklist li:nth-child(5) .ck-marca svg { transition-delay: 1520ms; }
.checklist .ck-status { transition: opacity 300ms ease-out 1980ms, transform 420ms cubic-bezier(0.16, 1, 0.3, 1) 1980ms; }
.checklist .ck-status svg { transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1) 2030ms; }

/* Instalar */
.instalar-grade { display: grid; gap: 48px; }

.download {
  padding: 28px 20px;
  background: var(--superficie);
  border-radius: 20px;
  box-shadow: var(--sombra);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.download img { border-radius: 16px; }
.download h2 { margin-top: 18px; font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.25rem); }
.download-info { justify-content: center; color: var(--tinta-2); }
.download .botao-baixar { margin-top: 22px; width: 100%; max-width: 360px; }
.download-nota { margin-top: 16px; color: var(--tinta-2); font-size: 0.9375rem; max-width: 40ch; }

.porque {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--azul-claro);
  color: var(--tinta);
  font-weight: 500;
}
.passos-instalar { margin-top: 32px; }
.passos-instalar code { color: var(--tinta); background: var(--superficie-3); padding: 1px 6px; border-radius: 5px; }

/* FAQ */
.secao-faq { background: var(--superficie-2); }
.faq { max-width: 820px; }
.faq h2 { margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--contorno); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 60px; padding: 14px 0;
  font-weight: 650; font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none;
  width: 10px; height: 10px;
  border-right: 2px solid var(--azul); border-bottom: 2px solid var(--azul);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 200ms ease-out;
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.faq summary:hover { color: var(--azul); }
.faq details p { padding: 0 0 20px; color: var(--tinta-2); max-width: 66ch; }

/* Rodapé */
.rodape {
  padding: 56px 0 calc(40px + env(safe-area-inset-bottom));
  background: #0B1C30;
  color: #C9D2E6;
  font-size: 0.9375rem;
}
.rodape .marca { color: #fff; }
.rodape a { color: #fff; }
.rodape a:focus-visible { outline-color: var(--laranja); }
.rodape-grade { display: grid; gap: 40px; }
.rodape-beta { margin: 14px 0 10px; max-width: 42ch; }

/* ───────── Telas maiores ───────── */

@media (min-width: 560px) {
  .card-prestador { transform: translateX(-78%); }
  .checklist { transform: translateX(-20%); }
}

@media (min-width: 900px) {
  .topo-barra { padding-block: 20px; }
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding-top: 24px;
  }
  .hero-texto { padding-bottom: 64px; }
  .hero-visual { padding-block: 24px 48px; }
  .celular { width: clamp(300px, 20vw, 400px); }
  /* o celular do topo nunca passa da altura da janela (azul = 1 tela) */
  .hero-visual .celular { width: clamp(260px, min(20vw, (100svh - 190px) * 0.5), 400px); }
  .card-prestador { left: 0; bottom: 96px; transform: none; }
  .secao { padding: 104px 0; }

  .painel { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
  .celular-lateral { width: clamp(270px, 18vw, 360px); }

  .fotos { gap: 16px; }

  .selo-grade { grid-template-columns: 1fr auto; align-items: center; gap: 72px; }
  .selo-visual { padding: 0 120px 8px 0; }
  .checklist { left: auto; right: 0; bottom: 64px; transform: none; }

  .instalar-grade { grid-template-columns: 380px 1fr; align-items: start; gap: 72px; }
  .download { position: sticky; top: 32px; padding: 36px 28px; }

}

/* ───────── Entrada e revelação ─────────
   Só valem com a classe .anima (posta no <head> quando há IntersectionObserver
   e o usuário não pediu movimento reduzido). Sem ela, tudo aparece parado. */

:root { --sair: cubic-bezier(0.16, 1, 0.3, 1); }

@keyframes subir { from { opacity: 0; translate: 0 28px; } }
@keyframes surgir { from { opacity: 0; } }
@keyframes palavra { from { translate: 0 105%; } }
@keyframes card { from { opacity: 0; translate: 0 32px; scale: 0.94; } }
@keyframes cutucar { 0%, 100% { translate: 0 0; } 30% { translate: 0 4px; } 60% { translate: 0 -1px; } }

.palavra { display: inline-block; overflow: clip; padding-bottom: 0.12em; margin-bottom: -0.12em; vertical-align: top; }
.palavra > span { display: inline-block; }

.anima .topo-barra { animation: surgir 600ms ease-out both; }
.anima .palavra > span { animation: palavra 900ms var(--sair) both; animation-delay: calc(80ms + var(--i) * 55ms); }
.anima .hero-sub { animation: subir 800ms var(--sair) 520ms both; }
.anima .acao { animation: subir 800ms var(--sair) 640ms both; }
.anima .hero-visual .celular { animation: subir 1100ms var(--sair) 380ms both; }
.anima .card-prestador { animation: card 900ms var(--sair) 1000ms both; }
.anima .hero .botao-baixar svg { animation: cutucar 700ms ease-in-out 1700ms 2; }

.anima [data-revela]:not([data-revela="grupo"]),
.anima [data-revela="grupo"] > * {
  transition: opacity 700ms ease-out, translate 900ms var(--sair);
  transition-delay: var(--atraso, 0ms);
}
.anima [data-revela]:not([data-revela="grupo"]):not(.visivel),
.anima [data-revela="grupo"]:not(.visivel) > * { opacity: 0; translate: 0 32px; }

/* Telas grandes: o texto e a coluna crescem juntos (quase tudo é em rem) */
@media (min-width: 1400px) {
  html { font-size: 112.5%; }
  :root { --largura: 1320px; }
}
@media (min-width: 1700px) {
  html { font-size: 125%; }
  :root { --largura: 1480px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0ms !important; animation: none !important; }
}
