/* ==========================================================================
   Movimento da página (js/scroll-fx.js), usado na home e na página da maquininha.
   Só vale com html.fx-on, ligada no <head> quando o sistema não pede movimento reduzido.
   As animações usam fill "backwards": ao terminar, o elemento volta aos próprios estilos
   (hover dos botões e cartões continua funcionando).
   ========================================================================== */

:root {
    --fx-ease: cubic-bezier(.16, 1, .3, 1);
}

/* Antes de entrar na tela */
.fx-on [data-reveal]:not(.is-revealed) {
    opacity: 0;
}

.fx-on [data-reveal-panel]:not(.is-revealed)::before {
    opacity: 0;
}

/* Entrada */
.fx-on [data-reveal].is-revealed {
    animation: fx-text .9s var(--fx-ease) var(--reveal-delay, 0ms) backwards;
}

.fx-on [data-reveal="card"].is-revealed {
    animation-name: fx-card;
    animation-duration: 1s;
}

.fx-on [data-reveal="media"].is-revealed {
    animation-name: fx-media;
    animation-duration: 1.3s;
}

.fx-on [data-reveal="device"].is-revealed {
    animation-name: fx-device;
    animation-duration: 1.2s;
}

/* Topo: o texto já nasce visível (opacidade inicial > 0) e "entra em foco".
   Fade a partir do zero faria o Google medir o LCP só no fim da animação. */
.fx-on .hero [data-reveal]:not([data-reveal="device"]).is-revealed {
    animation-name: fx-hero;
    animation-duration: 1s;
}

.fx-on [data-reveal-panel].is-revealed::before {
    animation: fx-panel 1.3s var(--fx-ease) var(--reveal-delay, 0ms) backwards;
}

@keyframes fx-text {
    from {
        opacity: 0;
        transform: translate3d(0, 28px, 0);
        filter: blur(8px);
    }
}

@keyframes fx-hero {
    from {
        opacity: .35;
        transform: translate3d(0, 22px, 0);
        filter: blur(10px);
    }
}

@keyframes fx-card {
    from {
        opacity: 0;
        transform: translate3d(0, 48px, 0);
    }
}

@keyframes fx-media {
    from {
        opacity: 0;
        transform: translate3d(0, 64px, 0) scale(.92);
    }
}

@keyframes fx-device {
    from {
        opacity: 0;
        transform: translate3d(0, 72px, 0);
    }
}

/* O palco vem do lado em que ele vaza para a borda da tela (--panel-from). */
@keyframes fx-panel {
    from {
        opacity: 0;
        transform: translate3d(var(--panel-from, 96px), 0, 0);
    }
}

/* Profundidade no topo (o deslocamento vem do script) */
.fx-on [data-fx="parallax"] {
    will-change: transform;
}

@media print {
    .fx-on [data-reveal],
    .fx-on [data-reveal-panel]::before {
        opacity: 1 !important;
        animation: none !important;
    }
}
