/* Новые страницы аудита 1E (27.11): лиса и рукописная подпись на первом экране, слайдер «Что даёт» с лисой,
   вкладки «Где пригодится» с лисами. Образец: боевая /razrabotka-ai-agentov/ (качание как у книги в подвале,
   появление вкладки как tabFadeIn шаблона). Движение берём свойствами translate/rotate, чтобы не спорить с transform шаблона. */

/* первый экран */
/* лиса стоит в первой строке под H1 (.develop__flex), между текстом и плашкой с ценой */
/* подпись слева от лисы и чуть заходит на её прозрачное поле: длинная подпись («Три приложения») не ложится на рисунок */
.afa-hero { display: flex; align-items: flex-end; flex: 0 0 auto; margin: 0 24px 0 auto; align-self: center; pointer-events: none; }
.afa-hero .afa-fox { order: 2; flex: none; width: 160px; height: auto; margin-left: -14px; }
.afa-ruka { order: 1; position: relative; z-index: 1; margin: 0 0 22px; font-family: "Bad Script", cursive; font-weight: 400; font-size: 30px; line-height: 1.15; color: #fa3; transform: rotate(-12deg) skewX(-8deg); white-space: nowrap; }
@media (max-width: 1199px) { .afa-hero .afa-fox { width: 136px; } .afa-ruka { font-size: 24px; } }
@media (max-width: 991px) {
  .afa-hero { flex: none; width: 100%; align-items: center; justify-content: center; gap: 22px; margin: 22px 0; }
  .afa-hero .afa-fox { width: 132px; margin-left: 0; }
  .afa-ruka { font-size: 24px; margin: 0; }
}
@media (max-width: 575px) { .afa-ruka { font-size: 21px; white-space: normal; max-width: calc(100% - 170px); } }

@keyframes afaSway { 0%, 100% { rotate: -2.5deg; translate: 0 0; } 25% { rotate: 1.5deg; translate: 0 -4%; } 50% { rotate: -1deg; translate: 0 0; } 75% { rotate: 2deg; translate: 0 -2%; } }
.afa-sway { transform-origin: center bottom; animation: afaSway 3.8s ease-in-out infinite; }
/* рамка шире строки: у рукописного шрифта росчерки выходят за края («Т», «я»), рамка по краю их срезала */
@keyframes afaPero { from { clip-path: inset(-40% 115% -40% -15%); } to { clip-path: inset(-40% -15% -40% -15%); } }
/* подпись «пишется», когда первый экран виден (класс ставит afa-anim.js); без скрипта просто стоит */
.afa-hero.afa-zhdu .afa-ruka { clip-path: inset(-40% 115% -40% -15%); }
.afa-hero.afa-vid .afa-ruka { animation: afaPero 1.6s .3s steps(30, end) both; }
/* плашка с ценой не ужимается из-за лисы */
@media (min-width: 992px) {
  .develop__flex:has(> .afa-hero) > .develop__text { flex: 1 1 380px; min-width: 340px; max-width: 520px; }
  .afa-hero ~ .web-hero-budget { flex: 0 1 300px; min-width: 220px; }
}

/* слайдер «Что даёт»: лиса на активном слайде покачивается */
@keyframes afaBob { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -8px; rotate: -4deg; } }
.afa-pluses .swiper-slide-active .pluses__img { animation: afaBob 2.6s ease-in-out infinite; }
.afa-pluses .pluses__pagination { margin-top: 34px; }

/* вкладки «Где пригодится» */
.afa-gde .afa-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-bottom: 34px; }
.afa-gde .afa-btns .tab__btn { background: none; border: 0; padding: 0; cursor: pointer; }
.afa-gde .afa-btns .tab__link { margin-left: auto; }
.afa-gde .afa-panel { display: none; }
.afa-gde .afa-panel.is-active { display: block; animation: afaFade .35s ease both; }
@keyframes afaFade { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes afaFloat { from { translate: 0 0; } to { translate: 0 -10px; } }
.afa-gde .tab__img-1 { animation: afaFloat 3.2s ease-in-out infinite alternate; object-fit: contain; pointer-events: none; }
/* как на /razrabotka-ai-agentov/: кнопки над колонкой текста, лиса слева (шаблон поднимает её на 50 px) */
@media (min-width: 1200px) { .afa-gde .afa-btns { padding-left: 420px; } }
@media (max-width: 767px) { .afa-gde .afa-btns .tab__link { margin-left: 0; } .afa-gde .tab__img-1 { max-width: 210px; height: 210px; } }

/* «меньше движения»: у посетителя с этой настройкой стоит; на стенде движение идёт всегда (класс afa-motion), вид как у
   посетителя открывается адресом с ?motion=0 */
@media (prefers-reduced-motion: reduce) {
  html:not(.afa-motion) .afa-hero.afa-zhdu .afa-ruka { clip-path: none; }
  html:not(.afa-motion) .afa-sway, html:not(.afa-motion) .afa-ruka, html:not(.afa-motion) .afa-pluses .pluses__img,
  html:not(.afa-motion) .afa-gde .tab__img-1, html:not(.afa-motion) .afa-gde .afa-panel.is-active { animation: none; }
}
