/* Scroll chapters extend the Philosophy sticky-frame language across the story. */
.scroll-chapter{position:relative;display:block;overflow:visible;background:#050605;scroll-margin-top:var(--header);--chapter-progress:0}
.chapter-frame{position:relative;min-height:calc(100svh - var(--header));overflow:hidden;isolation:isolate;background:#050605}
.scroll-chapter .chapter-image{position:absolute;inset:0 0 0 auto;width:72%;height:100%;object-fit:cover;object-position:center;border-radius:0;transform:none}
.scroll-chapter .chapter-veil{position:absolute;inset:0;background:linear-gradient(90deg,#050605 0%,#050605 35%,rgba(5,6,5,.8) 57%,rgba(5,6,5,.12));mask-image:none;pointer-events:none}
.scroll-chapter .chapter-content{position:relative;z-index:2;padding-block:100px 140px;min-height:calc(100svh - var(--header));display:flex;flex-direction:column;justify-content:center;align-items:flex-start;height:auto}
.scroll-chapter .chapter-content h1,.scroll-chapter .chapter-content h2{width:66%;max-width:18ch;font-size:clamp(44px,5.4vw,76px);font-weight:500;letter-spacing:-.035em;line-height:1.08;text-wrap:balance;margin:0}
.scroll-chapter .chapter-body{width:56%;max-width:620px;margin:var(--heading-content-gap) 0 0;font-size:20px;line-height:1.7;color:var(--muted)}
.scroll-chapter .chapter-body p{width:auto;max-width:none;font-size:inherit;line-height:inherit;margin:0 0 24px;color:inherit}
.scroll-chapter .chapter-body p:last-child{margin-bottom:0}
.scroll-chapter .chapter-body strong{color:var(--text)}
.scroll-chapter .chapter-body .button{margin-top:24px}
.scroll-chapter .history-development-note{font-size:15px!important;line-height:1.75}
.scroll-chapter[data-beat="notice"] .chapter-image{object-position:50% 25%;width:65%}
.scroll-chapter[data-beat="discover"] .chapter-image{object-position:75% center}
.scroll-chapter[data-beat="simplify"] .chapter-image{object-position:35% center}
.scroll-chapter[data-beat="craft"] .chapter-image{object-position:55% center}
.scroll-chapter[data-beat="resolve"] .chapter-image{object-position:75% center;width:75%}
.scroll-chapter[data-beat="ancestry"] .chapter-content h1{max-width:14ch;font-size:clamp(52px,6.5vw,90px)}
/* Progressive enhancement: a chapter stays in view while its imagery resolves. */
.scroll-chapter.is-scroll-chapter{height:var(--chapter-height)}
.is-scroll-chapter .chapter-frame{position:sticky;top:var(--header);height:var(--chapter-frame-height);min-height:0}
.is-scroll-chapter .chapter-content{min-height:100%;height:100%}
.is-scroll-chapter .chapter-image{transform:translate3d(calc((1 - var(--chapter-progress))*30px),0,0) scale(calc(1.1 - var(--chapter-progress)*.08));clip-path:inset(0 0 0 calc((1 - var(--chapter-progress))*18%))}
.is-scroll-chapter[data-beat="discover"] .chapter-image{clip-path:inset(calc((1 - var(--chapter-progress))*24%) 0 0 0);transform:scale(calc(1.12 - var(--chapter-progress)*.1))}
.is-scroll-chapter[data-beat="simplify"] .chapter-image,.is-scroll-chapter[data-beat="resolve"] .chapter-image{clip-path:inset(0 0 0 calc((1 - var(--chapter-progress))*32%));transform:scale(calc(1.18 - var(--chapter-progress)*.16))}
.is-scroll-chapter[data-beat="craft"] .chapter-image{clip-path:inset(0 calc((1 - var(--chapter-progress))*24%) 0 0)}
.is-scroll-chapter .chapter-body{transform:translate3d(0,calc((1 - var(--chapter-progress))*26px),0);opacity:calc(.85 + var(--chapter-progress)*.15)}
.is-scroll-chapter .chapter-content h1,.is-scroll-chapter .chapter-content h2{transform:translate3d(0,calc(var(--chapter-progress)*-14px),0)}
.history-navigation{gap:12px;padding:8px 12px}
.history-navigation a{min-width:40px;min-height:40px;justify-content:center;font-size:14px}
@media(max-width:760px){
 .scroll-chapter .chapter-image{width:100%;object-position:65% center}
 .scroll-chapter[data-beat="notice"] .chapter-image,.scroll-chapter[data-beat="resolve"] .chapter-image{width:100%}
 .scroll-chapter .chapter-veil{background:linear-gradient(90deg,rgba(5,6,5,.96),rgba(5,6,5,.78) 60%,rgba(5,6,5,.48)),linear-gradient(0deg,#050605,transparent 50%)}
 .scroll-chapter .chapter-content{padding-block:64px 112px}
 .scroll-chapter .chapter-content h1,.scroll-chapter .chapter-content h2,.scroll-chapter[data-beat="ancestry"] .chapter-content h1{width:100%;max-width:19ch;font-size:clamp(30px,8.4vw,44px);line-height:1.12}
 .scroll-chapter .chapter-body{width:100%;max-width:36ch;font-size:17px;line-height:1.7;margin-top:var(--heading-content-gap)}
 .scroll-chapter .chapter-body .button{max-width:100%;font-size:14px}
 .history-navigation{gap:0;max-width:calc(100% - 24px);padding:6px}
 .history-navigation a{min-width:36px;min-height:40px}
 .history-navigation a span{font-size:13px}
}
@media(prefers-reduced-motion:reduce){.scroll-chapter .chapter-image,.scroll-chapter .chapter-body{transform:none!important;clip-path:none!important;opacity:1!important}}

/* A concluding headline follows its setup instead of repeating it above. */
.scroll-chapter .chapter-conclusion .chapter-body{margin-top:0;margin-bottom:var(--heading-content-gap)}
.scroll-chapter .chapter-footnote{width:56%;max-width:620px;margin-top:var(--heading-content-gap);color:var(--muted)}
.scroll-chapter .chapter-footnote p{font-size:15px;line-height:1.75;margin:0 0 24px}
.scroll-chapter .chapter-footnote .button{margin-top:0}
@media(max-width:760px){.scroll-chapter .chapter-footnote{width:100%;max-width:36ch;margin-top:32px}.scroll-chapter .chapter-footnote p{font-size:14px}}
