/* 
 * BLUNAPRESS SCROLLYTELLING ENGINE v8.0 (STAGGERED CAPTION)
 * JS-Compatible version. Width and alignment are forced by engine.js.
 */

/* 1. PARENT VISIBILITY */
.white-content-box, 
.inner-constrained, 
.wp-block-post-content,
.scrolling-content-wrapper,
.entry-content,
.is-layout-constrained {
    overflow: visible !important;
}

/* 2. THE CONTAINER */
.blunapress-scrolly-container.wp-block-group {
    position: relative !important;
    padding: 0 !important;
    background: #ffffff !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* 3. THE REVEAL STAGE */
.scrolly-section {
    position: relative !important;
    /* Height and Margin-top are now controlled dynamically by JS for cinematic timing */
    width: 100% !important;
    background: transparent !important;
    clip-path: inset(0 0 0 0);
    overflow: visible !important;
}

/* Base z-index stacking to ensure the jalousie effect works top-down */
.scrolly-section:nth-child(1) { z-index: 50; }
.scrolly-section:nth-child(2) { z-index: 40; }
.scrolly-section:nth-child(3) { z-index: 30; }
.scrolly-section:nth-child(4) { z-index: 20; }
.scrolly-section:nth-child(5) { z-index: 10; }

/* 4. THE STATIONARY MEDIA */
.scrolly-media-block.wp-block-cover {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    width: 100% !important;
    margin: 0 !important;
    max-width: none !important;
}

.scrolly-media-block img.wp-block-cover__image-background {
    width: 100% !important;
    height: 100vh !important;
    object-fit: cover !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* 5. THE CAPTION OVERLAY (Staggered/Animated via JS) */
.scrolly-media-block .wp-block-cover__inner-container {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    padding: 40px !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    margin-top: 35vh !important; 
    color: #000 !important;
    border: 1px solid rgba(0,0,0,0.05);
    text-align: center;
    z-index: 100;
    opacity: 0; /* Managed by JS */
    will-change: transform, opacity;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.scrolly-media-block .wp-block-cover__inner-container h2 {
    font-family: var(--wp--preset--font-family--editorial-sans), sans-serif !important;
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: -0.03em !important;
    margin-bottom: 0.75rem !important;
    line-height: 0.95 !important;
    color: #000 !important;
}

.scrolly-media-block .wp-block-cover__inner-container p {
    font-family: var(--wp--preset--font-family--editorial-sans), sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    color: #666 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* 6. THE EXIT WALL */
.blunapress-scrolly-container::after {
    content: "";
    display: block;
    height: 80px;
    background: #ffffff;
    position: relative;
    z-index: 100;
}

/* ------------------------------------------------------------------------- */
/*	ADDITIONAL TOOLKIT MODULES
/* ------------------------------------------------------------------------- */

/* Standardize Figcaptions across all modules */
.toolkit-fullbleed-photo figcaption,
.toolkit-inline-photo figcaption,
.wp-block-image figcaption,
.wp-element-caption {
    font-family: var(--wp--preset--font-family--editorial-sans), sans-serif !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    margin-top: 1.25rem !important;
    color: #777 !important;
    text-align: center !important;
    line-height: 1.4 !important;
}

.toolkit-chapter-intro {
    margin: 10rem 0 !important;
    text-align: center;
    padding: 0 20px;
}

.toolkit-chapter-intro h2,
.toolkit-chapter-intro h3 {
    font-family: var(--wp--preset--font-family--editorial-sans), sans-serif !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    line-height: 0.9 !important;
    margin-bottom: 1.5rem !important;
    letter-spacing: -0.04em !important;
}

.toolkit-chapter-intro h2 {
    font-size: clamp(3rem, 10vw, 5.5rem) !important;
}

.toolkit-chapter-intro h3 {
    font-size: clamp(2rem, 6vw, 3.5rem) !important;
}

.toolkit-chapter-intro p {
    font-family: var(--wp--preset--font-family--default), sans-serif !important;
    font-style: italic !important;
    font-size: clamp(1.1rem, 2vw, 1.4rem) !important;
    color: #555 !important;
    max-width: 650px !important;
    margin: 0 auto !important;
    line-height: 1.6 !important;
}

.toolkit-fullbleed-photo {
    margin: 8rem 0 !important;
}

/* (standardized figcaption above) */

/* ------------------------------------------------------------------------- */
/*	REMAINING TOOLKIT MODULES: VIDEO, CAROUSEL, INLINE, TRANSITION
/* ------------------------------------------------------------------------- */

/* Video Module */
.toolkit-video-module {
    margin: 6rem auto !important;
    max-width: 1000px !important;
}

.toolkit-video-module video {
    width: 100%;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Carousel Module (Snap-Scroll) */
.toolkit-carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 85%;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2rem 5vw !important;
    margin-left: -5vw !important;
    width: 100vw !important;
    -webkit-overflow-scrolling: touch;
}

.toolkit-carousel-track::-webkit-scrollbar { display: none; }

.toolkit-carousel-slide {
    scroll-snap-align: center;
}

.toolkit-carousel-slide img {
    width: 100%;
    height: 60vh;
    object-fit: cover;
}

/* Inline Photo Module */
.toolkit-inline-photo {
    max-width: 650px !important;
    margin: 4rem auto !important;
}

/* Transition / Ending Module */
.toolkit-transition {
    text-align: center;
    padding: 6rem 0;
    position: relative;
}

.toolkit-transition::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 1px;
    background: #ccc;
}

.toolkit-transition-mark {
    font-family: serif;
    font-style: italic;
    color: #999;
    font-size: 0.8rem;
    background: #fff;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}
