/* =========================================================
   TAMINYAR LIGHTWEIGHT PAGE MOTION
   Smooth scrolling friendly
   ========================================================= */


/* ---------------------------------------------------------
   Reveal
   --------------------------------------------------------- */

html.ty-motion-ready .ty-reveal {
    opacity: 0;
    transform: translate3d(0, 14px, 0);

    transition:
        opacity .48s ease,
        transform .52s cubic-bezier(.22,.61,.36,1);

    transition-delay: var(--ty-delay, 0ms);
}

html.ty-motion-ready .ty-reveal.ty-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}


/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

html.ty-motion-ready .page-hero .breadcrumb.ty-reveal {
    transform: translate3d(10px, 8px, 0);
}

html.ty-motion-ready .page-hero .breadcrumb.ty-visible {
    transform: translate3d(0, 0, 0);
}

html.ty-motion-ready .page-hero h1.ty-reveal {
    transform: translate3d(0, 18px, 0);
}

html.ty-motion-ready .page-hero h1.ty-visible {
    transform: translate3d(0, 0, 0);
}

html.ty-motion-ready .page-hero p.ty-reveal {
    transform: translate3d(0, 12px, 0);
}

html.ty-motion-ready .page-hero p.ty-visible {
    transform: translate3d(0, 0, 0);
}


/* ---------------------------------------------------------
   Cards
   --------------------------------------------------------- */

html.ty-motion-ready .info-card.ty-reveal,
html.ty-motion-ready .contact-card.ty-reveal,
html.ty-motion-ready .price-card.ty-reveal,
html.ty-motion-ready .faq-item.ty-reveal,
html.ty-motion-ready .checkout-card.ty-reveal,
html.ty-motion-ready .payment-result-card.ty-reveal {
    transform: translate3d(0, 18px, 0);
}

html.ty-motion-ready .info-card.ty-visible,
html.ty-motion-ready .contact-card.ty-visible,
html.ty-motion-ready .price-card.ty-visible,
html.ty-motion-ready .faq-item.ty-visible,
html.ty-motion-ready .checkout-card.ty-visible,
html.ty-motion-ready .payment-result-card.ty-visible {
    transform: translate3d(0, 0, 0);
}


/* ---------------------------------------------------------
   Legal pages
   --------------------------------------------------------- */

html.ty-motion-ready .legal-nav.ty-reveal {
    transform: translate3d(14px, 0, 0);
}

html.ty-motion-ready .legal-nav.ty-visible {
    transform: translate3d(0, 0, 0);
}


/* ---------------------------------------------------------
   Form fields
   --------------------------------------------------------- */

html.ty-motion-ready .field.ty-reveal {
    transform: translate3d(0, 10px, 0);
}

html.ty-motion-ready .field.ty-visible {
    transform: translate3d(0, 0, 0);
}


/* ---------------------------------------------------------
   Do not animate scroll containers themselves
   --------------------------------------------------------- */

html,
body,
main,
.section,
.container,
.legal-wrap,
.legal-card {
    scroll-behavior: auto;
}


/* ---------------------------------------------------------
   Accessibility
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html.ty-motion-ready .ty-reveal,
    html.ty-motion-ready .ty-reveal.ty-visible {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 768px) {
    html.ty-motion-ready .ty-reveal {
        transform: translate3d(0, 10px, 0);

        transition:
            opacity .4s ease,
            transform .43s ease;
    }

    html.ty-motion-ready .ty-reveal.ty-visible {
        transform: translate3d(0, 0, 0);
    }

    html.ty-motion-ready .legal-nav.ty-reveal {
        transform: translate3d(0, 8px, 0);
    }

    html.ty-motion-ready .legal-nav.ty-visible {
        transform: translate3d(0, 0, 0);
    }
}

/* TY LEGAL FIRST VIEWPORT START */

/*
 * عناصر قابل مشاهده در لحظه ورود به صفحات حقوقی
 * به IntersectionObserver وابسته نیستند.
 */
html.ty-motion-ready .ty-first-enter {
    opacity: 1;
    transform: none;
    animation:
        tyLegalFirstEnter .58s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: var(--ty-delay, 0ms);
}

@keyframes tyLegalFirstEnter {
    from {
        opacity: 0;
        transform: translate3d(0, 14px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/*
 * هیچ قانون reveal دیگری نباید first-enter را مخفی کند.
 */
html.ty-motion-ready .ty-first-enter.ty-reveal {
    opacity: 1 !important;
    transform: none !important;
}

/*
 * برای Hero کمی موشن متفاوت
 */
html.ty-motion-ready .page-hero .breadcrumb.ty-first-enter {
    animation-name: tyLegalHeroEnter;
}

html.ty-motion-ready .page-hero h1.ty-first-enter {
    animation-name: tyLegalHeroEnter;
}

html.ty-motion-ready .page-hero p.ty-first-enter {
    animation-name: tyLegalHeroEnter;
}

@keyframes tyLegalHeroEnter {
    from {
        opacity: 0;
        transform: translate3d(0, 18px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}


/* Fail-safe */
html.ty-motion-ready.ty-legal-motion .legal-card {
    visibility: visible !important;
}

@media (prefers-reduced-motion: reduce) {
    html.ty-motion-ready .ty-first-enter {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* TY LEGAL FIRST VIEWPORT END */

