:root {
  --creme: #f6f1e7;
  --lilas: #d9d2ec;
  --pessego: #f5d9bf;
  --azul: #cfe3ee;
  --verde: #1f3a2e;
  --verde-2: #2c4f3f;
  --dourado: #b08a3e;
  --dourado-claro: #e2c27d;
  --branco: #ffffff;
  --texto: #1f3a2e;
  --texto-2: #4f6258;
  --texto-3: #7d8a83;
  --linha: rgba(31, 58, 46, .12);
  --erro: #9b3b2e;
  --erro-fundo: #fbeee9;
  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --raio: 28px;
  --cronometro-altura: 0px;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  background: var(--creme);
  color: var(--texto);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--dourado); outline-offset: 3px; }

/* ---------- fundo em aquarela ---------- */
.aquarela { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.mancha {
  position: absolute; border-radius: 50%;
  filter: blur(48px); opacity: .75;
  animation: flutuar 22s ease-in-out infinite alternate;
}
.mancha.lilas   { width: 70vmax; height: 55vmax; left: -28vmax; top: -18vmax; background: radial-gradient(closest-side, var(--lilas), transparent); }
.mancha.pessego { width: 60vmax; height: 50vmax; right: -26vmax; top: 22vh; background: radial-gradient(closest-side, var(--pessego), transparent); animation-delay: -6s; }
.mancha.azul    { width: 65vmax; height: 50vmax; left: -18vmax; bottom: -26vmax; background: radial-gradient(closest-side, var(--azul), transparent); animation-delay: -12s; }
.mancha.lilas.dois { width: 40vmax; height: 34vmax; right: -12vmax; bottom: -10vmax; opacity: .5; animation-delay: -3s; }
@keyframes flutuar {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(3vmax, 2vmax, 0) scale(1.06); }
}

/* ---------- estrutura ---------- */
.pagina {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px; margin: 0 auto;
  min-height: 100dvh;
  padding: calc(20px + var(--cronometro-altura) + env(safe-area-inset-top, 0px)) 16px calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column;
  transition: padding-top .3s ease;
}
.topo { display: flex; justify-content: center; padding: 8px 0 18px; }
.logo { width: min(200px, 52vw); height: auto; }
.inicio .logo { width: min(300px, 76vw); }

.cartao {
  background: var(--branco);
  border-radius: var(--raio);
  padding: 30px 22px 26px;
  box-shadow: 0 1px 0 rgba(31, 58, 46, .04), 0 24px 60px -28px rgba(31, 58, 46, .28);
}
@media (min-width: 480px) { .cartao { padding: 40px 36px 34px; } }

.rodape { margin-top: auto; padding-top: 28px; text-align: center; font-size: 13px; color: var(--texto-3); letter-spacing: .02em; }

/* ---------- transição entre telas ---------- */
.conteudo { animation: entrar .45s cubic-bezier(.2, .8, .2, 1) both; }
.conteudo.volta { animation-name: entrar-volta; }
@keyframes entrar { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes entrar-volta { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .conteudo, .conteudo.volta, .mancha { animation: none; }
}

/* ---------- tipografia ---------- */
.rotulo { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--dourado); margin-bottom: 10px; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; color: var(--verde); text-wrap: balance; }
h1 { font-size: clamp(36px, 10vw, 46px); line-height: 1.02; }
h2 { font-size: clamp(28px, 7.6vw, 36px); line-height: 1.08; }
h1:focus, h2:focus { outline: none; }
.apoio { margin-top: 12px; color: var(--texto-2); font-size: 15.5px; }
.centro { text-align: center; }

/* ---------- botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 15px 26px;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: var(--verde); color: #fff;
  font-weight: 500; font-size: 16px; letter-spacing: .01em;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), background .25s, opacity .25s;
  -webkit-tap-highlight-color: transparent;
}
.botao:hover { background: var(--verde-2); transform: translateY(-1px); }
.botao:active { transform: scale(.98); }
.botao[disabled] { opacity: .4; cursor: not-allowed; transform: none; }
.botao.dourado { background: var(--dourado); }
.botao.dourado:hover { background: #9c7834; }
.botao.claro { background: transparent; color: var(--verde); box-shadow: inset 0 0 0 1.5px var(--linha); }
.botao.claro:hover { background: rgba(31, 58, 46, .04); }
.botao svg { flex: none; }
.acoes { display: grid; gap: 12px; margin-top: 26px; }

.voltar {
  display: inline-flex; align-items: center; gap: 6px;
  margin: -8px 0 18px -6px; padding: 8px 12px 8px 6px;
  background: none; border: 0; border-radius: 999px; cursor: pointer;
  color: var(--texto-2); font-size: 14px; font-weight: 500;
}
.voltar:hover { color: var(--verde); background: rgba(31, 58, 46, .05); }

/* ---------- opções ---------- */
.opcoes { display: grid; gap: 12px; margin-top: 24px; }
.opcao {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 18px 18px; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid var(--linha); border-radius: 20px;
  font-size: 16.5px; font-weight: 500; color: var(--verde);
  transition: border-color .2s, background .2s, transform .2s;
}
.opcao:hover { border-color: var(--dourado-claro); background: #fffcf6; }
.opcao:active { transform: scale(.99); }
.opcao .icone {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--serif); font-size: 20px;
}
.opcao:nth-child(1) .icone { background: var(--azul); }
.opcao:nth-child(2) .icone { background: var(--lilas); }
.opcao:nth-child(3) .icone { background: var(--pessego); }
.opcao .seta { margin-left: auto; color: var(--texto-3); }
.opcoes.duas { grid-template-columns: 1fr 1fr; }
.opcoes.duas .opcao { justify-content: center; font-size: 17px; }

/* ---------- formulário ---------- */
.campo { margin-top: 24px; }
.campo label { display: block; font-size: 14px; font-weight: 500; color: var(--texto-2); margin-bottom: 8px; }
.campo input {
  width: 100%; min-height: 54px; padding: 14px 18px;
  border: 1.5px solid var(--linha); border-radius: 16px; background: #fffdf9;
  font-size: 17px; /* 16px ou mais evita zoom no iPhone */
  transition: border-color .2s, box-shadow .2s;
}
.campo input:focus { outline: none; border-color: var(--dourado); box-shadow: 0 0 0 4px rgba(226, 194, 125, .3); }
.campo input[aria-invalid="true"] { border-color: var(--erro); }

.aviso-erro {
  margin-top: 14px; padding: 14px 16px; border-radius: 16px;
  background: var(--erro-fundo); color: var(--erro); font-size: 14.5px;
}
.aviso-erro a { color: var(--erro); font-weight: 600; }
.suporte {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  color: var(--verde); font-weight: 600; font-size: 14.5px; text-decoration: none;
}
.suporte:hover { text-decoration: underline; }

/* ---------- tela do link ---------- */
.parabens { font-size: 16px; color: var(--texto); margin-top: 12px; }
.preco {
  margin: 24px 0 4px; padding: 22px 20px; border-radius: 22px; text-align: center;
  background: linear-gradient(135deg, #fffaf0, #fbf3e3);
  box-shadow: inset 0 0 0 1px rgba(176, 138, 62, .2);
}
.preco .de { color: var(--texto-3); text-decoration: line-through; font-size: 15px; }
.preco .valor { font-family: var(--serif); font-size: 54px; line-height: 1; color: var(--dourado); }
.preco .valor small { font-size: .5em; margin-right: 4px; }
.preco .nome { margin-top: 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-2); }
.pendentes { margin-top: 14px; padding: 12px 16px; border-radius: 16px; background: #f1eef8; color: var(--texto-2); font-size: 14.5px; }
.lembrete { margin-top: 14px; font-size: 14px; color: var(--texto-2); text-align: center; }
.lembrete strong { color: var(--verde); word-break: break-all; }
.esgotado { margin-top: 18px; text-align: center; font-family: var(--serif); font-size: 26px; color: var(--erro); }

/* ---------- cronômetro fixo ---------- */
.cronometro {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: var(--verde); color: #fff; text-align: center;
  font-size: 14.5px; font-weight: 500; letter-spacing: .01em;
  box-shadow: 0 6px 20px -10px rgba(31, 58, 46, .6);
}
.cronometro strong { font-variant-numeric: tabular-nums; color: var(--dourado-claro); font-weight: 600; }
.cronometro.urgente strong { animation: piscar 1s steps(2) infinite; }
.cronometro.zerado { background: #7a2f25; }
@keyframes piscar { 50% { opacity: .45; } }

/* ---------- confirmação ---------- */
.selo {
  width: 76px; height: 76px; margin: 4px auto 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--azul); color: var(--verde);
}

/* ---------- checkout em pop up ---------- */
.checkout {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20, 34, 27, .55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: aparecer .25s ease both;
}
.checkout[hidden] { display: none; }
@keyframes aparecer { from { opacity: 0; } }
.checkout-caixa {
  width: 100%; height: 100%; background: #fff; display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
}
@media (min-width: 680px) {
  .checkout-caixa { width: 620px; height: min(92dvh, 900px); border-radius: 24px; overflow: hidden; padding-top: 0; }
}
.checkout-topo {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px;
  border-bottom: 1px solid var(--linha); font-size: 14px;
}
.checkout-titulo { font-weight: 600; color: var(--verde); white-space: nowrap; }
.checkout-aba { margin-left: auto; color: var(--texto-2); font-size: 13px; white-space: nowrap; }
.checkout-fechar {
  width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(31, 58, 46, .06);
  display: grid; place-items: center; cursor: pointer; color: var(--verde);
}
.checkout-corpo { position: relative; flex: 1; }
.checkout-corpo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.checkout-carregando {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center;
  color: var(--texto-2); font-size: 15px;
}
.checkout-carregando a { color: var(--verde); font-weight: 600; }

.carregando { pointer-events: none; opacity: .7; }
.oculto { display: none !important; }
