/* Reusable chapter opener. Static/readable by default; JavaScript enables motion. */
.chapter-curtain {
    position: relative;
    z-index: 10;
    --curtain-y: 0%;
    --chapter-copy-y: 0px;
}
.chapter-curtain__stage {
    position: relative;
    min-height: calc(100svh - var(--header-height));
    display: grid;
    place-items: center;
    overflow: hidden;
    isolation: isolate;
    padding: 48px 24px;
}
.chapter-curtain__background {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #2a2b5f;
    transform: translateY(var(--curtain-y));
}
.chapter-curtain__copy {
    width: min(947px, 100%);
    color: #e8e8e8;
    transform: translateY(var(--chapter-copy-y));
}
.chapter-curtain__heading { display: flex; align-items: center; gap: 18px; }
.chapter-curtain__heading img { width: 67px; height: 66px; flex: 0 0 auto; }
.chapter-curtain__heading h2 {
    margin: 0;
    color: #95efce;
    font: 600 clamp(30px, 3.2vw, 48px)/1.1 var(--font-main);
}
.chapter-curtain__copy p {
    max-width: 700px;
    margin: 30px 0 0 85px;
    font: 400 20px/30px var(--font-main);
}
.chapter-motion-ready .chapter-curtain { height: 180svh; }
.chapter-motion-ready .chapter-curtain__stage {
    position: sticky;
    top: var(--header-height);
    height: calc(100svh - var(--header-height));
    min-height: 0;
    visibility: hidden;
    pointer-events: none;
}
.chapter-motion-ready .chapter-curtain[data-curtain-phase="entry"] .chapter-curtain__stage {
    position: fixed;
    inset: var(--header-height) 0 auto;
    visibility: visible;
}
.chapter-motion-ready .chapter-curtain[data-curtain-phase="settled"] .chapter-curtain__stage {
    visibility: visible;
    pointer-events: auto;
}
@media (max-width: 700px) {
    .chapter-curtain__heading { gap: 12px; }
    .chapter-curtain__heading img { width: 45px; height: auto; }
    .chapter-curtain__copy p { margin-left: 0; font-size: 17px; line-height: 26px; }
}
/* Short landscape screens and reduced motion keep all copy in normal flow. */
@media (prefers-reduced-motion: reduce), (max-height: 540px) {
    .chapter-motion-ready .chapter-curtain { height: auto; }
    .chapter-motion-ready .chapter-curtain .chapter-curtain__stage {
        position: relative;
        inset: auto;
        height: auto;
        min-height: calc(100svh - var(--header-height));
        visibility: visible;
        pointer-events: auto;
    }
    .chapter-curtain__background, .chapter-curtain__copy { transform: none; }
}
