/* One fast viewport entrance from Our Story through the footer. */
:root {
    --landing-reveal-duration: 420ms;
    --landing-reveal-distance: 12px;
    --landing-reveal-ease: cubic-bezier(.22, 1, .36, 1);
}

html.motion-ready .landing-unified-section {
    opacity: 0 !important;
    transform: translate3d(0, var(--landing-reveal-distance), 0) !important;
    transition:
        opacity var(--landing-reveal-duration) var(--landing-reveal-ease) !important,
        transform var(--landing-reveal-duration) var(--landing-reveal-ease) !important;
    transition-delay: 0ms !important;
    will-change: opacity, transform;
}

html.motion-ready .landing-unified-section.is-section-visible {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
    will-change: auto;
}

/* The wrapper owns the reveal. Legacy child entrances stay visible and do
   not replay or stagger as the user scrolls. */
html.motion-ready .landing-unified-section :is(
    .ce-story-copy,
    .ce-occasions-heading,
    .ce-occasion-stage,
    .ce-occasion-selector,
    .ce-occasions-personalized,
    .package-editorial-heading,
    .package-editorial-nav-row,
    .package-editorial-card,
    .package-editorial-addons,
    .ce-gallery-wall-heading,
    .ce-gallery-wall-grid,
    .process-flow-heading,
    .process-flow-journey,
    .process-flow-action,
    .site-footer-shell,
    .site-footer-brand-block,
    .site-footer-column,
    .site-footer-bottom
) {
    opacity: 1 !important;
    transform: none !important;
    animation-name: none !important;
    animation-delay: 0ms !important;
    transition-delay: 0ms !important;
}

/* Keep package switching responsive because it follows a direct click. */
html.motion-ready .landing-unified-section .package-editorial-card.is-entering-left {
    animation: packageEditorialSwitchInLeft 420ms var(--landing-reveal-ease) both !important;
}

html.motion-ready .landing-unified-section .package-editorial-card.is-entering-right {
    animation: packageEditorialSwitchInRight 420ms var(--landing-reveal-ease) both !important;
}

html.motion-ready .landing-unified-section .package-editorial-card.is-entering-left .package-editorial-visual,
html.motion-ready .landing-unified-section .package-editorial-card.is-entering-right .package-editorial-visual,
html.motion-ready .landing-unified-section .package-editorial-card.is-entering-left .package-editorial-details > *,
html.motion-ready .landing-unified-section .package-editorial-card.is-entering-right .package-editorial-details > * {
    animation-duration: 420ms !important;
    animation-delay: 0ms !important;
}

/* Data arriving after the section is visible should settle quickly without a
   card-by-card cascade that resembles slow loading. */
html.motion-ready .landing-unified-section .ce-occasions-layout.is-event-data-ready :is(
    .ce-occasion-stage,
    .ce-occasion-selector-heading,
    .ce-occasion-selector-card,
    .ce-occasions-personalized
) {
    animation-duration: 320ms !important;
    animation-delay: 0ms !important;
}

@media (max-width: 700px) {
    :root {
        --landing-reveal-distance: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.motion-ready .landing-unified-section,
    html.motion-ready .landing-unified-section.is-section-visible {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        will-change: auto !important;
    }
}

/* Stable media surfaces prevent empty white areas while an image is decoded
   or while the retry/fallback chain is running. */
.ce-story-landscape,
.package-editorial-visual,
.ce-occasion-stage-media,
.ce-occasion-selector-media,
.ce-gallery-wall-card-media,
.ce-gallery-wall-peek,
.ce-gallery-wall-thumb {
    background: linear-gradient(135deg, #e9eef8 0%, #f8faff 48%, #e1e8f5 100%);
}

img.landing-image-loading {
    opacity: .01;
}

img.landing-image-unavailable {
    opacity: 0 !important;
}
