/* 2026 首頁
   來源：index.php、widget_kv2026.php、widget_home2026.php（2026-10-05 由內嵌搬出，第一階段只搬家、規則未改） */

/* ---------- index.php ---------- */
.mobile .header {
	position: absolute!important;
}
/*.header { display: none !important; }
.header.header-compact { display: block !important; }
.header.header-onscroll { display: block !important; }*/

/* ---------- 主視覺（widget_kv2026.php；依 geom.json 產生的位置規則仍在原檔內嵌） ---------- */
@property --kvp { syntax: '<percentage>'; inherits: false; initial-value: 110%; }

/* --kv-top：頂部導覽列高度（kv.js 載入後依實際高度覆寫）；預設先給 .sh-bar 的 8rem，避免畫面先以 0 繪製再下移（版面位移 CLS） */
#kv2026 { --kv-top: 8rem; position: relative; height: 100vh; height: 100svh; min-height: 480px; display: grid; place-items: center; overflow: hidden; background: #000;
	padding-top: var(--kv-top, 0); box-sizing: border-box; }
@media (min-width: 961px) { #kv2026 { --kv-top: calc(8rem + 1px); } }   /* 961px 以上導覽列高度含 1px 底線（佈景主題 960px 以下不計入） */
#kv2026 .kv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

/* 舞台：依橫/直切換畫板，contain 縮放（黑底所以留邊不可見）；--kv-top 保留給頂部導覽列 */
#kv2026 .kv-stage { position: relative; aspect-ratio: 16 / 9; width: min(100vw, calc((100svh - var(--kv-top, 0px)) * 16 / 9)); }
#kv2026 .kv-stage img, #kv2026 .kv-title, #kv2026 .kv-vec { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; }
#kv2026 .kv-title { fill: #fff; overflow: visible; }
#kv2026 .kv-title.v, #kv2026 .kv-vec.v { display: none; }
#kv2026 .kv-px { position: absolute; inset: 0; translate: calc(var(--mx, 0) * var(--d, 0) * 1%) calc(var(--my, 0) * var(--d, 0) * 1%); transition: translate .8s cubic-bezier(.2,.7,.3,1); }
#kv2026 .kv-l { position: absolute; inset: 0; }

@media (max-aspect-ratio: 1/1) {
	#kv2026 .kv-stage { aspect-ratio: 9 / 16; width: min(100vw, calc((100svh - var(--kv-top, 0px)) * 9 / 16)); }
	#kv2026 .kv-title.h, #kv2026 .kv-vec.h { display: none; }
	#kv2026 .kv-title.v, #kv2026 .kv-vec.v { display: block; }
}

/* 向量圖層外框（延伸到畫板外）與擠出動畫範圍 --bp / --bs，由 geom.json 產生 */

/* 閒置：金屬反光掃過（SVG 內的 rect，以圖層形狀裁切） */
#kv2026 .kv-vec .sheen { mix-blend-mode: overlay; opacity: .9; transform: translate(var(--sx0), var(--sy0)); }

/* ---------- 入場動畫（只在 .play 時套用；無 JS 或減少動態時直接顯示完成圖） ---------- */
.kvjs #kv2026:not(.play):not(.still) .kv-stage { visibility: hidden; } /* 等圖層解碼，避免先閃完成圖 */
#kv2026.play .kv-band, #kv2026.play .kv-stairs {
	-webkit-mask: linear-gradient(239deg, #000 calc(var(--kvp) - 8%), transparent var(--kvp)) var(--bp) / var(--bs) no-repeat;
	mask: linear-gradient(239deg, #000 calc(var(--kvp) - 8%), transparent var(--kvp)) var(--bp) / var(--bs) no-repeat;
	animation: kv-extrude 1.5s cubic-bezier(.5,0,.2,1) both;
}
#kv2026.play .kv-band   { animation-delay: .1s; }
#kv2026.play .kv-stairs { animation-delay: .4s; animation-duration: 1.7s; }
@keyframes kv-extrude { from { --kvp: 0%; } to { --kvp: 110%; } }

#kv2026.play .kv-block { animation: kv-rise 1.3s cubic-bezier(.25,1.35,.4,1) 1.15s both; }
@keyframes kv-rise { from { opacity: 0; transform: translate(-3%, 9%); } 40% { opacity: 1; } to { opacity: 1; transform: none; } }

#kv2026.play .kv-title .f { animation: kv-weld .75s cubic-bezier(.2,.9,.25,1) both; animation-delay: calc(1.35s + var(--r) * 35ms); }
@keyframes kv-weld { from { opacity: 0; transform: translate(var(--x), var(--y)); } to { opacity: 1; transform: none; } }

#kv2026.play .kv-info { animation: kv-fade 1s ease 2.6s both; }
@keyframes kv-fade { from { opacity: 0; transform: translateY(1.5%); } to { opacity: 1; transform: none; } }

#kv2026.play .sheen { animation: kv-sheen 7s cubic-bezier(.45,0,.3,1) infinite; }
#kv2026.play .kv-band .sheen   { animation-delay: 3.2s; }
#kv2026.play .kv-stairs .sheen { animation-delay: 3.6s; }
#kv2026.play .kv-block .sheen  { animation-delay: 4.3s; animation-duration: 8s; }
@keyframes kv-sheen { 0% { transform: translate(var(--sx0), var(--sy0)); } 35%, 100% { transform: translate(var(--sx1), var(--sy1)); } }

/* 捲動提示 */
#kv2026 .kv-cue { position: absolute; left: 50%; bottom: 18px; width: 1px; height: 44px; background: rgba(255,255,255,.25); overflow: hidden; translate: -50% 0; }
#kv2026 .kv-cue::after { content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%; background: #fff; animation: kv-cue 2.2s ease-in-out infinite; }
@keyframes kv-cue { to { top: 100%; } }

/* 動態一律自動播放（不受系統「減少動態」影響）；暫停鍵切到 .still＝靜態完成圖 */
#kv2026.still *, #kv2026.still .kv-cue::after { animation: none !important; }
/* 捲出畫面時暫停動畫，避免持續重繪拖慢整頁 */
#kv2026.offscreen *, #kv2026.offscreen .kv-cue::after { animation-play-state: paused !important; }
#kv2026.still .kv-band, #kv2026.still .kv-stairs { -webkit-mask: none; mask: none; }

#kv2026 .kv-toggle { position: absolute; right: 16px; bottom: 16px; z-index: 2; width: 36px; height: 36px; padding: 0; margin: 0; border: 1px solid rgba(255,255,255,.35); border-radius: 50%;
	background: rgba(0,0,0,.45); color: #fff; cursor: pointer; display: grid; place-items: center; opacity: .6; transition: opacity .2s, background .2s; }
#kv2026 .kv-toggle:hover, #kv2026 .kv-toggle:focus-visible { opacity: 1; background: rgba(0,0,0,.7); }
#kv2026 .kv-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#kv2026 .kv-toggle i { display: block; width: 10px; height: 12px; border-left: 3px solid #fff; border-right: 3px solid #fff; box-sizing: border-box; }
#kv2026.still .kv-toggle i { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff; margin-left: 3px; }

/* ---------- 首頁區塊（widget_home2026.php；活動收合 nth-child 規則因含變數仍在原檔內嵌） ---------- */
/* 區1 節慶介紹 */
.h26-intro { display: grid; grid-template-columns: 5fr 7fr; gap: 6.4rem; align-items: start; }
.h26-intro .wm { display: block; width: 100%; max-width: 380px; height: auto; color: var(--accent, #ffff1e); }
.h26-intro .slogan { margin: 2.8rem 0 0; font-size: 1.5rem; letter-spacing: .2em; line-height: 1.8; color: #fff; }
.h26-intro .lead { margin: 0 0 2.4rem; font-size: 2.4rem; line-height: 1.7; font-weight: 500; color: #fff; text-align: justify; }
.h26-intro .body { margin: 0 0 2.4rem; font-size: 1.6rem; line-height: 2.1; color: rgba(255,255,255,.85); text-align: justify; }
.h26-intro .body-en { margin: 0 0 1.2rem; font-size: 1.4rem; line-height: 1.9; color: rgba(255,255,255,.55); text-align: justify; hyphens: auto; }
.h26-intro .body-en:last-of-type { margin-bottom: 4rem; }

/* 區2 展覽單元 */
.h26-zones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; }
.h26-zone { position: relative; display: block; aspect-ratio: 600 / 288; overflow: hidden; background: #000; color: #fff; text-decoration: none; }
/* 外框：最上層的 ::after（outline 會被文字區與放大中的圖片蓋住而斷開）；平時淡框包住文字與圖片，滑過／聚焦改主色並加粗（2026-10-07） */
.h26-zone::after { content: ""; position: absolute; inset: 0; z-index: 2; border: 1px solid rgba(255,255,30,.4); pointer-events: none; transition: border-color .25s, border-width .25s; }
/* 2026-10-07 業主意見「標題不夠明顯、時間地點不要被圖遮住」：一列兩張，整張卡片以分區圖為背景、文字疊在左上，標題字標放大；手機改文字在上、圖在下
   背景 zones/<key>-bg.webp：tools/kv/zones_native.py 由 AI 原生資料重算，比例同畫板高＝卡片高，右、上切齊畫板、往左延伸（畫板外仍有形狀）；左上文字區量測不重疊 */
.h26-zone img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: right bottom; }
.h26-zone .tx { position: relative; z-index: 1; display: block; padding: 3.2rem; }
.h26-zone .lb { display: block; font-size: 1.3rem; letter-spacing: .14em; color: var(--accent, #ffff1e); margin-bottom: 1.6rem; }
.h26-zone .zt-en { display: block; height: 4.2rem; width: auto; max-width: 100%; }
.h26-zone .zt-zh { display: block; height: 3.2rem; width: auto; max-width: 100%; margin-top: 1.2rem; }
.h26-zone .meta { display: block; margin-top: 2rem; font-size: 1.6rem; line-height: 1.7; color: rgba(255,255,255,.8); }
.h26-zone:hover, .h26-zone:focus-visible { outline: none; color: #fff; }   /* 標題字標為 currentColor，蓋過佈景主題 a:hover 的深灰 #333 */
.h26-zone:hover::after, .h26-zone:focus-visible::after { border: 2px solid var(--accent, #ffff1e); }

/* 區3 周邊活動：列表用 base.css 的 .h26-ev（簡介截 1 行 .brief）；收合時隱藏超出的列（收合數在 widget_home2026.php 的 $h26EvFold，h26_event_list() 加 class over）與收合按鈕 */
.h26-ev.is-folded li.over { display: none; }
.h26-ev-foot { margin-top: 4rem; text-align: center; }
.h26 .h26-ev-more { border: 0; font-family: inherit; line-height: inherit; cursor: pointer; }
.h26 .h26-ev-more:hover, .h26 .h26-ev-more:focus-visible { background: #fff !important; color: #000 !important; }


/* 區5 參觀資訊 */
.h26-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
.h26-info > div { padding-top: 2.4rem; border-top: 3px solid var(--accent, #ffff1e); }
.h26-info h3 { margin: 0 0 1.6rem; font-size: 2rem; font-weight: 700; color: #fff; }
.h26-info h3 small { display: block; margin-top: .4rem; font-size: 1.2rem; font-weight: 400; letter-spacing: .16em; color: var(--accent, #ffff1e); }
.h26-info dl { margin: 0; display: grid; grid-template-columns: 4.8rem 1fr; gap: .8rem 1.2rem; font-size: 1.5rem; line-height: 1.7; }
.h26-info dt { color: rgba(255,255,255,.55); font-weight: 400; }
.h26-info dd { margin: 0; color: #fff; }

@media (max-width: 1199px) {
	.h26-zones { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
	.h26-intro { grid-template-columns: 1fr; gap: 3.2rem; }
	.h26-intro .wm { max-width: 260px; }
	.h26-intro .lead { font-size: 2rem; }
	.h26-zones { grid-template-columns: 1fr; }
	.h26-zone { display: flex; flex-direction: column; aspect-ratio: auto; }
	.h26-zone .tx { padding: 2.4rem 2.4rem 0; }
	.h26-zone img { position: static; order: 1; width: 100%; height: auto; aspect-ratio: 600 / 288; }   /* 手機一欄：卡片太窄無法疊放，文字在上、同一張背景圖在下 */
	.h26-info { grid-template-columns: 1fr; gap: 4rem; }
}

/* kv-geom:start（tools/kv/gen_kv_geom_css.py 由 geom.json 產生，勿手改；放在最後以維持原內嵌樣式的層疊順序） */
#kv2026 .kv-l.kv-vecl { inset: -41.667% 0.000% 0.000% -14.953%; } #kv2026 .kv-band { --bp: 0.00% 0.00%; --bs: 65.92% 56.86%; } #kv2026 .kv-stairs { --bp: 39.07% 39.13%; --bs: 51.79% 54.90%; } #kv2026 .kv-block { --bp: 61.59% 71.43%; --bs: 23.54% 31.37%; }
@media (max-aspect-ratio: 1/1) { #kv2026 .kv-l.kv-vecl { inset: 0.000% 0.000% 0.000% -65.472%; } #kv2026 .kv-band { --bp: 0.00% 8.57%; --bs: 81.41% 45.31%; } #kv2026 .kv-stairs { --bp: 64.56% 33.33%; --bs: 63.97% 43.75%; } #kv2026 .kv-block { --bp: 81.99% 58.33%; --bs: 29.08% 25.00%; } }
/* kv-geom:end */
