/* =====================================================================
   Apresentação da Sala dos Conselheiros (76 s, tela cheia, com música).
   Identidade do site: marinho, dourado, Playfair com destaque em itálico
   dourado, Inter nos rótulos. As palavras entram pela classe .on, que o
   assets/js/apresentacao.js põe no segundo exato de cada golpe da música.
   As animações mexem em transform, opacidade e recorte; nada de desfoque
   no texto, que faz as letras tremerem.
   ===================================================================== */
.apr {
  --ouro: #e4c488; --ouro-f: #c9a558; --ouro-c: #fff3d6; --marinho: #061a30;
  --u: min(1vw, 1.78vh);
  position: fixed; inset: 0; z-index: 9999; overflow: hidden; isolation: isolate;
  color: #f6f1e7; font-family: Inter, system-ui, sans-serif;
  background: radial-gradient(120% 80% at 50% 0%, #0b2240 0%, #050f1e 55%, #02060c 100%) #030a14;
  opacity: 0; pointer-events: none; transition: opacity .5s;
}
@media (max-aspect-ratio: 1/1) { .apr { --u: 1.5vw; } }
.apr.on { opacity: 1; pointer-events: auto; }
html[data-apresentando], html[data-apresentando] body { overflow: hidden; }

/* camadas */
.apr-tela { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -4; display: block; }
.apr-luz { position: absolute; left: 50%; top: 46%; width: 90vmax; height: 90vmax; z-index: -3; pointer-events: none; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(228,196,136,.16), rgba(228,196,136,.04) 35%, transparent 62%); opacity: .3; }
.apr-vinheta { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(ellipse 75% 70% at 50% 48%, transparent 55%, rgba(0,0,0,.6) 100%); }
.apr-grao { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .09; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E"); }
/* clarão nos golpes: luz quente vinda do centro, por cima de tudo */
.apr-clarao { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(255,246,226,.95), rgba(228,196,136,.5) 38%, rgba(201,165,88,.1) 72%, transparent); }
/* risco de luz horizontal, como a lente de cinema, nos golpes mais fortes */
.apr-risco { position: absolute; left: -10%; right: -10%; top: 50%; height: 2px; z-index: 5; pointer-events: none; opacity: 0; transform: scaleX(0);
  background: linear-gradient(90deg, transparent, rgba(228,196,136,.6) 25%, #fff6e2 50%, rgba(228,196,136,.6) 75%, transparent);
  box-shadow: 0 0 18px 3px rgba(255,236,190,.65), 0 0 80px 18px rgba(228,196,136,.25); }
/* corte seco para o preto logo antes da batida forte */
.apr-corte { position: absolute; inset: 0; z-index: 7; background: #000; opacity: 0; pointer-events: none; }
.apr-corte.on { opacity: 1; }
/* faixas de cinema: fechadas na introdução, abrem na batida forte dos 18 s */
.apr-faixa { position: absolute; left: 0; right: 0; height: 0; z-index: 6; background: #000; pointer-events: none; transition: height 1.1s cubic-bezier(.7,0,.2,1); }
.apr-faixa.a { top: 0; } .apr-faixa.b { bottom: 0; }
.apr.cinema .apr-faixa { height: 11vh; }

.apr-palco { position: absolute; inset: 0; z-index: 2; }
.apr-cena { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 5vw; visibility: hidden; }
.apr-cena.on { visibility: visible; }
/* a saída é curta para a cena velha não ficar por baixo da nova, que entra no golpe seguinte */
.apr-cena.sai { visibility: visible; animation: apr-sai .32s cubic-bezier(.3,.6,.4,1) forwards; }
@keyframes apr-sai { to { opacity: 0; transform: scale(1.04); } }
.apr-c { width: min(1600px, 92vw); text-align: center; }

/* tipografia */
.apr-h { margin: 0; font-family: "Playfair Display", Georgia, serif; font-weight: 700; line-height: 1.04; letter-spacing: -.01em;
  font-size: clamp(32px, calc(var(--u) * 6.4), 150px); color: #f6f1e7; text-wrap: balance; }
.apr-h.g { font-size: clamp(38px, calc(var(--u) * 8.4), 200px); }
.apr-h.m { font-size: clamp(28px, calc(var(--u) * 5.2), 120px); }
.apr-ou { color: var(--ouro); font-style: italic; }
.apr-eye { margin: 0 0 calc(var(--u) * 2.2); font-size: clamp(11px, calc(var(--u) * 1.3), 26px); font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--ouro); }
.apr-sub { margin: calc(var(--u) * 2.4) auto 0; max-width: 40em; font-size: clamp(15px, calc(var(--u) * 2), 40px); line-height: 1.4; color: #cfd7e2; text-wrap: balance; }
.apr-num { display: block; margin: 0; font-family: "Playfair Display", Georgia, serif; font-weight: 800; line-height: .95; font-variant-numeric: lining-nums tabular-nums;
  font-size: clamp(64px, calc(var(--u) * 15), 330px); }
.apr-num small { font-size: .42em; font-weight: 600; font-style: italic; margin-left: .18em; }
.apr-linha { display: block; }
.apr-eye.abaixo { margin: 1.6em 0 0; }
.apr-r { font: 600 .3em Inter, system-ui, sans-serif; vertical-align: top; margin-left: .06em; position: relative; top: .5em; }
.apr-xl { font-size: 1.45em; line-height: 1; }
/* dourado com brilho que atravessa a palavra */
.apr-brilho { background: linear-gradient(100deg, var(--ouro-f) 0%, var(--ouro) 38%, var(--ouro-c) 50%, var(--ouro) 62%, var(--ouro-f) 100%);
  background-size: 260% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes apr-brilha { from { background-position: 100% 0; } to { background-position: -60% 0; } }

/* blocos que surgem (rótulos, frases de apoio, cartões) */
.apr-b { opacity: 0; }
.apr-b.on { animation: apr-surge .8s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes apr-surge { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.apr-b.lento.on { animation-duration: 2.2s; }

/* palavras que batem na tela, no tempo da música */
.apr-w { display: inline-block; opacity: 0; transform-origin: 50% 60%; will-change: transform, opacity; }
.apr-w.on { animation: apr-golpe .34s cubic-bezier(.2,1.5,.35,1) forwards, apr-rastro 1s ease-out forwards; }
@keyframes apr-golpe { 0% { opacity: 0; transform: scale(1.9) translateY(-.08em); } 35% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes apr-rastro { 0% { text-shadow: 0 0 .45em rgba(255,236,190,.95), 0 0 1.3em rgba(228,196,136,.6); } 100% { text-shadow: 0 0 0 transparent; } }
.apr-brilho.apr-w.on { animation: apr-golpe .34s cubic-bezier(.2,1.5,.35,1) forwards, apr-brilha 2.4s cubic-bezier(.3,0,.2,1) .15s forwards; filter: drop-shadow(0 0 .25em rgba(228,196,136,.35)); }

/* surge de baixo, revelada por uma máscara: introdução e silêncio */
.apr-w.fx-revela.on { animation: apr-revela .9s cubic-bezier(.16,1,.3,1) forwards, apr-rastro 1.2s ease-out forwards; }
@keyframes apr-revela { 0% { opacity: 0; clip-path: inset(100% 0 0 0); transform: translateY(.35em); } 30% { opacity: 1; } 100% { opacity: 1; clip-path: inset(-25% -5% -25% -5%); transform: none; } }
/* corte em diagonal, da esquerda */
.apr-w.fx-corte.on { animation: apr-corte .32s cubic-bezier(.7,0,.2,1) forwards, apr-rastro 1s ease-out forwards; }
@keyframes apr-corte { 0% { opacity: 1; clip-path: inset(-25% 100% -25% 0); transform: translateX(-.5em) skewX(-14deg); } 100% { opacity: 1; clip-path: inset(-25% -5% -25% -5%); transform: none; } }
/* cai pesada e treme ao bater */
.apr-w.fx-queda.on { animation: apr-queda .6s linear forwards, apr-rastro 1.2s ease-out forwards; }
@keyframes apr-queda {
  0% { opacity: 0; transform: translateY(-1.3em) scaleY(1.25); }
  30% { opacity: 1; transform: translateY(.07em) scaleY(.88) scaleX(1.06); }
  45% { transform: translate(-.03em, -.02em); } 58% { transform: translate(.03em, .015em); } 72% { transform: translate(-.015em, 0); }
  100% { opacity: 1; transform: none; }
}
/* falha de sinal: aparece aos trancos, com as cores separadas */
.apr-w.fx-falha.on { animation: apr-falha .55s steps(1, end) forwards; }
@keyframes apr-falha {
  0% { opacity: 0; }
  10% { opacity: 1; transform: translateX(-.08em) skewX(-10deg); text-shadow: -.06em 0 rgba(255,80,80,.85), .06em 0 rgba(120,170,255,.85); clip-path: inset(10% 0 45% 0); }
  25% { opacity: .3; transform: translateX(.06em); clip-path: inset(50% 0 5% 0); }
  40% { opacity: 1; transform: translateX(-.03em); text-shadow: .05em 0 rgba(255,80,80,.7), -.05em 0 rgba(120,170,255,.7); clip-path: none; }
  60% { opacity: 1; transform: translateX(.02em) skewX(6deg); }
  80%, 100% { opacity: 1; transform: none; text-shadow: none; clip-path: none; }
}
/* vem gigante, assenta e treme: os momentos mais fortes */
.apr-w.fx-zoom.on { animation: apr-zoom .75s linear forwards, apr-rastro 1.8s ease-out forwards; }
.apr-brilho.apr-w.fx-zoom.on { animation: apr-zoom .75s linear forwards, apr-brilha 2.4s cubic-bezier(.3,0,.2,1) .3s forwards; }
@keyframes apr-zoom {
  0% { opacity: 0; transform: scale(4); }
  28% { opacity: 1; transform: scale(.94); }
  38% { transform: scale(1.03) translate(-.02em, .01em); }
  50% { transform: translate(.025em, -.015em); } 62% { transform: translate(-.015em, .01em); }
  100% { opacity: 1; transform: none; }
}

/* contador: o número sobe até o valor real */
.apr-conta { opacity: 0; }
.apr-conta.on { opacity: 1; animation: apr-zoom-leve .5s cubic-bezier(.2,.8,.2,1) forwards; }
.apr-conta.apr-brilho.on { animation: apr-zoom-leve .5s cubic-bezier(.2,.8,.2,1) forwards, apr-brilha 5s linear forwards; filter: drop-shadow(0 0 .12em rgba(228,196,136,.3)); }
@keyframes apr-zoom-leve { from { opacity: 0; transform: scale(1.3); } to { opacity: 1; transform: none; } }
.apr-conta.apr-pousou { animation: apr-pousa .6s cubic-bezier(.2,1.4,.3,1), apr-brilha 1.6s cubic-bezier(.3,0,.2,1) forwards !important; }
@keyframes apr-pousa { 0% { transform: scale(1.12); } 100% { transform: none; } }

/* traço de luz que se abre */
.apr-traco { height: 2px; width: 0; margin: calc(var(--u) * 2.6) auto 0; background: linear-gradient(90deg, transparent, var(--ouro), transparent); box-shadow: 0 0 18px rgba(228,196,136,.7); }
.apr-traco.on { animation: apr-traco 1.4s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes apr-traco { to { width: min(560px, 50vw); } }

/* 6 pilares: um cartão por golpe */
.apr-pil { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--u) * 1.4); margin-top: calc(var(--u) * 3.2); text-align: left; }
.apr-pil > div { position: relative; padding: calc(var(--u) * 1.8) calc(var(--u) * 2); border: 1px solid rgba(228,196,136,.28); border-radius: 14px;
  background: linear-gradient(160deg, rgba(228,196,136,.12), rgba(6,26,48,.55) 60%); opacity: 0; overflow: hidden; }
.apr-pil > div.on { animation: apr-cartao .5s cubic-bezier(.2,1.3,.3,1) forwards; }
.apr-pil > div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,243,214,.35) 50%, transparent 70%); transform: translateX(-120%); }
.apr-pil > div.on::after { animation: apr-varre-cartao .9s .1s ease forwards; }
@keyframes apr-cartao { 0% { opacity: 0; transform: translateY(30px) scale(.9); } 100% { opacity: 1; transform: none; } }
@keyframes apr-varre-cartao { to { transform: translateX(120%); } }
.apr-pil b { display: block; font-family: "Playfair Display", Georgia, serif; font-style: italic; font-weight: 600; color: var(--ouro); font-size: clamp(14px, calc(var(--u) * 1.7), 34px); }
.apr-pil span { display: block; margin-top: .3em; font-weight: 600; color: #f6f1e7; font-size: clamp(14px, calc(var(--u) * 1.9), 38px); line-height: 1.2; }

/* números da mentoria */
.apr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--u) * 1.4); margin-top: calc(var(--u) * 3.4); }
.apr-stats > div { padding: calc(var(--u) * 1.6) calc(var(--u) * 1); border-top: 2px solid var(--ouro); background: linear-gradient(180deg, rgba(228,196,136,.1), transparent); opacity: 0; }
.apr-stats > div.on { animation: apr-cartao .45s cubic-bezier(.2,1.3,.3,1) forwards; }
.apr-stats b { display: block; font-family: "Playfair Display", Georgia, serif; font-weight: 800; color: var(--ouro); line-height: 1; font-variant-numeric: lining-nums;
  font-size: clamp(30px, calc(var(--u) * 5.4), 120px); }
.apr-stats span { display: block; margin-top: .4em; font-size: clamp(12px, calc(var(--u) * 1.5), 30px); letter-spacing: .08em; text-transform: uppercase; color: #cfd7e2; }

/* brasão: entra girando com um anel de luz atrás */
.apr-selo { position: relative; display: block; width: clamp(110px, calc(var(--u) * 17), 330px); aspect-ratio: 1; margin: 0 auto calc(var(--u) * 2.4); opacity: 0; }
.apr-selo img { position: relative; width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 22px rgba(228,196,136,.45)); }
.apr-selo::before { content: ""; position: absolute; inset: -14%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 62%, rgba(228,196,136,.15) 75%, rgba(255,243,214,.95) 92%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 64%, #000 65.5%, #000 68%, transparent 69.5%); mask: radial-gradient(circle, transparent 64%, #000 65.5%, #000 68%, transparent 69.5%);
  animation: apr-gira 3.2s linear infinite; }
.apr-selo.on { animation: apr-selo 1.3s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes apr-selo { 0% { opacity: 0; transform: scale(2.4) rotate(-40deg); } 40% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes apr-gira { to { transform: rotate(360deg); } }

/* final: os botões */
.apr-acoes { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: calc(var(--u) * 3.4); }
.apr-acoes a, .apr-acoes button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border-radius: 999px; font: 600 clamp(15px, calc(var(--u) * 1.5), 20px) Inter, system-ui, sans-serif; cursor: pointer; text-decoration: none;
  transition: border-radius .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s, background .35s, color .35s; }
.apr-acoes .ir { background: linear-gradient(180deg, #ecd08f, #c9a558); color: var(--marinho); border: 0; box-shadow: 0 0 0 0 rgba(228,196,136,.5); animation: apr-pulso 2.4s ease-out infinite 1s; }
.apr-acoes .rever { background: transparent; color: #f6f1e7; border: 1.5px solid rgba(228,196,136,.55); }
.apr-acoes a:hover, .apr-acoes button:hover { border-radius: 14px; transform: translateY(-2px); }
.apr-acoes .rever:hover { background: rgba(228,196,136,.12); }
@keyframes apr-pulso { 0% { box-shadow: 0 0 0 0 rgba(228,196,136,.5); } 70%, 100% { box-shadow: 0 0 0 18px rgba(228,196,136,0); } }

/* carregando a música */
.apr-espera { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; z-index: 8; border-radius: 50%;
  border: 2px solid rgba(228,196,136,.18); border-top-color: var(--ouro); animation: apr-gira .9s linear infinite; opacity: 0; transition: opacity .3s; pointer-events: none; }
.apr.esperando .apr-espera { opacity: 1; }

.apr-fechar { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 9; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18); background: rgba(3,10,20,.55); color: #e9eef1; font: 500 13px Inter, system-ui, sans-serif; cursor: pointer; opacity: .45; transition: opacity .2s, border-color .2s, color .2s; }
.apr-fechar:hover, .apr-fechar:focus-visible { opacity: 1; border-color: var(--ouro); color: var(--ouro); }

/* versão em vídeo (?apr-video), gravada para o telão 2016 x 840 da plenária: sem botões; a tela é larga e baixa,
   e a plateia está longe, então as letras crescem com a altura e o bloco de texto usa quase toda a largura */
.apr.video .apr-fechar { display: none; }
.apr.video { --u: 2.1vh; }
.apr.video .apr-c { width: min(1900px, 94vw); }
.apr.video .apr-eye { font-size: clamp(11px, calc(var(--u) * 1.6), 32px); }
.apr.video .apr-sub { font-size: clamp(15px, calc(var(--u) * 2.3), 46px); }
.apr.video .apr-pil b { font-size: clamp(14px, calc(var(--u) * 2), 40px); }
.apr.video .apr-pil span { font-size: clamp(14px, calc(var(--u) * 2.2), 44px); }
.apr.video .apr-stats span { font-size: clamp(12px, calc(var(--u) * 1.8), 36px); }
.apr.video .apr-selo { width: clamp(110px, calc(var(--u) * 14), 330px); }
.apr-site { margin: calc(var(--u) * 1.8) 0 0; font: 600 clamp(18px, calc(var(--u) * 2.6), 60px)/1.2 Inter, system-ui, sans-serif; letter-spacing: .06em; color: var(--ouro); }

/* botão da barra do topo que abre a apresentação (a barra corta o que passa da altura, por isso o pulso é curto) */
.ab-apr { display: inline-flex; align-items: center; gap: 10px; flex: none; padding: 3px 16px 3px 3px; border-radius: 999px; border: 1px solid rgba(228,196,136,.55);
  background: rgba(228,196,136,.08); color: #f6f1e7; font: 600 .88rem/1.2 Inter, system-ui, sans-serif; white-space: nowrap; cursor: pointer;
  transition: border-radius .35s cubic-bezier(.16,1,.3,1), background .3s, border-color .3s, box-shadow .3s; }
.ab-apr i { position: relative; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(180deg, #ecd08f, #c9a558); animation: apr-pulso-p 2.4s ease-out infinite; }
.ab-apr i::before { content: ""; margin-left: 2px; border-left: 8px solid #061a30; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.ab-apr:hover { border-radius: 10px; background: rgba(228,196,136,.18); border-color: #e4c488; box-shadow: 0 8px 24px -12px rgba(212,171,92,.7); }
.ab-apr:focus-visible { outline: 2px solid #e4c488; outline-offset: 2px; }
@keyframes apr-pulso-p { 0% { box-shadow: 0 0 0 0 rgba(228,196,136,.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(228,196,136,0); } }

@media (max-width: 760px) {
  .apr-pil { grid-template-columns: repeat(2, 1fr); }
  .apr-stats { grid-template-columns: repeat(2, 1fr); }
  .apr.cinema .apr-faixa { height: 8vh; }
  .apr-xl { font-size: 1.08em; }
}
@media (prefers-reduced-motion: reduce) {
  .apr-w.on, .apr-b.on, .apr-pil > div.on, .apr-stats > div.on, .apr-selo.on { animation-duration: .01s !important; }
  .apr-selo::before, .ab-apr i, .apr-acoes .ir { animation: none; }
}
