/* ECOS v0.9 / CINEMATIC LAYERS — original layout, not generated images. 
   Historical gallery photos are credited and sourced from NASA separately. */
:root{--v09-gold:#efd1a6;--v09-ice:#badff3;--v09-blue:#132334}
.chapter-visual-stack{min-width:0;position:relative;display:flex;flex-direction:column;align-self:start;background:linear-gradient(180deg,#111c29,#09131f)}
.chapter-visual-stack .chapter-image{width:100%;position:relative!important;top:auto!important;min-height:0!important;height:clamp(395px,48vh,555px)!important;max-height:none!important;flex:none;overflow:hidden}
.chapter-visual-stack .chapter-image:after{content:'';position:absolute;inset:0;pointer-events:none;z-index:4;background:linear-gradient(90deg,#98d8e40d,transparent 25%,#e5bc8410),repeating-linear-gradient(0deg,transparent 0 5px,#fff2 6px,transparent 7px);background-size:auto,100% 9px;opacity:.1;mix-blend-mode:screen;animation:v09-flicker 11s linear infinite}
.chapter-visual-stack .chapter-image .cinematic-stage{inset:0;z-index:1;overflow:hidden}
.chapter-visual-stack .stage-traverse{filter:drop-shadow(0 19px 20px #0009) drop-shadow(0 0 15px #9bbdd82b)}
.chapter-visual-stack .stage-vehicle{will-change:transform}
.chapter-visual-stack .stage-mark{z-index:4}
.chapter-visual-stack .chapter-image-gradient{z-index:3}
.chapter-visual-stack .chapter-img-credit{bottom:15px!important;left:23px!important;z-index:7!important}
.chapter-visual-stack .mission-photo-gallery{position:relative!important;inset:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;width:auto!important;transform:none!important;z-index:1!important;margin:0!important;padding:clamp(14px,2vw,25px)!important;border-radius:0!important;border:0!important;border-top:1px solid #aab8cb48!important;box-shadow:none!important;background:linear-gradient(170deg,#152535,#0b1422)!important;backdrop-filter:none!important}
.chapter-visual-stack .mission-photo-gallery .photo-stage{height:clamp(175px,21vw,285px)!important}
.chapter-visual-stack .mission-photo-gallery .photo-stage img{object-fit:contain!important;object-position:center!important;transform:none!important;filter:none!important;opacity:1!important}
.chapter-visual-stack .mission-photo-gallery .photo-thumbs{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.chapter-visual-stack .mission-photo-gallery .photo-thumbs button{height:52px!important;min-width:0}
.chapter-visual-stack .mission-photo-gallery .photo-thumbs img{width:100%!important;height:100%!important;object-fit:cover!important;position:static!important;animation:none!important;transform:none!important;filter:none!important}
.chapter-visual-stack .photo-gallery-head:before{content:'';display:block;width:7px;height:7px;border-radius:50%;background:#efcc9b;box-shadow:0 0 16px #efce9faa}
.chapter-visual-stack .photo-gallery-head{justify-content:initial;gap:11px}
.chapter-visual-stack .photo-gallery-count{margin-left:auto;font-variant-numeric:tabular-nums}
.chapter-visual-stack .photo-stage{cursor:zoom-in;transition:border-color .3s,box-shadow .35s}
.chapter-visual-stack .photo-stage:hover{border-color:#d3c2a05c;box-shadow:0 0 32px #d0ad851c}
.chapter-visual-stack .photo-meta{gap:14px;align-items:start}
.chapter-visual-stack .photo-thumbs{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:6px}
.chapter-visual-stack .photo-thumbs button{height:53px!important}
.chapter-visual-stack .photo-thumbs button.selected{box-shadow:0 0 0 1px #f0cea2,0 0 20px #eac89e35}
.chapter-visual-stack .photo-stage-sweep{pointer-events:none}
.v09-scene-indicator{position:absolute;bottom:45px;left:25px;right:25px;z-index:7;pointer-events:none;display:flex;align-items:center;gap:9px;color:#e7d6b9;text-shadow:0 3px 8px #000;font:800 9px/1.3 Manrope,sans-serif;letter-spacing:.17em}
.v09-scene-indicator .v09-line{flex:1;height:1px;background:linear-gradient(90deg,#e8d2b9a8,transparent)}
.v09-hero-pulse{position:absolute;z-index:4;inset:0;pointer-events:none;background:radial-gradient(circle at 42% 45%,#fff8e31a,transparent 55%);mix-blend-mode:screen;animation:v09-atmosphere 14s ease-in-out infinite alternate}
.v09-frame-corner{position:absolute;z-index:8;pointer-events:none;width:18px;height:18px;border-top:1px solid #ffffff6b;border-left:1px solid #ffffff6b;left:17px;top:17px;opacity:.85}
.v09-frame-corner:nth-of-type(2){left:auto;right:17px;transform:rotate(90deg)}
@keyframes v09-flicker{0%,4%,97%,100%{opacity:.09}5%,6%{opacity:.19}7%{opacity:.1}}
@keyframes v09-atmosphere{to{transform:translate3d(7%,-3%,0) scale(1.1);opacity:.55}}
/* The reader can see the full stage before encountering the photos. */
.chapter-layout{align-items:start}
.chapter-inner{position:relative}
.scene-voice{transition:opacity .3s,transform .45s;letter-spacing:-.012em}
.chapter-overlay[data-chapter] .chapter-inner #chapter-title{text-wrap:balance}
.chapter-overlay .chapter-inner .scene-fact{box-shadow:0 15px 30px #0002}
.chapter-overlay .chapter-inner .scene-progress span{border-radius:3px;transition:background .5s,box-shadow .5s}
.chapter-overlay .chapter-inner .scene-progress span.active{box-shadow:0 0 15px #cdb18573}
.chapter-overlay .scene-prev,.chapter-overlay .scene-next{transition:transform .25s,color .25s}
.chapter-overlay .scene-prev:hover{transform:translateX(-4px)}.chapter-overlay .scene-next:hover{transform:translateX(4px)}
.chapter-overlay .scene-fact{position:relative;overflow:hidden}
.chapter-overlay .scene-fact:after{content:'';position:absolute;top:0;left:-40%;width:35%;height:100%;background:linear-gradient(90deg,transparent,#e3b97e09,transparent);transform:skewX(-20deg);animation:v09-fact-glow 12s linear infinite}
@keyframes v09-fact-glow{to{left:150%}}
/* Separate gallery on tablet/mobile follows the narration instead of blocking cinematic art. */
@media(max-width:999px){
 .chapter-visual-stack .chapter-image{min-height:0!important;height:clamp(255px,41vw,390px)!important;max-height:none!important}
 .mission-photo-gallery{margin:29px 0 24px!important;padding:15px!important;border-radius:10px!important}
 .mission-photo-gallery .photo-thumbs{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:6px}
 .mission-photo-gallery .photo-stage{height:clamp(200px,32vw,335px)!important}
 .mission-photo-gallery .photo-stage img{object-fit:contain!important;transform:none!important;opacity:1!important}
 .v09-scene-indicator{bottom:41px;font-size:8px}
}
@media(max-width:620px){
 .chapter-visual-stack .chapter-image{height:245px!important}
 .mission-photo-gallery{padding:13px!important}
 .mission-photo-gallery .photo-stage{height:215px!important}
 .mission-photo-gallery .photo-thumbs{gap:4px!important}
 .mission-photo-gallery .photo-thumbs button{height:42px!important}
 .mission-photo-gallery .photo-thumbs button b{font-size:8px}
 .v09-scene-indicator{left:13px;right:13px;bottom:35px}
 .v09-frame-corner{top:11px;left:11px}.v09-frame-corner:nth-of-type(2){right:11px}
}
/* Cinematic final: NASA archival photos enter as layered memory projections, never altered. */
.cinema-screen{isolation:isolate}
.cinema-documentary{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden;opacity:0;transition:opacity 1.1s ease}
.cinema-finale .cinema-documentary{opacity:1}
.cinema-documentary .doc-layer{position:absolute;inset:0;background:#0b121d}
.cinema-documentary .doc-layer img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:grayscale(.48) saturate(.68) brightness(.48);transform:scale(1.18);opacity:0;transition:opacity 1.1s ease,transform 10s linear}
.cinema-documentary .doc-layer img.is-active{opacity:.67;transform:scale(1.03)}
.cinema-documentary:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,#05091077 0%,transparent 27%,#070c16a3 58%,#070c16fc 85%);pointer-events:none}
.cinema-light-trail{position:absolute;inset:0;pointer-events:none;z-index:1;opacity:.65;background:radial-gradient(circle at 14% 32%,#f6dec87c 0 1px,transparent 3px),radial-gradient(circle at 64% 15%,#c6deeea8 0 1px,transparent 3px),radial-gradient(circle at 88% 62%,#e6cba87a 0 1px,transparent 3px);background-size:240px 270px,320px 320px,400px 370px;animation:cinema-star-sweep 28s linear infinite}
@keyframes cinema-star-sweep{to{background-position:270px -200px,-200px 150px,140px -110px}}
.cinema-chapter-marker{position:absolute;z-index:2;top:24%;right:clamp(20px,5vw,70px);color:#f8ecd6;font:800 10px Manrope,sans-serif;letter-spacing:.2em;text-shadow:0 2px 15px #000;max-width:220px;text-align:right;opacity:0;transform:translateY(12px);transition:opacity .8s,transform .8s}
.cinema-finale .cinema-chapter-marker{opacity:.85;transform:translateY(0)}
.cinema-finale .cinema-circle{opacity:.18;filter:blur(3px)}
.cinema-finale .cinema-copy{background:linear-gradient(0deg,#060b16 4%,#08101bf5 52%,#08111b4d 100%);padding-bottom:clamp(27px,4vw,55px)}
.cinema-finale .cinema-copy #cinema-part{color:#ead3b7;letter-spacing:.18em}
.cinema-finale .cinema-copy h2{font-size:clamp(30px,4.2vw,57px);text-shadow:0 4px 30px #000a}
.cinema-finale .cinema-copy #cinema-text{color:#eef1f6;max-width:900px}
.cinema-finale .cinema-player{border-top-color:#cfb78a8a}
.cinema-memories{position:absolute;left:clamp(19px,5vw,69px);right:clamp(19px,5vw,69px);top:115px;z-index:2;display:flex;align-items:center;gap:8px;pointer-events:none}
.cinema-memories .memory-node{display:grid;place-items:center;border:1px solid #f3d5b177;background:#08111ed6;color:#eedcc5;min-width:25px;width:31px;height:31px;border-radius:50%;font:800 9px Manrope,sans-serif;animation:cinema-node-flicker 5s ease-in-out infinite alternate}
.cinema-memories .memory-ray{flex:1;height:1px;background:linear-gradient(90deg,#edcba799,#c5dcec66);transform-origin:left;box-shadow:0 0 13px #e9d2ac77}
@keyframes cinema-node-flicker{50%{box-shadow:0 0 28px #efd6b178}}
.cinema-scene-dots{position:absolute;bottom:17px;left:50%;transform:translateX(-50%);z-index:5;display:flex;gap:8px}
.cinema-scene-dots span{width:22px;height:2px;background:#8295a3;opacity:.4;transition:background .4s,width .4s,opacity .4s}
.cinema-scene-dots span.active{width:42px;background:#eac99e;opacity:1;box-shadow:0 0 13px #eac99e88}
.cinema-finale .cinema-next{background:linear-gradient(95deg,#e6cba6,#f2dfc0);color:#161d28;border-color:#eccaa1;font-weight:900;min-height:45px;box-shadow:0 12px 30px #e8be8d20;transition:transform .25s,box-shadow .25s}
.cinema-finale .cinema-next:hover{transform:translateY(-3px);box-shadow:0 18px 36px #e8be8d3a}
.cinema-finale.cinema-playing .cinema-memories .memory-node{animation-duration:1.6s}
@media(max-width:620px){.cinema-memories{top:95px;gap:4px}.cinema-memories .memory-node{width:24px;height:24px;min-width:24px;font-size:8px}.cinema-chapter-marker{top:20%;right:20px;max-width:140px;font-size:8px}.cinema-finale .cinema-copy #cinema-text{max-height:43vh;font-size:15px}.cinema-finale .cinema-copy{padding-bottom:52px}}
/* Respect visitor accessibility settings. */
@media(prefers-reduced-motion:reduce){.v09-hero-pulse,.chapter-visual-stack .chapter-image:after,.chapter-overlay .scene-fact:after,.cinema-light-trail,.cinema-memories .memory-node{animation:none!important}.cinema-documentary .doc-layer img{transition:none!important;transform:none!important}.v09-hero-pulse{opacity:.23}}

/* Keep an unresponsive NASA asset from showing a browser's broken-image icon/alt text over the scientific caption. */
.photo-stage img[hidden],.mission-photo-gallery .photo-stage img[hidden]{display:none!important}
