/* ==========================================================================
   Prêmio Confut Nordeste FutebolCard 2026 — telas imersivas
   (percurso de votação, confirmação e parcial). pages/premio-imersivo.php

   Identidade do prêmio: papel claro levemente rosado, vela vermelha (#a70404)
   e o arco laranja da logo. As artes dos finalistas vêm com fundo
   transparente e nome em vermelho, então o fundo precisa ser claro.
   ========================================================================== */

:root {
  --pvi-paper: #f4eceb;
  --pvi-paper-2: #fbf7f6;
  --pvi-ink: #1d1d1f;
  --pvi-muted: #6b5f5e;
  --pvi-red: #a70404;
  --pvi-red-deep: #7a0303;
  --pvi-orange: #ff9800;
  --pvi-line: rgba(167, 4, 4, .14);
  --pvi-display: "Bebas Neue Pro", "Bebas Neue", "Anton", system-ui, sans-serif;
  --pvi-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.ne-pvi {
  margin: 0;
  min-height: 100svh;
  font-family: var(--pvi-body);
  color: var(--pvi-ink);
  background-color: var(--pvi-paper);
  /* Ondas suaves como no cartão oficial do prêmio, sem imagem extra. */
  background-image:
    radial-gradient(120% 70% at 110% -10%, rgba(255, 255, 255, .9) 0 38%, transparent 62%),
    radial-gradient(90% 60% at -20% 110%, rgba(255, 255, 255, .85) 0 36%, transparent 60%),
    radial-gradient(60% 40% at 50% 120%, rgba(167, 4, 4, .06), transparent 70%),
    linear-gradient(160deg, var(--pvi-paper-2), var(--pvi-paper));
  background-attachment: fixed;
}

.ne-pvi__shell {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 0 max(16px, env(safe-area-inset-bottom));
}

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

.ne-pvi__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 0 clamp(12px, 3vw, 24px);
}

.ne-pvi__logo { display: inline-block; border-radius: 8px; }
.ne-pvi__logo img { display: block; width: auto; height: clamp(56px, 11vw, 92px); }

.ne-pvi__tag {
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--pvi-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--pvi-red);
}

/* --- etapa --------------------------------------------------------------- */

.ne-pvi__stage { flex: 1; display: flex; flex-direction: column; }

.ne-pvi__loading {
  margin: 3rem 0;
  text-align: center;
  color: var(--pvi-muted);
}

.ne-pvi__head { text-align: center; margin-bottom: clamp(16px, 3vw, 28px); }

.ne-pvi__contador {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--pvi-red);
}

.ne-pvi__contador::before,
.ne-pvi__contador::after {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--pvi-orange);
}

.ne-pvi__categoria {
  margin: 0 auto;
  max-width: 20ch;
  font-family: var(--pvi-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 6.4vw, 3.6rem);
  line-height: .98;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--pvi-red);
  text-wrap: balance;
}

.ne-pvi__categoria:focus { outline: none; }

.ne-pvi__instrucao {
  margin: 10px 0 0;
  font-size: .92rem;
  color: var(--pvi-muted);
}

/* --- cartões ------------------------------------------------------------- */

.ne-pvi__opcoes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2.4vw, 24px);
}

/* Categoria com só 2 finalistas: mesma largura de cartão, centralizados. */
@media (min-width: 701px) {
  .ne-pvi__opcoes:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: calc((200% - clamp(10px, 2.4vw, 24px)) / 3);
    margin-inline: auto;
  }
}

.ne-pvi__opcao {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: clamp(8px, 1.6vw, 16px) clamp(4px, 1vw, 10px) clamp(10px, 1.8vw, 18px);
  border: 2px solid transparent;
  border-radius: 22px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 10px 30px -18px rgba(122, 3, 3, .35);
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), border-color .2s ease, background-color .2s ease, opacity .2s ease, box-shadow .2s ease;
}

div.ne-pvi__opcao { cursor: default; }

button.ne-pvi__opcao:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .9); }
button.ne-pvi__opcao:active { transform: translateY(0) scale(.985); }

button.ne-pvi__opcao:focus-visible {
  outline: 3px solid var(--pvi-orange);
  outline-offset: 3px;
}

.ne-pvi__opcao.is-escolhido {
  border-color: var(--pvi-red);
  background: #fff;
  box-shadow: 0 14px 34px -16px rgba(167, 4, 4, .55);
}

/* Respondida: as opções não escolhidas recuam, a escolha salta. */
.ne-pvi__opcoes.is-respondida .ne-pvi__opcao:not(.is-escolhido) { opacity: .55; }
.ne-pvi__opcoes.is-respondida .ne-pvi__opcao:not(.is-escolhido):hover { opacity: .9; }

.ne-pvi__midia {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
}

.ne-pvi__midia img {
  display: block;
  width: 100%;
  max-width: 293px;
  height: auto;
  aspect-ratio: 293 / 300;
  object-fit: contain;
}

.ne-pvi__nome {
  font-family: var(--pvi-display);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--pvi-red);
}

.ne-pvi__clube { font-size: .85rem; font-weight: 600; color: var(--pvi-muted); }

/* Marca de escolha: forma (check), não só cor. */
.ne-pvi__check {
  position: absolute;
  top: 4px;
  right: 8%;
  display: grid;
  place-items: center;
  width: clamp(28px, 5vw, 38px);
  height: clamp(28px, 5vw, 38px);
  border-radius: 50%;
  background: var(--pvi-red);
  color: #fff;
  box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(122, 3, 3, .35);
  opacity: 0;
  transform: scale(.6);
  transition: opacity .18s ease, transform .25s cubic-bezier(.2, .9, .3, 1.4);
}

.ne-pvi__check svg { width: 60%; height: 60%; }

.is-escolhido .ne-pvi__check { opacity: 1; transform: scale(1); }

/* --- parcial ------------------------------------------------------------- */

.ne-pvi__medida {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 6px;
}

.ne-pvi__barra {
  flex: 1;
  height: 10px;
  border-radius: 10px;
  background: rgba(167, 4, 4, .1);
  overflow: hidden;
}

.ne-pvi__barra-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pvi-red), #d62a12);
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}

.is-lider .ne-pvi__barra-fill { background: linear-gradient(90deg, var(--pvi-red), var(--pvi-orange)); }
.is-lider { border-color: var(--pvi-orange); background: #fff; }

.ne-pvi__pct {
  min-width: 3.6em;
  font-family: var(--pvi-display);
  font-size: 1.5rem;
  font-weight: 400;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--pvi-red);
}

/* --- navegação ----------------------------------------------------------- */

.ne-pvi__nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(20px, 4vw, 36px);
}

.ne-pvi__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 11rem;
  min-height: 52px;
  padding: 0 28px;
  border: 2px solid var(--pvi-red);
  border-radius: 999px;
  background: var(--pvi-red);
  color: #fff;
  font-family: var(--pvi-display);
  font-size: 1.35rem;
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}

.ne-pvi__btn:hover { background: var(--pvi-red-deep); border-color: var(--pvi-red-deep); }
.ne-pvi__btn:active { transform: scale(.98); }
.ne-pvi__btn:focus-visible { outline: 3px solid var(--pvi-orange); outline-offset: 3px; }

.ne-pvi__btn--ghost { background: transparent; color: var(--pvi-red); }
.ne-pvi__btn--ghost:hover { background: rgba(167, 4, 4, .07); color: var(--pvi-red-deep); }

.ne-pvi__btn:disabled {
  border-color: rgba(167, 4, 4, .25);
  background: rgba(167, 4, 4, .25);
  color: #fff;
  cursor: not-allowed;
  transform: none;
}

.ne-pvi__btn.is-loading { cursor: progress; }

.ne-pvi__progresso {
  height: 6px;
  margin: clamp(18px, 3vw, 28px) auto 0;
  width: min(100%, 420px);
  border-radius: 6px;
  background: rgba(167, 4, 4, .1);
  overflow: hidden;
}

.ne-pvi__progresso-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pvi-red), var(--pvi-orange));
  transition: width .35s ease;
}

/* --- confirmação --------------------------------------------------------- */

.ne-pvi__obrigado {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 5vw, 48px) 0;
  text-align: center;
}

.ne-pvi__selo {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--pvi-red);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(255, 152, 0, .22), 0 16px 40px -14px rgba(122, 3, 3, .6);
  animation: ne-pvi-selo .5s cubic-bezier(.2, .9, .3, 1.3) both;
}

.ne-pvi__selo svg { width: 46%; height: 46%; }

@keyframes ne-pvi-selo {
  from { opacity: 0; transform: scale(.5); }
  to { opacity: 1; transform: scale(1); }
}

.ne-pvi__eyebrow {
  margin: 0 0 6px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pvi-orange);
}

.ne-pvi__headline {
  margin: 0;
  font-family: var(--pvi-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 9vw, 4.6rem);
  line-height: .95;
  text-transform: uppercase;
  color: var(--pvi-red);
}

.ne-pvi__texto {
  max-width: 34rem;
  margin: 14px 0 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--pvi-muted);
}

.ne-pvi__acoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 0;
}

.ne-pvi__alerta {
  margin: 0 auto 16px;
  max-width: 40rem;
  padding: 12px 16px;
  border: 1px solid rgba(192, 57, 43, .3);
  border-radius: 14px;
  background: #fff;
  color: #a5301f;
  font-weight: 600;
  text-align: center;
}

/* --- rodapé -------------------------------------------------------------- */

.ne-pvi__rodape {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: clamp(20px, 4vw, 32px);
  font-size: .78rem;
  color: var(--pvi-muted);
}

.ne-pvi__rodape a { color: inherit; text-decoration: none; }
.ne-pvi__rodape a:hover { color: var(--pvi-red); }

/* --- celular ------------------------------------------------------------- */

@media (max-width: 700px) {
  .ne-pvi__opcoes { grid-template-columns: 1fr; gap: 8px; }

  /* Empilhados, os cartões ficam lado a lado: arte à esquerda, mais compacta. */
  .ne-pvi__opcao { padding: 4px 10px 8px; border-radius: 18px; }
  .ne-pvi__midia { min-height: 0; }
  .ne-pvi__midia img { max-width: 168px; }
  .ne-pvi__logo img { height: 52px; }
  .ne-pvi__head { margin-bottom: 12px; }
  .ne-pvi__categoria { font-size: clamp(1.9rem, 8.4vw, 2.4rem); }
  .ne-pvi__instrucao { margin-top: 6px; font-size: .85rem; }
  .ne-pvi__check { top: 6px; right: 6px; }

  .ne-pvi__nav {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-left: -16px;
    margin-right: -16px;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(244, 236, 235, 0), var(--pvi-paper) 35%);
  }

  .ne-pvi__btn { flex: 1; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ne-pvi__opcao,
  .ne-pvi__check,
  .ne-pvi__btn,
  .ne-pvi__barra-fill,
  .ne-pvi__progresso-fill { transition: none; }
  .ne-pvi__selo { animation: none; }
  button.ne-pvi__opcao:hover { transform: none; }
}

/* Parcial: atalhos por número de categoria. */
.ne-pvi__atalhos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 640px;
  margin: 4px auto 14px;
}

.ne-pvi__atalho {
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border: 1px solid var(--pvi-line);
  border-radius: 999px;
  background: var(--pvi-paper-2);
  color: var(--pvi-red);
  font: 700 .82rem/1 var(--pvi-body);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.ne-pvi__atalho:hover { border-color: var(--pvi-red); }

.ne-pvi__atalho:focus-visible { outline: 2px solid var(--pvi-orange); outline-offset: 2px; }

.ne-pvi__atalho.is-atual {
  background: var(--pvi-red);
  border-color: var(--pvi-red);
  color: #fff;
}

/* Celular: grade de 10 colunas, três linhas iguais, sem sobrar número sozinho. */
@media (max-width: 700px) {
  .ne-pvi__atalhos {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    max-width: 420px;
    margin: 2px auto 12px;
    padding: 6px;
    border: 1px solid var(--pvi-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .55);
    box-sizing: border-box;
  }
  .ne-pvi__atalho {
    min-width: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: .74rem;
  }
  .ne-pvi__atalho.is-atual { box-shadow: 0 2px 6px rgba(167, 4, 4, .3); }
}
