/* ============================================================================
   po-motion.css — Keyframes, view transitions & reduced-motion guards
   ============================================================================ */

/* The drawers slide in with Radzen's own side-dialog animation (AppDrawer.razor). */


/* ── Motion ──────────────────────────────────────────────────────────────────
   Both keyframes are GPU-composited (opacity + transform only).
*/
@keyframes app-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes app-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Scroll-driven entrances ─────────────────────────────────────────────────
   Cards and panes rise into place as they scroll in — a CSS scroll timeline, no JS,
   no rAF, off the main thread. Only the ENTRY range animates and the fill is
   `backwards`, which is what makes it safe:
     · anything already on screen at load is past the range and draws exactly as it
       did before — the first catalogue card `Home_FirstScreen_ShowsAWholeRow`
       measures, the first /azure pane;
     · nothing keeps a transform once it has arrived, so no permanent stacking context.
   Opacity and `translate` only — NO `scale`. Backwards fill applies the from-state to
   every pane still below the fold, and a scale there changes those panes' measured size
   (a 0.97 scale once failed a pane-geometry test at exactly 733px of 756). `translate`
   moves a box without resizing it, and is a separate property from `transform`, so it
   composes with a component's own hover transform.
   `animation-timeline` must come AFTER the `animation` shorthand, which resets it. */
@keyframes app-rise {
    from {
        opacity: 0;
        translate: 0 28px;
    }
}

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .portfolio-stack,
        .app-pane,
        .signins-page .app-card {
            animation: app-rise linear backwards;
            animation-timeline: view();
            animation-range: entry 0% entry 70%;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-page,
    .app-card,
    .portfolio-stack,
    .rz-header {
        animation: none !important;
        transition: none !important;
    }

    .app-progress-icon {
        animation: none;
    }

    #app-gpu-backdrop {
        display: none;
    }
}


