/* ===== Animação de abertura ===== */
/* Enquanto a intro carrega, esconde o site (evita "piscar" o conteúdo antes). */
html.intro-pending, html.intro-pending body { background: #000; overflow: hidden; }
html.intro-pending body > :not(#intro):not(#entrada):not(.toast):not(.som-player) { visibility: hidden; }
html.intro-pending body::after {
  content: ''; position: fixed; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 24px 6px var(--accent);
  animation: introDot 1s ease-in-out infinite alternate;
}
html.intro-running body::after { display: none; }
@keyframes introDot { from { opacity: .2; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }

.intro {
  position: fixed; inset: 0; z-index: 1000; overflow: hidden;
  background: #000; color: #fff;
  transition: opacity .7s ease;
  touch-action: manipulation;
}
.intro.leaving { opacity: 0; pointer-events: none; }
.intro-skip {
  position: absolute; z-index: 5; top: calc(14px + env(safe-area-inset-top)); right: 14px;
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid #ffffff40; background: #00000080; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
  backdrop-filter: blur(6px);
}
.intro-skip:hover { background: #ffffff20; }
.intro-progress { position: absolute; z-index: 5; left: 0; right: 0; top: 0; height: 3px; background: #ffffff14; }
.intro-progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 10px var(--accent); }

.scene {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 72px 20px 40px; text-align: center;
  opacity: 0; visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
.scene.on { opacity: 1; visibility: visible; transition: opacity .35s ease, visibility 0s; }

/* --- 1. Logo --- */
.scene-logo .logo-wrap { position: relative; width: min(560px, 84vw); }
.scene-logo img { position: relative; width: 100%; opacity: 0; transform: scale(.82); }
.scene-logo .glow {
  position: absolute; inset: -30% -10%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 55%, transparent), transparent);
  opacity: 0; transform: scale(.6);
}
.scene-logo.on img { animation: logoIn 1.6s cubic-bezier(.2,.8,.2,1) forwards, neonFlicker 1.1s steps(1) .15s 1; }
.scene-logo.on .glow { animation: glowIn 1.8s ease-out .3s forwards; }
@keyframes logoIn { 0% { opacity: 0; transform: scale(.82); } 60% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
@keyframes neonFlicker { 0% { opacity: 0; } 8% { opacity: .9; } 12% { opacity: .1; } 20% { opacity: 1; } 24% { opacity: .3; } 30%, 100% { opacity: 1; } }
@keyframes glowIn { 0% { opacity: 0; transform: scale(.6); } 50% { opacity: 1; } 100% { opacity: .55; transform: scale(1.05); } }
.particles { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.particles i {
  position: absolute; width: var(--s, 4px); height: var(--s, 4px); border-radius: 50%;
  background: var(--c, var(--accent)); box-shadow: 0 0 8px var(--c, var(--accent));
  opacity: 0;
}
.scene-logo.on .particles i { animation: burst var(--d, 1.6s) cubic-bezier(.1,.7,.3,1) var(--delay, .2s) forwards; }
@keyframes burst {
  0% { opacity: 0; transform: translate(0, 0) scale(.4); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); }
}

/* --- 2. Atrações --- */
.scene-act { padding: 0; }
.scene-act .photo { position: absolute; inset: 0; opacity: 0; }
.scene-act .photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12) translateX(var(--from, 6%)); }
.scene-act .photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, #000 8%, #0008 45%, #0003); }
.scene-act .sweep {
  position: absolute; top: -20%; bottom: -20%; left: 0; width: 35%;
  background: linear-gradient(90deg, transparent, #ffffff55, transparent);
  transform: translateX(-120%) skewX(-18deg); opacity: 0; mix-blend-mode: overlay;
}
.scene-act .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 20px calc(56px + env(safe-area-inset-bottom)); }
.scene-act .label { font-size: 12px; font-weight: 800; letter-spacing: .3em; color: var(--accent-2); opacity: 0; transform: translateY(10px); }
.scene-act h2 {
  position: relative; display: inline-block; margin: 6px 0 0;
  font-family: var(--font-display); font-size: clamp(36px, 11vw, 92px); line-height: .95; letter-spacing: .02em;
  opacity: 0; transform: translateY(20px);
}
.scene-act h2::before, .scene-act h2::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; }
.scene-act h2::before { color: var(--accent-2); }
.scene-act h2::after { color: var(--accent); }
.scene-act .sub { color: #d4d4d8; margin-top: 4px; opacity: 0; }
.scene-act.on .photo { animation: fadeIn .5s ease forwards; }
.scene-act.on .photo img { animation: slideZoom var(--dur, 1.3s) cubic-bezier(.2,.7,.2,1) forwards; }
.scene-act.on .sweep { animation: sweep .9s ease .15s forwards; }
.scene-act.on .label { animation: rise .4s ease .1s forwards; }
.scene-act.on h2 { animation: rise .35s cubic-bezier(.2,.8,.2,1) .15s forwards; }
.scene-act.on h2::before { animation: glitchA .45s steps(2) .2s 1; }
.scene-act.on h2::after { animation: glitchB .45s steps(2) .2s 1; }
.scene-act.on .sub { animation: fadeIn .4s ease .35s forwards; }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes slideZoom { to { transform: scale(1.02) translateX(0); } }
@keyframes sweep { 0% { opacity: 1; transform: translateX(-120%) skewX(-18deg); } 100% { opacity: 1; transform: translateX(380%) skewX(-18deg); } }
@keyframes glitchA { 0% { opacity: .9; transform: translate(-6px, 2px); } 25% { transform: translate(5px, -3px); } 50% { transform: translate(-3px, 1px); } 75% { transform: translate(4px, 2px); } 100% { opacity: 0; transform: none; } }
@keyframes glitchB { 0% { opacity: .9; transform: translate(6px, -2px); } 25% { transform: translate(-5px, 3px); } 50% { transform: translate(3px, -1px); } 75% { transform: translate(-4px, -2px); } 100% { opacity: 0; transform: none; } }

/* --- 3. Prêmios --- */
.scene-prize .card-p { position: relative; width: min(320px, 72vw); }
.scene-prize .card-p img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 22px; opacity: 0; transform: scale(.8) rotate(-4deg); box-shadow: 0 20px 60px -20px #000; }
.scene-prize .label { font-size: 12px; font-weight: 800; letter-spacing: .3em; color: var(--accent); margin-bottom: 14px; opacity: 0; }
.scene-prize h2 { font-family: var(--font-display); font-size: clamp(24px, 7vw, 44px); margin: 18px 0 0; opacity: 0; transform: translateY(12px); }
.scene-prize.on img { animation: prizeIn .6s cubic-bezier(.2,1.3,.4,1) forwards; }
.scene-prize.on .label { animation: fadeIn .3s ease forwards; }
.scene-prize.on h2 { animation: rise .4s ease .2s forwards; }
@keyframes prizeIn { to { opacity: 1; transform: none; } }
.scene-prize .rays {
  position: absolute; left: 50%; top: 50%; width: 180%; aspect-ratio: 1; margin: -90% 0 0 -90%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--gold) 35%, transparent) 0 8deg, transparent 8deg 24deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent); mask: radial-gradient(closest-side, #000 30%, transparent);
  opacity: 0;
}
.scene-prize.top .label { color: var(--gold); }
.scene-prize.top h2 { color: var(--gold); text-shadow: 0 0 24px color-mix(in srgb, var(--gold) 55%, transparent); font-size: clamp(30px, 9vw, 60px); }
.scene-prize.top .card-p { width: min(380px, 80vw); }
.scene-prize.top.on .rays { animation: fadeIn .6s ease .2s forwards, spin 9s linear infinite; }

/* --- 4. Final --- */
.scene-final .inner { display: grid; gap: 18px; justify-items: center; }
.scene-final img { width: min(360px, 70vw); opacity: 0; transform: translateY(-10px); }
.scene-final p { margin: 0; font-family: var(--font-display); color: var(--accent); font-size: clamp(18px, 5vw, 26px); opacity: 0; }
.scene-final .btn { min-height: 58px; font-size: 18px; padding: 0 32px; opacity: 0; transform: scale(.9); }
.scene-final.on img { animation: rise .5s ease forwards; }
.scene-final.on p { animation: fadeIn .5s ease .15s forwards; }
.scene-final.on .btn { animation: prizeIn .5s cubic-bezier(.2,1.3,.4,1) .3s forwards; }

/* --- Versão sem movimento --- */
.intro.static .scene { transition: none; }
.intro-static { overflow-y: auto; }
.intro-static .inner { display: grid; gap: 20px; justify-items: center; max-width: 560px; }
.intro-static img.logo { width: min(380px, 76vw); }
.intro-static h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .3em; color: var(--accent-2); }
.intro-static ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.intro-static li { width: 96px; font-size: 13px; font-weight: 700; }
.intro-static li img { width: 96px; height: 96px; object-fit: cover; border-radius: 14px; margin-bottom: 6px; }
.intro-static li.top { color: var(--gold); }
.intro-static li.top img { outline: 2px solid var(--gold); }

/* ===== Tema preto e branco / neon branco ===== */
.scene-logo img { filter: drop-shadow(0 0 10px rgba(255,255,255,.6)); }
.scene-logo .glow { background: radial-gradient(closest-side, rgba(255,255,255,.28), transparent); }
.scene-act .photo img { filter: grayscale(1) contrast(1.12); }
.scene-act .label, .scene-prize .label { color: #fff; text-shadow: 0 0 8px #fff; }
.scene-act h2 { text-shadow: 0 0 6px #fff, 0 0 22px rgba(255,255,255,.6); }
.scene-act h2::before { color: #fff; } .scene-act h2::after { color: #777; }

/* Logo do artista com glitch (camadas fantasmas usando a mesma imagem) */
.glitch-img { position: relative; display: inline-block; width: min(420px, 78vw); margin-top: 10px; opacity: 0; transform: translateY(16px); }
.glitch-img img { position: relative; width: 100%; filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 22px rgba(255,255,255,.55)); }
.glitch-img::before, .glitch-img::after {
  content: ''; position: absolute; inset: 0; opacity: 0;
  background: var(--src) center / contain no-repeat;
}
.scene-act.on .glitch-img { animation: rise .35s cubic-bezier(.2,.8,.2,1) .1s forwards; }
.scene-act:not(.first).on .glitch-img { animation: none; opacity: 1; transform: none; }
.scene-act.on .glitch-img::before { animation: glitchA .5s steps(2) .12s 1; }
.scene-act.on .glitch-img::after { animation: glitchB .5s steps(2) .12s 1; filter: blur(1px); }

/* Pôster do sorteio: mostra inteiro, sem cortar */
.scene-prize .card-p { width: min(320px, 70vw); }
.scene-prize.top .card-p { width: min(340px, 72vw); }
.scene-prize .card-p img { aspect-ratio: auto; max-height: 56svh; object-fit: contain; border: 1px solid rgba(255,255,255,.8); box-shadow: 0 0 30px rgba(255,255,255,.3); }
.scene-prize.top h2 { color: #fff; text-shadow: 0 0 6px #fff, 0 0 24px rgba(255,255,255,.6); font-size: clamp(24px, 7vw, 44px); }
.scene-prize .rays { background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.22) 0 8deg, transparent 8deg 24deg); }
.scene-final p { color: #fff; text-shadow: 0 0 8px #fff, 0 0 20px rgba(255,255,255,.5); }
.intro-static li img { filter: grayscale(1); }

/* Fotos da atração inteiras (sem corte): quadro centralizado no lugar de tela cheia */
.scene-act .photo {
  inset: auto; left: 0; right: 0; margin: 0 auto;
  top: calc(64px + env(safe-area-inset-top));
  width: min(300px, 68vw, calc((100svh - 330px) * .75));
  aspect-ratio: 3 / 4;
  border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 0 26px rgba(255,255,255,.35), 0 0 70px rgba(255,255,255,.12);
  transform: translateX(var(--from, 6%)) scale(.94);
}
.scene-act .photo img { transform: none; object-fit: cover; object-position: center top; }
.scene-act .photo::after { background: linear-gradient(to top, rgba(0,0,0,.35), transparent 40%); }
/* brilho passando só dentro do quadro */
.scene-act .sweep { display: none; }
.scene-act .photo::before {
  content: ''; position: absolute; z-index: 1; top: -20%; bottom: -20%; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-150%) skewX(-18deg);
}
.scene-act.on .photo { animation: fotoIn .55s cubic-bezier(.2,.8,.2,1) forwards; }
.scene-act.on .photo img { animation: none; }
.scene-act.on .photo::before { animation: sweepFoto .9s ease .2s forwards; }
@keyframes fotoIn { to { opacity: 1; transform: none; } }
@keyframes sweepFoto { to { transform: translateX(380%) skewX(-18deg); } }
.scene-act .info { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.scene-act .glitch-img { width: min(300px, 70vw); }

/* Foto + logo como um bloco centralizado na vertical */
.scene-act {
  --fw: min(300px, 68vw, calc((100svh - 330px) * .75));
  --fh: calc(var(--fw) * 4 / 3);
  --topo: max(calc(60px + env(safe-area-inset-top)), calc(50svh - (var(--fh) + 210px) / 2));
}
.scene-act .photo { width: var(--fw); top: var(--topo); }
.scene-act .info { bottom: auto; top: calc(var(--topo) + var(--fh) + 22px); padding-bottom: 0; }

/* ===== Tela "Toque para entrar" (libera o som da música) ===== */
html.entrada-pending, html.entrada-pending body { background: #000; overflow: hidden; }
html.entrada-pending body > :not(#entrada):not(#intro):not(.toast):not(.som-player) { visibility: hidden; }
html.entrada-pending body::after {
  content: ''; position: fixed; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 24px 6px var(--accent);
  animation: introDot 1s ease-in-out infinite alternate;
}
html.entrada-running body::after { display: none; }
.entrada {
  position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(ellipse at 50% 42%, #1a1a1a 0%, #000 62%); color: #fff;
  cursor: pointer; transition: opacity .55s ease; -webkit-tap-highlight-color: transparent;
}
.entrada.leaving { opacity: 0; pointer-events: none; }
.entrada-inner { display: grid; justify-items: center; gap: 18px; text-align: center; max-width: 520px; }
.entrada-logo { width: min(360px, 74vw); height: auto; filter: drop-shadow(0 0 18px rgba(255,255,255,.35)); }
.entrada-frase { margin: -6px 0 18px; font-family: var(--font-display); font-size: clamp(15px, 4.2vw, 20px); text-shadow: var(--neon); }
.entrada-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 58px; padding: 0 34px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-display); font-size: clamp(14px, 3.8vw, 17px); letter-spacing: .14em; text-transform: uppercase;
  color: #000; background: #fff; border: 0; box-shadow: 0 0 22px rgba(255,255,255,.55);
  transition: transform .15s, box-shadow .2s;
}
.entrada-btn:hover { box-shadow: 0 0 34px rgba(255,255,255,.85); }
.entrada-btn:active { transform: scale(.97); }
.entrada-btn:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
.entrada-pulso { position: absolute; inset: 0; border-radius: inherit; border: 2px solid rgba(255,255,255,.7); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .entrada-pulso { animation: entradaPulso 1.8s ease-out infinite; }
  .entrada-logo { animation: entradaBrilho 2.6s ease-in-out infinite alternate; }
}
@keyframes entradaPulso { from { transform: scale(1); opacity: .9; } to { transform: scale(1.25, 1.6); opacity: 0; } }
@keyframes entradaBrilho { from { filter: drop-shadow(0 0 10px rgba(255,255,255,.25)); } to { filter: drop-shadow(0 0 26px rgba(255,255,255,.6)); } }
.entrada-som { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: rgba(255,255,255,.7); font-size: 14px; }
.entrada-som svg { width: 18px; height: 18px; }
.entrada-mudo {
  margin-top: 10px; padding: 10px 14px; min-height: 44px; background: none; border: 0; cursor: pointer;
  color: rgba(255,255,255,.55); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px;
}
.entrada-mudo:hover { color: #fff; }
.entrada-mudo:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }
