/* Abertura do link pessoal (js/abertura-cedo.js marca o <html>; js/abertura.mjs encena). O 1º
   quadro já é o palco escuro, só com CSS. O palco fica fora do <body>: fundo por baixo da página,
   frente por cima; a página, recortada em círculo, abre em íris. Anima transform, opacity e clip-path. */
html.tvx-espera, html.tvx-abertura { overflow: hidden; scrollbar-gutter: stable; background: #1e2038; }
html.tvx-espera::before, html.tvx-abertura::before, .ab-fundo, .ab-veu {
  background:
    radial-gradient(ellipse 90% 80% at 50% 46%, transparent 34%, rgb(8 7 17 / .68)),
    linear-gradient(160deg, #20243f, #2c2338 60%, #3a2236);
}
html.tvx-espera::before, html.tvx-abertura::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
html.tvx-abertura body { clip-path: circle(0 at 50% 50%); }

/* Acesso (/) conferindo o código do link: só o aviso de espera, no mesmo escuro. */
html.tvx-espera body { background: transparent; }
html.tvx-espera :is(.ac-mast, .ac-footer, .ac-skip), html.tvx-espera #conteudo:not(.is-abrindo) > * { visibility: hidden; }
html.tvx-espera #conteudo.is-abrindo::before { content: none; }

/* Cartas: os envelopes chegam depois da luz, não escondidos atrás do palco. */
html[data-abertura="tocando"] .ct-item { animation-play-state: paused; }

/* ---------- Palco ---------- */
.ab-fundo, .ab-frente { position: fixed; inset: 0; margin: 0; overflow: hidden; contain: strict; }
.ab-fundo { z-index: -1; pointer-events: none; }
.ab-frente {
  z-index: 2147483000; display: grid; place-items: center; padding-bottom: 7vh; cursor: pointer;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.ab-fundo > *, .ab-anel, .ab-clarao, .ab-veu { position: absolute; left: 0; top: 0; pointer-events: none; }
.ab-veu { width: 100%; height: 100%; }
.ab-poeira { width: 100%; height: 100%; }
/* Luz ambiente vinho do acesso (#5b2a41), que só aparece quando o holofote pousa. */
.ab-aura { border-radius: 50%; opacity: 0; background: radial-gradient(closest-side, rgb(91 42 65 / .92), rgb(91 42 65 / .5) 46%, transparent); }
/* Poça com platô e borda macia, como um elipsoidal no palco (mesma família de palco.css). */
.ab-poca {
  border-radius: 50%; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgb(255 230 198 / .17), rgb(255 228 194 / .15) 66%, rgb(255 222 184 / .08) 85%, rgb(255 216 176 / 0) 98%);
}
/* O braço gira no pivô e soma luz (screen); o cone cônico vem do JS, com a abertura medida. */
.ab-braco { opacity: 0; transform-origin: 50% 0; mix-blend-mode: screen; }
.ab-feixe {
  position: absolute;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 34%, #000 74%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 34%, #000 74%, transparent);
}
.ab-mancha { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgb(255 236 208 / .26), rgb(255 232 200 / .23) 64%, rgb(255 226 192 / .12) 86%, rgb(255 222 186 / 0) 99%); }

/* ---------- Título: wordmark, traço e slogan ---------- */
.ab-titulo {
  --ab-w: min(72vw, 520px, 80vh);
  position: relative; display: grid; justify-items: center; text-align: center; color: #f4e9ee; will-change: transform, opacity;
}
.ab-marca { position: relative; width: var(--ab-w); aspect-ratio: 302 / 66; }
.ab-marca-halo { position: absolute; inset: -70% -16%; border-radius: 50%; opacity: 0; background: radial-gradient(closest-side, rgb(255 224 184 / .3), rgb(238 104 116 / .08) 62%, transparent); }
.ab-marca-base, .ab-marca-acesa, .ab-marca-brilho {
  position: absolute; inset: 0;
  -webkit-mask: url("assets/envio/marca.svg") center / contain no-repeat;
  mask: url("assets/envio/marca.svg") center / contain no-repeat;
}
.ab-marca-base { opacity: 0; background: #a48c9b; }
.ab-marca-acesa { clip-path: inset(0 100% 0 0); background: linear-gradient(100deg, #e6c494, #fff5e4 38%, #f9e6c6 60%, #e3bb83); }
.ab-marca-brilho { overflow: hidden; }
.ab-faixa {
  position: absolute; top: 0; bottom: 0; left: 0; width: 36%; transform: translateX(-130%);
  background: linear-gradient(100deg, transparent, rgb(255 251 242 / .85) 44%, #fff 50%, rgb(255 251 242 / .85) 56%, transparent);
}
.ab-traco { width: 34px; height: 2px; margin: calc(var(--ab-w) * .065) 0 calc(var(--ab-w) * .05); background: #ee6874; transform: scaleX(0); }
.ab-slogan { margin: 0; font: 600 calc(var(--ab-w) * .087)/1 var(--font-ui); letter-spacing: -.045em; }
.ab-linha { display: block; padding: .05em .3em .16em; clip-path: inset(0 -1em); white-space: nowrap; }
.ab-linha > span { display: inline-block; opacity: 0; transform: translateY(110%); }
.ab-linha em { font: italic 400 1.34em/.92 var(--editorial); letter-spacing: -.03em; color: #fff4e3; }

/* ---------- Íris ---------- */
.ab-anel {
  border-radius: 50%; opacity: 0; transform: scale(0);
  background: radial-gradient(closest-side, transparent 80%, rgb(255 236 210 / .07) 86%, rgb(255 242 222 / .36) 90%, rgb(255 236 210 / .1) 94.5%, rgb(255 236 210 / 0) 100%);
}
.ab-clarao { border-radius: 50%; opacity: 0; background: radial-gradient(closest-side, rgb(255 246 230 / .92), rgb(255 236 208 / .6) 22%, rgb(255 226 190 / .2) 50%, transparent); }
@media print { .ab-fundo, .ab-frente { display: none; } }
