/* =============================================================
   VOZ DA VERDADE — efeitos de tipografia e entrada
   Arquivo separado do style.css. Tudo leve: só CSS + efeitos.js.
   Os estados "escondidos" só valem com a classe .fx no <html>
   (colocada pelo efeitos.js) — se o JS falhar, o texto aparece normal.
   ============================================================= */

:root {
  --script: "Pinyon Script", "Playfair Display", Georgia, serif;
  --script-tam: 1.3em;       /* tamanho da caligrafia em relação ao título */
}

::selection { background: var(--ouro); color: var(--marinho-0); }

/* ---------- Caligrafia nas palavras-destaque ---------- */
.titulo em,
.hero__titulo em {
  --c1: var(--ouro);
  --c2: #f6e7bf;
  display: inline-block;
  font-family: var(--script);
  font-style: normal;
  font-weight: 400;
  font-size: var(--script-tam);
  line-height: 1;
  letter-spacing: 0;
  padding: .12em .28em .2em .22em;
  margin: -.12em -.28em -.2em -.06em;
  vertical-align: baseline;
  /* dourado com brilho que passa */
  background: linear-gradient(110deg, var(--c1) 0 42%, var(--c2) 50%, var(--c1) 58% 100%) 100% 0 / 300% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.claro .titulo em { --c1: var(--ouro-tinta); --c2: #c9a96b; }
.hero__titulo em { text-shadow: none; filter: drop-shadow(0 4px 18px rgba(0,0,0,.55)); }

/* frase da abertura também em caligrafia */
.intro__frase {
  font: 400 clamp(1.9rem, 4.4vw, 2.6rem)/1.1 var(--script);
  padding: .1em .3em .2em; margin-top: 12px;
}
.intro__frase [data-anos] { font-family: var(--serif); font-style: italic; font-size: .62em; font-weight: 600; margin-right: .1em; }

/* ---------- Tinta: a caligrafia aparece da esquerda pra direita ---------- */
.fx .fx-tinta,
.fx .intro__frase {
  -webkit-mask: linear-gradient(100deg, #000 40%, transparent 60%) 100% 0 / 250% 100% no-repeat;
          mask: linear-gradient(100deg, #000 40%, transparent 60%) 100% 0 / 250% 100% no-repeat;
}
@keyframes fxTinta { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes fxBrilho {
  0%   { background-position: 100% 0; }
  16%  { background-position: 0 0; }
  100% { background-position: 0 0; }
}
.fx .fx-on .fx-tinta,
.fx.fx-pronto .hero__titulo .fx-tinta {
  animation:
    fxTinta 1.5s cubic-bezier(.5, 0, .3, 1) var(--d, 0s) forwards,
    fxBrilho 9s ease-in-out calc(var(--d, 0s) + 1.3s) infinite;
}
.fx .intro.final .intro__frase { opacity: 1; animation: fxTinta 1.3s cubic-bezier(.5, 0, .3, 1) forwards; }
.fx .intro__frase { transform: none; }

/* ---------- Palavras sobem de trás de uma máscara ---------- */
.fx-p { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.fx-p__in { display: inline-block; }
.fx .fx-p__in { transform: translateY(110%); transition: transform 1s cubic-bezier(.2, .8, .2, 1) var(--d, 0s); }
.fx .fx-on .fx-p__in,
.fx.fx-pronto .hero__titulo .fx-p__in { transform: none; }

/* no hero o título inteiro fica visível; quem anima são as palavras */
.fx .hero__titulo { opacity: 1 !important; transform: none !important; }
.hero__titulo .fx-p, .hero__titulo .fx-p__in { color: var(--branco); }
.hero__titulo .fx-p__in > [data-anos] { color: var(--ouro); }

/* ---------- Rótulos (◆ TEXTO): o losango gira e o texto se abre ---------- */
.fx .rotulo.fx-r { clip-path: inset(-4px 100% -4px 0); transition: clip-path 1.1s cubic-bezier(.6, 0, .2, 1) .05s; }
.fx .cab--centro .rotulo.fx-r { clip-path: inset(-4px 50% -4px 50%); }
.fx .rotulo.fx-r::before { transform: rotate(-135deg) scale(0); transition: transform .9s cubic-bezier(.2, .8, .2, 1) .2s; }
.fx .rotulo.fx-r.fx-on { clip-path: inset(-4px -4px -4px -4px); }
.fx .rotulo.fx-r.fx-on::before { transform: rotate(45deg) scale(1); }

/* ---------- Abertura: halo de luz atrás do logo ---------- */
.intro__centro { isolation: isolate; }
.intro__centro::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1;
  width: min(720px, 130vw); aspect-ratio: 1; margin: calc(min(720px, 130vw) / -2) 0 0 calc(min(720px, 130vw) / -2);
  background: radial-gradient(circle, rgba(201,169,107,.16), rgba(201,169,107,.05) 38%, transparent 66%);
  opacity: 0; transform: scale(.6);
  animation: fxHalo 2.6s cubic-bezier(.2, .8, .2, 1) .2s forwards;
}
@keyframes fxHalo { to { opacity: 1; transform: scale(1); } }
.intro.final .intro__centro::before { animation: fxHaloPulso 1.4s ease-out forwards; }
@keyframes fxHaloPulso { 0% { opacity: 1; transform: scale(1); } 40% { opacity: 1; transform: scale(1.12); filter: brightness(1.6); } 100% { opacity: 1; transform: scale(1.05); } }
.intro__ano { transition: color .6s ease, text-shadow .6s ease; }
.intro.final .intro__ano { text-shadow: 0 0 34px rgba(201,169,107,.45); }

/* ---------- Botões dourados: reflexo de luz ao passar o mouse ---------- */
.btn--ouro, .menu .menu__cta { position: relative; overflow: hidden; isolation: isolate; }
.btn--ouro::after, .menu .menu__cta::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 60%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: translateX(-130%) skewX(-18deg);
}
.btn--ouro:hover::after, .menu .menu__cta:hover::after { transform: translateX(260%) skewX(-18deg); transition: transform .8s cubic-bezier(.2, .8, .2, 1); }

/* ---------- Menu: linha dourada que nasce do centro ---------- */
@media (min-width: 861px) {
  .menu a:not(.menu__cta) { position: relative; }
  .menu a:not(.menu__cta)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px;
    background: var(--ouro); transform: scaleX(0); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  }
  .menu a:not(.menu__cta):hover::after { transform: scaleX(1); }
}

/* ---------- Barra de leitura (progresso da rolagem) ---------- */
.fx-progresso {
  position: fixed; left: 0; right: 0; top: 0; z-index: 60; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--ouro-2), var(--ouro-claro));
  transform: scaleX(0); transform-origin: left;
}

/* ---------- Acessibilidade: sem movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  .fx-progresso { display: none; }
  .intro__centro::before { animation: none; opacity: 1; transform: none; }
}

/* =============================================================
   RODADA 2
   ============================================================= */

/* ---------- Hero: ordem de entrada (título → subtítulo → botões → selo) ---------- */
.fx .hero__sub { filter: blur(8px); transition: opacity 1.2s ease, transform 1.2s var(--suave), filter 1.2s ease; }
.fx.fx-pronto .hero__sub { filter: none; transition-delay: 1.45s; }
.fx.fx-pronto .hero__botoes { transition-delay: 1.75s; }
.fx .selo--hero { transition-delay: 2.1s; }

/* menu cai item por item quando a abertura termina */
@media (min-width: 861px) {
  .fx .menu > a { opacity: 0; transform: translateY(-10px); transition: opacity .7s ease, transform .7s var(--suave), color .2s, background .25s; }
  .fx.fx-pronto .menu > a { opacity: 1; transform: none; }
  .fx.fx-pronto .menu > a:nth-child(1) { transition-delay: 1.1s, 1.1s, 0s, 0s; }
  .fx.fx-pronto .menu > a:nth-child(2) { transition-delay: 1.18s, 1.18s, 0s, 0s; }
  .fx.fx-pronto .menu > a:nth-child(3) { transition-delay: 1.26s, 1.26s, 0s, 0s; }
  .fx.fx-pronto .menu > a:nth-child(4) { transition-delay: 1.34s, 1.34s, 0s, 0s; }
  .fx.fx-pronto .menu > a:nth-child(5) { transition-delay: 1.42s, 1.42s, 0s, 0s; }
}

/* ---------- Reflexo de luz passando pelo logo ---------- */
.hero__logo { position: relative; }
.hero__logo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,248,225,.85) 50%, transparent 62%) 160% 0 / 250% 100% no-repeat;
  -webkit-mask: url(../img/logo.png) center / contain no-repeat;
          mask: url(../img/logo.png) center / contain no-repeat;
}
.fx.fx-pronto .hero__logo::after { animation: fxReflexo 10s ease-in-out 1.3s infinite; }
@keyframes fxReflexo { 0% { background-position: 160% 0; } 14%, 100% { background-position: -60% 0; } }

/* ---------- Saída do hero ao rolar (o JS controla --sai de 0 a 1) ---------- */
.fx .hero__centro { transform: translateY(calc(var(--sai, 0) * 90px)); opacity: calc(1 - var(--sai, 0) * 1.3); will-change: transform, opacity; }
.fx .hero__video { transform: translateY(calc(var(--sai, 0) * 22%)) scale(calc(1 + var(--sai, 0) * .06)); }

/* ---------- Foto da banda: revelada de baixo pra cima ---------- */
.fx .banda__foto img { clip-path: inset(100% 0 0 0); transform: scale(1.08); transition: clip-path 1.5s cubic-bezier(.7, 0, .2, 1) .15s, transform 2.2s cubic-bezier(.2, .8, .2, 1) .15s; }
.fx .banda__foto.is-visivel img { clip-path: inset(0); transform: none; }

/* ---------- Faixa dos clássicos: bordas esmaecidas, pausa no hover ---------- */
.faixa { -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.faixa:hover .faixa__trilho { animation-play-state: paused; }

/* ---------- Rodapé: frase escrita a tinta ---------- */
.fx .rodape p.fx-tinta-r { -webkit-mask: linear-gradient(100deg, #000 40%, transparent 60%) 100% 0 / 250% 100% no-repeat; mask: linear-gradient(100deg, #000 40%, transparent 60%) 100% 0 / 250% 100% no-repeat; }
.fx .rodape p.fx-tinta-r.fx-on { animation: fxTinta 2.2s cubic-bezier(.5, 0, .3, 1) .2s forwards; }

/* ---------- Granulado de filme (só telas grandes; leve, uma camada fixa) ---------- */
@media (min-width: 861px) {
  .fx body::after {
    content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .05;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__logo::after { display: none; }
}
