/* ==========================================================
   LUMI — camada de movimento (entradas fluidas e modernas)
   Carrega depois do home.css. Para desligar tudo: remova o <link> no index.html.
   ========================================================== */
:root{
  --expo:cubic-bezier(.16,1,.3,1);        /* desacelera suave, estilo iOS */
  --spring:cubic-bezier(.34,1.56,.64,1);  /* leve "mola" no final */
  --silk:cubic-bezier(.22,.9,.28,1);
}

@keyframes mHeader{from{opacity:0}}
@keyframes mTitle{from{opacity:0;transform:translateY(10px)}}
@keyframes mLine{from{transform:scaleX(0);opacity:0}}
@keyframes mStage{from{opacity:0}}
@keyframes mCard{from{opacity:0}}
@keyframes mName{from{opacity:0;transform:translateY(12px)}}
@keyframes mRise{from{opacity:0;transform:translate3d(0,14px,0)}}
@keyframes mRv{from{opacity:0;transform:translate3d(0,14px,0)}}
@keyframes mPop{from{opacity:0;transform:translate3d(0,10px,0) scale(.96)}}
@keyframes mSlideL{from{opacity:0;transform:translate3d(-14px,0,0)}}
@keyframes mSlideR{from{opacity:0;transform:translate3d(14px,0,0)}}
@keyframes mDots{from{opacity:0;transform:scale(.4)}}
@keyframes mShine{0%,60%{background-position:130% 0}100%{background-position:-30% 0}}
@keyframes mGlow{0%,100%{box-shadow:0 10px 30px -10px rgba(20,149,255,.55)}50%{box-shadow:0 14px 42px -8px rgba(20,149,255,.85)}}

/* ---------- Carga da página ---------- */
body.home .top{animation:mHeader .35s ease-out both}

.js body.home .trend h2{animation:mTitle .45s var(--expo) .02s backwards}
.js body.home .trend h2::before,
.js body.home .trend h2::after{animation:mLine .4s var(--expo) .1s backwards;transform-origin:right}
.js body.home .trend h2::after{transform-origin:left}

.js body.home .t-stage{animation:mStage .4s ease-out .05s backwards}
.js body.home .t-stage .tf{animation:mCard .8s var(--expo) backwards;animation-delay:calc(var(--i,0)*55ms + .2s)}
.js body.home .t-stage .tn{animation:mName .6s var(--expo) .55s backwards}
.js body.home .t-dots{animation:mDots .5s var(--spring) .7s backwards}

/* Hero: título, texto, botões e detalhes entram em cascata */
.js body.home .hero2>*{
  animation:mRise .5s var(--expo) backwards;
  animation-delay:calc(var(--s,0)*40ms + .08s);
}
.js body.home .hero2 .cta .btn{animation:mPop .45s var(--expo) backwards}
.js body.home .hero2 .cta .btn:nth-child(1){animation-delay:.2s}
.js body.home .hero2 .cta .btn:nth-child(2){animation-delay:.26s}

/* "No celular." com brilho passando */
body.home .hero2 .hg{
  background-size:220% 100%;
}

/* ---------- Revelar ao rolar ---------- */
.js body.home [data-rv].in{animation:mRv .4s var(--expo) backwards}

/* filhos entram em cascata dentro de cada bloco */
.js body.home .rv.in .nums>div,
.js body.home .nums.in>div{animation:mPop .4s var(--expo) backwards}
.js body.home .nums.in>div:nth-child(1){animation-delay:.03s}
.js body.home .nums.in>div:nth-child(2){animation-delay:.07s}
.js body.home .nums.in>div:nth-child(3){animation-delay:.11s}

.js body.home .how.in li,
.js body.home li[data-rv].in{animation:mRv .4s var(--expo) backwards}

.js body.home .lrow.in .lp{animation:none}
.js body.home .lrow.in .lp:nth-child(1){--k:0}.js body.home .lrow.in .lp:nth-child(2){--k:1}
.js body.home .lrow.in .lp:nth-child(3){--k:2}.js body.home .lrow.in .lp:nth-child(4){--k:3}
.js body.home .lrow.in .lp:nth-child(5){--k:4}.js body.home .lrow.in .lp:nth-child(n+6){--k:5}

/* Chat da Diana: mensagens mais ágeis */
.js body.home .chat.in .bb{animation:mPop .4s var(--expo) backwards}
.chat.in .bb:nth-of-type(1){animation-delay:.1s}
.chat.in .bb:nth-of-type(2){animation-delay:.5s}
.chat.in .bb:nth-of-type(3){animation-delay:.9s}
.chat.in .bb:nth-of-type(4){animation-delay:1.3s}

.chat.in .bb--out{animation-name:mSlideR!important}
.chat.in .bb--in{animation-name:mSlideL!important}
.js body.home .bento a[data-rv].in:nth-child(odd){animation-name:mSlideL}
.js body.home .bento a[data-rv].in:nth-child(even){animation-name:mSlideR}

/* FAQ abre suave */
body.home details[open] p{animation:mRise .3s var(--expo) backwards}

/* ---------- Microinterações ---------- */
body.home .btn{transition:transform .35s var(--expo),box-shadow .35s var(--expo)}
@media(hover:hover){
  body.home .btn:hover{transform:translateY(-2px) scale(1.02);}
  body.home .bento a:hover,body.home .plan:hover,body.home .fb-card:hover{transform:translateY(-4px)}
}
body.home .btn:active{transform:scale(.96);transition-duration:.12s}
body.home .btn--p.btn--xl{animation:mPop .45s var(--expo) .2s backwards;box-shadow:0 12px 32px -10px rgba(20,149,255,.7)}
body.home .bento a,body.home .fb-card{transition:transform .35s var(--expo),box-shadow .35s var(--expo)}

/* ---------- Ajuste do título longo ---------- */
.trend h2{letter-spacing:.14em;font-size:11px;gap:10px;max-width:100%;white-space:nowrap}
.trend h2::before,.trend h2::after{width:20px;flex:none}
@media(max-width:340px){.trend h2{letter-spacing:.08em;font-size:10px}}

/* ---------- Fluidez: tira o que pesa durante as entradas ---------- */
/* blur de fundo (backdrop-filter) em elementos que animam obriga a GPU a refazer o desfoque a cada frame */
body.home .nums,body.home .hero2 .fine span,body.home details,body.home .offer,
body.home .bento .ic,body.home .btn--g,body.home .final,body.home .plan .btn--g,
body.home .plans .pl-card,body.home .pl-tag,body.home .pl-ar,body.home .plans-test,body.home .why-ios,
body.home .fb-card,body.home .card,body.home .stat,body.home .frame .fi,body.home .frame .fp{
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important}
/* anima só no compositor (transform/opacity), sem tremer no 3D */
.js body.home .t-stage .tf,.js body.home .lrow.in .lp,.js body.home .chat.in .bb{backface-visibility:hidden}
body.home .lp{transform:translateZ(0)}

/* ---------- Acessibilidade ---------- */
@media(prefers-reduced-motion:reduce){
  body.home .top,
  .js body.home .trend h2,.js body.home .trend h2::before,.js body.home .trend h2::after,
  .js body.home .t-stage,.js body.home .t-stage .tf,.js body.home .t-stage .tn,.js body.home .t-dots,
  .js body.home .hero2>*,.js body.home .hero2 .cta .btn,body.home .hero2 .hg,
  .js body.home [data-rv].in,.js body.home .nums.in>div,.js body.home .lrow.in .lp,
  .js body.home .chat.in .bb,body.home .btn--p.btn--xl,body.home details[open] p{animation:none!important}
}

/* texto: entrada discreta (fade + 8px, .4s) e planos só com fade */
@keyframes lvIn{from{opacity:0;transform:translateY(8px)}}
@keyframes lvFade{from{opacity:0}}
.js body.home [data-rv].in,.js body.home li[data-rv].in{animation:lvIn .4s cubic-bezier(.22,.8,.25,1) var(--rv-d,0ms) backwards}
.js body.home #planos [data-rv].in{animation:lvFade .4s ease backwards}
@media(prefers-reduced-motion:reduce){.js body.home [data-rv].in,.js body.home li[data-rv].in{animation:none}}

/* fileiras de pôsteres: sem máscara de sumiço, de ponta a ponta da tela, rolagem automática intocável */
body.home{overflow-x:clip}
body.home .lscroll{-webkit-mask-image:none;mask-image:none;overflow-x:hidden;pointer-events:none;touch-action:pan-y;overscroll-behavior:auto;margin-inline:calc(50% - 50vw)}

/* carrossel "Mais assistidos": leve — entrada só com fade, legenda por classe, sombra enxuta, camada própria para o escurecimento */
.js body.home .t-stage .tf,.js body.home .t-stage .tn,.js body.home .t-dots{animation:none}
.js body.home .t-stage{animation:tStageIn .45s ease backwards}
@keyframes tStageIn{from{opacity:0}}
body.home .tf{box-shadow:0 14px 24px -16px var(--g),inset 0 0 0 1px rgba(255,255,255,.12)}
body.home .tf::after{will-change:opacity}
body.home .t-stage .tn{opacity:0;transition:opacity .6s ease}
body.home .t-stage .tc.on .tn{opacity:1}
@media(prefers-reduced-motion:reduce){.js body.home .t-stage{animation:none}}

/* carrossel 2D leve (o JS só move translate/scale): sem perspectiva 3D, sem camadas extras */
body.home .t-stage{perspective:none;transform-style:flat}
body.home .tc{transition:none;backface-visibility:hidden}
/* brilhos de fundo já são degradês suaves; o blur por cima só custava GPU */
body.home .hero2::before,body.home .final::before{filter:none}
/* anel de ping do WhatsApp: só opacity/transform (barato) em vez de animar box-shadow */
body.home .hero-wa i{animation:none}

/* carrossel: entrada com fade-in (só opacity), um pôster após o outro; imagem aparece suave ao carregar */
@keyframes tcFade{from{opacity:0}}
.js body.home .t-stage .tf{animation:tcFade .5s ease-out backwards;animation-delay:calc(var(--i,0)*70ms + .05s)}
body.home .tf img{opacity:0;transition:opacity .45s ease-out}
body.home .tf img.ld{opacity:1}
@media(prefers-reduced-motion:reduce){.js body.home .t-stage .tf{animation:none}body.home .tf img{opacity:1;transition:none}}

/* fundo do carrossel: 3 cores do pôster em 2 camadas que alternam por opacidade (barato: sem repintar o degradê) */
.bg::after{z-index:5}
.bg .bgl{position:absolute;inset:0;opacity:0;pointer-events:none;transition:opacity 1s ease;backface-visibility:hidden;
  --l1:#1495ff;--l2:#1495ff;--l3:transparent;--la:0;
  background:
    linear-gradient(to bottom,transparent 42%,rgba(0,0,0,.58) 100%),
    radial-gradient(70% 34% at 50% 8%,color-mix(in srgb,var(--l3) calc(var(--la)*100%),transparent) 0%,transparent 100%),
    radial-gradient(85% 48% at 100% 6%,var(--l2) 0%,transparent 100%),
    radial-gradient(90% 46% at 0% 88%,var(--l2) 0%,transparent 100%),
    radial-gradient(120% 55% at 50% 28%,var(--l1) 0%,transparent 100%),
    radial-gradient(90% 45% at 0% 0%,var(--l1) 0%,transparent 100%),
    radial-gradient(130% 50% at 50% 100%,var(--l1) 0%,transparent 100%),#000}
/* depois do hero o fundo vira azul (regra antiga .bg.blue): as camadas somem e revelam ele */
.bg.blue .bgl{opacity:0!important}
@media(prefers-reduced-motion:reduce){.bg .bgl{transition:none}}


/* o fundo azul padrão não pode aparecer por baixo do degradê do pôster (nem durante o crossfade) */
.bg.pc:not(.blue){background:#000!important}

/* fundo do carrossel = pôster em 8x12 px (canvas) esticado e desfocado: mesmas cores do pôster, sem precisar ler pixels */
.bg .bgl{overflow:hidden}
.bg .bgl .bgc{display:none}
.bg .bgl.has-c{background:#000}
.bg .bgl.has-c .bgc{display:block;position:absolute;left:-18%;top:-12%;width:136%;height:124%;filter:blur(34px) saturate(1.8) brightness(1.08);transform:translateZ(0)}
.bg .bgl.has-c::after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,.1) 0%,rgba(0,0,0,0) 32%,rgba(0,0,0,.66) 100%)}
