/* Visual comum dos formulários (pesquisa e convite) e do painel. */
:root {
  --tinta: #3b2f27;
  --tinta-suave: #6e6056;
  --destaque: #5c4535;
  --destaque-claro: #8c7260;
  --vidro: rgba(255, 252, 248, 0.58);
  --vidro-borda: rgba(255, 255, 255, 0.72);
  --opcao: rgba(255, 255, 255, 0.55);
  --opcao-borda: rgba(92, 69, 53, 0.16);
  --erro: #9a3b2c;
  --fundo: #efe6dc;
  --sombra: 0 30px 80px rgba(70, 50, 35, 0.18), 0 2px 8px rgba(70, 50, 35, 0.06);
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--tinta);
  background: var(--fundo) url("/comum/fundo-pequeno.webp") center / cover fixed;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* Fundo: imagem desfocada com um véu claro por cima, pra nunca competir com o texto */
.fundo {
  position: fixed; inset: 0; z-index: 0;
  background: url("/comum/fundo.webp") center / cover no-repeat;
  transform: scale(1.04);
}
.fundo::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(250, 245, 239, 0.35), rgba(239, 230, 220, 0.62) 70%),
    linear-gradient(180deg, rgba(250, 246, 241, 0.25), rgba(232, 221, 209, 0.45));
}

/* Barra de progresso no topo */
.progresso {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3;
  height: 4px; background: rgba(92, 69, 53, 0.10);
}
.progresso span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--destaque-claro), var(--destaque));
  border-radius: 0 4px 4px 0;
  transition: width 0.6s cubic-bezier(.22, 1, .36, 1);
}

.palco {
  position: relative; z-index: 1;
  height: 100dvh; min-height: 100vh;
  display: grid; place-items: center;
  padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
}

.cartao {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100dvh - 56px);
  overflow: auto;
  background: var(--vidro);
  border: 1px solid var(--vidro-borda);
  border-radius: 28px;
  box-shadow: var(--sombra);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
  padding: 40px 40px 32px;
}

.topo {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 28px; margin-bottom: 26px;
  font-size: 13px; color: var(--tinta-suave); letter-spacing: 0.02em;
}
.topo[hidden] { display: none; }
.topo .contador { font-variant-numeric: tabular-nums; }

.voltar {
  appearance: none; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--tinta-suave); padding: 4px 8px 4px 0;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .2s;
}
.voltar:hover { color: var(--tinta); }
.voltar[hidden] { display: inline-flex; visibility: hidden; }

/* Telas: só uma visível por vez, entrando de baixo e saindo pra cima */
.tela { display: none; }
.tela.ativa { display: block; animation: entra .55s cubic-bezier(.22, 1, .36, 1) both; }
.tela.ativa.volta { animation-name: entraVolta; }
.tela.saindo { display: block; animation: sai .28s ease-in both; }
.tela.saindo.volta { animation-name: saiVolta; }
@keyframes entra { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes sai { to { opacity: 0; transform: translateY(-22px); } }
@keyframes entraVolta { from { opacity: 0; transform: translateY(-28px); } to { opacity: 1; transform: none; } }
@keyframes saiVolta { to { opacity: 0; transform: translateY(22px); } }

.rotulo {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--destaque-claro); margin-bottom: 14px;
}

h1, h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600; line-height: 1.12; margin: 0 0 14px;
  color: var(--tinta); text-wrap: balance;
}
h1 { font-size: clamp(34px, 6vw, 46px); }
h2 { font-size: clamp(26px, 4.6vw, 34px); }

p { margin: 0 0 14px; line-height: 1.6; color: var(--tinta-suave); font-size: 15.5px; }
p strong { color: var(--tinta); font-weight: 600; }
.ajuda { font-size: 14.5px; margin-top: -4px; }

.campo {
  display: flex; align-items: center; gap: 4px;
  margin-top: 26px;
  border-bottom: 1.5px solid rgba(92, 69, 53, 0.28);
  transition: border-color .25s;
}
.campo:focus-within { border-color: var(--destaque); }
.campo .prefixo { font-size: 22px; color: var(--tinta-suave); }
.campo input {
  flex: 1; min-width: 0;
  appearance: none; border: 0; outline: 0; background: transparent;
  font: 500 22px/1.4 "Manrope", system-ui, sans-serif; color: var(--tinta);
  padding: 10px 0 12px;
}
.campo input::placeholder { color: rgba(110, 96, 86, 0.45); font-weight: 400; }

.erro {
  min-height: 22px; margin-top: 10px;
  font-size: 13.5px; color: var(--erro);
  opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s;
}
.erro.visivel { opacity: 1; transform: none; }

.opcoes { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.opcao {
  width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--opcao);
  border: 1px solid var(--opcao-borda);
  border-radius: 14px;
  font: 500 15.5px/1.4 "Manrope", system-ui, sans-serif; color: var(--tinta);
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.opcao:hover { background: rgba(255, 255, 255, 0.8); border-color: rgba(92, 69, 53, 0.3); }
.opcao:active { transform: scale(0.99); }
.opcao:focus-visible { outline: 2px solid var(--destaque); outline-offset: 2px; }
.opcao .tecla {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  border: 1px solid rgba(92, 69, 53, 0.25); color: var(--destaque);
  background: rgba(255, 255, 255, 0.6);
  transition: inherit;
}
.opcao .marca { margin-left: auto; opacity: 0; transition: opacity .2s; }
.opcao.escolhida {
  background: var(--destaque); border-color: var(--destaque); color: #fff;
  box-shadow: 0 8px 24px rgba(92, 69, 53, 0.25);
}
.opcao.escolhida .tecla { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.opcao.escolhida .marca { opacity: 1; }
.opcao.piscando { animation: pisca .32s ease; }
@keyframes pisca { 50% { transform: scale(1.015); } }

.acoes { display: flex; align-items: center; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.botao {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px;
  background: var(--destaque); color: #fff;
  font: 600 15.5px/1 "Manrope", system-ui, sans-serif; letter-spacing: 0.01em;
  box-shadow: 0 10px 26px rgba(92, 69, 53, 0.28);
  transition: transform .15s, box-shadow .2s, background .2s;
}
.botao:hover { background: #4d3a2c; box-shadow: 0 12px 30px rgba(92, 69, 53, 0.34); }
.botao:active { transform: translateY(1px); }
.botao:focus-visible { outline: 2px solid var(--destaque); outline-offset: 3px; }
.botao[disabled] { opacity: .6; cursor: default; }
.dica { font-size: 13px; color: var(--tinta-suave); }
.dica kbd {
  font: 600 11.5px "Manrope", sans-serif; padding: 2px 7px; border-radius: 6px;
  border: 1px solid rgba(92, 69, 53, 0.22); background: rgba(255, 255, 255, 0.6);
}

.selo {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 22px;
  background: var(--destaque); color: #fff;
  box-shadow: 0 12px 30px rgba(92, 69, 53, 0.3);
  animation: surge .6s cubic-bezier(.22, 1.4, .36, 1) both .15s;
}
@keyframes surge { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

.girando {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  animation: gira .8s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }

.assinatura {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 18px; margin-bottom: 22px;
  border-bottom: 1px solid rgba(92, 69, 53, 0.14);
  font-weight: 600; font-size: 15px; color: var(--tinta);
}
.assinatura span { display: block; margin-top: 2px; font-weight: 400; font-size: 13px; color: var(--tinta-suave); }
.assinatura a {
  flex: none; font-size: 13px; font-weight: 600; color: var(--destaque);
  text-decoration: none; padding: 7px 12px; border-radius: 999px;
  border: 1px solid rgba(92, 69, 53, 0.22); background: rgba(255, 255, 255, 0.5);
  transition: background .2s;
}
.assinatura a:hover { background: rgba(255, 255, 255, 0.85); }
@media (max-width: 400px) {
  .assinatura { flex-direction: column; align-items: flex-start; }
}

.privacidade {
  margin: 22px 0 0; font-size: 12.5px; line-height: 1.55;
  color: var(--tinta-suave); opacity: .85;
}

.beneficios {
  margin: 4px 0 18px; padding: 0; list-style: none; counter-reset: b;
  display: grid; gap: 8px;
}
.beneficios li {
  counter-increment: b;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.5); border: 1px solid var(--opcao-borda);
  font-weight: 600; font-size: 15px; color: var(--tinta);
}
.beneficios li::before {
  content: counter(b);
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--destaque); color: #fff; font-size: 12px;
}
.aviso {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--destaque);
}

.isca { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 560px) {
  .cartao { padding: 28px 22px 24px; border-radius: 22px; }
  .topo { margin-bottom: 20px; }
  .campo input, .campo .prefixo { font-size: 19px; }
  .opcao { padding: 13px 14px; font-size: 15px; }
  .dica { display: none; }
  .botao { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .tela.ativa, .tela.saindo, .selo, .opcao.piscando { animation: none !important; }
  .progresso span { transition: none; }
}
