/* ==========================================================================
   吳卿金雕 — base.css
   設計語彙：深墨 × 暖金 × 象牙白
   1. 設計權杖（色彩／字體／字級／間距／動態）
   2. 重置與元素預設
   3. 版面容器與區段
   4. 標題區塊、眉標與內文
   5. 按鈕
   6. 徽章、標籤與社群圖示
   7. 頁首與主選單
   8. 行動選單抽屜
   9. 頁尾
   10. 進場動態
   11. 無障礙與雜項
   12. 列印樣式
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 設計權杖 Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* 深墨 — 頁面底色與層次 */
  --ink-900: #0d0e11;
  --ink-800: #101116;
  --ink-700: #16171c;
  --ink-600: #1f2128;
  --ink-500: #2a2d36;

  /* 卡片 / 圖面底色 */
  --bg-soft: #141519;

  /* 象牙白與前景文字 */
  --ivory: #f3ede1;
  --fg-soft: rgba(243, 237, 225, 0.78);
  --fg-muted: #b7b0a3;
  --fg-faint: #8b8478;

  /* 暖金主色階（數字越小越亮） */
  --gold-200: #f2e5c4;
  --gold-300: #e4c98c;
  --gold-400: #d6b46c;
  --gold-500: #c8a45c;
  --gold-600: #a8823f;
  --gold-700: #6d5527;
  --gold: #c8a45c;

  /* 淡灰 — 次要資訊 */
  --gray-300: #d9d4ca;
  --gray-400: #a9a297;
  --gray-500: #7e776d;
  --gray-600: #55504a;

  /* 線條 */
  --line: rgba(214, 178, 106, 0.22);
  --line-soft: rgba(214, 178, 106, 0.12);

  /* 字體：內文與標題用襯線 CJK，介面元素用無襯線 */
  --font-serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "Hiragino Mincho ProN",
    "Microsoft JhengHei", "PMingLiU", serif;
  --font-en: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-ui: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Hiragino Sans TC",
    -apple-system, "Segoe UI", Roboto, sans-serif;

  /* 字級（流體） */
  --fs-display: clamp(2.6rem, 1.6rem + 4.2vw, 5rem);
  --fs-h1: clamp(2rem, 1.4rem + 2.2vw, 3.1rem);
  --fs-h2: clamp(1.45rem, 1.15rem + 1.2vw, 2.05rem);
  --fs-h3: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-h4: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  --fs-lead: clamp(1rem, 0.95rem + 0.35vw, 1.12rem);
  --fs-body: clamp(0.92rem, 0.9rem + 0.12vw, 0.98rem);

  /* 間距與尺寸 */
  --section-y: clamp(3.5rem, 7vw, 6.5rem);
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --container: 1240px;
  --container-narrow: 880px;
  --header-h: 76px;

  /* 圓角與陰影 */
  --radius: 3px;
  --radius-pill: 999px;
  --shadow-md: 0 18px 42px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 18px 48px rgba(200, 164, 92, 0.16);

  /* 動態 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. 重置與元素預設 Reset & element defaults
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--ivory);
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: 1.9;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 標題 */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.08em;
  color: var(--ivory);
}
h1 { font-size: var(--fs-h1); line-height: 1.32; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5, h6 { font-size: 1rem; letter-spacing: 0.12em; }

/* 段落與清單 */
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.4em; }
li { margin-bottom: 0.4em; }
li:last-child { margin-bottom: 0; }
dl, dd { margin: 0; }
dt { font-weight: 500; }
strong, b { font-weight: 600; color: var(--gold-200); }

/* 連結 */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease),
    background-color 0.35s var(--ease), opacity 0.35s var(--ease);
}
a:hover { color: var(--gold-300); }

/* 媒體元素 */
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }

/* 表單控制項 */
button, input, select, textarea { font: inherit; color: inherit; }
button {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

/* 分隔線、選取樣式與焦點 */
hr {
  height: 1px;
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
}
::selection { background: rgba(200, 164, 92, 0.28); color: var(--gold-200); }
:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* --------------------------------------------------------------------------
   3. 版面容器與區段 Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { position: relative; padding-block: var(--section-y); }
.section--soft {
  background: var(--bg-soft);
  border-block: 1px solid var(--line-soft);
}
/* 緊接頁首橫幅的區段：縮小上內距，避免與橫幅疊出空隙 */
.section--top { padding-top: clamp(1.75rem, 3.5vw, 3rem); }

.grid {
  display: grid;
  gap: clamp(1.15rem, 2.2vw, 2rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid,
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.divider {
  height: 1px;
  margin: clamp(2rem, 4vw, 3.25rem) 0;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
}

/* 內文閱讀寬度 */
.measure { max-width: 68ch; }

/* --------------------------------------------------------------------------
   4. 標題區塊、眉標與內文 Typography
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500));
}
/* 無前置線條的簡化眉標 */
.eyebrow--plain { gap: 0; }
.eyebrow--plain::before { display: none; }

.section-head { margin-bottom: clamp(2rem, 3.6vw, 3rem); }
.section-head__title {
  font-size: var(--fs-h2);
  line-height: 1.45;
  letter-spacing: 0.1em;
  color: var(--ivory);
}
.section-head__desc {
  margin-top: 0.9rem;
  font-size: var(--fs-lead);
  line-height: 2;
  color: var(--fg-muted);
  max-width: 56ch;
}
.section-head--center { text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .section-head__desc { margin-inline: auto; }
.section-head--center .section-head__title::after {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  margin: 1.15rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}

/* 長文內文 */
.prose { color: var(--fg-muted); }
.prose > * + * { margin-top: 1.2em; }
.prose p { font-size: 1rem; line-height: 2.05; color: var(--fg-soft); }
.prose h2,
.prose h3,
.prose h4 { margin-top: 2.2em; color: var(--gold-300); letter-spacing: 0.1em; }
.prose h2 { font-size: var(--fs-h3); }
.prose h3 { font-size: 1.16rem; }
.prose h4 { font-size: 1.04rem; }
.prose ul,
.prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 0.6em; line-height: 2; }
.prose a { color: var(--gold-300); border-bottom: 1px solid rgba(200, 164, 92, 0.3); }
.prose a:hover { color: var(--gold-200); border-bottom-color: var(--gold-400); }
.prose strong { color: var(--ivory); }
.prose blockquote {
  margin: 1.8em 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 2px solid var(--gold-700);
  font-size: 1.04rem;
  line-height: 1.95;
  color: var(--gold-200);
}

.text-muted { color: var(--fg-muted); }

/* 間距工具 */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

/* 箭頭連結 */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--gold-400);
}
.link-arrow::after {
  content: "\2192";
  line-height: 1;
  transition: transform 0.4s var(--ease);
}
a.link-arrow:hover { color: var(--gold-200); }
a.link-arrow:hover::after { transform: translateX(5px); }

/* 序號（襯線數字） */
.num {
  font-family: var(--font-en);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--gold-600);
}

/* --------------------------------------------------------------------------
   5. 按鈕 Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85em 1.7em;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-align: center;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease), box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* 實心暖金 */
.btn--gold {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-600));
  color: #171208;
  font-weight: 600;
  box-shadow: var(--shadow-gold);
}
.btn--gold:hover {
  background: linear-gradient(135deg, var(--gold-200), var(--gold-500));
  box-shadow: 0 20px 46px rgba(200, 164, 92, 0.24);
}

/* 金線框 */
.btn--line {
  background: transparent;
  color: var(--gold-300);
  border-color: rgba(200, 164, 92, 0.45);
}
.btn--line:hover {
  background: rgba(200, 164, 92, 0.1);
  border-color: var(--gold-400);
  color: var(--gold-200);
}

/* 玻璃質感的次要按鈕 */
.btn--ghost {
  background: rgba(245, 241, 232, 0.05);
  color: var(--ivory);
  border-color: var(--line-soft);
}
.btn--ghost:hover {
  background: rgba(245, 241, 232, 0.1);
  border-color: var(--line);
  color: var(--gold-200);
}

.btn--sm { padding: 0.6em 1.15em; font-size: 0.78rem; }
.btn--lg { padding: 1em 2.1em; font-size: 0.92rem; }
.btn--block { display: flex; width: 100%; }

@media (max-width: 480px) {
  .btn { padding: 0.8em 1.4em; letter-spacing: 0.1em; }
  .btn--lg { padding: 0.9em 1.6em; }
}

/* --------------------------------------------------------------------------
   6. 徽章、標籤與社群圖示 Badges / Tags
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32em 0.8em;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--gold-200);
  background: rgba(8, 7, 6, 0.72);
  border: 1px solid rgba(200, 164, 92, 0.3);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.badge--solid {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-600));
  border-color: transparent;
  color: #171208;
  font-weight: 600;
}

/* 標籤（基底樣式，與元件樣式同值） */
.tag {
  display: inline-block;
  padding: 0.35em 0.85em;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease),
    background-color 0.35s var(--ease);
}

/* 社群圖示按鈕 */
.social-btn {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--fg-muted);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease),
    background-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.social-btn svg { width: 16px; height: 16px; }
.social-btn:hover {
  color: var(--gold-300);
  border-color: rgba(200, 164, 92, 0.45);
  background: rgba(200, 164, 92, 0.07);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   7. 頁首與主選單 Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 125; /* 高於行動選單抽屜（120），開啟選單時仍可點到右上角的 ✕ 關閉 */
  height: var(--header-h);
  background: rgba(13, 14, 17, 0.72);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: background-color 0.45s var(--ease), border-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}
/* 捲動後的實心狀態 */
.site-header.is-scrolled {
  background: rgba(10, 11, 14, 0.94);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
}

.site-header__inner {
  width: 100%;
  max-width: var(--container);
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: none;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  flex: none;
}
.brand__mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1;
  color: var(--gold-300);
  border: 1px solid rgba(200, 164, 92, 0.35);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(200, 164, 92, 0.14), transparent 68%);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.brand:hover .brand__mark { color: var(--gold-200); border-color: var(--gold-400); }
.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
}
.brand__name {
  font-size: 1.02rem;
  line-height: 1.2;
  letter-spacing: 0.18em;
  color: var(--ivory);
  white-space: nowrap;
}
.brand__en {
  font-family: var(--font-en);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  white-space: nowrap;
}

/* 主選單 */
.nav { display: block; }
.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__link {
  position: relative;
  display: inline-block;
  padding: 0.45rem 0;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--fg-muted);
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease);
}
.nav__link:hover { color: var(--gold-200); }
.nav__link:hover::after,
.nav__link:focus-visible::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--gold-300); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* 漢堡按鈕 */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: none;
  align-items: center;
  justify-content: center;
  color: var(--gold-300);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(245, 241, 232, 0.03);
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease),
    background-color 0.35s var(--ease);
}
.nav-toggle:hover {
  color: var(--gold-200);
  border-color: rgba(200, 164, 92, 0.45);
  background: rgba(200, 164, 92, 0.08);
}
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}
.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.4s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle__bars span:nth-child(3) { bottom: 0; }
/* 展開時三條線合成叉號 */
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(6.25px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-6.25px) rotate(-45deg);
}

/* 窄螢幕：隱藏主選單，改以抽屜呈現（與 site.js 的 1080px 判斷一致） */
@media (max-width: 1080px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 480px) {
  .site-header__actions .btn { display: none; }
  .brand__mark { width: 36px; height: 36px; font-size: 1.05rem; }
  .brand__name { font-size: 0.94rem; letter-spacing: 0.14em; }
  .brand__en { font-size: 0.66rem; }
}

/* --------------------------------------------------------------------------
   8. 行動選單抽屜 Mobile navigation
   -------------------------------------------------------------------------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2rem;
  background: linear-gradient(180deg, rgba(10, 11, 14, 0.985), rgba(13, 14, 17, 0.995));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1.5%);
  transition: opacity 0.45s var(--ease), visibility 0.45s var(--ease),
    transform 0.45s var(--ease-out);
}
/* 抽屜開啟 */
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-nav__list {
  flex: 1 1 auto;
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mobile-nav__link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  font-size: clamp(1.15rem, 1rem + 1vw, 1.5rem);
  letter-spacing: 0.14em;
  color: var(--ivory);
  border-bottom: 1px solid var(--line-soft);
  transition: color 0.35s var(--ease), padding-left 0.35s var(--ease);
}
.mobile-nav__link:hover,
.mobile-nav__link:focus-visible { color: var(--gold-300); padding-left: 0.5rem; }
.mobile-nav__link[aria-current="page"] { color: var(--gold-300); }
.mobile-nav__foot {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.1rem;
}
.mobile-nav__contact {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.95;
  color: var(--fg-muted);
}
.mobile-nav__contact a { color: var(--gold-300); }
.mobile-nav__contact a:hover { color: var(--gold-200); }

/* 抽屜開啟時鎖定背景捲動 */
body.is-locked { overflow: hidden; }

/* 選單開啟時：頁首改為實心、漢堡鈕變成明顯的金色 ✕ */
body.is-locked .site-header { background: rgba(10, 11, 14, 0.98); }
.nav-toggle[aria-expanded="true"] {
  color: #171208;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-600));
  border-color: transparent;
}

/* --------------------------------------------------------------------------
   9. 頁尾 Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  padding-top: clamp(3rem, 6vw, 5rem);
  background: linear-gradient(180deg, #0b0c0f 0%, var(--ink-900) 100%);
  border-top: 1px solid var(--line);
}
/* 頂部金色髮絲線 */
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.footer__col {
  display: grid;
  gap: 1rem;
  align-content: start;
}
.footer__brand { margin-bottom: 0.35rem; }
.footer__desc {
  margin: 0;
  font-size: 0.84rem;
  line-height: 2;
  color: var(--fg-faint);
  max-width: 42ch;
}
.footer__title {
  margin-bottom: 1.15rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.footer__list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer__list a {
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}
.footer__list a:hover { color: var(--gold-300); padding-left: 0.35rem; }
.footer__contact {
  display: grid;
  gap: 1rem;
  margin: 0;
}
.footer__contact dt {
  margin-bottom: 0.3rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.footer__contact dd {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--fg-muted);
}
.footer__contact a:hover { color: var(--gold-300); }
.footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}
.footer__bottom p { margin: 0; }
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer__legal a { color: var(--gray-400); }
.footer__legal a:hover { color: var(--gold-300); }
.footer__copy {
  margin: 0;
  padding-bottom: 2rem;
  font-size: 0.74rem;
  line-height: 1.9;
  color: var(--gray-600);
}
.footer__copy strong { color: var(--gray-500); font-weight: 500; }

@media (max-width: 900px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   10. 進場動態 Reveal（配合 assets/js/site.js）
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal="left"] { transform: translateX(-26px); }
[data-reveal="right"] { transform: translateX(26px); }
[data-reveal="left"].is-visible,
[data-reveal="right"].is-visible { transform: none; }

/* 未啟用 JavaScript 時內容直接可見（html.no-js 為初始狀態） */
.no-js [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
}
@media (scripting: none) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   11. 無障礙與雜項 Utilities
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 300;
  padding: 0.8rem 1.2rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: #171208;
  background: var(--gold-500);
  border-radius: var(--radius);
  transition: top 0.3s var(--ease);
}
.skip-link:focus {
  top: 1rem;
  color: #171208;
}

/* 通用狀態類別：僅提供基底，具體外觀由 components.css / pages.css 覆寫 */
.is-active { color: var(--gold-300); }
.is-open { opacity: 1; }

/* 錯誤頁面底色 */
body.page-error {
  background:
    radial-gradient(ellipse at 50% 28%, rgba(200, 164, 92, 0.09), transparent 62%),
    var(--ink-900);
}

/* 作品資訊欄 */
.work-info {
  display: grid;
  gap: 0;
  align-content: start;
}
.work-info > * + * { margin-top: 1.15rem; }

/* 尊重系統的減少動態偏好 */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   12. 列印樣式 Print
   -------------------------------------------------------------------------- */
@media print {
  .skip-link { display: none; }
  body { background: #fff; color: #111; }
  a { color: #111; }
}
