/* Portal vivo (13/11/2026): camada de tecnologia nova por cima do Portal. Só acrescenta; não tira nem cobre nada.
   1) transição entre páginas (View Transitions); 2) efeitos guiados pela rolagem (scroll-driven animations);
   3) luz e borda que seguem o cursor nos cartões; 4) capa com aurora em shader (canvas criado pelo portal-vivo.js). */

/* ---------- 1) transição entre páginas: a antiga recua e desfoca, a nova sobe; o topo fica parado ---------- */
@view-transition { navigation: auto; }
header.topo { view-transition-name: pv-topo; }
::view-transition-old(root) { animation: pvSai .3s cubic-bezier(.4, 0, .8, .3) both; }
::view-transition-new(root) { animation: pvEntra .6s cubic-bezier(.2, .7, .2, 1) both; }
::view-transition-group(pv-topo) { animation-duration: .4s; }
@keyframes pvSai { to { opacity: 0; scale: .975; filter: blur(6px); } }
@keyframes pvEntra { from { opacity: 0; translate: 0 28px; filter: blur(8px); } }

/* ---------- 4) capa: aurora em shader e luz nas palavras da manchete ---------- */
.pv-aurora { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 1.2s; }
.pv-aurora.on { opacity: .95; }
.pv-on .titulo-destaque .pl { text-shadow: 0 0 calc(var(--pv, 0) * 30px) rgba(226, 195, 142, calc(var(--pv, 0) * .85)); translate: 0 calc(var(--pv, 0) * -5px); }

/* ---------- 3) cartões: clarão e borda de luz que seguem o cursor ---------- */
.pv-luz { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 4; opacity: 0; transition: opacity .35s; mix-blend-mode: screen;
  background: radial-gradient(300px circle at var(--lx, 50%) var(--ly, 50%), rgba(246, 227, 189, .15), rgba(120, 160, 230, .05) 45%, transparent 68%); }
.pv-luz::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: radial-gradient(220px circle at var(--lx, 50%) var(--ly, 50%), rgba(246, 227, 189, .95), rgba(196, 154, 92, .35) 45%, transparent 72%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.pv-quente > .pv-luz { opacity: 1; }
/* anel que nasce no clique de botões e links */
.pv-anel { position: fixed; z-index: 9999; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; pointer-events: none; border: 1.5px solid rgba(246, 227, 189, .9); box-shadow: 0 0 24px rgba(196, 154, 92, .5), inset 0 0 18px rgba(196, 154, 92, .25); }

/* ---------- 2) efeitos guiados pela rolagem (só onde o navegador sabe fazer e sem "reduzir movimento") ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* a capa fica para trás: a foto escurece e desfoca, o texto sobe mais devagar que a página */
    .palco-fundo { animation: pvPalcoFoto linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
    .palco > .caixa { animation: pvPalcoTexto linear both; animation-timeline: scroll(root); animation-range: 0 85vh; }
    @keyframes pvPalcoFoto { to { filter: brightness(.4) blur(7px); } }
    @keyframes pvPalcoTexto { to { translate: 0 -64px; opacity: .1; } }
    /* fotos grandes: paralaxe por dentro da moldura enquanto atravessam a tela */
    .bloco-destaque .foto img, .peca .foto img { animation: pvFoto linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    @keyframes pvFoto { from { scale: 1.16; translate: 0 -3.5%; } to { scale: 1.03; translate: 0 3.5%; } }
    /* títulos de seção: um fio de luz dourada atravessa as letras quando a seção entra */
    .titulo-j { background: linear-gradient(100deg, currentColor 0%, currentColor 42%, #F6E3BD 50%, currentColor 58%, currentColor 100%) 100% 0 / 320% 100% no-repeat; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
      animation: pvTitulo linear both; animation-timeline: view(); animation-range: entry 30% cover 55%; }
    @keyframes pvTitulo { to { background-position: 0 0; } }
    /* números de posição crescem ao entrar */
    .bloco-lista .num, .fb-item .num { animation: pvNum linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    @keyframes pvNum { from { scale: .6; opacity: .2; } }
  }
}
@media (prefers-reduced-motion: reduce) { .pv-aurora, .pv-luz, .pv-anel { display: none !important; } ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }
