/* Página pública: cadastro, obrigado, encerrado. Mobile primeiro. */

html {
  overscroll-behavior-y: none;
}

.pagina {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
}

/* ---------------------------------------------------------------- topo */

.topo {
  position: relative;
  isolation: isolate;
  padding-top: calc(28px + env(safe-area-inset-top, 0px));
  padding-bottom: 28px;
}

.facetas {
  position: absolute;
  z-index: -1;
  inset: 0 50% auto;
  width: 100vw;
  max-width: 900px;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
}

.marcas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.marcas .logo-ac {
  width: 172px;
  height: auto;
}

.marcas .divisor {
  width: 1px;
  height: 44px;
  background: var(--grafite-3);
}

.marcas .logo-r25 {
  width: 104px;
  height: auto;
}

/* ---------------------------------------------------------------- chamada */

.chamada {
  padding: 8px 0 32px;
  text-align: center;
}

.chamada h1 {
  font-family: var(--fonte-display);
  font-weight: 400;
  font-size: clamp(3rem, 14vw, 4.25rem);
  line-height: 0.92;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.chamada h1 .junto {
  white-space: nowrap;
}

.chamada h1 em {
  font-style: normal;
  color: var(--ouro);
}

.chamada p {
  max-width: 30ch;
  margin: 14px auto 0;
  color: var(--texto-2);
  text-wrap: pretty;
}

.chamada p strong {
  color: var(--texto);
  font-weight: 600;
}

/* ---------------------------------------------------------------- seções */

.secao {
  padding: 28px 0;
  border-top: 1px solid var(--grafite-2);
}

.secao > h2 {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.secao > h2 + p {
  margin-top: 4px;
  color: var(--texto-2);
  font-size: 0.9375rem;
}

/* ---------------------------------------------------------------- prêmios */

.grupo-premios {
  margin-top: 20px;
}

.grupo-premios + .grupo-premios {
  margin-top: 28px;
}

.grupo-titulo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
}

.grupo-regra {
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--texto-2);
}

.lista-premios {
  margin-top: 12px;
  border-top: 1px solid var(--grafite-2);
}

.premio {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--grafite-2);
}

.premio-foto {
  width: 60px;
  height: 60px;
  border-radius: var(--raio);
  object-fit: cover;
  background: var(--grafite-1);
}

.premio-texto {
  grid-column: 2;
  min-width: 0;
}

.premio:not(:has(.premio-foto)) .premio-texto {
  grid-column: 1 / 3;
}

.premio-nome {
  font-weight: 600;
  line-height: 1.3;
}

.premio-desc {
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--texto-2);
}

.premio-qtd {
  grid-column: 3;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--texto-2);
  white-space: nowrap;
}

.premio:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.grupo-vip .lista-premios {
  border-top-color: rgba(243, 200, 83, 0.4);
}

.vazio {
  margin-top: 14px;
  padding: 18px;
  font-size: 0.9375rem;
  color: var(--texto-2);
  background: var(--grafite-0);
  border: 1px dashed var(--grafite-3);
  border-radius: var(--raio);
}

/* ---------------------------------------------------------------- formulário */

.form-cadastro {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.resumo-erros {
  padding: 14px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--erro);
  background: var(--erro-fundo);
  border: 1px solid rgba(255, 139, 123, 0.35);
  border-radius: var(--raio);
}

.resumo-erros:focus {
  outline: none;
}

.consentimentos {
  display: grid;
  gap: 16px;
  padding-top: 4px;
}

.form-cadastro .botao-primario {
  width: 100%;
  min-height: 58px;
  font-size: 1.0625rem;
}

.isca {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------------------------------------------------------- regras e rodapé */

.regras {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--texto-2);
}

.regras li {
  position: relative;
  padding-left: 18px;
}

.regras li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--ouro-linha);
  transform: rotate(45deg);
}

.regras strong {
  color: var(--texto);
  font-weight: 600;
}

.privacidade {
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--texto-2);
}

.privacidade summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  color: var(--texto);
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.privacidade summary::-webkit-details-marker {
  display: none;
}

.privacidade summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 200ms var(--ease-out);
}

.privacidade[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.privacidade div {
  display: grid;
  gap: 10px;
  padding-bottom: 8px;
}

.rodape {
  padding-top: 24px;
  border-top: 1px solid var(--grafite-2);
  font-size: 0.8125rem;
  color: var(--texto-3);
  text-align: center;
}

/* ---------------------------------------------------------------- obrigado */

.bilhete {
  position: relative;
  margin: 4px 0 28px;
  padding: 26px 20px 24px;
  text-align: center;
  background: var(--grafite-0);
  border: 1px solid var(--grafite-2);
  border-radius: 16px;
}

.bilhete::before,
.bilhete::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  background: var(--preto);
  border: 1px solid var(--grafite-2);
  border-radius: 50%;
}

.bilhete::before {
  left: -12px;
  clip-path: inset(0 0 0 50%);
}

.bilhete::after {
  right: -12px;
  clip-path: inset(0 50% 0 0);
}

.bilhete-rotulo {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--texto-2);
}

.bilhete-numero {
  font-family: var(--fonte-display);
  font-size: clamp(5rem, 30vw, 6rem);
  line-height: 1;
  color: var(--ouro);
  letter-spacing: 0.01em;
  margin-top: 6px;
}

.bilhete-nota {
  max-width: 28ch;
  margin: 10px auto 0;
  font-size: 0.9375rem;
  color: var(--texto-2);
}

.bilhete-nota strong {
  color: var(--texto);
  font-weight: 600;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .bilhete-numero {
    animation: numero-entra 520ms var(--ease-out) both;
    animation-delay: 80ms;
  }
}

@keyframes numero-entra {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    filter: blur(4px);
  }
}

.bloco-vip {
  margin-bottom: 28px;
  padding: 18px;
  background: var(--ouro-fundo);
  border: 1px solid rgba(243, 200, 83, 0.35);
  border-radius: var(--raio);
}

.bloco-vip h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.0625rem;
  font-weight: 800;
}

.bloco-vip p {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: #e6dcc4;
}

.acoes {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.acoes .botao {
  width: 100%;
}

/* ---------------------------------------------------------------- ganhadores */

.ganhador {
  display: grid;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--grafite-2);
}

.ganhador:last-child {
  border-bottom: 0;
}

.ganhador-premio {
  font-size: 0.875rem;
  color: var(--texto-2);
}

.ganhador-nome {
  font-weight: 600;
}

@media (min-width: 40rem) {
  .topo {
    padding-top: 44px;
  }
  .marcas .logo-ac {
    width: 200px;
  }
  .marcas .logo-r25 {
    width: 120px;
  }
}
