/*
 * Entrance motion, applied only when js/motion.js has added the "motion" class to <html>
 * (never for reduced-motion visitors). Without it every element is simply visible.
 */
:root {
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --reveal-duration: 1100ms;
    --reveal-step: 90ms;
}

.motion [data-reveal] {
    transition:
        opacity var(--reveal-duration) var(--ease-out),
        transform var(--reveal-duration) var(--ease-out),
        clip-path var(--reveal-duration) var(--ease-out);
    transition-delay: calc(var(--i, 0) * var(--reveal-step));
}

.motion [data-reveal]:not(.is-in) { opacity: 0; }
.motion [data-reveal="up"]:not(.is-in) { transform: translateY(48px); }
.motion [data-reveal="scale"]:not(.is-in) { transform: translateY(28px) scale(0.93); }
.motion [data-reveal="left"]:not(.is-in) { transform: translateX(-64px); }
.motion [data-reveal="right"]:not(.is-in) { transform: translateX(64px); }
.motion [data-reveal="fade"]:not(.is-in) { transform: none; }

/* Words slide up out of a mask, one after another. */
.motion [data-reveal="words"] { opacity: 1; }
.reveal-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.1em;
    margin-bottom: -0.1em;
}
.reveal-word > span {
    display: inline-block;
    transition: transform 1000ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * var(--reveal-step) + var(--w, 0) * 55ms);
}
.motion [data-reveal="words"]:not(.is-in) .reveal-word > span { transform: translateY(110%); }

/* Eyebrow rules and list dividers draw themselves in. */
.motion .eyebrow::before {
    transform-origin: left;
    transition: transform 900ms var(--ease-out) 250ms;
}
.motion [data-reveal]:not(.is-in) .eyebrow::before,
.motion .eyebrow[data-reveal]:not(.is-in)::before { transform: scaleX(0); }

.motion .feature-list > li { position: relative; border-bottom-color: transparent; }
.motion .feature-list > li::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px;
    height: 1px;
    background: var(--color-line-strong);
    transform-origin: left;
    transition: transform 1200ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * var(--reveal-step) + 200ms);
}
.motion .feature-list > li:not(.is-in)::after { transform: scaleX(0); }

/* Feature numbers count in with a slight slide. */
.motion .feature-list__index { transition: transform 900ms var(--ease-out), opacity 900ms var(--ease-out); }
.motion .feature-list > li:not(.is-in) .feature-list__index { opacity: 0; transform: translateX(-12px); }

/* Illustrations rise in with a slight scale, or are uncovered by a wipe. */
.motion [data-reveal="rise"]:not(.is-in) { transform: translateY(56px) scale(0.96); }
/* The wipe clips the content, never the observed element itself: an element clipped to nothing
   never counts as intersecting, so it would never be revealed. */
.motion [data-reveal="clip"]:not(.is-in) { opacity: 1; }
.motion [data-reveal="clip"] > * {
    clip-path: inset(0 0 0 0);
    transition: clip-path 1300ms var(--ease-out), transform 1600ms var(--ease-out);
}
.motion [data-reveal="clip"]:not(.is-in) > * { clip-path: inset(0 100% 0 0); transform: scale(1.08); }

/* Soft parallax on large illustrations where the browser supports scroll-driven animations. */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .page-hero__art .ill, .home-split__art .ill {
            animation: ill-parallax linear both;
            animation-timeline: view();
            animation-range: cover;
        }
    }
}

@keyframes ill-parallax {
    from { transform: translateY(-3%); }
    to { transform: translateY(3%); }
}

