/*
  版面外殼：內容容器、頁首（含導覽列）、頁尾。

  導覽列刻意只有「一份」markup，用純 CSS 做響應式。設計稿是桌機一份、手機一份同時
  存在於 DOM 裡（只用 CSS 互相隱藏），那會產生兩個 <nav> landmark、兩個指向同處的
  logo 連結，而且設計稿裡那兩份「已經」漂移了（桌機版指向不存在的檔案、手機版才是對的）。

  收合行為採漸進增強：沒有 JS 時導覽連結一律展開可見，
  <html class="js"> 出現後才啟用漢堡鈕與收合狀態。設計稿在這點是壞的——
  關掉 JS，它的手機版完全沒有導覽列。
*/

.shell {
	width: 100%;
	max-width: var(--shell-max);
	margin-inline: auto;
	padding-inline: 16px;
}

/* ---- 頁首 -------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	padding: 12px 0;
	background: rgba(255, 248, 235, .92);
	backdrop-filter: blur(10px);
}

.site-header .shell {
	background: #fff;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: 8px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.site-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
	padding: 4px;
}
.site-logo img {
	display: block;
	width: 190px;
	max-width: 52vw;
	height: auto;
}

.menu-btn {
	display: none;           /* 沒有 JS 就永遠不顯示，連結本來就都看得到 */
	margin-left: auto;
	width: 46px; height: 46px;
	border: 0;
	border-radius: 50%;
	background: var(--orange-soft);
	cursor: pointer;
	place-items: center;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
	display: block;
	width: 20px; height: 2px;
	background: var(--brown);
	border-radius: 2px;
	content: "";
	position: relative;
}
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after  { position: absolute; top: 6px; }

.site-nav { margin-left: auto; }
.site-nav ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: clamp(4px, 2vw, 28px);
	margin: 0;
	padding: 0;
}
.site-nav a {
	position: relative;
	display: block;
	padding: 10px 12px;
	color: var(--brown);
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.site-nav a::after {
	content: "";
	position: absolute;
	left: 50%; bottom: 4px;
	width: 0; height: 4px;
	background: var(--orange);
	border-radius: var(--radius-pill);
	transform: translateX(-50%);
	transition: width .18s ease;
}
.site-nav a:hover { color: var(--orange-text); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { width: 60%; }
/* 目前頁面不只靠底線的顏色表示，也加深字色——避免只用顏色傳達資訊 */
.site-nav a[aria-current="page"] { color: var(--orange-text); }
/* 這是純文字，不是 <a>；公開頁面不輸出入口路徑，並以灰階清楚表達暫不開放。 */
.site-nav__inactive {
	display: block;
	padding: 10px 12px;
	color: #988f86;
	font-weight: 700;
	white-space: nowrap;
	cursor: not-allowed;
	opacity: .58;
	filter: grayscale(1);
}

@media (max-width: 860px) {
	.site-header .shell { padding: 6px 12px; }
	.site-nav { width: 100%; margin-left: 0; }
	.site-nav ul {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		padding: 4px 0 8px;
	}
	.site-nav a {
		padding: 12px 8px;
		text-align: center;
		background: #fff8ef;
		border-radius: 14px;
	}
	.site-nav a::after { display: none; }
	.site-nav a[aria-current="page"] {
		background: var(--orange-soft);
		box-shadow: inset 0 0 0 2px var(--orange);
	}
	.site-nav__inactive {
		padding: 12px 8px;
		text-align: center;
		background: #fff8ef;
		border-radius: 14px;
	}

	/* 有 JS 才收合；漢堡鈕也只在有 JS 時出現 */
	.js .menu-btn { display: grid; }
	.js .site-nav { display: none; }
	.js .site-nav.is-open { display: block; }
}

/* ---- 主要內容 ---------------------------------------------------------- */

main {
	flex: 1 0 auto;
	padding: 32px 0 56px;
}

/* ---- 頁尾 -------------------------------------------------------------- */

.site-footer {
	flex-shrink: 0;
	margin-top: auto;
	padding: 28px 0;
	background: rgba(255, 255, 255, .55);
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: var(--fs-sm);
	text-align: center;
}
.site-footer a { color: var(--orange-text); }
.footer-row {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin-bottom: 6px;
}
.footer-badges {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 10px;
}
.footer-badges a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	font-weight: 600;
}
.footer-badges a:hover { text-decoration: underline; }
.footer-badges img { display: block; }
.copyright { margin-top: 10px; font-size: 13px; }
