/* ==========================================================================
   ST 開場頁首 — 版面與動畫
   線寬與路徑取自標誌原圖實測，請勿改成 stroke-linecap:round。
   ========================================================================== */

.sthh-root{
	--sthh-ease: cubic-bezier(.62,.02,.32,1);
	--sthh-h: 92px;
	--sthh-logo-w: 72px;
	--sthh-intro-size: 30vw;
	--sthh-intro-bg: #fff;
	--sthh-intro-color: #121714;
	--sthh-color: #fff;
	--sthh-color-scrolled: #121714;
	--sthh-bg-scrolled: #fff;
	--sthh-accent: #73C69D;
	--sthh-gap: 30px;
	--sthh-z: 999;
	--sthh-panel-bg: #fff;
	--sthh-panel-color: #121714;
	--sthh-scrim: rgba(0,0,0,.42);
	--sthh-blur: 14px;
	--sthh-scrim-h: 170px;
}
.sthh-root *,
.sthh-root *::before,
.sthh-root *::after{ box-sizing: border-box; }

html.sthh-lock,
body.sthh-lock{ overflow: hidden !important; }

.sthh-root .screen-reader-text{
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); clip-path: inset(50%); white-space: nowrap;
}

/* ------------------------------------------------------------- 頁首容器 */
.sthh{
	width: 100%;
	color: var(--sthh-color);
	background: transparent;
	transition: background-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.sthh--overlay .sthh,
.sthh--sticky .sthh{ position: fixed; top: 0; left: 0; right: 0; z-index: var(--sthh-z); }
.sthh--static .sthh{ position: relative; z-index: var(--sthh-z); }

.sthh--sticky .sthh{
	background: var(--sthh-bg-scrolled);
	color: var(--sthh-color-scrolled);
}
.sthh--overlay.is-scrolled .sthh,
.sthh--overlay.is-solid .sthh{
	background: var(--sthh-bg-scrolled);
	color: var(--sthh-color-scrolled);
	box-shadow: 0 1px 0 rgba(0,0,0,.07);
}
.sthh--sticky.is-scrolled .sthh{ box-shadow: 0 1px 0 rgba(0,0,0,.07); }

/* 透明狀態下的襯底：標誌與選單疊在照片上時靠它拉出對比 */
.sthh::before{
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: var(--sthh-scrim-h);
	opacity: 0;
	pointer-events: none;
	transition: opacity .35s ease;

	/* 多段停止點模擬 ease-out：純線性的 alpha 會在下緣看得出一條邊，
	   這樣鋪才會真的「化開」。遮罩同時淡出顏色與模糊，兩者永遠同步。 */
	-webkit-mask-image: linear-gradient(to bottom,
		rgba(0,0,0,1) 0%,
		rgba(0,0,0,.992) 10%,
		rgba(0,0,0,.965) 19%,
		rgba(0,0,0,.915) 28%,
		rgba(0,0,0,.84) 36%,
		rgba(0,0,0,.74) 44%,
		rgba(0,0,0,.62) 52%,
		rgba(0,0,0,.49) 60%,
		rgba(0,0,0,.36) 68%,
		rgba(0,0,0,.24) 76%,
		rgba(0,0,0,.14) 84%,
		rgba(0,0,0,.06) 92%,
		rgba(0,0,0,0) 100%);
	mask-image: linear-gradient(to bottom,
		rgba(0,0,0,1) 0%,
		rgba(0,0,0,.992) 10%,
		rgba(0,0,0,.965) 19%,
		rgba(0,0,0,.915) 28%,
		rgba(0,0,0,.84) 36%,
		rgba(0,0,0,.74) 44%,
		rgba(0,0,0,.62) 52%,
		rgba(0,0,0,.49) 60%,
		rgba(0,0,0,.36) 68%,
		rgba(0,0,0,.24) 76%,
		rgba(0,0,0,.14) 84%,
		rgba(0,0,0,.06) 92%,
		rgba(0,0,0,0) 100%);
}
.sthh-root.has-scrim .sthh::before{ opacity: 1; }
.sthh-root.has-scrim.is-scrolled .sthh::before,
.sthh-root.has-scrim.is-solid .sthh::before,
.sthh-root.has-scrim.is-open .sthh::before{ opacity: 0; }

/* 深色漸層（不模糊） */
.sthh-root.scrim-dark .sthh::before{ background: var(--sthh-scrim); }

/* 毛玻璃：同一個深色漸層再加上模糊，淡出全部交給上面的遮罩 */
.sthh-root.scrim-glass .sthh::before{
	background: var(--sthh-scrim);
	-webkit-backdrop-filter: blur(var(--sthh-blur)) saturate(125%);
	backdrop-filter: blur(var(--sthh-blur)) saturate(125%);
}

.sthh__bar{
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 24px;
	height: var(--sthh-h);
	padding-inline: clamp(16px, 4vw, 44px);
}
.sthh--dock-left .sthh__bar{ justify-content: space-between; }
.sthh--dock-center .sthh__bar{ justify-content: flex-end; }
.sthh--dock-center .sthh__logo{
	position: absolute; left: 50%; top: 50%;
	transform: translate(-50%,-50%);
	z-index: 2;
}

/* ------------------------------------------------------------- 標誌 */
.sthh__logo{
	position: relative;
	z-index: 2;
	display: block;
	width: var(--sthh-logo-w);
	flex: 0 0 auto;
	color: inherit;
	line-height: 0;
	text-decoration: none;
	opacity: 1;
	transition: opacity .3s ease;
}
.sthh-logo{ display: block; width: 100%; height: auto; overflow: visible; }
.sthh-logo path{
	fill: none;
	stroke-linecap: butt;     /* 原圖端點為平切，不可改 round */
	stroke-dasharray: 1;      /* 搭配 pathLength="1"：1 = 整條線長 */
	stroke-dashoffset: 0;
}
.sthh-ring{ stroke: currentColor; stroke-width: .33; }
.sthh-arc,
.sthh-bar,
.sthh-stem{ stroke: currentColor; stroke-width: 1.29; }
.sthh-bowl{
	stroke: var(--sthh-accent);
	stroke-width: 3.2;
	transform-box: view-box;
	transform-origin: 38.24px 60.76px;   /* 綠弧自己的圓心 */
}
.sthh-logo--img{ display: block; width: 100%; height: auto; }

/* ------------------------------------------------------------- 選單 */
.sthh__nav{ display: flex; align-items: center; opacity: 1; }
.sthh__menu{
	display: flex; align-items: center; gap: var(--sthh-gap);
	list-style: none; margin: 0; padding: 0;
}
.sthh__menu li{ position: relative; }
.sthh__menu a{
	position: relative; display: block; padding: 6px 0;
	color: inherit; text-decoration: none;
}
.sthh-root.has-underline .sthh__menu > li > a::after{
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
	background: currentColor; transform: scaleX(0); transform-origin: right;
	transition: transform .3s var(--sthh-ease);
}
.sthh-root.has-underline .sthh__menu > li > a:hover::after,
.sthh-root.has-underline .sthh__menu > li.current-menu-item > a::after{
	transform: scaleX(1); transform-origin: left;
}
.sthh__empty{ margin: 0; font-size: 13px; opacity: .6; }

.sthh__menu .sub-menu{
	position: absolute; top: 100%; left: 0; min-width: 190px;
	list-style: none; margin: 0; padding: 10px 0;
	background: var(--sthh-panel-bg); color: var(--sthh-panel-color);
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity .25s ease, transform .25s var(--sthh-ease), visibility .25s;
	box-shadow: 0 18px 40px -24px rgba(0,0,0,.55);
}
.sthh__menu li:hover > .sub-menu,
.sthh__menu li:focus-within > .sub-menu{ opacity: 1; visibility: visible; transform: none; }
.sthh__menu .sub-menu a{ padding: 7px 18px; white-space: nowrap; }

/* ------------------------------------------------------------- 漢堡 */
.sthh__burger{
	display: none; align-items: center; justify-content: center;
	width: 42px; height: 42px; margin-inline-start: auto;
	padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
	flex: 0 0 auto; position: relative; z-index: 2;
}
.sthh__burger:focus-visible{ outline: 2px solid currentColor; outline-offset: 2px; }
.sthh__burger-box{ position: relative; display: block; width: 24px; height: 14px; }
.sthh__burger-box i{
	position: absolute; left: 0; width: 100%; height: 1.5px;
	background: currentColor; border-radius: 2px;
	transition: transform .35s var(--sthh-ease), opacity .2s ease;
}
.sthh__burger-box i:nth-child(1){ top: 0; }
.sthh__burger-box i:nth-child(2){ top: 50%; margin-top: -.75px; }
.sthh__burger-box i:nth-child(3){ bottom: 0; }

.sthh-root.is-mobile .sthh__burger{ display: inline-flex; }
.sthh-root.is-mobile.is-open .sthh__burger-box i:nth-child(1){ transform: translateY(6.25px) rotate(45deg); }
.sthh-root.is-mobile.is-open .sthh__burger-box i:nth-child(2){ opacity: 0; }
.sthh-root.is-mobile.is-open .sthh__burger-box i:nth-child(3){ transform: translateY(-6.25px) rotate(-45deg); }

.sthh-root.is-mobile .sthh__nav{
	position: fixed; inset: 0;
	z-index: 1;
	display: flex; flex-direction: column; justify-content: center; align-items: center;
	padding: var(--sthh-h) 24px 40px;
	background: var(--sthh-panel-bg); color: var(--sthh-panel-color);
	transform: translateY(-101%);
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: transform .55s var(--sthh-ease), opacity .35s ease, visibility .55s;
	overflow-y: auto;
}
.sthh-root.is-mobile.is-open .sthh__nav{
	transform: none;
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}
.sthh-root.is-mobile .sthh__nav .sthh__menu{
	flex-direction: column; align-items: stretch;
	gap: clamp(12px, 3vh, 24px); font-size: 1.15em;
	width: 100%; max-width: 420px;
}
.sthh-root.is-mobile .sthh__nav .sthh__menu > li{ width: 100%; text-align: center; }
.sthh-root.is-mobile .sthh__nav .sthh__menu a{ text-align: center; }

/* 有子選單的母項目：文字維持置中，展開鈕掛在文字右側之外 */
.sthh-root.is-mobile .sthh__nav .sthh__menu > li.has-sub > a{
	position: relative; display: inline-block;
}
.sthh__caret{
	position: absolute; right: -26px; top: 50%;
	width: 24px; height: 24px; margin: 0; padding: 0;
	border: 0; background: none; color: inherit; cursor: pointer;
	transform: translateY(-50%);
	display: none;
}
.sthh-root.is-mobile .sthh__nav .sthh__caret{ display: block; }
.sthh__caret::before{
	content: ""; position: absolute; left: 50%; top: 50%;
	width: 7px; height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translate(-50%,-70%) rotate(45deg);
	transition: transform .3s var(--sthh-ease);
}
.sthh-root.is-mobile .sthh__nav .sthh__menu > li.is-expanded > a > .sthh__caret::before{
	transform: translate(-50%,-30%) rotate(-135deg);
}
.sthh__caret:focus-visible{ outline: 2px solid currentColor; outline-offset: 2px; }

/* 子選單：預設收合，點母項目才展開 */
.sthh-root.is-mobile .sthh__nav .sthh__menu .sub-menu{
	position: static; transform: none; box-shadow: none; background: none;
	text-align: center; font-size: .86em;
	opacity: 0; visibility: hidden;
	max-height: 0; padding: 0; overflow: hidden;
	transition: max-height .4s var(--sthh-ease), opacity .3s ease,
	            visibility .4s, padding .4s var(--sthh-ease);
}
.sthh-root.is-mobile .sthh__nav .sthh__menu > li.is-expanded > .sub-menu{
	opacity: 1; visibility: visible;
	max-height: 60vh; padding: 12px 0 2px;
}
.sthh-root.is-mobile .sthh__nav .sthh__menu .sub-menu li{
	margin-bottom: clamp(8px, 1.6vh, 14px);
}
.sthh-root.is-mobile .sthh__nav .sthh__menu .sub-menu li:last-child{ margin-bottom: 0; }
/* 選單打開時，頁首列改用面板的文字色，背景讓面板透出來 */
.sthh-root.is-mobile.is-open .sthh{
	color: var(--sthh-panel-color);
	background: transparent;
	box-shadow: none;
}

/* ------------------------------------------------------------- 滿版開場 */
.sthh__intro{
	position: fixed; inset: 0;
	z-index: calc(var(--sthh-z) + 10);
	display: none; place-items: center;
	color: var(--sthh-intro-color);
}
.sthh-root.is-intro .sthh__intro{ display: grid; }
.sthh__intro::before{
	content: ""; position: absolute; inset: 0;
	background: var(--sthh-intro-bg);
	opacity: 1; transition: opacity .6s ease;
}
.sthh__intro.is-fading::before{ opacity: 0; }
.sthh__intro-logo{
	position: relative;
	width: var(--sthh-intro-size);
	max-width: 82vw;
	will-change: transform;
}

/* 等待使用者的提示：文字 + 一條往下滑動的細線 */
.sthh__hint{
	position: absolute;
	left: 50%;
	bottom: clamp(28px, 6vh, 64px);
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	color: currentColor;
	opacity: 0;
	transition: opacity .8s ease;
	pointer-events: none;
}
.sthh-root.is-ready .sthh__hint{ opacity: .55; }
.sthh-root.is-docking .sthh__hint{ opacity: 0; transition: opacity .3s ease; }

.sthh__hint-text{
	font-size: 11px;
	letter-spacing: .32em;
	text-indent: .32em;   /* 補回字距造成的視覺偏移 */
	text-transform: uppercase;
	line-height: 1;
}
.sthh__hint-line{
	position: relative;
	display: block;
	width: 1px;
	height: 46px;
	background: currentColor;
	opacity: .3;
	overflow: hidden;
}
.sthh__hint-line::after{
	content: "";
	position: absolute;
	left: 0; top: 0;
	width: 1px; height: 46px;
	background: currentColor;
	animation: sthh-hint-run 2.2s cubic-bezier(.65,0,.35,1) infinite;
}
@keyframes sthh-hint-run{
	0%   { transform: translateY(-100%); }
	60%  { transform: translateY(100%); }
	100% { transform: translateY(100%); }
}
@media (prefers-reduced-motion: reduce){
	.sthh__hint-line::after{ animation: none; transform: none; }
}

.sthh-root.is-intro .sthh__logo,
.sthh-root.is-intro .sthh__nav,
.sthh-root.is-intro .sthh__burger{ opacity: 0; }
.sthh-root.is-docking .sthh__nav,
.sthh-root.is-docking .sthh__burger{ opacity: 1; transition: opacity .6s ease .3s; }
.sthh-root.is-docked .sthh__logo{ opacity: 1; }

/* 收合中的頁首底色：跟著標誌一起淡入，不要硬跳 */
.sthh-root.is-docking .sthh{ transition: background-color .7s ease, color .7s ease, box-shadow .7s ease; }

/* 開場期間不要讓頁首背景先跳出來 */
.sthh-root.is-intro.is-scrolled:not(.is-solid) .sthh{ background: transparent; box-shadow: none; }

/* 開場與收合途中一律不顯示襯底：白底開場上壓一條深色帶很難看，
   而且遮罩底下本來就看不到頁首。收合完成後才淡入。 */
.sthh-root.is-intro .sthh::before,
.sthh-root.is-docking .sthh::before{ opacity: 0 !important; }
.sthh-root.is-docked .sthh::before{ transition: opacity .6s ease .15s; }

/* ==========================================================================
   ST 頁尾 — 與頁首共用同一顆標誌與同一套線條語彙
   ========================================================================== */

.stff-root{
	--stff-bg: #E7E7E7;
	--stff-color: #5E5D5C;
	--stff-logo-color: #121714;
	--stff-logo-w: 72px;
	--stff-pt: 76px;
	--stff-pb: 44px;
	--stff-gap: 30px;
	--stff-item-gap: 30px;
	--stff-rule: rgba(0,0,0,.16);
	--stff-copy-op: .65;
	--stff-icon: 19px;

	background: var(--stff-bg);
	color: var(--stff-color);
	width: 100%;
}
.stff-root *,
.stff-root *::before,
.stff-root *::after{ box-sizing: border-box; }

.stff__inner{
	display: flex;
	flex-direction: column;
	gap: var(--stff-gap);
	padding: var(--stff-pt) clamp(16px, 4vw, 44px) var(--stff-pb);
	max-width: 1200px;
	margin: 0 auto;
}

.stff__main{
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--stff-gap);
}
.stff__links{
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: calc(var(--stff-gap) * .6);
}

/* 左右分欄 */
.stff--split .stff__main{
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: calc(var(--stff-gap) * .8);
}
.stff--split .stff__links{ align-items: flex-end; }
.stff--split .stff__copy{ text-align: left; }

/* 標誌 */
.stff__logo{
	display: block;
	width: var(--stff-logo-w);
	flex: 0 0 auto;
	line-height: 0;
	text-decoration: none;
	color: var(--stff-logo-color);
}
.stff__logo .sthh-logo{ display: block; width: 100%; height: auto; overflow: visible; }
.stff-root.has-spin .stff__logo:hover .sthh-bowl{ animation: sthh-spin-once .95s cubic-bezier(.7,0,.18,1); }
@keyframes sthh-spin-once{ to{ transform: rotate(360deg); } }

/* 進入視野描繪一次 */
.stff-root.will-draw .stff__logo .sthh-logo path{ stroke-dashoffset: 1; }

/* 選單與社群 */
.stff__menu,
.stff__socials{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: var(--stff-item-gap);
	list-style: none;
	margin: 0;
	padding: 0;
}
.stff--split .stff__menu,
.stff--split .stff__socials{ justify-content: flex-end; }

.stff__menu a,
.stff__socials a{
	position: relative;
	display: inline-block;
	padding: 4px 0;
	color: inherit;
	text-decoration: none;
}
.stff__socials a{
	display: inline-flex;
	align-items: center;
	gap: .5em;
	opacity: .8;
	transition: opacity .25s ease, transform .25s var(--sthh-ease, cubic-bezier(.62,.02,.32,1));
}
.stff__socials a:hover{ opacity: 1; }
.stff__socials .stff__label{
	font-size: .88em;
	letter-spacing: .14em;
	text-transform: uppercase;
}

/* 圖示：跟著文字色，尺寸由 --stff-icon 控制 */
.stff__icon{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--stff-icon, 19px);
	height: var(--stff-icon, 19px);
	line-height: 1;
	font-size: var(--stff-icon, 19px);
	color: inherit;
}
.stff__icon svg{
	width: 100%; height: 100%;
	display: block;
}
/* Font Awesome 等實心圖示用 fill；自訂的線性圖示（有 stroke 屬性）保持不填色 */
.stff__icon svg:not([stroke]){ fill: currentColor; }
.stff__icon svg[stroke]{ fill: none; stroke: currentColor; }
.stff__icon i{ font-size: inherit; line-height: 1; }

/* 只有圖示時：加大點擊範圍，滑過微微上浮 */
.stff__socials--icon{ gap: calc(var(--stff-item-gap) * .9); }
.stff__socials--icon a{ padding: 6px; }
.stff__socials--icon a:hover{ transform: translateY(-2px); }
.stff__socials--icon a::after{ content: none !important; }

.stff-root.has-underline .stff__menu a::after,
.stff-root.has-underline .stff__socials a::after{
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
	background: currentColor; transform: scaleX(0); transform-origin: right;
	transition: transform .3s cubic-bezier(.62,.02,.32,1);
}
.stff-root.has-underline .stff__menu a:hover::after,
.stff-root.has-underline .stff__socials a:hover::after{
	transform: scaleX(1); transform-origin: left;
}
.stff__menu .sub-menu{ display: none; }

/* 版權 */
.stff__copy{
	margin: 0;
	text-align: center;
	font-size: .8em;
	letter-spacing: .1em;
	opacity: var(--stff-copy-op);
}
.stff-root.has-divider .stff__copy{
	padding-top: var(--stff-gap);
	border-top: 1px solid var(--stff-rule);
}
@supports (border-top-width: .5px){
	.stff-root.has-divider .stff__copy{ border-top-width: .5px; }
}

.stff-root .screen-reader-text{
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); clip-path: inset(50%); white-space: nowrap;
}

@media (max-width: 767px){
	.stff--split .stff__main{ flex-direction: column; align-items: center; }
	.stff--split .stff__links{ align-items: center; }
	.stff--split .stff__menu,
	.stff--split .stff__socials{ justify-content: center; }
	.stff--split .stff__copy{ text-align: center; }
}

@media (prefers-reduced-motion: reduce){
	.stff-root.has-spin .stff__logo:hover .sthh-bowl{ animation: none; }
	.stff-root.will-draw .stff__logo .sthh-logo path{ stroke-dashoffset: 0; }
}

/* ==========================================================================
   100vh 開場區塊（捲動連動）
   標誌的縮放與位移完全由捲動進度決定，往上捲就原路回去。
   ========================================================================== */

.sthh__stage{
	position: relative;
	width: 100%;
	height: 100vh;
	height: 100svh;
}
.sthh__stage-bg{
	position: fixed;
	inset: 0;
	background: var(--sthh-intro-bg);
	z-index: calc(var(--sthh-z) - 2);
	pointer-events: none;
	will-change: opacity;
}
.sthh__stage-logo{
	position: fixed;
	left: 50%;
	top: 50%;
	width: var(--sthh-intro-size);
	max-width: 82vw;
	transform: translate(-50%, -50%);
	transform-origin: 50% 50%;
	color: var(--sthh-intro-color);
	z-index: calc(var(--sthh-z) + 2);
	pointer-events: none;
	will-change: transform;
}
.sthh__stage-logo .sthh-logo{ display: block; width: 100%; height: auto; overflow: visible; }

.sthh__stage .sthh__hint{
	position: fixed;
	left: 50%;
	bottom: clamp(28px, 6vh, 64px);
	transform: translateX(-50%);
	color: var(--sthh-intro-color);
	opacity: .55;
	z-index: calc(var(--sthh-z) + 2);
}

/* 區塊還沒捲完之前：頁首維持透明、不上襯底，頁首標誌交給大標誌代班 */
.sthh-root.has-stage:not(.is-stage-done) .sthh{
	background: transparent !important;
	box-shadow: none !important;
	color: var(--sthh-intro-color);
}
.sthh-root.has-stage:not(.is-stage-done) .sthh::before{ opacity: 0 !important; }
.sthh-root.has-stage:not(.is-stage-done) .sthh__logo{ opacity: 0; }

/* 捲完之後：大標誌交棒給頁首標誌，一切回到正常頁首 */
.sthh-root.has-stage.is-stage-done .sthh__stage-logo,
.sthh-root.has-stage.is-stage-done .sthh__hint{ opacity: 0 !important; }
.sthh-root.has-stage.is-stage-done .sthh__logo{ opacity: 1; }

@media (prefers-reduced-motion: reduce){
	.sthh__stage-logo{ transition: none !important; }
}
