/* ===== SCROLL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-heavy), transform var(--transition-heavy)
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0)
}

.reveal--left {
    transform: translateX(-40px)
}

.reveal--left.visible {
    transform: translateX(0)
}

.reveal--right {
    transform: translateX(40px)
}

.reveal--right.visible {
    transform: translateX(0)
}

.reveal--scale {
    transform: scale(0.9);
    opacity: 0
}

.reveal--scale.visible {
    transform: scale(1);
    opacity: 1
}

/* Staggered children */
.stagger>* {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-heavy), transform var(--transition-heavy)
}

.stagger.visible>* {
    opacity: 1;
    transform: translateY(0)
}

.stagger.visible>*:nth-child(1) {
    transition-delay: 0ms
}

.stagger.visible>*:nth-child(2) {
    transition-delay: 100ms
}

.stagger.visible>*:nth-child(3) {
    transition-delay: 200ms
}

.stagger.visible>*:nth-child(4) {
    transition-delay: 300ms
}

.stagger.visible>*:nth-child(5) {
    transition-delay: 400ms
}

.stagger.visible>*:nth-child(6) {
    transition-delay: 500ms
}

.stagger.visible>*:nth-child(7) {
    transition-delay: 600ms
}

.stagger.visible>*:nth-child(8) {
    transition-delay: 700ms
}

/* Count-up animation */
.count-up {
    display: inline-block
}

/* Loading animation */
@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes lineGrow {
    from {
        width: 0
    }

    to {
        width: 60px
    }
}

/* Page load */
.page-enter {
    animation: fadeIn 0.8s ease forwards
}

.hero__content>* {
    opacity: 0;
    animation: slideUp 0.8s ease forwards
}

.hero__content>*:nth-child(1) {
    animation-delay: 0.2s
}

.hero__content>*:nth-child(2) {
    animation-delay: 0.4s
}

.hero__content>*:nth-child(3) {
    animation-delay: 0.6s
}

.hero__content>*:nth-child(4) {
    animation-delay: 0.8s
}

.hero__content>*:nth-child(5) {
    animation-delay: 1s
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: var(--z-modal);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    box-shadow: var(--shadow-lg);
    transform: translateX(calc(100% + 2rem));
    transition: transform var(--transition-heavy);
    display: flex;
    align-items: center;
    gap: var(--space-md)
}

[dir="rtl"] .toast {
    right: auto;
    left: 2rem;
    transform: translateX(calc(-100% - 2rem))
}

.toast.show {
    transform: translateX(0)
}

.toast--success {
    background: #065f46;
    color: #d1fae5
}

.toast--error {
    background: #7f1d1d;
    color: #fecaca
}

.toast__close {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast)
}

.toast__close:hover {
    opacity: 1
}

/* Reduced motion */
@media(prefers-reduced-motion:reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important
    }

    .reveal,
    .stagger>* {
        opacity: 1;
        transform: none
    }
}