/**
 * NewSum Pro - Smooth Scroll & Motion Styling
 * Architecture reverse-engineered from Shopify Sleek theme.
 */

:root {
    --scrollbar-width: 0px;
    --ease-sleek: cubic-bezier(0.3, 1, 0.3, 1);
    --ease-nav: cubic-bezier(0.6, 0, 0.4, 1);
    --ease-fast: cubic-bezier(0.7, 0, 0.3, 1);
    --duration-reveal: 550ms;
}

/* Zero-CLS layout stabilization when body locks for modals/drawers */
body.story-modal-open,
body.offcanvas-open,
body.drawer-open {
    padding-right: var(--scrollbar-width, 0px) !important;
}

/* Ensure sticky header accounts for scrollbar offset when locked */
body.story-modal-open .site-header.is-sticky,
body.offcanvas-open .site-header.is-sticky,
body.drawer-open .site-header.is-sticky {
    padding-right: calc(var(--space-md) + var(--scrollbar-width, 0px)) !important;
}

/* Dynamic scroll-margin-top for anchor jumps */
[id] {
    scroll-margin-top: calc(var(--header-height, 70px) + 24px);
}

/* Pre-initial state for WAAPI cards if JavaScript runs */
.has-pro-smooth-scroll .bento-tile,
.has-pro-smooth-scroll .zenith-card,
.has-pro-smooth-scroll .metropolitan-lead,
.has-pro-smooth-scroll .metropolitan-subgrid-card,
.has-pro-smooth-scroll .vanguard-hero-banner {
    will-change: transform, opacity;
}

/* Fallback for users requesting reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

