/* FIELDNOTE — motion. Всё отключается при prefers-reduced-motion. */

/* Вход страницы */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
.top { animation: drop-in .6s var(--ease) both; }
.guide { animation: rise .6s var(--ease) .1s both; }
.card { animation: rise .7s var(--ease) both; animation-delay: calc(.15s + var(--i, 0) * .09s); }

/* Гид: смена текста и «дыхание» кнопки */
@keyframes swap { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.guide.is-swap .guide-text, .guide.is-swap .guide-step { animation: swap .45s var(--ease) both; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(127, 209, 168, .5); } 50% { box-shadow: 0 0 0 8px rgba(127, 209, 168, 0); } }
.btn-cta { animation: breathe 2.2s ease-in-out infinite; }
@keyframes spark { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(90deg) scale(1.25); } }
.ai-spark { display: inline-block; color: var(--accent); animation: spark 3.2s ease-in-out infinite; }

/* Зона загрузки: орбиты */
@keyframes orbit { 0% { transform: scale(.75); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
.drop-orbit::before { animation: orbit 2.6s ease-out infinite; }
.drop-orbit::after { animation: orbit 2.6s ease-out 1.3s infinite; }
.drop.is-over .drop-orbit i { transform: translateY(-3px); transition: transform .2s; }

/* Анализ снимка: лазер и появление результатов */
@keyframes scan { 0% { top: -4px; } 100% { top: calc(100% + 1px); } }
.thumb.is-scanning::after { animation: scan 1.1s linear infinite; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.9); } to { opacity: 1; transform: none; } }
.photo-card.is-new { animation: rise .55s var(--ease) both; }
.photo-card.is-new .finding { animation: pop .45s var(--ease) both; animation-delay: calc(.2s + var(--k, 0) * .08s); }
.photo-card.is-new .box, .photo-card.is-new .locate { animation: rise .6s var(--ease) both; animation-delay: .45s; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.btn-locate.is-busy { background: linear-gradient(110deg, var(--accent) 30%, #b9f0d6 50%, var(--accent) 70%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.ai-result > * { animation: rise .55s var(--ease) both; }
.ai-result > *:nth-child(2) { animation-delay: .08s; } .ai-result > *:nth-child(3) { animation-delay: .16s; } .ai-result > *:nth-child(4) { animation-delay: .24s; }

/* Гипотезы */
.hypo { animation: rise .5s var(--ease) both; animation-delay: calc(var(--k, 0) * .07s); }
.hypo.is-grown .meter i { width: var(--w, 0%); }
.hypo.no-anim, .hypo.no-anim .meter i { animation: none; transition: none; }

/* Панель точки */
.sheet:not([hidden]) { animation: rise .45s var(--ease) both; }
.note-line:not([hidden]) { animation: pop .4s var(--ease) both; }
.map-empty-ring { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--accent); margin-bottom: 8px; animation: ring 2.4s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

/* Пины */
@keyframes pin-drop { 0% { transform: translateY(-46px) scale(.6); opacity: 0; } 60% { transform: translateY(4px) scale(1.05); opacity: 1; } 100% { transform: none; } }
@keyframes radar { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(3.4); opacity: 0; } }
.pin { animation: pin-drop .6s cubic-bezier(.3, 1.4, .5, 1) both; transform-origin: 50% 100%; }
.pin.is-selected .pin-ring { animation: radar 1.7s ease-out infinite; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.shadow-line { stroke-dasharray: 8 6; animation: flow 1s linear infinite; }

/* Чат */
.msg { animation: rise .4s var(--ease) both; }
@keyframes dots { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.typing span { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--accent); animation: dots 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }

/* Диалоги и дровер */
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes modal-out { to { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes drawer-out { to { transform: translateX(100%); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal[open] { animation: modal-in .35s var(--ease) both; }
.modal.is-closing { animation: modal-out .22s ease-in both; }
.drawer[open] { animation: drawer-in .42s var(--ease) both; }
.drawer.is-closing { animation: drawer-out .26s ease-in both; }
dialog[open]::backdrop { animation: fade .3s ease both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .meter i { width: var(--w, 0%) !important; }
}

.pano:not([hidden]) { animation: fade .35s ease both; }
.pano-pip { animation: pop .5s var(--ease) .3s both; }

.bld-poly { stroke-dasharray: 7 5; animation: flow 1.4s linear infinite; }
