/* Анимации поверх style.css: появление, отклик на нажатия, переходы.
   Всё выключается при «уменьшить движение» в системе. */

/* штукатурка «наносится» сверху вниз, как полоса обоев */
.hero::before { animation: plaster-in 1.4s cubic-bezier(.22,.8,.26,1) both; }
@keyframes plaster-in { from { clip-path: inset(0 0 100% 0); opacity: .2; } to { clip-path: inset(0); } }
.frame { will-change: transform; }

/* заголовки секций: надпись над заголовком с чертой, заголовок выезжает */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.8,.26,1); }
.rv.in { opacity: 1; transform: none; }
.eyebrow.rv { display: flex; align-items: center; gap: 10px; }
.eyebrow.rv::before { content: ""; height: 2px; width: 0; background: currentColor; transition: width .8s .25s cubic-bezier(.22,.8,.26,1); }
.eyebrow.rv.in::before { width: 28px; }
.center .eyebrow.rv { justify-content: center; }

/* кнопки: волна от пальца */
.btn, .chip, .round, .seg button { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .25; transform: scale(0); animation: ripple .6s ease-out forwards; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* анонсы въезжают сверху */
.ann { animation: ann-in .5s cubic-bezier(.22,.8,.26,1) both; }
.ann:nth-child(2) { animation-delay: .1s; } .ann:nth-child(3) { animation-delay: .2s; }
@keyframes ann-in { from { opacity: 0; transform: translateY(-100%); } }
.ann-when { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { background: color-mix(in srgb, var(--primary) 14%, transparent); } }

/* бегущая строка замирает под пальцем */
.marquee:hover .marquee-track, .marquee:active .marquee-track { animation-play-state: paused; }

/* прайс: строка подсвечивается под курсором */
.row { transition: background .2s, padding .2s; border-radius: 10px; }
@media (hover: hover) { .row:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); padding-left: 8px; padding-right: 8px; } }

/* калькулятор */
.room { animation: room-in .45s cubic-bezier(.22,.8,.26,1) both; }
@keyframes room-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.room.out { animation: room-out .3s ease forwards; }
@keyframes room-out { to { opacity: 0; transform: scale(.95); height: 0; margin: 0; padding: 0; } }
.calc-total.bump { animation: bump .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 40% { transform: scale(1.08); } }
.calc-total { transform-origin: left center; display: inline-block; }
.calc-lines li { animation: line-in .35s ease both; }
@keyframes line-in { from { opacity: 0; transform: translateX(8px); } }
.seg button { transition: background .25s, color .25s; }

/* работы: карточка в центре чуть крупнее */
.carousel button { transition: transform .5s cubic-bezier(.22,.8,.26,1), opacity .5s; transform: scale(.93); opacity: .75; }
.carousel button.vis { transform: none; opacity: 1; }

/* просмотр фото: появление и смена кадра */
#lightbox[open] { animation: lb-in .3s ease both; }
#lightbox[open]::backdrop { animation: fade .3s ease both; }
@keyframes lb-in { from { opacity: 0; transform: scale(.92); } }
@keyframes fade { from { opacity: 0; } }
#lightbox img.next { animation: slide-l .35s ease both; }
#lightbox img.prev { animation: slide-r .35s ease both; }
@keyframes slide-l { from { opacity: 0; transform: translateX(40px); } }
@keyframes slide-r { from { opacity: 0; transform: translateX(-40px); } }

/* FAQ: ответ раскрывается плавно (высоту ведёт motion.js) */
.faq details { transition: box-shadow .3s, border-color .3s; }
.faq details[open] { border-color: var(--accent); box-shadow: 0 16px 40px -28px rgba(0,0,0,.45); }
.faq .a { overflow: hidden; }

/* заготовки вопросов */
.chip.on { animation: pop .3s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { 50% { transform: scale(1.08); } }
.calc-attached:not([hidden]) { animation: room-in .45s cubic-bezier(.22,.8,.26,1) both; }

/* вопрос отправлен: галочка рисуется */
.sent-check { display: flex; align-items: center; gap: 10px; }
.sent-check svg { width: 34px; height: 34px; flex: none; }
.sent-check circle { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw .5s ease forwards; }
.sent-check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .35s .45s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* подписка на уведомления: колокольчик покачивается */
.push-card:not([hidden]) { animation: room-in .6s cubic-bezier(.22,.8,.26,1) both; }
#push-btn::before { content: "🔔"; display: inline-block; margin-right: 6px; animation: ring 3s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes ring { 0%, 70%, 100% { transform: none; } 75% { transform: rotate(14deg); } 80% { transform: rotate(-12deg); } 85% { transform: rotate(8deg); } 90% { transform: rotate(-4deg); } }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; }
  .carousel button { transform: none; opacity: 1; }
}
