/* 首頁開場：滿版幻燈片墊在文字後方，加深色漸層讓文字清楚；底部羽化成頁面底色，銜接下方區塊。
   視差啟用時，羽化只在照片開始離開、下緣進入畫面時才淡入（--cn-hero-exit 由 hero-parallax.js 寫入）。 */
/* 照片高度＝螢幕扣掉後台工具列。啟用捲動停留（.is-holding，scroll-hold.js）時開場軌道加高，
   舞台 sticky 固定在頂端：慢速進場 → 靜止 --cn-hero-still → 慢速離場（兩段緩衝各 2 × --cn-hero-ramp）。 */
.cn-opening{--cn-hero-still:80vh;--cn-hero-ramp:40vh;--cn-bar:var(--wp-admin--admin-bar--height,0px);width:100vw;margin-left:calc(50% - 50vw)}
.cn-opening-stage{height:calc(100svh - var(--cn-bar));overflow:hidden}
.cn-opening.is-holding .cn-opening-stage{position:sticky}
.cn-slides-hero{position:absolute;inset:0;z-index:0}
/* 照片層上下多留緩衝位移需要的空間，位移時不露出空白。 */
.cn-opening.is-holding .cn-slides-hero{inset:calc(-1 * var(--cn-hold-headroom)) 0;will-change:transform}
.cn-opening-stage:after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:45vh;z-index:2;pointer-events:none;opacity:var(--cn-hero-exit,1);background:linear-gradient(180deg,rgba(20,26,19,0) 0,rgba(20,26,19,.3) 30%,rgba(20,26,19,.75) 62%,var(--cn-night) 85%,var(--cn-night) 100%)}
/* 首頁照片用原圖色彩，只稍微提高對比與飽和；上面不放文字，所以不加遮罩（底部羽化到背景色保留）。 */
.cn-slides-hero .cn-slide img,.cn-slides-hero .cn-slide video{filter:contrast(1.06) saturate(1.1)}
.cn-slides-hero .cn-slide .cn-slide-backdrop img{filter:brightness(.85) saturate(1.05) blur(8px)}
@media(max-width:767px){.cn-opening{--cn-hero-still:40vh;--cn-hero-ramp:20vh}}
/* 視差捲動：--cn-hero-progress 由 hero-parallax.js 寫入（0＝照片開始減速，1＝照片開始離開）。
   固定期間照片微放大，標語、提示、按鈕以不同的慢速往上飄；淡出由 hero-parallax.js 直接設定，
   進度 0.6–0.7 時三者都已完全透明並隱藏，早於照片開始離開（1），不會殘留影子。 */
.cn-opening{--cn-hero-progress:0}
.cn-slides-hero .cn-slide{transform:scale(calc(1 + var(--cn-hero-progress) * .05))}
@media(prefers-reduced-motion:reduce){.cn-slides-hero{transform:none}}
