/* 匯流空間 — 設計系統
   所有數值來自 data/wp-frontend/設計token.json 的實測計算樣式，不是重新發明。
   修掉的舊站弱點以 [V2]/[V3]/[V4] 標注。 */

:root {
  --bg:        #1B1B1B;   /* body 底 */
  --ink:       #FAF5E5;   /* 主文字：暖米白，非純白 —— 質感關鍵 */
  --ink-soft:  rgba(250,245,229,.72);
  --white:     #FFFFFF;
  --gold:      #D09A40;   /* 強調／連結／色帶 */
  --gold-lift: #DCA54A;   /* hover */
  --dark:      #0E0D06;   /* 頁尾 */
  --panel:     #2E2D2A;

  --serif: 'Noto Serif TC', Songti TC, serif;
  --hand:  'LXGW WenKai TC', 'Noto Serif TC', serif;

  --lh-body: 1.86;
  --container: 1140px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --band-y: clamp(2rem, 3.4vw, 2.6rem);
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--hand);
  font-size: 16px;
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  letter-spacing: .02em;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--gold); text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--gold-lift); }

img { max-width: 100%; height: auto; display: block; }

/* [V3] 單一容器基準 —— 舊站段落自左側約 1/5 起、與區塊標題未對齊 */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.rule {              /* hero 與區塊標題下的細橫線 */
  width: min(420px, 60%);
  height: 1px;
  border: 0;
  margin: 1.6rem 0 1.8rem;
  background: linear-gradient(90deg, var(--ink) 0%, rgba(250,245,229,.15) 100%);
}

/* ───────── Header：透明疊在 hero 上 ───────── */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  height: 100px;
  display: flex;
  align-items: center;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand img { height: 42px; width: auto; }

.nav { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.nav a, .nav__parent {
  color: var(--ink);
  font-size: .78rem;
  padding: .35rem .62rem;
  position: relative;
  white-space: nowrap;
  background: none; border: 0; cursor: pointer; font: inherit; font-size: .78rem; line-height: inherit;
}
.nav > a + a::before, .nav > * + *::before {   /* 頂層導覽項之間的細分隔 */
  content: "";
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 12px;
  background: rgba(250,245,229,.28);
}
.nav a:hover, .nav__parent:hover { color: var(--gold); }
.nav a[aria-current="page"], .nav__group.is-active > .nav__parent { color: var(--gold); }
/* 子分類（2026-08-23）：桌機滑過／點擊展開下拉；手機在漢堡選單裡直接攤平 */
.nav__group { position: relative; display: flex; align-items: center; }
.nav__caret { font-size: .7em; margin-left: .3em; opacity: .7; transition: transform .2s var(--ease); }
.nav__sub {
  position: absolute; top: 100%; left: .4rem; z-index: 30;
  min-width: 14rem; padding: .35rem 0;
  background: rgba(14,13,6,.97);
  border: 1px solid rgba(208,154,64,.45);
  display: none; flex-direction: column;
}
.nav__sub a { padding: .6rem 1rem; }
.nav__sub a::before { display: none; }
.nav__sub a + a { border-top: 1px solid rgba(250,245,229,.08); }
.nav__group:hover > .nav__sub, .nav__group:focus-within > .nav__sub, .nav__group.is-open > .nav__sub { display: flex; }
.nav__group:hover > .nav__parent .nav__caret, .nav__group.is-open > .nav__parent .nav__caret { transform: rotate(180deg); }

.nav-toggle { display: none; background: none; border: 0; color: var(--ink); padding: .5rem; cursor: pointer; }

/* ───────── Hero ───────── */
.hero {
  position: relative;
  min-height: min(88vh, 860px);
  display: flex;
  align-items: center;
  padding: 140px 0 clamp(3rem, 8vw, 6rem);
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
}
/* [V2] 舊站文字壓在照片亮部難辨讀 —— 遮罩只壓「文字所在的區域」，不整片洗掉。
   ⚠ 照片的清晰度與色溫就是質感來源（使用者 2026-08-12）：
     ① 底圖不做任何 filter；② 遮罩用暖黑 rgba(20,17,12) 而非中性黑（中性黑會把
     木頭／地板的暖色洗成灰的）；③ 用橢圓漸層集中在左側文字帶，右半照片幾乎不遮。 */
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 66% 92% at 26% 58%,
      rgba(20,17,12,.78) 0%,
      rgba(20,17,12,.58) 46%,
      rgba(20,17,12,.14) 100%),
    /* 文字欄整體再墊一層（只作用在左半，右側照片不受影響） */
    linear-gradient(90deg,
      rgba(20,17,12,.34) 0%,
      rgba(20,17,12,.24) 42%,
      rgba(20,17,12,.04) 64%,
      rgba(20,17,12,0) 78%),
    linear-gradient(180deg,
      rgba(20,17,12,.50) 0%,
      rgba(20,17,12,0) 24%,
      rgba(20,17,12,0) 76%,
      rgba(20,17,12,.42) 100%);
}
.hero__inner { max-width: 760px; }
.hero h1 {
  color: var(--white);
  font-size: clamp(3.25rem, 10.4vw, 150px);
  line-height: 1.12;
  letter-spacing: .04em;
  text-shadow: 0 2px 28px rgba(0,0,0,.55);
}
.hero__sub {
  font-family: var(--hand);
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  color: var(--ink);
  margin-top: .9rem;
  text-shadow: 0 1px 12px rgba(0,0,0,.6);
}
.hero__body { max-width: 640px; font-size: 1rem; color: var(--ink); text-shadow: 0 1px 10px rgba(0,0,0,.7); }
.hero__note {
  font-size: .875rem;
  color: rgba(250,245,229,.88);      /* 壓在照片上，比一般 --ink-soft 需再亮一階才讀得清 */
  margin-top: 1.2rem;
  text-shadow: 0 1px 10px rgba(0,0,0,.75);
}

/* 頁面標題型 hero（內頁用，較矮） */
.hero--page { min-height: min(46vh, 430px); padding-top: 150px; padding-bottom: 3rem; }
.hero--page h1 { font-size: clamp(2rem, 5vw, 3.25rem); }

/* ───────── 按鈕 ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--hand);
  font-size: clamp(1rem, 1.4vw, 1.5rem);
  line-height: 1.2;
  padding: .6rem 1.5rem;
  border-radius: 100px;            /* 膠囊 —— 實測 border-radius:100px */
  border: 1px solid var(--white);
  color: var(--white);
  background: transparent;
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { background: var(--white); color: var(--bg); transform: translateY(-2px); }
.btn__arrow { font-size: .9em; }

.btn--gold { border-color: var(--gold); color: var(--gold); }
.btn--gold:hover { background: var(--gold); color: var(--dark); }

.btn--solid-dark { background: var(--dark); border-color: var(--dark); color: var(--ink); }
.btn--solid-dark:hover { background: var(--bg); border-color: var(--bg); color: var(--gold); }

/* ───────── 色帶交替 ───────── */
.band { padding: var(--band-y) 0; position: relative; }
.band--gold { background: var(--gold); color: var(--dark); }
.band--dark { background: var(--bg); color: var(--ink); }
.band--black { background: #000; }

.band__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.band__text { text-align: center; }
.band h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  margin-bottom: .5rem;
}
.band--gold h2 { color: var(--white); }
.band--dark h2 { color: var(--gold); }
.band__sub { font-size: .9rem; opacity: .82; }
.band--gold .band__sub { color: rgba(14,13,6,.86); }

/* 色帶交界的圓形箭頭 */
.band__chevron {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .7rem;
  background: var(--bg);
  color: var(--gold);
  z-index: 2;
}
.band--dark .band__chevron { background: var(--gold); color: var(--dark); }

/* ───────── 內容區塊 ───────── */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section__title {
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  text-align: center;
  color: var(--ink);
}
.section__title--left { text-align: left; }
.lede { max-width: 68ch; margin-inline: auto; }

.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(.75rem, 2vw, 1.4rem);
}
.photo-strip img { border-radius: 2px; aspect-ratio: 3/4; object-fit: cover; }

/* [V2] 照片上的內容區塊：文字給半透明底，不再直接壓在亮部 */
.feature {
  position: relative;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.feature::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(14,13,6,.90) 0%, rgba(14,13,6,.66) 55%, rgba(14,13,6,.86) 100%);
}
.feature__card { max-width: 62ch; }

/* 條列 */
.list { padding-left: 1.15em; margin: 0; }
.list li { margin-bottom: .5em; }
.list li::marker { color: var(--gold); }

/* ───────── 頁尾 ───────── */
.site-footer { background: var(--dark); padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.75rem; }
.social { display: flex; justify-content: center; gap: 1.4rem; margin-bottom: 2rem; }
.social a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  color: var(--gold);
  transition: transform .25s var(--ease), color .25s var(--ease);
}
.social a:hover { color: var(--gold-lift); transform: translateY(-2px); }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.footer__bar {
  display: flex; justify-content: center;
  font-size: .8rem; color: var(--ink-soft);
}
.footer__legal { text-align: center; line-height: 1.8; }
.footer__legal .nowrap { white-space: nowrap; }

/* [V4] 舊站頁尾 "Powered by 匯流空間" 是 Astra 主題預設殘留，已移除 */

/* ───────── 行動版 ───────── */
@media (max-width: 860px) {
  .band__grid { grid-template-columns: 1fr; justify-items: center; }
  .nav {
    position: absolute; inset: 100px 0 auto 0;
    flex-direction: column; align-items: stretch;
    background: #0e0d06;
    padding: .5rem 0;
    z-index: 30;                 /* 要壓在 hero 文字之上，否則標題會從面板透出來 */
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a, .nav__parent { padding: .85rem var(--pad); }
  .nav > * + *::before { display: none; }
  .nav > * + * { border-top: 1px solid rgba(250,245,229,.1); }
  .nav__group { flex-direction: column; align-items: stretch; }
  .nav__parent { text-align: left; color: var(--ink-soft); font-size: .72rem; padding-bottom: .3rem; pointer-events: none; }
  .nav__caret { display: none; }
  .nav__sub { position: static; display: flex; min-width: 0; padding: 0 0 .3rem; border: 0; background: none; }
  .nav__sub a { padding: .6rem var(--pad) .6rem calc(var(--pad) + 1rem); }
  .nav__sub a + a { border-top: 0; }
  .nav-toggle { display: block; }
  .hero { min-height: 78vh; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
