/* ═══════════════════════════════════════════════════════════
   سامورا — میکرو-انیمیشن‌های سراسری (نرم و نامحسوس)
   قاعده: هیچ انیمیشنی مسیر کاربر را بند نمی‌کند؛
   prefers-reduced-motion همه را خاموش می‌کند.
   ═══════════════════════════════════════════════════════════ */

/* ---------- ۱) ورود نرم کارت‌ها و بخش‌ها (site.js با IntersectionObserver کلاس .in می‌دهد) ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .55s cubic-bezier(.2, .7, .3, 1), transform .55s cubic-bezier(.2, .7, .3, 1);
    transition-delay: var(--rd, 0ms);
    will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- ۲) فشار ملایم دکمه‌ها ---------- */
button:active,
.btn:active,
a[class*="btn"]:active,
a[class*="cta"]:active {
    transform: scale(.97);
}

/* ---------- ۳) فید ورود صفحه در ناوبری بلزور ---------- */
.page-content,
main {
    animation: spPageIn .45s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes spPageIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- ۴) واترمارک غول فوتر — شناوری خیلی آرام ---------- */
.pl-giant {
    animation: spGiantFloat 10s ease-in-out infinite alternate;
}
@keyframes spGiantFloat {
    from { transform: translateY(0); }
    to   { transform: translateY(-7px); }
}

/* ---------- ۵) بات‌ناو موبایل — ورود از پایین ---------- */
@media (max-width: 760px) {
    .pl-bottomnav {
        animation: spBnIn .55s cubic-bezier(.2, .9, .3, 1.08) both;
        animation-delay: .15s;
    }
    @keyframes spBnIn {
        from { transform: translateY(110%); opacity: 0; }
        to   { transform: none; opacity: 1; }
    }
}

/* ---------- ۶) فیلدهای فرم — فوکوس با نفس ملایم ---------- */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    animation: spFocusPulse 1.6s ease-in-out 1;
}
@keyframes spFocusPulse {
    0%, 100% { outline-offset: 2px; }
    50%      { outline-offset: 4px; }
}

/* ---------- احترام به تنظیم کاهش حرکت ---------- */
@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .page-content, main, .pl-giant, .pl-bottomnav {
        animation: none !important;
    }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
