/* ============================================================
   ClimaService Rent - animations.css
   Reveal on scroll (IntersectionObserver) + entrata hero.
   Tutto disattivato con prefers-reduced-motion.
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(22px);
        transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
        transition-delay: var(--d, 0ms);
    }
    .reveal.is-in { opacity: 1; transform: none; }

    .reveal-x {
        opacity: 0;
        transform: translateX(-18px);
        transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
        transition-delay: var(--d, 0ms);
    }
    .reveal-x.is-in { opacity: 1; transform: none; }

    .hero__content > * {
        animation: hero-in 0.9s var(--ease) both;
    }
    .hero__content > :nth-child(1) { animation-delay: 0.05s; }
    .hero__content > :nth-child(2) { animation-delay: 0.15s; }
    .hero__content > :nth-child(3) { animation-delay: 0.25s; }
    .hero__content > :nth-child(4) { animation-delay: 0.35s; }
    .hero__media { animation: media-in 1.2s var(--ease) both; }
    .hero__media img { animation: media-zoom 2.4s var(--ease) both; }

    @keyframes hero-in {
        from { opacity: 0; transform: translateY(18px); }
        to   { opacity: 1; transform: none; }
    }
    @keyframes media-in {
        from { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
        to   { clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%); }
    }
    @media (max-width: 900px) {
        @keyframes media-in {
            from { clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%); }
            to   { clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%); }
        }
    }
    @keyframes media-zoom {
        from { transform: scale(1.06); }
        to   { transform: none; }
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-x { opacity: 1; transform: none; }
    .strip, .strip img, .bento__cell img, .btn, .btn::before { transition: none !important; }
    .nav__progress { animation: none !important; display: none; }
}
