/* Движение кабинета. Всё работает только при классе motion: без JS, при сбое motion.js и с reduced motion кабинет статичен и полон */

/* Кнопка «Озвучить»: живая клякса на холсте вместо SVG той же формы */
.gob .alive { position: absolute; display: block; pointer-events: none; }
.gob.is-alive svg { visibility: hidden; }
html.motion .gob .o { animation: none !important; }
html.motion .stage__mid { z-index: 3; }

/* Буквы и капля летят над сценой, но под кнопкой: тонут в ней и выходят из-под края */
.fly { position: absolute; display: block; z-index: 2; pointer-events: none; }
html.motion .script { transition: opacity .45s; }
.scene.is-run .script { opacity: .13; transition: none; }
.scene.is-drop #job-result { opacity: 0; }
.scene.is-land #job-result { transform-origin: 0 100%; animation: card-land .52s cubic-bezier(.3, .7, .4, 1); }
[dir="rtl"] .scene.is-land #job-result { transform-origin: 100% 100%; } /* хвост карточки справа */
.scene.is-land #job-result > * { animation: card-in .32s .06s both; }
.scene.is-land #job-result > :nth-child(2) { animation-delay: .1s; }
.scene.is-land #job-result > :nth-child(n + 3) { animation-delay: .16s; }
@keyframes card-land { 22% { transform: scale(1.035, .955); } 56% { transform: scale(.992, 1.012); } }
@keyframes card-in { from { opacity: 0; } }

/* Смена голоса: новый цвет заливает видимую часть сцены волной из кнопки */
.flood { position: absolute; left: 0; z-index: 0; display: block; pointer-events: none; }

/* Пружины play: живая копия формы, масштаб от звука считает кольцо, а не CSS */
html.motion .play svg { transform: none !important; }

/* Готовый файл ложится строкой в «Недавние» */
html.motion .row.is-new { animation: row-in .5s cubic-bezier(.2, .9, .25, 1.1); }
html.motion .row.is-new .play { animation: row-pop .62s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes row-in { from { transform: translateY(-18px); opacity: 0; } }
@keyframes row-pop { from { transform: scale(.25); } }

/* Меню: пилюля переезжает к разделу, текст пунктов поверх неё */
html.has-pill .nav { position: relative; isolation: isolate; }
.nav__pill { position: absolute; left: 0; top: 50%; height: 44px; margin-top: -22px; border-radius: 999px; background: var(--ink); z-index: -1; transform-origin: 0 50%; pointer-events: none; opacity: 0; }
html.has-pill .nav a[aria-current="page"] { background: none; }
html.has-pill .nav a { transition: color .14s .1s; }
