/* ===== HOME FX: анимации и полировка главной страницы ===== */

/* --- появление блоков при скролле (активно только при body.fx-ready) --- */
body.fx-ready [data-rev]{opacity:0;transform:translateY(28px);transition:opacity .7s cubic-bezier(.16,1,.3,1),transform .7s cubic-bezier(.16,1,.3,1);}
body.fx-ready [data-rev].rev-in{opacity:1;transform:none;}

/* --- вход хиро-сетки при загрузке --- */
@keyframes fxHeroIn{from{opacity:0;transform:translateY(26px) scale(.985);}to{opacity:1;transform:none;}}
body.fx-ready .hero-grid>*{animation:fxHeroIn .7s cubic-bezier(.16,1,.3,1) both;}
body.fx-ready .hero-grid>*:nth-child(2){animation-delay:.1s;}
body.fx-ready .hero-grid>*:nth-child(3){animation-delay:.18s;}
body.fx-ready .hero-grid>*:nth-child(4){animation-delay:.26s;}
body.fx-ready .hero-grid>*:nth-child(5){animation-delay:.34s;}
body.fx-ready .hero-h1{animation:fxHeroIn .8s .3s cubic-bezier(.16,1,.3,1) both;}

/* --- карточки хиро: мягкий подъём и стрелка-подсказка --- */
@media(hover:hover){
  .hero-card{transition:transform .3s cubic-bezier(.16,1,.3,1),box-shadow .3s cubic-bezier(.16,1,.3,1);}
  .hero-card:hover{transform:translateY(-5px) scale(1.02);box-shadow:0 18px 40px rgba(13,32,53,.32);}
  .hero-card::after{content:'→';position:absolute;right:16px;bottom:14px;z-index:3;width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.94);color:#1a5ea0;font-weight:900;font-size:1.05rem;display:flex;align-items:center;justify-content:center;opacity:0;transform:translateX(-8px);transition:opacity .3s,transform .3s;pointer-events:none;box-shadow:0 4px 14px rgba(0,0,0,.25);}
  .hero-card:hover::after{opacity:1;transform:none;}
}

/* --- живая дрейфующая волна-разделитель --- */
.fx-wave{position:relative;line-height:0;overflow:hidden;}
.fx-wave svg{display:block;width:200%;height:60px;}
.fx-wave--drift svg{animation:fxWaveDrift 9s linear infinite;}
.fx-wave--drift2{position:absolute;inset:0;opacity:.45;}
.fx-wave--drift2 svg{animation:fxWaveDrift 15s linear infinite reverse;}
@keyframes fxWaveDrift{from{transform:translateX(0);}to{transform:translateX(-50%);}}

/* --- пузырьки, всплывающие в синей секции --- */
.fx-bubbles{position:absolute;inset:0;pointer-events:none;overflow:hidden;}
.fx-bubbles span{position:absolute;bottom:-80px;border-radius:50%;background:radial-gradient(circle at 32% 30%,rgba(255,255,255,.34),rgba(255,255,255,.07) 62%,transparent 72%);animation:fxBubble linear infinite;}
.fx-bubbles span:nth-child(1){left:7%;width:46px;height:46px;animation-duration:17s;}
.fx-bubbles span:nth-child(2){left:26%;width:22px;height:22px;animation-duration:12s;animation-delay:3s;}
.fx-bubbles span:nth-child(3){left:56%;width:34px;height:34px;animation-duration:19s;animation-delay:6s;}
.fx-bubbles span:nth-child(4){left:77%;width:18px;height:18px;animation-duration:11s;animation-delay:1.5s;}
.fx-bubbles span:nth-child(5){left:91%;width:40px;height:40px;animation-duration:21s;animation-delay:9s;}
@keyframes fxBubble{0%{transform:translateY(0);opacity:0;}8%{opacity:1;}85%{opacity:.85;}100%{transform:translateY(-780px);opacity:0;}}

/* --- подъём кнопок/ссылок в синей секции (в дополнение к inline-эффектам) --- */
.reasons-section a[href],.reasons-section button{transition:transform .25s ease,box-shadow .25s ease,opacity .2s ease;}
@media(hover:hover){.reasons-section a[href]:hover,.reasons-section button:hover{transform:translateY(-3px);}}

/* --- подъём карточек --- */
.fx-lift{transition:transform .3s cubic-bezier(.16,1,.3,1),box-shadow .3s cubic-bezier(.16,1,.3,1);}
@media(hover:hover){.fx-lift:hover{transform:translateY(-6px);box-shadow:0 16px 36px rgba(0,0,0,.24) !important;}}

/* --- покачивание эмодзи-бейджа --- */
@keyframes fxWiggle{0%,100%{transform:rotate(0);}25%{transform:rotate(-7deg);}60%{transform:rotate(5deg);}}
.fx-wiggle{animation:fxWiggle 3.6s ease-in-out infinite;transform-origin:50% 80%;}

/* --- SEO-ссылки: подъём чипов --- */
@media(hover:hover){
  .home-seo-links a{transition:transform .25s ease,box-shadow .25s ease;}
  .home-seo-links a:hover{transform:translateY(-3px);box-shadow:0 8px 20px rgba(36,120,200,.22);}
}

/* --- гребец на сапе: река-русло идёт между блоками страницы --- */
.river-ride{position:absolute;top:0;left:0;right:0;z-index:18;pointer-events:none;overflow:hidden;}
.river-ride__bed{position:absolute;inset:0;width:100%;height:100%;}
.rr-bed{fill:none;stroke-linecap:round;stroke-linejoin:round;}
.rr-bed--halo{display:none;}
.rr-bed--main{stroke:#3f9fd8;stroke-width:28;opacity:.22;}
.rr-bed--light{stroke:#d9f3ff;stroke-width:11;opacity:.3;}
/* рябь реки: волнистые струйки внутри русла (paint-server pattern, течёт вниз) */
.rr-bed--ripple{stroke:url(#rrRipple);stroke-width:30;opacity:.72;}
.river-ride__rider{position:absolute;left:0;top:0;will-change:transform;filter:drop-shadow(0 5px 8px rgba(10,40,70,.24));}
@media(max-width:1199px),(pointer:coarse){.river-ride{display:none!important;}}
.rr-rock{animation:rrRock 3.4s ease-in-out infinite;transform-origin:32px 56px;transform-box:view-box;}
@keyframes rrRock{0%,100%{transform:rotate(-2deg)}50%{transform:rotate(2deg)}}
.rr-rip{animation:rrRip 2.6s ease-out infinite;transform-box:fill-box;transform-origin:center;}
.rr-rip--2{animation-delay:1.3s;}
@keyframes rrRip{0%{transform:scale(.86);opacity:.55}70%{opacity:.18}100%{transform:scale(1.12);opacity:0}}
.rr-splash path{animation:rrSplash 1.4s ease-in-out infinite;}
.rr-splash path:nth-child(2){animation-delay:.7s;}
@keyframes rrSplash{0%,100%{opacity:.15}50%{opacity:.85}}
.rr-paddle-wake path{stroke-width:1.7;stroke-opacity:.72;stroke-dasharray:18 18;animation:rrWake 1.8s cubic-bezier(.16,1,.3,1) infinite;}
.rr-paddle-wake path:nth-child(2){animation-delay:.22s;stroke-opacity:.52;}
.rr-paddle-wake path:nth-child(3){animation-delay:.44s;stroke-opacity:.34;}
@keyframes rrWake{0%{stroke-dashoffset:28;opacity:0}24%{opacity:.78}100%{stroke-dashoffset:-14;opacity:0}}
.river-ride__callout{position:absolute;left:0;top:0;width:202px;box-sizing:border-box;padding:11px 14px 12px 16px;border:1px solid rgba(36,120,200,.16);border-left:4px solid #f7c948;border-radius:16px 16px 16px 7px;background:rgba(255,255,255,.96);color:#17324d;line-height:1.2;box-shadow:0 12px 28px rgba(13,32,53,.16);opacity:0;transform:translate3d(0,0,0) scale(.94);transition:opacity .28s ease,transform .28s cubic-bezier(.16,1,.3,1);will-change:transform,opacity;backdrop-filter:blur(8px);}
.river-ride__callout::before{content:'';position:absolute;top:12px;right:13px;width:7px;height:7px;border-radius:50%;background:#22a06b;box-shadow:0 0 0 4px rgba(34,160,107,.12);}
.river-ride__callout::after{content:'';position:absolute;left:12px;bottom:-7px;width:14px;height:14px;background:rgba(255,255,255,.96);border-right:1px solid rgba(36,120,200,.1);border-bottom:1px solid rgba(36,120,200,.1);transform:rotate(45deg);box-shadow:4px 4px 10px rgba(13,32,53,.06);}
.river-ride__callout-kicker{position:relative;z-index:1;display:block;padding-right:18px;color:#67849d;font-size:.58rem;font-weight:900;letter-spacing:1.1px;text-transform:uppercase;}
.river-ride__callout-copy{position:relative;z-index:1;display:block;margin-top:4px;padding-right:8px;color:#17324d;font-size:.84rem;font-weight:900;line-height:1.22;}
.river-ride__callout.is-visible{opacity:1;transform:translate3d(0,0,0) scale(1);}
.river-ride__callout.is-right{border-radius:18px 18px 6px 18px;}
.river-ride__callout.is-right::after{left:auto;right:12px;}
@media(max-width:767px){.river-ride{display:none;}}

/* --- доступность: без анимаций при reduce motion --- */
@media(prefers-reduced-motion:reduce){
  .fx-wave--drift svg,.fx-wave--drift2 svg,.fx-bubbles span,.fx-wiggle,
  body.fx-ready .hero-grid>*,body.fx-ready .hero-h1,
  body.fx-ready .home-genesis-promo__media img{animation:none !important;}
  body.fx-ready [data-rev]{opacity:1;transform:none;transition:none;}
  .hero-card,.fx-lift{transition:none;}
  .river-ride{display:none;}
  .river-ride__callout,.rr-paddle-wake path{animation:none !important;transition:none;}
}
