/* Анимации: появление блоков, наведение, фоновые мелочи. */

/* ---------- Первый экран: выплывание при загрузке ---------- */
@keyframes rise{from{opacity:0;translate:0 26px}to{opacity:1;translate:0 0}}
@keyframes kb{from{scale:1}to{scale:1.07}}
@keyframes blink{0%,100%{opacity:1}50%{opacity:.35}}
@keyframes btnpulse{0%,70%,100%{box-shadow:0 14px 30px -10px rgba(47,134,222,.7),0 0 0 0 rgba(47,134,222,.45)}85%{box-shadow:0 14px 30px -10px rgba(47,134,222,.7),0 0 0 14px rgba(47,134,222,0)}}
@keyframes cardpulse{0%,100%{scale:1}50%{scale:1.018}}
@keyframes selpulse{0%,100%{box-shadow:0 0 0 4px rgba(47,134,222,.35),0 14px 30px -14px rgba(11,30,54,.5)}50%{box-shadow:0 0 0 9px rgba(47,134,222,.15),0 14px 30px -14px rgba(11,30,54,.5)}}

.hero>img{animation:kb 22s ease-out forwards}
.top{animation:rise .8s ease both}
.ttl .vC1{animation:rise .9s cubic-bezier(.2,.7,.2,1) .15s both}
.ttl .vC2{animation:rise .9s cubic-bezier(.2,.7,.2,1) .35s both}
.ttl .ln{animation:rise .8s ease .5s both}
.ttl .lead{animation:rise .9s cubic-bezier(.2,.7,.2,1) .6s both}
.ttl .ctas{animation:rise .9s cubic-bezier(.2,.7,.2,1) .8s both}
.live{animation:rise .9s ease 1s both}
.hstats{animation:rise 1s ease 1.1s both}
.live b,.coach .av2 i,.mgr i{animation:blink 2.2s ease-in-out infinite}
.ttl .btn,.vx .tx .btn{animation:btnpulse 3.6s ease-in-out 2s infinite}
.hstats b{font-variant-numeric:tabular-nums}

/* ---------- Появление при прокрутке ---------- */
.anim .rv{opacity:0;transform:translateY(28px);transition:opacity .8s ease,transform .8s cubic-bezier(.2,.7,.2,1),translate .35s ease,scale .35s ease,box-shadow .35s ease}
.anim .rv.rv-r{transform:translateX(56px)}
.anim .rv.rv-l{transform:translateX(-56px)}
.anim .rv.in{opacity:1;transform:none}

/* ---------- Наведение: приподнятие, тень, увеличение фото, лёгкая пульсация ---------- */
.tp>img,.xc img,.rc .im img,.hc img{transition:scale .7s cubic-bezier(.2,.7,.2,1)}
.tile img{transition:scale .6s cubic-bezier(.2,.7,.2,1)}
.faq p{display:block;max-height:0;opacity:0;overflow:hidden;margin:0 24px;transition:max-height .45s ease,opacity .35s ease,margin .45s ease}
.faq .open p{max-height:260px;opacity:1;margin:-4px 24px 20px}
.opt.sel .tile{animation:selpulse 1.8s ease-in-out 3}

@media (hover:hover){
  .tp:hover,.xc:hover,.rc:hover,.hc:hover{translate:0 -8px;animation:cardpulse 1.8s ease-in-out infinite}
  .tp:hover{box-shadow:0 50px 80px -34px rgba(11,30,54,.85)}
  .xc:hover,.hc:hover{box-shadow:0 28px 54px -16px rgba(0,0,0,.65)}
  .rc:hover{box-shadow:0 40px 70px -30px rgba(11,30,54,.6)}
  .tp:hover>img,.xc:hover img,.rc:hover .im img,.hc:hover img,.opt:hover .tile img{scale:1.06}
  .facts>div:hover,.af>div:hover,.gift:hover,.ps:hover .n{translate:0 -5px}
  .facts>div,.af>div,.gift,.ps .n{transition:translate .3s ease,box-shadow .3s ease}
  .facts>div:hover,.af>div:hover{box-shadow:0 22px 40px -18px rgba(11,30,54,.45)}
  .btn:hover{scale:1.045;box-shadow:0 18px 38px -10px rgba(47,134,222,.9)}
  .btn.w:hover{box-shadow:0 18px 38px -12px rgba(0,0,0,.45)}
  .chip:hover,.msg label:hover span{translate:0 -2px}
  .guar>div:hover .gi{translate:0 -4px}
  .guar .gi{transition:translate .3s ease}
}

/* ---------- Мобильные поправки ---------- */
@media (max-width:640px){
  .faq p{margin:0 18px}
  .faq .open p{margin:-4px 18px 18px}
}

/* ---------- Фото «Почему ОАЭ» и «О нас»: выезжают из размытия и парят ---------- */
@keyframes floaty{0%,100%{translate:0 0}50%{translate:0 -9px}}
.anim .why .poster>img{opacity:0;transform:translateY(80px) scale(.93);filter:blur(12px);transition:opacity 1s ease,transform 1.3s cubic-bezier(.2,.7,.2,1),filter 1.1s ease}
.anim .why .poster::before{opacity:0;transition:opacity 1.4s ease .5s}
.anim .why .poster.in>img{opacity:1;transform:none;filter:none;animation:floaty 7s ease-in-out 1.6s infinite}
.anim .why .poster.in::before{opacity:1}

.anim .ap .m{opacity:0;transform:translateY(80px) scale(.94);filter:blur(12px);transition:opacity 1s ease,transform 1.3s cubic-bezier(.2,.7,.2,1),filter 1.1s ease}
.anim .ap .s{opacity:0;transform:translate(70px,60px) scale(.9);filter:blur(12px);transition:opacity 1s ease .35s,transform 1.3s cubic-bezier(.2,.7,.2,1) .35s,filter 1.1s ease .35s}
.anim .ap .cardx{opacity:0;transform:translateY(56px);transition:opacity .9s ease .75s,transform 1.1s cubic-bezier(.2,.7,.2,1) .75s}
.anim .ap.in .m,.anim .ap.in .s,.anim .ap.in .cardx{opacity:1;transform:none;filter:none}
@keyframes floaty-soft{0%,100%{translate:0 0}50%{translate:0 -3px}}
.anim .ap.in .m{animation:floaty-soft 10s ease-in-out 1.6s infinite}
.anim .ap.in .s{animation:floaty-soft 9s ease-in-out 2.2s infinite reverse}
.anim .ap.in .cardx{animation:floaty-soft 11s ease-in-out 2.6s infinite}

/* ---------- Подчёркивание под «заканчиваются»: линия прорисовывается ---------- */
.anim .vx .uline path{stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset 1.2s cubic-bezier(.6,.1,.2,1) .7s}
.anim .vx .uline path+path{transition-delay:1.5s;transition-duration:.9s}
.anim .vx .tx.in .uline path{stroke-dashoffset:0}
.anim .vx .tx.in .zt{animation:ztpop .8s ease .6s both}
@keyframes ztpop{0%{opacity:.4;letter-spacing:.06em}100%{opacity:1;letter-spacing:.01em}}

/* ---------- Плашки «осталось номеров»: мигают и пульсируют ---------- */
@keyframes badgeblink{
  0%,100%{opacity:1;scale:1;box-shadow:0 0 0 0 rgba(255,106,48,.6)}
  50%{opacity:.62;scale:1.08;box-shadow:0 0 0 9px rgba(255,106,48,0)}
}
@keyframes badgeblink-ok{
  0%,100%{opacity:1;scale:1;box-shadow:0 0 0 0 rgba(48,170,100,.55)}
  50%{opacity:.7;scale:1.06;box-shadow:0 0 0 8px rgba(48,170,100,0)}
}
.hc .badge{animation:badgeblink 1.5s ease-in-out infinite;transform-origin:left center}
.hc .badge.ok{animation-name:badgeblink-ok;animation-duration:2s}
.hg .grid .hc:nth-child(2) .badge{animation-delay:.35s}
.hg .grid .hc:nth-child(3) .badge{animation-delay:.7s}
.hg .grid .hc:nth-child(4) .badge{animation-delay:1s}

/* ---------- Стрелка «вперёд» в отзывах пульсирует: подсказка, что можно листать ---------- */
@keyframes arrowhint{
  0%,55%,100%{scale:1;box-shadow:0 14px 30px -14px rgba(11,30,54,.5),0 0 0 0 rgba(47,134,222,.55)}
  25%{scale:1.12;box-shadow:0 14px 30px -14px rgba(11,30,54,.5),0 0 0 14px rgba(47,134,222,0)}
}
@keyframes arrownudge{0%,55%,100%{translate:0 0}25%{translate:4px 0}}
#rNext{background:var(--blue);color:#fff;animation:arrowhint 2.2s ease-in-out infinite}
#rNext svg{animation:arrownudge 2.2s ease-in-out infinite}

/* ---------- Без движения, если так выбрано в системе ---------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
  .anim .rv,.anim .why .poster>img,.anim .ap>*{opacity:1!important;transform:none!important;filter:none!important}
  .anim .vx .uline path{stroke-dashoffset:0!important}
}
