/* The shared reveal controller owns content entrances once it is ready.
   Keep the original welcome fallback when JavaScript is unavailable. */
body.invitation-reveal-enabled #welcome > .d-flex > .d-flex.flex-column > *,
html.performance-lite body.invitation-reveal-enabled #welcome > .d-flex > .d-flex.flex-column > *,
body.invitation-reveal-enabled #welcome > .d-flex > .d-flex.flex-column > #button-open-invitation,
html.performance-lite body.invitation-reveal-enabled #welcome > .d-flex > .d-flex.flex-column > #button-open-invitation,
body.invitation-reveal-enabled #welcome #button-open-invitation {
    animation: none;
}

/* Welcome wrappers remain visible while their semantic children reveal.
   Do not reset transforms: several themes use them for positioning. */
body.invitation-reveal-enabled #welcome > .d-flex > .d-flex.flex-column > :not(.content-reveal-pending),
html.performance-lite body.invitation-reveal-enabled #welcome > .d-flex > .d-flex.flex-column > :not(.content-reveal-pending),
body.invitation-reveal-enabled #welcome #button-open-invitation {
    opacity: 1;
}

/* JavaScript removes this state before its short Web Animation starts.
   Only prepared targets can be hidden; no layout or scrolling rules change. */
body.invitation-reveal-enabled :is(#welcome, main) .content-reveal.content-reveal-pending,
body.invitation-reveal-enabled #welcome > .d-flex > .d-flex.flex-column > .content-reveal.content-reveal-pending,
html.performance-lite body.invitation-reveal-enabled #welcome > .d-flex > .d-flex.flex-column > .content-reveal.content-reveal-pending {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    /* These declarations also take precedence over an animation that was
       already running when the visitor changed their motion preference. */
    body.invitation-reveal-enabled :is(#welcome, main) .content-reveal {
        opacity: 1 !important;
        translate: none !important;
        scale: none !important;
    }
}
