/*
 * Página pública de contratação.
 *
 * Mesmo mundo visual do site (ISP FORGE/DESIGN.md): marinho de base, laranja
 * só no botão de ação, Geist em tudo, botões em pílula e o app sempre numa
 * moldura de celular. A tela do celular é uma réplica da tela de início real
 * do app; `--p` (cor principal) e `--d` (destaque) vêm do formulário.
 */

@font-face {
  font-family: 'Geist';
  src: url('/fontes/geist-variavel.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --tinta: #0a1a2f;
  --tinta-forte: #1f3550;
  --ardosia: #4f6178;
  --nevoa: #5d6f85;
  --marinho: #14395c;
  --marinho-fundo: #0f2a47;
  --veu: #e8eef6;
  --papel: #f4f7fb;
  --branco: #ffffff;
  --linha: #e3e8ee;
  --linha-forte: #cfd8e3;
  --laranja: #e2711d;
  --laranja-fundo: #bf500e;
  --laranja-pressionado: #9a3f0a;
  --laranja-veu: #fff4ea;
  --verde: #12805c;
  --verde-veu: #e3f4ec;
  --erro: #b42318;

  --sombra-repouso: 0 1px 2px rgb(10 26 47 / 0.06), 0 1px 1px rgb(10 26 47 / 0.04);
  --sombra-cartao: 0 8px 24px -8px rgb(10 26 47 / 0.18), 0 2px 6px rgb(10 26 47 / 0.06);
  --sombra-destaque: 0 40px 80px -24px rgb(10 26 47 / 0.35), 0 16px 32px -16px rgb(10 26 47 / 0.25);
  --suave: cubic-bezier(0.16, 1, 0.3, 1);

  /* Cores do app do provedor, trocadas ao vivo pelo formulário. */
  --p: #14395c;
  --d: #e2711d;
  --p-texto: #ffffff;
  --d-texto: #0a1a2f;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--linha-forte) transparent; }
body {
  margin: 0;
  font-family: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ardosia);
  background: var(--branco);
  caret-color: var(--laranja);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--laranja-veu); color: var(--tinta); }
h1, h2, p, ol, ul, fieldset { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--tinta-forte); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--tinta); }
:focus-visible { outline: 2px solid var(--laranja); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ── Cabeçalho ─────────────────────────────────────────────────────────── */

.topo { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / 0.86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--linha); }
.topo-dentro { max-width: 1200px; margin: 0 auto; height: 68px; padding: 0 clamp(16px, 4vw, 32px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tinta); font-weight: 650; font-size: 1.0625rem; letter-spacing: -0.02em; }

/* ── Palco: faixa marinho no topo, guia à esquerda, celular à direita ──── */

.palco {
  position: relative; isolation: isolate;
  max-width: 1200px; margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 32px) clamp(64px, 9vw, 112px);
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(40px, 6vw, 88px); align-items: start;
}
/* A faixa vai de ponta a ponta da janela, atrás do título e do celular; o
   cartão do formulário começa nela e desce para o branco. */
.palco::before {
  content: ''; position: absolute; z-index: -1; top: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  height: clamp(520px, 44vw, 600px); background: #0a1f36;
}
.coluna { min-width: 0; }
h1 { font-size: clamp(2.25rem, 1.3rem + 2.8vw, 3.5rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 650; color: var(--branco); text-wrap: balance; max-width: 16ch; }
h1 em { font-style: normal; color: #f59a57; }
.lead { margin-top: 18px; font-size: 1.125rem; line-height: 1.6; max-width: 32rem; text-wrap: pretty; color: #c7d3e2; }
.preco { margin-top: 28px; display: flex; align-items: flex-start; gap: 6px; color: var(--branco); font-variant-numeric: tabular-nums; }
.preco-moeda { font-size: 1.125rem; font-weight: 600; margin-top: 10px; }
.preco b { font-size: clamp(3rem, 2.4rem + 1.6vw, 3.75rem); line-height: 1; font-weight: 650; letter-spacing: -0.035em; }
.preco-mes { align-self: flex-end; margin: 0 0 6px 4px; font-size: 0.9375rem; color: #c7d3e2; }
.selos { list-style: none; padding: 0; margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.selos li { font-size: 0.8125rem; font-weight: 500; color: var(--branco); padding: 5px 12px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 0.28); }

/* O formulário num cartão branco que nasce na faixa. */
.folha { margin-top: 40px; padding: clamp(24px, 3.5vw, 40px); border-radius: 28px; background: var(--branco); box-shadow: 0 40px 80px -24px rgb(0 0 0 / 0.28), 0 16px 32px -16px rgb(0 0 0 / 0.18); }

/* ── Trilho de passos ──────────────────────────────────────────────────── */

.guia { margin-top: 0; }
.trilho { position: relative; list-style: none; padding: 5px; display: inline-flex; gap: 4px; background: var(--papel); border-radius: 999px; }
.trilho li { position: relative; z-index: 1; }
/* Com JavaScript, a pílula do passo atual é uma peça só que desliza. */
.trilho-marca { position: absolute; top: 5px; left: 0; height: 44px; width: 0; border-radius: 999px; background: var(--branco); box-shadow: var(--sombra-repouso); pointer-events: none; transform-origin: left center; }
.trilho.movel .etapa[aria-current='step'] { background: transparent; box-shadow: none; }
.etapa {
  font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--ardosia); white-space: nowrap;
  height: 44px; padding: 0 18px 0 8px; border: 0; border-radius: 999px; background: transparent;
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  transition: background-color 0.18s, color 0.18s, box-shadow 0.18s;
}
.etapa:hover:not(:disabled) { color: var(--tinta); }
.etapa:disabled { cursor: default; color: var(--nevoa); }
.etapa[aria-current='step'] { background: var(--branco); color: var(--tinta); box-shadow: var(--sombra-repouso); }
.etapa-n { width: 28px; height: 28px; border-radius: 50%; background: var(--veu); color: var(--tinta-forte); display: inline-flex; align-items: center; justify-content: center; font-size: 0.8125rem; font-variant-numeric: tabular-nums; transition: background-color 0.18s, color 0.18s; }
.etapa[aria-current='step'] .etapa-n { background: var(--marinho); color: var(--branco); }
.etapa.feita .etapa-n { background: var(--verde-veu); color: var(--verde); }

/* ── Passos e campos ───────────────────────────────────────────────────── */

.passo { border: 0; padding: 0; margin: 28px 0 0; min-width: 0; }
.passo.entra-frente { animation: vem-frente 0.36s var(--suave); }
.passo.entra-tras { animation: vem-tras 0.36s var(--suave); }
@keyframes vem-frente { from { opacity: 0; transform: translateX(20px); } }
@keyframes vem-tras { from { opacity: 0; transform: translateX(-20px); } }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } }

.campo { margin-bottom: 20px; }
.campo label, .cor-nome { display: block; font-size: 0.875rem; font-weight: 500; color: var(--tinta-forte); margin-bottom: 6px; }
.opcional { font-weight: 400; color: var(--nevoa); }
input[type='text'], input[type='email'], input[type='tel'], textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--tinta);
  background: var(--branco); border: 1px solid var(--linha-forte); border-radius: 8px;
  height: 46px; padding: 0 16px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
textarea { height: auto; min-height: 96px; padding: 12px 16px; resize: vertical; line-height: 1.5; }
::placeholder { color: var(--nevoa); opacity: 1; }
input:hover, textarea:hover { border-color: var(--nevoa); }
input:focus, textarea:focus { outline: none; border-color: var(--marinho); box-shadow: 0 0 0 3px rgb(20 57 92 / 0.15); }
input[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: var(--erro); box-shadow: 0 0 0 3px rgb(180 35 24 / 0.12); }
.erro { margin-top: 6px; font-size: 0.875rem; color: var(--erro); animation: aparece 0.2s ease-out; }
@keyframes aparece { from { opacity: 0; } }
.nota { margin-top: 6px; font-size: 0.875rem; line-height: 1.55; color: var(--nevoa); max-width: 34rem; }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dupla .campo-uf { max-width: 96px; }
.passo[data-passo='2'] .dupla { grid-template-columns: 1fr 96px; }

/* Cores: a amostra é o próprio seletor do navegador, vestido. */
.cores { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.cor { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 14px; border: 1px solid var(--linha-forte); border-radius: 12px; cursor: pointer; transition: border-color 0.18s, box-shadow 0.18s; }
.cor:hover { border-color: var(--nevoa); }
.cor:focus-within { border-color: var(--marinho); box-shadow: 0 0 0 3px rgb(20 57 92 / 0.15); }
.cor-amostra { position: relative; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px rgb(10 26 47 / 0.12); flex: none; }
.cor-amostra input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; background: none; }
.cor-texto { display: flex; flex-direction: column; min-width: 0; }
.cor-nome { margin: 0; }
.cor-hex { font-size: 0.875rem; color: var(--nevoa); font-variant-numeric: tabular-nums; }

/* Logo: zona de soltar. Tracejada só aqui, porque é um convite. */
.solta { position: relative; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 18px; border: 1.5px dashed var(--linha-forte); border-radius: 12px; cursor: pointer; transition: border-color 0.18s, background-color 0.18s; }
.solta:hover, .solta.arrastando { border-color: var(--marinho); background: var(--papel); }
.solta:focus-within { border-color: var(--marinho); box-shadow: 0 0 0 3px rgb(20 57 92 / 0.15); }
.solta input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.solta-icone { width: 44px; height: 44px; border-radius: 10px; background: var(--veu); color: var(--marinho); display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.solta-icone img { width: 100%; height: 100%; object-fit: contain; background: var(--branco); }
.solta-texto { display: flex; flex-direction: column; min-width: 0; }
.solta-titulo { font-weight: 600; color: var(--tinta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.solta-nota { font-size: 0.875rem; color: var(--nevoa); }
.solta.erro-arquivo .solta-titulo { color: var(--erro); }

/* ── Ações ─────────────────────────────────────────────────────────────── */

.acoes { margin-top: 28px; display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; }
.acoes-nota { font-size: 0.875rem; color: var(--nevoa); font-variant-numeric: tabular-nums; }
.botao {
  font: inherit; font-weight: 600; font-size: 1rem; color: var(--branco);
  height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--laranja-fundo);
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  transition: background-color 0.18s, transform 0.12s, outline-offset 0.18s;
}
.botao svg { transition: transform 0.18s var(--suave); }
.botao:hover { background: var(--laranja-pressionado); }
.botao:hover svg { transform: translateX(3px); }
.botao:active { transform: translateY(1px) scale(0.98); }
.botao:disabled { background: var(--nevoa); cursor: progress; transform: none; }
.botao-texto { font: inherit; font-weight: 600; font-size: 1rem; color: var(--tinta-forte); background: none; border: 0; height: 48px; padding: 0 8px; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color 0.18s; }
.botao-texto:hover { text-decoration-color: currentColor; }

/* ── Resumo com o preço ────────────────────────────────────────────────── */

.resumo { margin-top: 8px; padding: 20px 0; border-top: 1px solid var(--linha); border-bottom: 1px solid var(--linha); }
.resumo-titulo { font-weight: 600; color: var(--tinta); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.resumo-lista { list-style: none; padding: 0; font-size: 0.9375rem; color: var(--tinta-forte); }
.resumo-lista li { position: relative; padding-left: 26px; line-height: 1.5; margin-bottom: 4px; }
.resumo-lista li::before { content: ''; position: absolute; left: 2px; top: 5px; width: 12px; height: 7px; border: solid var(--verde); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.resumo-nota { margin-top: 10px; font-size: 0.875rem; line-height: 1.55; color: var(--nevoa); }

.recado { margin-top: 20px; padding: 12px 16px; border-radius: 12px; background: #fdecea; color: var(--erro); font-size: 0.9375rem; }
.rodape-form { margin-top: 16px; font-size: 0.875rem; line-height: 1.55; color: var(--nevoa); max-width: 34rem; }
.armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Pedido recebido ───────────────────────────────────────────────────── */

.pronto { margin-top: 0; max-width: 40rem; outline: none; animation: entra 0.5s var(--suave); }
.pronto-selo { width: 56px; height: 56px; border-radius: 50%; background: var(--verde-veu); color: var(--verde); display: flex; align-items: center; justify-content: center; }
.pronto-selo svg { width: 28px; height: 28px; stroke-width: 2.4; }
/* O check se desenha uma vez quando o pedido é recebido. */
html.movimento .pronto-selo path { stroke-dasharray: 22; stroke-dashoffset: 22; animation: tracar 0.5s 0.2s var(--suave) forwards; }
@keyframes tracar { to { stroke-dashoffset: 0; } }

/* ── Movimento: a marca entrando no app ────────────────────────────────── */

/* A logo em voo, do espaço de envio até o topo do app. */
.voador { position: fixed; z-index: 50; object-fit: contain; pointer-events: none; transform-origin: center; will-change: transform; filter: drop-shadow(0 8px 16px rgb(10 26 47 / 0.25)); }
/* A cor nova se espalhando pela tela do app. */
.tela { position: relative; }
.onda { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: var(--onda); }
/* Contorno que acende quando um dado chega ao app (o mesmo gesto do site). */
.app-cartao, .app-topo, .mini-previa { outline: 2px solid transparent; outline-offset: 2px; }
.acende { animation: acende 1s var(--suave); }
@keyframes acende { 25% { outline-color: var(--verde); } 100% { outline-color: transparent; } }
.mini-previa.acende { animation-name: acende-claro; }
@keyframes acende-claro { 25% { outline-color: rgb(255 255 255 / 0.85); } 100% { outline-color: transparent; } }

/* Enviando: um anel girando no lugar da seta, só enquanto o pedido viaja. */
.girando { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgb(255 255 255 / 0.35); border-top-color: currentColor; animation: gira 0.8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* O celular assenta uma vez ao abrir, como no topo do site. */
html.movimento .aparelho { animation: assenta 0.8s 0.1s var(--suave) backwards; }
@keyframes assenta { from { transform: translateY(18px) rotate(0deg); } }
.pronto h2 { margin-top: 20px; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; color: var(--tinta); }
.pronto-texto { margin-top: 8px; font-size: 1.0625rem; }
.protocolo { margin-top: 16px; display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--papel); font-size: 0.9375rem; color: var(--tinta-forte); font-variant-numeric: tabular-nums; }
.proximos { margin-top: 28px; padding: 0; list-style: none; counter-reset: p; border-top: 1px solid var(--linha); }
.proximos li { counter-increment: p; position: relative; padding: 16px 0 16px 48px; border-bottom: 1px solid var(--linha); }
.proximos li::before { content: counter(p); position: absolute; left: 0; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--veu); color: var(--tinta-forte); font-size: 0.875rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.proximos b { color: var(--tinta); font-weight: 600; }

/* ── Prévia: celular com a tela de início do app ───────────────────────── */

/* O celular grande e levemente girado sobre a faixa, como no topo do site;
   fica preso ao lado enquanto a pessoa preenche. */
.previa { position: sticky; top: 92px; display: flex; flex-direction: column; align-items: center; padding-top: 8px; }
.aparelho {
  width: 340px; aspect-ratio: 340 / 700; border-radius: 46px; padding: 10px;
  background: linear-gradient(160deg, #3a4a5e, #0b1626 60%);
  box-shadow: 0 40px 80px -24px rgb(0 0 0 / 0.45), 0 16px 32px -16px rgb(0 0 0 / 0.3), inset 0 0 0 1px rgb(255 255 255 / 0.08);
  position: relative; transform: rotate(-2deg);
}
.aparelho::after { content: ''; position: absolute; right: -3px; top: 132px; width: 3px; height: 64px; border-radius: 0 2px 2px 0; background: #253244; }
.tela { width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: #f3f6fa; color: #0a1a2f; font-size: 13px; line-height: 1.35; }

.app-topo { min-height: 82px; padding: 14px 10px 10px; background: var(--p); color: var(--p-texto); border-radius: 0 0 20px 20px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 8px; transition: background-color 0.35s var(--suave), color 0.35s; }
.app-botao { position: relative; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--p-texto) 14%, transparent); display: flex; align-items: center; justify-content: center; }
.app-botao svg { width: 17px; height: 17px; }
.app-acoes { display: flex; gap: 6px; }
.app-contador { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--d); color: var(--d-texto); font-style: normal; font-size: 10px; font-weight: 650; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--p); transition: background-color 0.35s, box-shadow 0.35s; }
.app-marca { text-align: center; font-weight: 650; font-size: 15px; letter-spacing: -0.01em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; display: flex; justify-content: center; align-items: center; height: 54px; }
/* A logo na escala do app real: é a prova de que o celular virou o app dele. */
.app-marca img { max-height: 54px; max-width: 100%; object-fit: contain; }

.app-corpo { padding: 14px 12px 0; display: flex; flex-direction: column; gap: 10px; }
.app-ola { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 2px 2px 4px; }
.app-avatar { width: 40px; height: 40px; border-radius: 50%; background: #e4eaf2; color: #3c5068; display: flex; align-items: center; justify-content: center; }
.app-ola-texto { display: flex; flex-direction: column; }
.app-ola-texto b { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
.app-pequeno { font-size: 11.5px; color: #5d6f85; display: block; }
.app-selo { justify-self: end; align-self: start; font-size: 11px; font-weight: 600; color: #0e6a4b; background: #e3f4ec; border-radius: 999px; padding: 3px 9px 3px 8px; display: inline-flex; align-items: center; gap: 5px; }
.app-selo::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.app-cartao { background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 1px 2px rgb(10 26 47 / 0.05), 0 0 0 1px rgb(10 26 47 / 0.03); }
.app-fatura { box-shadow: 0 10px 24px -14px rgb(10 26 47 / 0.25), 0 0 0 1px rgb(10 26 47 / 0.03); }
.app-fatura-topo { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; }
.app-fatura-topo b { font-weight: 600; font-size: 13.5px; }
.app-icone { width: 30px; height: 30px; border-radius: 50%; background: #e8eef6; color: #3c5068; display: flex; align-items: center; justify-content: center; }
.app-icone svg { width: 15px; height: 15px; }
.app-icone-verde { background: #e3f4ec; color: #12805c; }
.app-valor { margin-top: 12px; font-size: 30px; line-height: 1; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.app-fatura .app-pequeno { margin-top: 6px; }
.app-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.app-botoes span { height: 38px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.app-pix { background: var(--p); color: var(--p-texto); transition: background-color 0.35s var(--suave), color 0.35s; }
.app-boleto { border: 1px solid #cfd8e3; color: #0a1a2f; }

.app-duo { display: grid; grid-template-columns: 1fr 1fr; padding: 10px 12px; }
.app-item { display: flex; align-items: center; gap: 8px; min-width: 0; }
.app-item + .app-item { border-left: 1px solid #e3e8ee; padding-left: 10px; }
.app-item b { font-size: 12.5px; font-weight: 600; white-space: nowrap; }

.app-plano { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; }
.app-plano b { display: block; font-size: 14px; font-weight: 600; margin: 2px 0; }
.app-vence { background: #f1f4f8; border-radius: 12px; padding: 6px 10px; text-align: center; align-self: start; }
.app-vence b { font-size: 20px; margin: 0; font-variant-numeric: tabular-nums; }
.app-endereco { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid #e3e8ee; font-size: 12px; color: #4f6178; }

.app-zap { display: grid; grid-template-columns: 38px 1fr 18px; gap: 10px; align-items: center; }
.app-seta { color: #5d6f85; display: flex; }
.app-seta svg { width: 16px; height: 16px; }
.app-banner { position: relative; overflow: hidden; margin-top: 2px; border-radius: 16px; padding: 14px 14px 40px; background: linear-gradient(135deg, color-mix(in srgb, var(--p) 70%, #050b14), var(--p)); color: var(--p-texto); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; transition: background 0.35s var(--suave), color 0.35s; }
.app-banner b { position: relative; z-index: 1; font-size: 17px; line-height: 1.15; font-weight: 650; letter-spacing: -0.02em; max-width: 14ch; }
.app-banner-sub { position: relative; z-index: 1; font-size: 11.5px; opacity: 0.8; }
.app-banner-selo { position: relative; z-index: 1; font-size: 11px; font-weight: 600; padding: 2px 8px 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--p-texto) 14%, transparent); display: inline-flex; align-items: center; gap: 5px; margin-bottom: 2px; }
.app-banner-selo::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--d); }
.app-banner-aneis { position: absolute; right: -46px; bottom: -70px; width: 190px; height: 190px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--p-texto) 10%, transparent); box-shadow: 0 0 0 26px color-mix(in srgb, var(--p-texto) 4%, transparent), inset 0 0 0 26px color-mix(in srgb, var(--p-texto) 4%, transparent); }
.app-banner-medidor { position: absolute; right: 18px; bottom: 16px; width: 54px; height: 54px; border-radius: 50%; background: color-mix(in srgb, var(--d) 22%, transparent); color: var(--d); display: flex; align-items: center; justify-content: center; transition: background 0.35s, color 0.35s; }
.app-banner-medidor svg { width: 26px; height: 26px; }
.app-zap-icone { width: 38px; height: 38px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; }
.app-zap-icone svg { width: 19px; height: 19px; stroke-width: 1.8; }
.app-zap b { font-size: 13px; font-weight: 600; line-height: 1.3; }

.previa-nota { margin-top: 20px; max-width: 300px; text-align: center; font-size: 0.875rem; line-height: 1.55; color: var(--nevoa); }

/* Faixa do app no celular: só existe abaixo de 960 px. */
.mini-previa { display: none; }

/* ── Telas menores ─────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .palco { grid-template-columns: 1fr; }
  .palco::before { display: none; }
  .previa { position: static; order: -1; }
  .coluna { display: contents; }
  .abertura { order: -2; }
  .folha { order: 0; margin-top: 8px; }
  /* No celular a faixa marinho vira o fundo do título e do celular, de ponta a ponta. */
  .abertura, .previa { background: #0a1f36; margin-inline: calc(-1 * clamp(16px, 4vw, 32px)); padding-inline: clamp(16px, 4vw, 32px); }
  .palco { padding-top: 0; row-gap: 0; }
  .abertura { padding-block: 32px 28px; margin-bottom: -1px; }
  .previa { padding-block: 0 40px; }
  .previa-nota { color: #c7d3e2; }
  /* No celular, o aparelho aparece recortado do topo do app até a fatura e
     some em degradê: a prova fica à vista e o formulário chega logo. */
  .aparelho { width: 280px; aspect-ratio: auto; height: 340px; overflow: hidden; border-bottom-left-radius: 0; border-bottom-right-radius: 0; transform: none; -webkit-mask-image: linear-gradient(#000 93%, transparent); mask-image: linear-gradient(#000 93%, transparent); }
  .tela { height: 640px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  html.movimento .aparelho { animation-name: assenta-reto; }
  @keyframes assenta-reto { from { transform: translateY(14px); } }
  .previa-nota { margin-top: 4px; }
  .tela { font-size: 11px; }
  .previa-nota { margin-top: 14px; }
  /* Fixa abaixo do cabeçalho, mas só aparece quando o celular grande sai da
     tela (o script liga `.visivel`); antes disso ela repetiria a prévia. */
  .mini-previa {
    position: fixed; top: 76px; left: clamp(16px, 4vw, 32px); right: clamp(16px, 4vw, 32px); z-index: 5; margin: 0;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: background-color 0.35s var(--suave), color 0.35s, opacity 0.25s var(--suave), transform 0.25s var(--suave), visibility 0s 0.25s;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 56px; padding: 8px 8px 8px 16px; border-radius: 16px;
    background: var(--p); color: var(--p-texto); box-shadow: var(--sombra-cartao);
  }
  .mini-previa.visivel { opacity: 1; visibility: visible; transform: none; transition: background-color 0.35s var(--suave), color 0.35s, opacity 0.25s var(--suave), transform 0.25s var(--suave); }
  .mini-topo { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
  .mini-info { font-size: 0.8125rem; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; margin-top: -2px; display: flex; align-items: center; gap: 6px; }
  .mini-info[hidden] { display: none; }
  .mini-info::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0.6; }
  .mini-info.zap::before { background: #25d366; opacity: 1; }
  .mini-marca { font-weight: 650; font-size: 0.9375rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; height: 40px; }
  .mini-marca img { max-height: 32px; max-width: 160px; object-fit: contain; }
  .mini-sino { position: relative; flex: none; width: 36px; height: 36px; margin-right: 4px; border-radius: 50%; background: color-mix(in srgb, var(--p-texto) 14%, transparent); display: flex; align-items: center; justify-content: center; }
  .mini-sino svg { width: 17px; height: 17px; }
  .mini-sino i { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--d); color: var(--d-texto); font-style: normal; font-size: 10px; font-weight: 650; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--p); }
}
@media (max-width: 640px) {
  .trilho { display: flex; width: 100%; }
  .trilho li { flex: 1; min-width: 0; }
  .etapa { width: 100%; justify-content: center; padding: 0 8px; gap: 6px; font-size: 0.8125rem; }
  .cores, .dupla { grid-template-columns: 1fr; }
  .passo[data-passo='2'] .dupla { grid-template-columns: 1fr 88px; }
  .acoes .botao { width: 100%; justify-content: center; }
  .acoes .botao-texto { width: 100%; }
}
@media (max-width: 400px) {
  .etapa { font-size: 0; gap: 0; }
  .etapa-n { font-size: 0.8125rem; }
  .etapa[aria-current='step'] { font-size: 0.8125rem; gap: 6px; padding-right: 12px; }
  /* O passo atual leva o espaço do nome; os outros ficam só no número. */
  .trilho li { flex: 0 0 auto; }
  .trilho li:has([aria-current='step']) { flex: 1 1 auto; }
  .trilho { justify-content: space-between; }
}

/* Reduzir movimento: sem deslocamento nem voo; ficam os esmaecimentos e as
   mudanças de cor e de estado, que dizem o que aconteceu. */
@media (prefers-reduced-motion: reduce) {
  .passo.entra-frente, .passo.entra-tras { animation: aparece 0.2s ease-out; }
  html.movimento .aparelho { animation: none; }
  .girando { animation: none; border-top-color: rgb(255 255 255 / 0.35); border-right-color: currentColor; }
  html.movimento .pronto-selo path { animation: none; stroke-dashoffset: 0; }
  .botao svg, .botao { transition-duration: 0.01ms; }
  .pronto { animation: aparece 0.2s ease-out; }
  .acende { animation-duration: 1.2s; }
}
