/* CSS-only replacement for the hero's Typed.js text rotator (assets/js/pages/index-2.js).
   That script called `new Typed(...)`, but typed.min.js was never actually loaded on the
   page, so #typed-output rendered empty in production. This crossfades the same 3 phrases
   with pure CSS, on an infinite loop, no JS. */

#typed-output.hero-typed-cycle {
    position: relative;
    display: block;
}

#typed-output.hero-typed-cycle .hero-typed-phrase {
    /* keep the original #typed-output span{font-size:70px;color:#d40436} rule scoped to
       the real inline highlight spans only, not this wrapper */
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: heroTypedCycle 15s infinite;
}

#typed-output.hero-typed-cycle .hero-typed-phrase:nth-child(1) {
    animation-delay: 0s;
}

#typed-output.hero-typed-cycle .hero-typed-phrase:nth-child(2) {
    animation-delay: 5s;
}

#typed-output.hero-typed-cycle .hero-typed-phrase:nth-child(3) {
    animation-delay: 10s;
}

@keyframes heroTypedCycle {
    0% {
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    28% {
        opacity: 1;
    }

    33% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    #typed-output.hero-typed-cycle .hero-typed-phrase {
        animation: none;
        position: static;
        opacity: 1;
    }

    #typed-output.hero-typed-cycle .hero-typed-phrase~.hero-typed-phrase {
        display: none;
    }
}
