/* ==========================================================================
   DAYMARK COFFEE — Animations
   All hidden-until-revealed states are scoped under html.has-js so content
   is never invisible if JavaScript fails. Reduced motion respected.
   ========================================================================== */

/* --- Scroll reveal --- */
html.has-js .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

html.has-js .reveal--left {
    transform: translateX(-24px);
}

html.has-js .reveal--right {
    transform: translateX(24px);
}

html.has-js .reveal.is-revealed {
    opacity: 1;
    transform: none;
}

/* Stagger */
html.has-js .stagger > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

html.has-js .stagger.is-revealed > * {
    opacity: 1;
    transform: none;
}

html.has-js .stagger.is-revealed > *:nth-child(1) { transition-delay: 0.04s; }
html.has-js .stagger.is-revealed > *:nth-child(2) { transition-delay: 0.1s; }
html.has-js .stagger.is-revealed > *:nth-child(3) { transition-delay: 0.16s; }
html.has-js .stagger.is-revealed > *:nth-child(4) { transition-delay: 0.22s; }
html.has-js .stagger.is-revealed > *:nth-child(5) { transition-delay: 0.28s; }
html.has-js .stagger.is-revealed > *:nth-child(6) { transition-delay: 0.34s; }
html.has-js .stagger.is-revealed > *:nth-child(7) { transition-delay: 0.4s; }
html.has-js .stagger.is-revealed > *:nth-child(8) { transition-delay: 0.46s; }

/* --- Hero entrance --- */
html.has-js .hero-entrance > * {
    opacity: 0;
    transform: translateY(18px);
    animation: rise-in 0.6s var(--ease) forwards;
}

html.has-js .hero-entrance > *:nth-child(1) { animation-delay: 0.08s; }
html.has-js .hero-entrance > *:nth-child(2) { animation-delay: 0.18s; }
html.has-js .hero-entrance > *:nth-child(3) { animation-delay: 0.28s; }
html.has-js .hero-entrance > *:nth-child(4) { animation-delay: 0.38s; }
html.has-js .hero-entrance > *:nth-child(5) { animation-delay: 0.48s; }

@keyframes rise-in {
    to {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@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;
        transition-delay: 0ms !important;
    }

    html.has-js .reveal,
    html.has-js .reveal--left,
    html.has-js .reveal--right,
    html.has-js .stagger > *,
    html.has-js .hero-entrance > * {
        opacity: 1;
        transform: none;
    }

    .ticker-track {
        animation: none;
    }
}
