/* SC-ICG Cixin0711 Addons — 頁面進場動畫（穩重緩慢）
   只在 html.scm-js（head 端判定支援且未要求減少動態）時生效。
   - 頁面載入：body 柔和淡入
   - 內容：捲入視窗前 透明＋略下移，進入後緩慢淡入上浮；同批錯落由 JS 以 --scm-delay 控制
   - 媒體：時長較長，帶 1.02→1 的輕微縮放；標題：位移較小
   - 標記前（html.scm-js 但尚未 .scm-ready）先以廣泛選擇器預先隱藏主內容區候選元素，避免先出現再消失的閃爍
   - 商品（.woocommerce／.products／wc-block）、輪播、跑馬燈、表單、nav 一律不動 */

html.scm-js body {
	animation: scm-page var(--scm-page, 0.8s) ease-out both;
}

@keyframes scm-page {
	from { opacity: 0; }
	to { opacity: 1; }
}

html.scm-js:not(.scm-ready) :where(main, #main, .site-main) :where(h1, h2, h3, h4, h5, p, figure, img, li, table, blockquote, .wp-block-buttons, .gspb-buttonbox, .wp-block-image):not(.swiper *):not(.splide *):not(.sc-cixin-marquee *):not(.sc-cixin-events *):not(form *):not(nav *):not(.woocommerce *):not(.products *):not([class*="wc-block"] *) {
	opacity: 0;
}

html.scm-js .scm-reveal {
	opacity: 0;
	transform: translateY(var(--scm-y, 20px));
	transition:
		opacity var(--scm-dur, 1.2s) var(--scm-ease, ease-out),
		transform var(--scm-dur, 1.2s) var(--scm-ease, ease-out);
	transition-delay: var(--scm-delay, 0ms);
	will-change: opacity, transform;
}

html.scm-js .scm-reveal--heading {
	--scm-y: 12px;
}

html.scm-js .scm-reveal--media {
	transform: translateY(14px) scale(1.02);
	transition-duration: var(--scm-media-dur, 1.5s);
}

html.scm-js .scm-reveal.is-in {
	opacity: 1;
	transform: none;
	will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
	html.scm-js body { animation: none; }
	html.scm-js .scm-reveal,
	html.scm-js:not(.scm-ready) :where(main, #main, .site-main) * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

@media print {
	html.scm-js body { animation: none; }
	html.scm-js .scm-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
