/*
 * Анимации при скрол като на стария сайт (Elementor + animate.css), B13.1.
 * Нищо не се скрива без класа th-anim на <html> - слага го inline скриптът
 * в <head> (inc/setup.php) само при включена опция „animacii", ?anim=1 или
 * проба в sessionStorage. Скриването е тук, а не в JS, за да няма проблясване.
 * Поддържай списъка селектори в синхрон с anim.js (tools/anim-sync.mjs).
 */

/* Keyframes 1:1 с animate.css - така ги дава Elementor. */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 100%, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translate3d(-100%, 0, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translate3d(100%, 0, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes slideInRight {
  from { transform: translate3d(100%, 0, 0); visibility: visible; }
  to { transform: none; }
}

/* Разрешено изключение: транслациите на 100% иначе дават хоризонтален скрол
   на 390px. clip, не hidden - sticky хедърът остава жив. */
html.th-anim main { overflow-x: clip; }

/* Поддържай в синхрон с anim.js. */
html.th-anim .hero__content .eyebrow:not(.is-in),
html.th-anim .hero__content h1:not(.is-in),
html.th-anim .hero__content .lead:not(.is-in),
html.th-anim .hero__content .hero__btns:not(.is-in),
html.th-anim .sec-head .eyebrow:not(.is-in),
html.th-anim .sec-head h2:not(.is-in),
html.th-anim #featured .feat-card:not(.is-in),
html.th-anim .cards:not(.is-in),
html.th-anim .cta-band__body:not(.is-in),
html.th-anim #why .about__text:not(.is-in),
html.th-anim #why .collage:not(.is-in),
html.th-anim #zashto .why-grid > *:not(.is-in) { opacity: 0; }

/* slideInRight е без opacity - скрива се с visibility. */
html.th-anim #faq .acc:not(.is-in) { visibility: hidden; }

html.th-anim .hero__content .eyebrow.is-in,
html.th-anim .hero__content h1.is-in,
html.th-anim .hero__content .lead.is-in,
html.th-anim .hero__content .hero__btns.is-in,
html.th-anim .sec-head .eyebrow.is-in,
html.th-anim .sec-head h2.is-in,
html.th-anim #featured .feat-card.is-in,
html.th-anim .cards.is-in,
html.th-anim .cta-band__body.is-in,
html.th-anim #why .about__text.is-in,
html.th-anim #why .collage.is-in,
html.th-anim #zashto .why-grid > *.is-in,
html.th-anim #faq .acc.is-in {
  animation: var(--th-a) 1.25s both;
  animation-delay: var(--th-d, 0ms);
}
