/* ==========================================================================
   Inner-page motion (public/js/motion.js).

   Only the script adds these classes — and never for reduced-motion
   visitors — so nothing here can hide content on its own.
   ========================================================================== */

/* A title can sit inside a scrollCue group, whose CSS hides every child until
   the theme animates it. The title is claimed by motion.js instead, so it must
   override that hiding (and any inline animation the theme sets). */
.aim-rise {
    opacity: 1 !important;
    animation: none !important;
}

/* Words rise from behind the bottom edge of their line; the other edges stay
   open so accents, ascenders and descenders are never cropped. */
.aim-rise-mask {
    display: inline-block;
    clip-path: inset(-0.4em -0.2em -0.14em -0.2em);
}

.aim-rise-word {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--i, 0) * 40ms);
}

.aim-rise.is-in .aim-rise-word {
    transform: none;
}

.aim-reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--aim-delay, 0ms);
}

.aim-reveal.is-in {
    opacity: 1;
    transform: none;
}

img.aim-wipe {
    clip-path: inset(0 0 100% 0);
    scale: 1.08;
    transition: clip-path 1.1s cubic-bezier(0.65, 0, 0.35, 1), scale 1.4s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--aim-delay, 0ms);
}

img.aim-wipe.is-in {
    clip-path: inset(0 0 0 0);
    scale: 1;
}

.aim-count {
    font-variant-numeric: tabular-nums;
}

/* Buttons lean toward the pointer (translate is set by the script). */
.content-wrapper section .btn {
    transition-property: color, background-color, border-color, box-shadow, transform, translate;
}

@media print {
    .aim-rise-word,
    .aim-reveal,
    img.aim-wipe {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
        scale: 1 !important;
    }
}
