/* Efeitos e animações. As classes .anima e .revela são aplicadas por efeitos.js. */

/* ---------- interações (valem para todos) ---------- */
.progresso { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 40; background: linear-gradient(90deg, var(--realce), #FFF3C4, var(--realce)); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

.filtro { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.filtro button { border: 2px solid var(--escuro); background: transparent; color: var(--escuro); border-radius: 99px; min-height: 44px; padding: 8px 18px; font: 800 .82rem var(--titulo); cursor: pointer; transition: background .25s, color .25s, scale .15s; }
.filtro button[aria-pressed="true"] { background: var(--escuro); color: var(--realce); }
.filtro button:active { scale: .95; }

.galeria { position: relative; padding-inline: max(20px, calc(50% - min(33vw, 125px))); scrollbar-width: none; }
.galeria::-webkit-scrollbar { display: none; }
@media (min-width: 1100px) { .galeria { padding-inline: 20px; } }
.galeria button { position: relative; }
.galeria button::after { content: "Ampliar ⤢"; position: absolute; left: 50%; bottom: 14px; translate: -50% 8px; background: var(--escuro); color: #fff; border-radius: 99px; padding: 7px 16px; font: 800 .74rem var(--titulo); white-space: nowrap; opacity: 0; transition: opacity .25s, translate .25s; pointer-events: none; }
.galeria button:hover::after, .galeria button:focus-visible::after, .galeria.rola button.atual::after { opacity: 1; translate: -50% 0; }
.galeria.rola button:not(.revela) { transition: scale .35s, opacity .35s; }
.galeria.rola button:not(.atual):not(.revela) { scale: .91; opacity: .6; }

.controles { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 2px; }
.controles > button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--escuro); background: #fff; color: var(--escuro); font: 900 1.3rem/1 var(--titulo); cursor: pointer; transition: background .2s, color .2s, scale .15s; }
.controles > button:hover { background: var(--escuro); color: var(--realce); }
.controles > button:active { scale: .9; }
.pontos { display: flex; gap: 7px; }
.pontos i { width: 9px; height: 9px; border-radius: 99px; background: var(--suave); transition: width .3s, background .3s; }
.pontos i.atual { width: 26px; background: var(--cor); }

.zoom__nav { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #fff; }
.zoom .zoom__nav button { position: static; background: var(--cor); }

/* ---------- movimento (desligado para quem pede menos animação) ---------- */
@media (prefers-reduced-motion: no-preference) {

  /* entrada do topo */
  .hero { position: relative; overflow: hidden; isolation: isolate; }
  .hero::before, .hero::after { content: ""; position: absolute; z-index: -1; width: 460px; height: 460px; border-radius: 50%; pointer-events: none; }
  .hero::before { top: -170px; left: -190px; background: radial-gradient(circle, var(--realce) 0%, transparent 66%); opacity: .34; animation: deriva 11s ease-in-out infinite alternate; }
  .hero::after { bottom: -150px; right: -200px; background: radial-gradient(circle, var(--cor) 0%, transparent 66%); opacity: .3; animation: deriva 13s ease-in-out infinite alternate-reverse; }
  .faixa { background: linear-gradient(100deg, var(--escuro) 30%, var(--cor) 50%, var(--escuro) 70%); background-size: 260% 100%; animation: corre 7s linear infinite; }

  .hero .selo { animation: sobe .6s ease both; }
  .hero h1 { animation: sobe .7s ease .08s both; }
  .hero__mockup { animation: surge .9s cubic-bezier(.2, .9, .3, 1.2) .2s both, flutua 5.5s ease-in-out 1.2s infinite; filter: drop-shadow(0 18px 22px rgba(10, 20, 40, .16)); }
  .hero__sub { animation: sobe .7s ease .35s both; }
  .hero .btn { animation: sobe .7s ease .45s both, respira 2.6s ease-in-out 1.6s infinite; }
  .hero .micro { animation: sobe .7s ease .55s both; }
  .numeros li { animation: sobe .6s ease both; }
  .numeros li:nth-child(1) { animation-delay: .6s; }
  .numeros li:nth-child(2) { animation-delay: .7s; }
  .numeros li:nth-child(3) { animation-delay: .8s; }
  .numeros li:nth-child(4) { animation-delay: .9s; }

  /* faixa de matérias correndo */
  .letreiro { overflow: hidden; background: var(--escuro); color: #fff; border-block: 3px solid var(--realce); padding: 14px 0; }
  .letreiro__trilho { display: flex; width: max-content; animation: letreiro var(--tempo, 40s) linear infinite; }
  .letreiro:hover .letreiro__trilho { animation-play-state: paused; }
  .letreiro span { display: flex; align-items: center; white-space: nowrap; font: 800 .88rem var(--titulo); text-transform: uppercase; letter-spacing: .6px; }
  .letreiro span::after { content: "✦"; color: var(--realce); margin: 0 20px; }

  /* botões com brilho */
  .btn { position: relative; overflow: hidden; }
  .btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -75%; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg); animation: brilho 3.4s ease-in-out infinite; pointer-events: none; }
  #oferta .btn { animation: respira 2.4s ease-in-out infinite; }

  /* seções escuras com luz em movimento */
  .sec--escura { position: relative; overflow: hidden; isolation: isolate; }
  .sec--escura::before { content: ""; position: absolute; inset: -20%; z-index: -1; background: radial-gradient(circle at 22% 28%, var(--cor) 0, transparent 34%), radial-gradient(circle at 80% 72%, var(--cor) 0, transparent 30%); opacity: .75; animation: deriva 14s ease-in-out infinite alternate; pointer-events: none; }
  .oferta { animation: halo 3.2s ease-in-out infinite; }

  /* passo em destaque */
  .passos li { transition: background .35s, border-color .35s, scale .35s, box-shadow .35s; }
  .passos li.ativo { background: rgba(255, 255, 255, .18); border-color: var(--realce); scale: 1.025; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
  .passos li.ativo b { animation: pulo .5s ease; }

  /* perguntas */
  .faq summary::after { transition: rotate .3s; }
  .faq details[open] summary::after { rotate: 180deg; }
  .faq details[open] p { animation: desce .35s ease both; }
  .zoom[open] { animation: surge .3s ease both; }
  .recado { animation: sobe .3s ease both; }
  .blocos li.troca { animation: sobe .45s ease both; animation-delay: var(--atraso, 0s); }

  /* sublinhado que se desenha */
  .anima .hl { background-size: 0% 100%; background-repeat: no-repeat; transition: background-size 1s cubic-bezier(.6, 0, .2, 1) .35s; }
  .anima .hl.marcado { background-size: 100% 100%; }

  /* inclinação com o mouse */
  .inclina { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out, box-shadow .25s, translate .25s; will-change: transform; }

  /* passar o mouse */
  @media (hover: hover) {
    .blocos li, .quem li, .numeros li, .faq details, .chips li { transition: translate .22s, box-shadow .22s; }
    .blocos li:hover, .numeros li:hover, .faq details:hover { translate: 0 -4px; box-shadow: 0 16px 34px rgba(12, 24, 40, .18); }
    .quem li:hover { translate: 6px 0; }
    .chips li:hover { translate: 0 -3px; }
    .bonus img { transition: transform .35s, scale .35s; }
    .bonus article:hover img { transform: rotate(0deg); scale: 1.07; }
    .galeria img { transition: translate .3s, box-shadow .3s; }
    .galeria button:hover img { translate: 0 -8px; box-shadow: 0 22px 40px rgba(12, 24, 40, .26); }
  }

  /* aparecer ao rolar */
  .anima .revela { opacity: 0; translate: 0 34px; transition: opacity .7s ease var(--atraso, 0s), translate .7s cubic-bezier(.2, .8, .2, 1) var(--atraso, 0s), scale .7s cubic-bezier(.2, .9, .3, 1.3) var(--atraso, 0s), rotate .7s ease var(--atraso, 0s); }
  .anima .revela.revela--pop { scale: .6; translate: 0 12px; }
  .anima .revela.revela--lado { translate: -44px 0; }
  .anima .revela.revela--giro { scale: .3; rotate: -140deg; }
  .anima .revela.visto { opacity: 1; translate: 0 0; scale: 1; rotate: 0deg; }

  /* página de escolha */
  .escolha { position: relative; overflow: hidden; isolation: isolate; }
  .escolha::before { content: ""; position: absolute; inset: -25%; z-index: -1; background: radial-gradient(circle at 25% 30%, #243F7E 0, transparent 32%), radial-gradient(circle at 78% 68%, #12665C 0, transparent 30%); animation: deriva 12s ease-in-out infinite alternate; }
  .escolha h1 { animation: sobe .6s ease both; }
  .escolha__item { animation: sobe .7s ease .15s both; }
  .escolha__item + .escolha__item { animation-delay: .3s; }
  .escolha__item:hover { box-shadow: 0 0 0 6px rgba(245, 185, 34, .22), 0 24px 50px rgba(0, 0, 0, .45); }
  .escolha__item img { animation: flutua 5.5s ease-in-out infinite; }
  .escolha__item + .escolha__item img { animation-delay: -2.7s; }
}

@keyframes sobe { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
@keyframes surge { from { opacity: 0; scale: .86; } to { opacity: 1; scale: 1; } }
@keyframes desce { from { opacity: 0; translate: 0 -10px; } to { opacity: 1; translate: 0 0; } }
@keyframes flutua { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes respira { 0%, 100% { scale: 1; } 50% { scale: 1.035; } }
@keyframes brilho { 0% { left: -75%; } 45%, 100% { left: 135%; } }
@keyframes deriva { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(40px, 30px, 0) scale(1.14); } }
@keyframes corre { from { background-position: 100% 0; } to { background-position: -60% 0; } }
@keyframes letreiro { to { transform: translateX(-50%); } }
@keyframes halo { 0%, 100% { box-shadow: 0 24px 60px rgba(0, 0, 0, .35), 0 0 0 0 rgba(245, 185, 34, .5); } 50% { box-shadow: 0 24px 60px rgba(0, 0, 0, .35), 0 0 34px 8px rgba(245, 185, 34, .42); } }
@keyframes pulo { 50% { scale: 1.25; } }
