/* =============================================================
   Abyss Commerce — animations.css
   Keyframes, classes de entrada e preferências de movimento.
   ============================================================= */

@keyframes abyss-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes abyss-pulse {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 7px rgba(123, 108, 246, 0.9);
    }

    50% {
        opacity: 0.55;
        box-shadow: 0 0 3px rgba(123, 108, 246, 0.5);
    }
}

@keyframes abyss-glow-drift {
    0%,
    100% {
        opacity: 0.72;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.05);
    }
}

/* Entrada durante o scroll.
   O estado inicial só é aplicado quando o JavaScript está ativo
   (html.js), evitando conteúdo invisível sem script. */

.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 620ms cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 620ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}

.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.js .reveal[data-reveal-delay='1'] {
    transition-delay: 80ms;
}

.js .reveal[data-reveal-delay='2'] {
    transition-delay: 160ms;
}

.js .reveal[data-reveal-delay='3'] {
    transition-delay: 240ms;
}

.js .reveal[data-reveal-delay='4'] {
    transition-delay: 320ms;
}

/* Entrada do hero: o conteúdo já está visível, então a animação roda no load
   em vez de depender do observer de scroll. */

.js .hero__title,
.js .hero__text,
.js .hero__actions {
    animation: abyss-fade-up 760ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.js .hero__text {
    animation-delay: 110ms;
}

.js .hero__actions {
    animation-delay: 210ms;
}

.site-backdrop__horizon-glow {
    animation: abyss-glow-drift 16s ease-in-out infinite;
}

.founder-card__status-dot {
    animation: abyss-pulse 3.2s ease-in-out infinite;
}

/* Menu mobile */

.mobile-menu {
    animation: abyss-fade-up 220ms ease both;
}

/* Preferência do usuário por menos movimento */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .js .hero__title,
    .js .hero__text,
    .js .hero__actions,
    .site-backdrop__horizon-glow,
    .founder-card__status-dot {
        animation: none;
    }

    .custom-cursor,
    .custom-cursor__shape {
        transition: none;
    }
}
