:root {
  --azul-virtual: #0a4d8c;
  --azul-claro: #1e88e5;
  --azul-bg: #f0f6fc;
  --verde-ok: #2e7d32;
  --vermelho-erro: #c62828;
  --cinza-texto: #1f2937;
  --cinza-suave: #6b7280;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;
}
body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, #cfe4f8 0%, transparent 55%),
    linear-gradient(180deg, #eaf3fb 0%, #f7fafc 45%, #ffffff 100%);
  background-attachment: fixed;
  color: var(--cinza-texto);
  min-height: 100vh;
  padding: 24px 16px 60px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(60px, env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
.container { max-width: 560px; margin: 0 auto; }
.header { text-align: center; margin-bottom: 22px; }
.header img { max-width: 200px; height: auto; }
.header h1 {
  margin-top: 14px;
  color: var(--azul-virtual);
  font-size: 1.55rem;
  letter-spacing: -.02em;
}
.header p { color: var(--cinza-suave); margin-top: 6px; font-size: .95rem; }

.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(10, 77, 140, .1);
  border: 1px solid rgba(10, 77, 140, .06);
  padding: 28px 24px;
  margin-bottom: 18px;
}
.card h2 {
  color: var(--azul-virtual);
  font-size: 1.15rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h2 .num {
  background: var(--azul-claro);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: bold;
  flex-shrink: 0;
}

.opcoes { display: flex; flex-direction: column; gap: 10px; }
.opcao {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  min-height: 48px;
  border: 2px solid #e5eaf2;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
  font-size: .97rem;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.opcao:hover { border-color: var(--azul-claro); background: var(--azul-bg); }
.opcao.selecionado { border-color: var(--azul-virtual); background: #e8f1fb; }
.opcao input { margin-top: 3px; accent-color: var(--azul-virtual); transform: scale(1.15); min-width: 18px; min-height: 18px; }
.opcao .texto { flex: 1; line-height: 1.4; }
.opcao .texto strong { display: block; color: var(--azul-virtual); }
.opcao .texto small { color: var(--cinza-suave); font-size: .82rem; }

.checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px;
  min-height: 44px;
  border: 2px solid #e5eaf2;
  border-radius: 12px;
  cursor: pointer;
  font-size: .92rem;
  transition: border-color .12s ease, background .12s ease;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.check:hover { border-color: var(--azul-claro); background: var(--azul-bg); }
.check.selecionado { border-color: var(--azul-virtual); background: #e8f1fb; }
.check input { accent-color: var(--azul-virtual); }

.botoes {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.btn {
  background: var(--azul-virtual);
  color: #fff;
  border: none;
  padding: 15px 26px;
  min-height: 50px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}
.btn:hover { background: #083d70; }
.btn:active { transform: scale(.98); }
.btn:disabled { background: #9bb6d4; cursor: not-allowed; }
.btn-secundario {
  background: transparent;
  color: var(--azul-virtual);
  border: 2px solid var(--azul-virtual);
}
.btn-secundario:hover { background: var(--azul-bg); }

.erro {
  color: var(--vermelho-erro);
  font-size: .85rem;
  margin-top: 6px;
  display: none;
}
.progresso {
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 24px;
  position: sticky;
  top: 8px;
  z-index: 20;
  background: rgba(229, 234, 242, .85);
  backdrop-filter: saturate(180%) blur(6px);
  -webkit-backdrop-filter: saturate(180%) blur(6px);
}
.progresso .barra {
  height: 100%;
  background: linear-gradient(90deg, var(--azul-claro), var(--azul-virtual));
  width: 0%;
  transition: width .25s ease;
}
.tela { display: none; }
.tela.ativa { display: block; animation: fadeIn .18s ease; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .tela.ativa { animation: none; }
  .progresso .barra { transition: none; }
  * { transition: none !important; }
}

.obrigado { text-align: center; padding: 44px 20px 36px; position: relative; overflow: hidden; }

/* ===== Animação de "obrigado" ===== */
.sucesso-animacao {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.anel-externo, .anel-interno {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--verde-ok);
  opacity: 0;
  animation: anelPulso 1.6s ease-out forwards;
}
.anel-interno { animation-delay: .15s; }
@keyframes anelPulso {
  0%   { transform: scale(.55); opacity: .55; }
  100% { transform: scale(1.35); opacity: 0; }
}
.check-grande {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: checkPop .5s cubic-bezier(.18,.89,.32,1.28) both;
}
.check-grande svg { width: 100%; height: 100%; }
.check-circulo {
  fill: none;
  stroke: var(--verde-ok);
  stroke-width: 3;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: desenhaCirculo .6s ease-out .15s forwards;
}
.check-traco {
  fill: none;
  stroke: var(--verde-ok);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: desenhaTraco .35s ease-out .55s forwards;
}
@keyframes checkPop {
  0%   { transform: scale(.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes desenhaCirculo { to { stroke-dashoffset: 0; } }
@keyframes desenhaTraco   { to { stroke-dashoffset: 0; } }

.obrigado .obrigado-titulo {
  display: block;
  text-align: center;
  color: var(--azul-virtual);
  margin: 6px 0 8px;
  font-size: 1.3rem;
  animation: sobeFade .5s ease-out .35s both;
}
.obrigado .obrigado-texto {
  display: block;
  text-align: center;
  color: var(--cinza-suave);
  margin-bottom: 20px;
  animation: sobeFade .5s ease-out .45s both;
}
@keyframes sobeFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

#bloco-google { animation: sobeFade .5s ease-out .6s both; }
.google-intro {
  color: var(--cinza-suave);
  font-size: .92rem;
  line-height: 1.5;
  margin-bottom: 18px;
}

/* Confete leve */
.confete {
  position: absolute;
  top: 30%;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  animation: caiConfete var(--dur, 2s) ease-in forwards;
}
@keyframes caiConfete {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--dx, 0), 160px) rotate(var(--rot, 180deg)); }
}

@media (prefers-reduced-motion: reduce) {
  .anel-externo, .anel-interno, .check-grande,
  .check-circulo, .check-traco,
  .obrigado-titulo, .obrigado-texto, #bloco-google { animation: none; }
  .check-circulo { stroke-dashoffset: 0; }
  .check-traco { stroke-dashoffset: 0; }
}
.btn-google {
  background: #fff;
  color: #4285f4;
  border: 2px solid #4285f4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: all .15s ease;
}
.btn-google:hover { background: #4285f4; color: #fff; }

.footer {
  text-align: center;
  margin-top: 28px;
  color: var(--cinza-suave);
  font-size: .8rem;
}
.footer p { margin: 4px 0; }
.footer-aviso {
  font-size: .78rem;
  max-width: 420px;
  margin: 8px auto 0 !important;
  line-height: 1.4;
}
.footer-aviso a {
  color: var(--azul-claro);
  text-decoration: none;
  font-weight: 600;
}
.footer-aviso a:hover { text-decoration: underline; }

/* ===== Tela inicial / consentimento ===== */
.consentimento h2 {
  display: block !important;
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.3rem;
}
.consent-intro {
  text-align: center;
  color: var(--cinza-suave);
  font-size: .95rem;
  line-height: 1.5;
  margin: 0 auto 22px;
  max-width: 440px;
}
.brinde-box {
  background: linear-gradient(135deg, #fff8e8 0%, #eef6ff 55%, #f3f8fd 100%);
  border: 1px solid #f0d78c;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 22px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(240, 180, 60, .12);
}
.brinde-box strong {
  display: block;
  color: var(--azul-virtual);
  font-size: 1.08rem;
  margin-bottom: 6px;
}
.brinde-box p {
  color: #4a6278;
  font-size: .88rem;
  line-height: 1.45;
  margin: 0;
}
.campos-nome {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0 auto 20px;
  max-width: 380px;
}
.consentimento .campo label {
  display: block;
  text-align: center;
  font-size: .85rem;
  font-weight: 700;
  color: var(--azul-virtual);
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.consentimento .campo input {
  width: 100%;
  padding: 14px 14px;
  border: 2px solid #e5eaf2;
  border-radius: 12px;
  font-size: 16px;
  text-align: center;
  background: #fafbfd;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.campo input:focus {
  outline: none;
  background: #fff;
  border-color: var(--azul-claro);
  box-shadow: 0 0 0 4px rgba(30, 136, 229, .14);
}
#erro-nome {
  margin: 0 0 14px;
  text-align: center;
}
.consent-texto {
  margin: 18px 0 22px;
  font-size: .84rem;
  line-height: 1.55;
  color: #64748b;
  text-align: center;
}
.consent-texto a {
  color: var(--azul-claro);
  font-weight: 600;
  text-decoration: none;
}
.consent-texto a:hover { text-decoration: underline; }

/* Força centralização do botão (vence .botoes space-between) */
.botoes.consent-btns {
  display: flex !important;
  justify-content: center !important;
  align-items: center;
  margin-top: 6px;
}
.botoes.consent-btns .btn {
  min-width: 240px;
  padding: 15px 32px;
  font-size: 1.05rem;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(10, 77, 140, .22);
}

/* Política */
.politica h2 {
  display: block;
  font-size: 1.05rem;
  margin: 22px 0 8px;
  color: var(--azul-virtual);
}
.politica p,
.politica li {
  color: #334155;
  font-size: .93rem;
  line-height: 1.55;
  margin-bottom: 8px;
}
.politica ul { padding-left: 1.2rem; margin-bottom: 10px; }
.politica .atualizado {
  color: var(--cinza-suave);
  font-size: .82rem;
  margin-bottom: 8px;
}
.politica-acoes { margin-top: 28px; text-align: center; }
.politica-acoes .btn { display: inline-block; text-decoration: none; }

@media (max-width: 520px) {
  body { padding: 18px 14px calc(60px + env(safe-area-inset-bottom)); }
  .header { margin-bottom: 18px; }
  .header img { max-width: 160px; }
  .header h1 { font-size: 1.3rem; }
  .header p { font-size: .9rem; }
  .card { padding: 22px 16px; border-radius: 16px; }
  .card h2 { font-size: 1.08rem; gap: 8px; }
  .card h2 .num { width: 24px; height: 24px; font-size: .82rem; }
  .campos-nome { grid-template-columns: 1fr; }
  .checkboxes { grid-template-columns: 1fr 1fr; }
  .botoes { gap: 10px; }
  .botoes .btn { flex: 1; padding: 14px 16px; font-size: .98rem; }
  .botoes.consent-btns .btn {
    width: 100%;
    min-width: 0;
  }
  .opcao { padding: 13px 13px; }
  .check { padding: 11px 11px; }
  .footer { font-size: .76rem; }
}

/* Telas muito estreitas (ex.: paisagem em mobile) */
@media (max-width: 360px) {
  .header h1 { font-size: 1.15rem; }
  .card { padding: 18px 12px; }
  .checkboxes { grid-template-columns: 1fr; gap: 8px; }
  .botoes { flex-direction: column; }
  .botoes .btn { width: 100%; }
  .botoes .btn-secundario { order: -1; }
}

/* Desabilita efeitos de hover em dispositivos de toque para evitar tremor */
@media (hover: none) {
  .opcao:hover,
  .check:hover,
  .btn-secundario:hover,
  .btn-google:hover,
  .politica-nav a:hover { background: initial; border-color: #e5eaf2; }
  .opcao.selecionado,
  .check.selecionado { border-color: var(--azul-virtual); background: #e8f1fb; }
  .btn:hover { background: var(--azul-virtual); }
}

/* Paisagem em mobile: reduz padding para caber mais sem rolagem */
@media (max-height: 500px) and (orientation: landscape) {
  .header { margin-bottom: 10px; }
  .header img { max-width: 110px; }
  .header h1 { font-size: 1.1rem; margin-top: 6px; }
  .header p { display: none; }
  .card { padding: 16px 16px; margin-bottom: 10px; }
  .progresso { margin-bottom: 12px; }
}

/* ===== Página Política (LGPD) ===== */
.politica-page { max-width: 720px; }
.politica-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 18px;
}
.politica-nav a {
  font-size: .78rem;
  font-weight: 600;
  color: var(--azul-virtual);
  text-decoration: none;
  background: #fff;
  border: 1px solid #d6e4f5;
  padding: 7px 12px;
  border-radius: 999px;
  transition: background .15s ease, border-color .15s ease;
}
.politica-nav a:hover {
  background: #e8f1fb;
  border-color: var(--azul-claro);
}
.politica-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.badge-lgpd {
  display: inline-block;
  background: #e8f1fb;
  color: var(--azul-virtual);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
}
.politica .atualizado {
  color: var(--cinza-suave);
  font-size: .82rem;
  margin: 0;
}
.politica-lead {
  font-size: .98rem !important;
  line-height: 1.6 !important;
  color: #334155 !important;
  margin-bottom: 18px !important;
}
.aviso-box {
  background: linear-gradient(135deg, #fff8e8 0%, #fff3d8 100%);
  border: 1px solid #efd7a0;
  border-radius: 14px;
  padding: 16px 18px;
  margin: 8px 0 22px;
}
.aviso-box strong {
  display: block;
  color: #8a5a00;
  font-size: .95rem;
  margin-bottom: 8px;
}
.aviso-box p {
  margin: 0 !important;
  color: #6b5420 !important;
  font-size: .9rem !important;
  line-height: 1.55 !important;
}
.tabela-dados {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
}
.dado-item {
  background: #f7fafc;
  border: 1px solid #e8eef6;
  border-radius: 12px;
  padding: 12px 14px;
}
.dado-item strong {
  display: block;
  color: var(--azul-virtual);
  font-size: .88rem;
  margin-bottom: 4px;
}
.dado-item span {
  color: #475569;
  font-size: .86rem;
  line-height: 1.45;
}
.politica .nota {
  background: #f0f7ff;
  border-left: 3px solid var(--azul-claro);
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  font-size: .88rem !important;
}
.politica h2 {
  scroll-margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
  margin-top: 26px !important;
}
.politica h2:first-of-type { border-top: none; margin-top: 18px !important; }
