/* ==========================================================================
   Animations: shared keyframes, reveal states and reduced-motion rules.
   Scroll-driven motion lives in assets/js/animations.js (GSAP).
   ========================================================================== */


/* CSS-only draw for above-the-fold annotations */
.js .draw-on-load path,
.js .draw-on-load ellipse {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.8s var(--ease-editorial) forwards;
    animation-delay: var(--delay, 0.6s);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Masked line reveal (shared with section headings) */
.mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-top: 0.08em;
    margin-top: -0.08em;
    padding-right: 0.04em;
}
.mask__inner { display: inline-block; }

.js .hero__slogan .mask__inner {
    transform: translateY(110%);
    animation: rise 1s var(--ease-editorial) forwards;
    animation-delay: calc(var(--i, 0) * 90ms + 120ms);
}
@keyframes rise { to { transform: none; } }

/* --------------------------------------------------------------------------
   Reduced motion: show everything at rest
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .js .hero__slogan .mask__inner,
    .js .page-hero .mask__inner,
    .js .capsule__media,
    .js .capsule__play,
    .js .capsule__label,
    .js .draw-on-load path,
    .js .draw-on-load ellipse {
        animation: none !important;
        transform: none !important;
        stroke-dashoffset: 0 !important;
        clip-path: none !important;
    }
}

/* Inner-page hero headings rise on load like the homepage slogan */
.js .page-hero .mask__inner {
    transform: translateY(110%);
    animation: rise 1s var(--ease-editorial) forwards;
    animation-delay: calc(var(--i, 0) * 90ms + 100ms);
}

/* Global safety net: no animation or smooth scroll when reduced motion is requested */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
