/* Painel de boas-vindas — apresenta summit 2026 (TV/LED ao lado da porta).
   Palco fixo de 1920x1080, escalado por --escala (painel.js) para caber na tela. */

:root {
  --marinho-950: #030e33;
  --marinho-900: #061548;   /* fundo do logo */
  --marinho-800: #0a2163;
  --azul-700: #123a8e;
  --azul-500: #2e6be6;
  --verde: #8dc63f;         /* verde-limão do logo */
  --ciano: #23a6e0;         /* azul das chamadas em itálico do material */
  --tinta: #0b1b4d;         /* nome no cartão */
  --tinta-2: #55627e;       /* função */
  --tinta-3: #1b3c8c;       /* empresa */
  --ease-saida: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--marinho-950);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { cursor: none; }                 /* tela de exibição: sem ponteiro... */
body.mostrar-cursor { cursor: auto; }  /* ...exceto antes da tela cheia, para achar o botão */

.palco {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%, -50%) scale(var(--escala, 1));
  overflow: hidden;
  font-family: 'Poppins', system-ui, sans-serif;
  color: #fff;
  background:
    radial-gradient(ellipse 70% 60% at 50% 38%, #12398b 0%, rgba(18, 57, 139, 0) 70%),
    radial-gradient(ellipse 120% 90% at 50% 50%, var(--marinho-800) 0%, var(--marinho-900) 55%, var(--marinho-950) 100%);
}

/* Textura de pontos de LED, como no material (bem sutil). */
.pontilhado {
  position: absolute; inset: 0; pointer-events: none; z-index: 20;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.6px),
    radial-gradient(rgba(0, 10, 40, 0.10) 1px, transparent 1.6px);
  background-size: 7px 7px, 7px 7px;
  background-position: 0 0, 3.5px 3.5px;
}

/* ── Topo: logo + saudação ── */
.topo {
  position: absolute; top: 74px; left: 0; right: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 30px;
}
.logo {
  width: 760px; height: auto; display: block;
  filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.35));
}
.saudacao {
  margin: 0;
  font-weight: 600;
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0.42em;
  padding-left: 0.42em;               /* compensa o espaçamento após a última letra */
  color: var(--verde);
  text-shadow: 0 0 30px rgba(141, 198, 63, 0.38);
  transition: opacity 0.32s ease, transform 0.32s ease;
}
.saudacao.trocando { opacity: 0; transform: translateY(-8px); }

/* ── Cena ── */
.cena { position: absolute; left: 0; right: 0; top: 296px; height: 650px; z-index: 4; }

/* Espera: convite enquanto ninguém chegou */
.espera {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px; text-align: center;
  transition: opacity 0.9s ease, transform 0.9s var(--ease-saida);
}
.espera-titulo {
  margin: 0;
  font-weight: 900;
  font-size: 112px;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.espera-titulo span { display: block; }
.espera-titulo .linha-2 { font-style: italic; color: var(--ciano); }
.espera-apoio {
  margin: 0;
  font-weight: 500;
  font-size: 34px;
  color: rgba(255, 255, 255, 0.78);
}
.espera-titulo, .espera-apoio { animation: flutuar 9s ease-in-out infinite alternate; }
.espera-apoio { animation-delay: -4.5s; }
@keyframes flutuar { to { transform: translate3d(0, -10px, 0); } }

.cartoes { position: absolute; inset: 0; }
.espera-titulo { text-shadow: 0 6px 40px rgba(3, 14, 51, 0.85); }

/* O convite só aparece enquanto ninguém chegou. */
.palco:not([data-modo="convite"]) .espera { opacity: 0; transform: translate3d(0, 24px, 0); }

/* ── Título do topo: saudação (boas-vindas) ou frase do Summit (carrossel) no mesmo lugar ── */
.titulo-topo { display: grid; place-items: center; transition: opacity 0.5s ease; }
.titulo-topo > * { grid-area: 1 / 1; }
.frase {
  margin: 0;
  font-weight: 800; font-size: 46px; line-height: 1; letter-spacing: -0.01em; white-space: nowrap;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.frase em { font-style: italic; color: var(--ciano); }
.palco[data-modo="convite"] .titulo-topo { opacity: 0; }
.palco[data-modo="mosaico"] .frase { opacity: 1; transform: none; }
.palco[data-modo="mosaico"] .saudacao { opacity: 0; }

/* ── Cartão ── */
.cartao {
  position: absolute; left: 50%; top: 50%;
  width: 530px; height: 640px;
  margin: -320px 0 0 -265px;
  display: flex; flex-direction: column;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  transform-origin: 50% 50%;
  transition:
    transform 1.05s var(--ease-saida),
    opacity 0.85s ease,
    box-shadow 1.05s ease;
  will-change: transform, opacity;
}

.cartao .foto {
  position: relative; flex: none; height: 392px;
  overflow: hidden;
  background: var(--marinho-800);
}
.cartao .iniciais {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-weight: 800; font-size: 168px; letter-spacing: 0.02em;
  color: #fff;
  background:
    radial-gradient(120% 90% at 28% 12%, var(--azul-500) 0%, var(--azul-700) 46%, var(--marinho-900) 100%);
}
.cartao .iniciais::after {           /* aro discreto em verde, eco da marca */
  content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  border: 2px solid rgba(141, 198, 63, 0.35);
}
.cartao .foto img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 28%;
  transition: filter 1s ease;
}

.cartao .info {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 26px 40px 32px;
  background: #fff;
}
.cartao .nome {
  margin: 0;
  font-weight: 800; font-size: 50px; line-height: 1.04; letter-spacing: -0.015em;
  color: var(--tinta);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.cartao .nome.longo { font-size: 42px; }
.cartao .cargo {
  margin: 8px 0 0;
  font-weight: 400; font-size: 25px; line-height: 1.25;
  color: var(--tinta-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cartao .empresa {
  margin: 14px 0 0;
  font-weight: 700; font-size: 21px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tinta-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Reflexo que atravessa o cartão novo uma vez */
.cartao .brilho {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 36%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 64%);
  transform: translate3d(-130%, 0, 0);
}
.cartao.destaque .brilho { animation: varrer 1.7s 0.55s cubic-bezier(0.4, 0, 0.2, 1) both; }
@keyframes varrer { to { transform: translate3d(130%, 0, 0); } }

/* ── Posições ── */
.cartao.no-centro {
  z-index: 3;
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  box-shadow:
    0 0 0 4px var(--verde),
    0 0 90px rgba(141, 198, 63, 0.34),
    0 50px 100px rgba(0, 0, 0, 0.5);
}
/* Estados de entrada e saída (declarados depois das posições: vencem) */
.cartao.entrando { transform: translate3d(0, 80px, 0) scale(0.86); opacity: 0; }
.cartao.no-centro:not(.entrando) { transition-timing-function: cubic-bezier(0.34, 1.32, 0.64, 1), ease, ease; }
.cartao.sumindo { opacity: 0; transition: opacity 0.55s ease; }

/* ── Mosaico de rostos (fundo): quem já chegou; rostos ilustrativos enquanto a casa enche ── */
.mosaico {
  position: absolute; left: -27px; top: -67px; z-index: 0;
  display: grid; grid-template-columns: repeat(13, 150px); grid-auto-rows: 150px; gap: 2px;
}
.ladrilho { position: relative; overflow: hidden; background: var(--marinho-800); }
.ladrilho > img, .ladrilho > canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity 1.6s ease;
}
.ladrilho > .chegando { opacity: 0; }
/* Quem está no evento tem um fio verde; os rostos ilustrativos, não. */
.ladrilho.real::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px rgba(141, 198, 63, 0.55); }

/* Véu: escurece o mosaico (mais no topo e no rodapé, onde há texto). */
.veu {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 14, 51, 0.96) 0%, rgba(3, 14, 51, 0.62) 27%, rgba(3, 14, 51, 0.62) 78%, rgba(3, 14, 51, 0.96) 100%),
    radial-gradient(ellipse 60% 55% at 50% 55%, rgba(18, 57, 139, 0.25) 0%, rgba(3, 14, 51, 0) 70%);
}
.veu::after {
  content: ''; position: absolute; inset: 0; background: rgba(3, 14, 51, 0.62);
  opacity: 0; transition: opacity 0.8s ease;
}
.palco[data-modo="boasvindas"] .veu::after { opacity: 1; }

/* ── Destaques: de 6 a 10 cartões com nome; o grupo troca a cada 20 s, cada vez com um efeito ── */
.destaques { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: opacity 0.8s ease; perspective: 1600px; }
.palco[data-modo="convite"] .destaques { opacity: 0; }
.palco[data-modo="boasvindas"] .destaques { opacity: 0; }
.dcard {
  position: absolute; width: calc(var(--foto) + 20px);
  display: flex; flex-direction: column; align-items: center;
  animation-fill-mode: both;
  will-change: transform, opacity;
}
.dcard.entra { animation-duration: 0.95s; animation-delay: calc(var(--i) * 75ms); animation-timing-function: cubic-bezier(0.22, 1.15, 0.36, 1); }
.dcard.sai { animation-duration: 0.6s; animation-delay: calc(var(--i) * 45ms); animation-timing-function: cubic-bezier(0.55, 0, 0.75, 0.2); }
.dcard.entra-cascata { animation-name: entra-cascata; }
.dcard.entra-giro3d { animation-name: entra-giro3d; }
.dcard.entra-zoom { animation-name: entra-zoom; }
.dcard.entra-onda { animation-name: entra-onda; }
.dcard.entra-espiral { animation-name: entra-espiral; }
.dcard.sai-cascata { animation-name: sai-cascata; }
.dcard.sai-giro3d { animation-name: sai-giro3d; }
.dcard.sai-zoom { animation-name: sai-zoom; }
.dcard.sai-onda { animation-name: sai-onda; }
.dcard.sai-espiral { animation-name: sai-espiral; }
/* Quem acabou de chegar pousa por último, quando o cartão grande chega ao lugar. */
.dcard.pouso { animation-name: pouso; animation-delay: 0.78s; animation-duration: 0.8s; }

@keyframes entra-cascata { from { opacity: 0; transform: translate3d(0, 80px, 0) scale(0.88); } 55% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes entra-giro3d { from { opacity: 0; transform: rotateY(-100deg) scale(0.9); } 50% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes entra-zoom { from { opacity: 0; transform: scale(1.4); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes entra-onda { from { opacity: 0; transform: translate3d(220px, 0, 0) rotate(5deg); } to { opacity: 1; transform: none; } }
@keyframes entra-espiral { from { opacity: 0; transform: rotate(-16deg) scale(0.3); } 70% { opacity: 1; transform: rotate(2deg) scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes sai-cascata { to { opacity: 0; transform: translate3d(0, -60px, 0) scale(0.92); } }
@keyframes sai-giro3d { to { opacity: 0; transform: rotateY(100deg) scale(0.9); } }
@keyframes sai-zoom { to { opacity: 0; transform: scale(0.7); filter: blur(8px); } }
@keyframes sai-onda { to { opacity: 0; transform: translate3d(-220px, 0, 0) rotate(-5deg); } }
@keyframes sai-espiral { to { opacity: 0; transform: rotate(14deg) scale(0.3); } }
@keyframes pouso { from { opacity: 0; transform: scale(0.7); } 60% { opacity: 1; transform: scale(1.07); } to { opacity: 1; transform: none; } }

.retrato {
  position: relative; flex: none; width: var(--foto); height: var(--foto); border-radius: 26px; overflow: hidden;
  background: radial-gradient(120% 90% at 28% 12%, var(--azul-500) 0%, var(--azul-700) 46%, var(--marinho-900) 100%);
  box-shadow: 0 0 0 3px var(--verde), 0 0 44px rgba(141, 198, 63, 0.3), 0 26px 50px rgba(0, 0, 0, 0.55);
}
.retrato > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.retrato .ini { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: calc(var(--foto) * 0.36); color: #fff; }
/* Reflexo que atravessa cada foto quando o grupo entra */
.retrato::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 36%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 64%);
  transform: translate3d(-130%, 0, 0);
}
.dcard.entra .retrato::after { animation: varrer 1.3s calc(0.55s + var(--i) * 75ms) cubic-bezier(0.4, 0, 0.2, 1) both; }
.dcard.pouso .retrato::after { animation-delay: 1.3s; }
.nome-d {
  margin: 16px 0 0; max-width: 100%;
  font-weight: 700; font-size: 27px; line-height: 1.12; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}
.empresa-d {
  margin: 6px 0 0; max-width: 100%;
  font-weight: 700; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; text-align: center;
  color: var(--verde); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* QR do WhatsApp (networking): selo no canto da foto */
.qr-d {
  position: absolute; right: -10px; top: calc(var(--foto) - 102px);
  padding: 5px; border-radius: 14px; background: #fff;
  box-shadow: 0 0 0 3px var(--verde), 0 10px 26px rgba(0, 0, 0, 0.5);
}
.qr-d canvas { display: block; width: 104px; height: 104px; image-rendering: pixelated; border-radius: 8px; }

/* QR no cartão grande da boas-vindas */
.cartao .info { position: relative; }
.cartao .info.com-qr { padding-right: 214px; }
.qr-heroi {
  position: absolute; right: 30px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.qr-heroi canvas { display: block; width: 168px; height: 168px; image-rendering: pixelated; border-radius: 10px; box-shadow: 0 0 0 3px var(--verde); }
.qr-heroi span { font-weight: 700; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tinta-3); }

/* Chegada: anéis de luz atrás do cartão grande */
.explosao {
  position: absolute; left: 50%; top: 50%; width: 760px; height: 760px; margin: -380px 0 0 -380px;
  border-radius: 50%; pointer-events: none;
  border: 4px solid rgba(141, 198, 63, 0.85);
  box-shadow: 0 0 70px rgba(141, 198, 63, 0.5), inset 0 0 70px rgba(141, 198, 63, 0.35);
  animation: explodir 1.8s cubic-bezier(0.16, 0.7, 0.3, 1) both;
}
@keyframes explodir { 0% { opacity: 0; transform: scale(0.3); } 12% { opacity: 1; } 100% { opacity: 0; transform: scale(2.1); } }

/* Chegada: onda de luz verde que corre o mosaico a partir do centro (acima do véu, senão some) */
.luz-mosaico {
  position: absolute; left: -27px; top: -67px; z-index: 1; pointer-events: none;
  display: grid; grid-template-columns: repeat(13, 150px); grid-auto-rows: 150px; gap: 2px;
}
.luz-mosaico > span { opacity: 0; border-radius: 6px; background: radial-gradient(circle, rgba(141, 198, 63, 0.5) 0%, rgba(141, 198, 63, 0.14) 72%); }
.luz-mosaico.onda > span { animation: onda-luz 1.5s ease-out var(--d, 0ms) both; }
@keyframes onda-luz { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

/* Fim da boas-vindas: o cartão grande encolhe até o lugar dele entre os destaques. */
.cartao.voando {
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.55, 0, 0.3, 1), opacity 0.9s ease 0.15s, box-shadow 0.9s ease;
}

/* Rodapé: quantos já chegaram. */
.contador { margin: 0; font-weight: 500; font-size: 22px; letter-spacing: 0.18em; color: rgba(255, 255, 255, 0.78); }
.contador strong { margin-right: 8px; font-weight: 800; letter-spacing: 0.04em; color: var(--verde); }

/* ── Rodapé ── */
.rodape {
  position: absolute; left: 96px; right: 96px; bottom: 44px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
}
.rodape-tec { display: flex; align-items: center; gap: 20px; }
.rodape-tec span {
  font-weight: 500; font-size: 16px; letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.55);
}
.festpag { height: 34px; width: auto; filter: brightness(0) invert(1); opacity: 0.92; }
.rodape-local { margin: 0; font-weight: 400; font-size: 26px; letter-spacing: 0.02em; }
.rodape-local strong { font-weight: 800; }
.rodape-local em { font-style: italic; font-weight: 800; color: var(--ciano); margin: 0 4px; }

/* ── Avisos de operação (discretos) ── */
.aviso {
  position: absolute; top: 28px; right: 28px; z-index: 30;
  padding: 10px 20px; border-radius: 999px;
  font-weight: 600; font-size: 18px; letter-spacing: 0.14em;
  color: #fff; background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
/* ── Pergunta: abrir em tela cheia? ── */
.pergunta {
  position: absolute; inset: 0; z-index: 40;
  display: grid; place-items: center;
  background: rgba(3, 14, 51, 0.74);
  animation: surgir 0.4s ease both;
}
.pergunta[hidden] { display: none; }
.pergunta-caixa {
  width: 780px;
  padding: 58px 66px 54px;
  border-radius: 34px;
  text-align: center;
  background: linear-gradient(160deg, rgba(18, 57, 139, 0.96) 0%, rgba(6, 21, 72, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 1px rgba(141, 198, 63, 0.28), 0 0 80px rgba(141, 198, 63, 0.16), 0 44px 120px rgba(0, 0, 0, 0.55);
  animation: subir 0.55s var(--ease-saida) both;
}
.pergunta-icone { width: 76px; height: 76px; color: var(--verde); }
.pergunta h2 {
  margin: 22px 0 0;
  font-weight: 800; font-size: 50px; line-height: 1.1; letter-spacing: -0.01em;
}
.pergunta p { margin: 14px 0 0; font-size: 26px; color: rgba(255, 255, 255, 0.78); }
.pergunta-acoes { margin-top: 42px; display: flex; gap: 20px; justify-content: center; }
.botao-sim, .botao-nao {
  font-family: inherit; cursor: pointer; border-radius: 18px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.botao-sim {
  min-width: 320px; padding: 22px 44px; border: 0;
  background: var(--verde); color: var(--marinho-900);
  font-weight: 800; font-size: 32px;
  box-shadow: 0 14px 34px rgba(141, 198, 63, 0.38);
}
.botao-nao {
  padding: 22px 36px;
  border: 1px solid rgba(255, 255, 255, 0.32); background: transparent; color: #fff;
  font-weight: 600; font-size: 26px;
}
.botao-sim:active, .botao-nao:active { transform: scale(0.97); }
.botao-sim:focus-visible, .botao-nao:focus-visible { outline: 4px solid #fff; outline-offset: 5px; }
@keyframes surgir { from { opacity: 0; } }
@keyframes subir { from { opacity: 0; transform: translate3d(0, 30px, 0) scale(0.96); } }

.estado {
  position: absolute; right: 24px; bottom: 20px; z-index: 30;
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.4s ease;
}
.estado.ok { background: rgba(141, 198, 63, 0.55); }
.estado.offline { background: #f0a020; animation: piscar 1.2s ease-in-out infinite; }
.estado.erro { background: #e5484d; animation: piscar 0.8s ease-in-out infinite; }
@keyframes piscar { 50% { opacity: 0.25; } }

@media (prefers-reduced-motion: reduce) {
  .espera-titulo, .espera-apoio { animation: none; }
  .ladrilho > img, .ladrilho > canvas { transition-duration: 0.01s; }
  .dcard, .retrato::after, .explosao, .luz-mosaico.onda > span { animation-duration: 0.01s !important; animation-delay: 0s !important; }
  .cartao, .saudacao, .espera { transition-duration: 0.01s; }
  .cartao.destaque .brilho { animation: none; }
}
