/* Trail-only native stack. The current production content stays in natural flow. */
body:not([data-office="true"]) #main{overflow:visible;isolation:isolate}
body:not([data-office="true"]) #main>section{height:auto!important;max-height:none!important;margin-top:0!important;isolation:isolate;padding-bottom:max(clamp(80px,10vw,120px),var(--chapter-reading-buffer,0px))!important;scroll-margin-top:calc(var(--sticky-chapter-header-height,0px) + 16px)}
body:not([data-office="true"]) #main.sticky-chapters-active>section{position:sticky;top:var(--chapter-sticky-top,0px);z-index:var(--chapter-layer,1);min-height:100svh}
body:not([data-office="true"]) #trailhead{--chapter-layer:1;display:block;padding-top:clamp(128px,20svh,216px);min-height:100svh;background:#080d13 url('/trail-prototype/assets/cinematic-night-environment.webp') center/cover no-repeat}
body:not([data-office="true"]) #tales{--chapter-layer:2;background:#090b13 url('/trail-prototype/assets/close-campfire-v1.webp') center/cover no-repeat}
body:not([data-office="true"]) #field-notes{--chapter-layer:3;background:#090b13 url('/images/sections/field-notes-bg.webp') 54% bottom/cover no-repeat}
body:not([data-office="true"]) #principles{--chapter-layer:4;background:#090b13 url('/images/sections/trail-markers-bg.webp') 34% bottom/cover no-repeat}
body:not([data-office="true"]) #voices{--chapter-layer:5;background:#090b13 url('/images/sections/echo-ridge-bg.webp') 52% bottom/cover no-repeat}
body:not([data-office="true"]) #connect{--chapter-layer:6;background:#090b13 url('/images/Footer-3d-desktop-poster.jpg') center/cover no-repeat}
body:not([data-office="true"]) #main>section:not(#connect)::before{display:none!important}
body:not([data-office="true"]) #connect::before{background:linear-gradient(90deg,#090b13a8,transparent 80%);z-index:0}
body:not([data-office="true"]) #connect::after{display:none}
body:not([data-office="true"]) #trailhead .hero-copy{position:relative;top:auto;left:auto;margin:0 0 0 7%;padding:0;width:48%;transform:none!important;opacity:1!important}
body:not([data-office="true"]) #trailhead .chapter-bottom{position:relative;inset:auto;margin:40px 7% 0}
body:not([data-office="true"]) #trailhead .hero-shade{background:linear-gradient(180deg,#060811b8 0%,#06081150 21%,transparent 58%),linear-gradient(90deg,#05080e55,transparent 59%)}
body:not([data-office="true"]) .chapter-theme-plate{position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:0;background:center/cover no-repeat}
body:not([data-office="true"]) .chapter-theme-plate[data-chapter="trailhead"]{background-image:url('/trail-prototype/assets/cinematic-morning-environment.webp')}
body:not([data-office="true"]) .chapter-theme-plate[data-chapter="tales"]{background-image:url('/trail-prototype/assets/campfire-tales-morning.webp')}
body:not([data-office="true"]) .chapter-theme-plate[data-chapter="field-notes"]{background-image:url('/trail-prototype/assets/field-notes-morning.webp')}
body:not([data-office="true"]) .chapter-theme-plate[data-chapter="principles"]{background-image:url('/trail-prototype/assets/trail-markers-morning.webp')}
body:not([data-office="true"]) .chapter-theme-plate[data-chapter="voices"]{background-image:url('/trail-prototype/assets/echo-ridge-morning.webp')}
body:not([data-office="true"]) .chapter-theme-plate[data-chapter="connect"]{background-image:url('/trail-prototype/assets/campsite-morning.webp')}
html[data-theme="light"] body:not([data-office="true"]) .chapter-theme-plate{opacity:1}
html.chapter-theme-changing body:not([data-office="true"]) .chapter-theme-plate{transition:opacity 5s ease}
body:not([data-office="true"]) #main>section .field-clouds{inset:0;height:100%;transform:none;clip-path:inset(0)}
body:not([data-office="true"]) #connect .journey-campsite-video{z-index:-2;mask-image:none!important;-webkit-mask-image:none!important}
/* Contrast stays local to the chapter; no scrim crosses a section boundary. */
body:not([data-office="true"]) #main>section:not(#trailhead):not(#connect)::after{inset:0;background:linear-gradient(90deg,#090b1370,transparent 72%),linear-gradient(0deg,#090b1360,transparent 48%)}
body:not([data-office="true"]) #main .home-motion-control{position:fixed;z-index:90}
body:not([data-office="true"]) #voices .testimonial-board{grid-template-rows:repeat(2,minmax(22rem,auto));scroll-snap-type:none}
body:not([data-office="true"]) #voices .testimonial-quote p{display:block;-webkit-line-clamp:none;overflow:visible;font-size:16px}
body:not([data-office="true"]) #voices .testimonial-slide-btn{min-width:44px;min-height:44px}
@media(max-width:900px) and (min-width:651px){body:not([data-office="true"]) #trailhead .hero-copy h1{font-size:clamp(46px,6.6vw,64px)}}
@media(max-width:650px){
 body:not([data-office="true"]) #trailhead{padding-top:440px;min-height:100svh}
 body:not([data-office="true"]) #trailhead .hero-copy{margin-left:7%;width:86%}
 body:not([data-office="true"]) #trailhead .chapter-bottom{display:none}
 body:not([data-office="true"]) #connect{background-position:65% center}
}
@media(prefers-reduced-motion:reduce){body:not([data-office="true"]) .chapter-theme-plate{transition:none!important}}

@media(max-width:650px){body:not([data-office="true"]) #voices .testimonial-board{width:100%;margin-left:0;margin-right:0}}

@media(max-width:650px){body:not([data-office="true"]) .home-motion-control{top:10px;bottom:auto;right:110px;z-index:101}body:not([data-office="true"]) .home-motion-control #motion{font-size:12px;padding:8px 12px}}

/* The incoming image feathers above its own layer, across the outgoing
   reading buffer. Only scenery dissolves; headings and actions stay crisp. */
body:not([data-office="true"]) #main>section{background:none!important}
body:not([data-office="true"]) #trailhead{--chapter-night-art:url('/trail-prototype/assets/cinematic-night-environment.webp')}
body:not([data-office="true"]) #tales{--chapter-night-art:url('/trail-prototype/assets/close-campfire-v1.webp')}
body:not([data-office="true"]) #field-notes{--chapter-night-art:url('/images/sections/field-notes-bg.webp')}
body:not([data-office="true"]) #principles{--chapter-night-art:url('/images/sections/trail-markers-bg.webp')}
body:not([data-office="true"]) #voices{--chapter-night-art:url('/images/sections/echo-ridge-bg.webp')}
body:not([data-office="true"]) #connect{--chapter-night-art:url('/images/Footer-3d-desktop-poster.jpg')}
body:not([data-office="true"]) .chapter-scene{display:block;position:absolute;inset:calc(-1 * var(--chapter-veil-height,0px)) 0 0;z-index:-2;pointer-events:none;background:#090b13 var(--chapter-night-art) center/cover no-repeat;opacity:var(--chapter-scene-reveal,1);-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 var(--chapter-veil-height,0px),#000 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 var(--chapter-veil-height,0px),#000 100%)}
body:not([data-office="true"]) #trailhead .chapter-scene{-webkit-mask-image:none;mask-image:none}
body:not([data-office="true"]) .chapter-scene>.chapter-theme-plate{z-index:0}
body:not([data-office="true"]) #main:not(.sticky-chapters-active) .chapter-scene{inset:0;-webkit-mask-image:none;mask-image:none;opacity:1}
/* A solid fill remains readable when WebKit delays composited text-gradient paint. */
body:not([data-office="true"]) #hero-title .hero-title-line{color:#f2f0e8;-webkit-text-fill-color:#f2f0e8}
body:not([data-office="true"]) #hero-title .hero-title-line em{color:#fca311;-webkit-text-fill-color:#fca311}
