@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+TC:wght@400;500;700&family=Noto+Serif+TC:wght@600;700&display=swap');

/* ============================================================
   保康生醫 Design System — Swiss Modernism 2.0 × 草綠土黃
   Tokens 為唯一色彩來源，元件內禁止硬寫 hex
   ============================================================ */
:root {
  /* ---- Color：草綠土黃（依博士 2026-08-16 裁示）----
     草綠 = 主體：頁首按鈕、頁尾、CTA 帶、圖示、數據
     土黃 = 強調：eyebrow、標號、星等、深底主按鈕
     深紅 = logo 專用品牌印記，不得用於按鈕或底色
     色值取自官方 logo AI 向量原始檔：深紅 #81292D、土黃 #DAB866、葉綠 #629939。 */
  --c-brand:      #2C4A20;  /* 深草綠：滿版底色，白字 9.9:1 */
  --c-brand-d:    #22391A;  /* hover */
  --c-brand-lt:   #DAB866;  /* 深底上的主按鈕：土黃底配深褐字 8.0:1 */
  --c-ink:        #17210F;  /* 頁尾底：深綠黑 */
  --c-logo:       #81292D;  /* logo 深紅，僅供參照，勿用於元件 */

  --c-primary:    #43702D;  /* 內容層草綠，白底 5.58:1 */
  --c-primary-d:  #35591F;
  --c-accent:     #8A6516;  /* 淺底上的土黃：#F0F2EC 底達 5.0:1 */
  --c-accent-d:   #6E5012;
  --c-accent-lt:  #DAB866;  /* logo 土黃原色，僅用於深底 */
  --c-on-gold:    #2E2408;
  --c-leaf:       #629939;  /* logo 葉片綠，白底 3.43:1：僅可用於圖形／大色塊，不可當內文字 */  /* 土黃底上的字，8.0:1 */

  --c-bg:         #FAFAF6;
  --c-surface:    #FFFFFF;
  --c-muted:      #F0F2EC;
  --c-border:     #E1E5DC;
  --c-fg:         #1E2419;
  --c-fg-muted:   #5A6154;
  --c-on-dark:    #E8EDE2;
  --c-on-dark-mut:#A4AF98;

  /* Type */
  --font-sans: 'Inter', 'Noto Sans TC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Noto Serif TC', 'Inter', Georgia, serif;

  /* Spacing — density 3/10 (spacious) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 4px;
  --radius-lg: 8px;

  --shadow-sm: 0 1px 2px rgba(23, 33, 15, .05);
  --shadow-md: 0 8px 24px rgba(23, 33, 15, .08);
  --shadow-lg: 0 20px 48px rgba(23, 33, 15, .12);

  --header-h: 76px;
  --ease: cubic-bezier(.16, .84, .44, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--c-brand); color: #fff; padding: 12px 20px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(var(--space-5), 9vw, var(--space-6)); }
.section--muted { background: var(--c-muted); }
.section--dark { background: var(--c-ink); color: var(--c-on-dark); }
.section--dark p, .section--dark li { color: var(--c-on-dark-mut); }

.grid { display: grid; gap: var(--space-3); }
@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid { gap: var(--space-4); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--c-accent); margin-bottom: var(--space-2);
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
/* 深底上的 eyebrow 需改用亮金，否則 #A16207 對比僅 2.46:1，未達 WCAG 4.5:1 */
.section--dark .eyebrow, .cta-band .eyebrow { color: var(--c-accent-lt); }

.h-display { font-size: clamp(2.25rem, 5.2vw, 4rem); }
.h-section { font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
.h-card    { font-size: clamp(1.15rem, 1.8vw, 1.375rem); }

.lead { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); color: var(--c-fg-muted); max-width: 62ch; }
.section--dark .lead { color: var(--c-on-dark-mut); }
.text-muted { color: var(--c-fg-muted); }
.section-head { max-width: 780px; margin-bottom: var(--space-4); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; letter-spacing: .02em;
  transition: background-color .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--c-brand); color: #fff; }
.btn--primary:hover { background: var(--c-brand-d); }
.btn--accent { background: var(--c-brand-lt); color: var(--c-on-gold); }
.btn--accent:hover { background: #C79C4C; }
/* 酒紅 CTA 帶上不能再放酒紅按鈕（色塊對比僅 1.69:1），改用品牌金：色塊 4.9:1、深字 8.8:1 */
.cta-band .btn--accent { background: var(--c-accent-lt); color: var(--c-on-gold); }
.cta-band .btn--accent:hover { background: #C79C4C; }
.btn--outline { border-color: var(--c-border); background: var(--c-surface); color: var(--c-fg); }
.btn--outline:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn--ghost-light { border-color: rgba(244,246,242,.45); color: var(--c-on-dark); }
.btn--ghost-light:hover { background: rgba(244,246,242,.12); border-color: var(--c-on-dark); }
.btn__arrow { width: 16px; height: 16px; transition: transform .22s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; font-size: 15px; color: var(--c-primary);
  box-shadow: inset 0 -1px 0 currentColor;
  transition: gap .22s var(--ease), color .22s var(--ease);
}
.link-arrow:hover { gap: 14px; color: var(--c-accent); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,250,248,.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.header.is-scrolled { background: rgba(250,250,248,.97); border-bottom-color: var(--c-border); box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--header-h); }

/* 品牌識別：使用官方 logo 檔（含中英文字標），不再另附文字 */
.logo { display: inline-flex; align-items: center; padding-block: 4px; flex: none; }
.logo__img { display: block; height: 28px; width: auto; }
/* 完整版字標（中文頁）比例 1.75:1，需獨立高度，否則會過小 */
.logo__img--full { height: 50px; }
@media (max-width: 400px) { .logo__img { height: 23px; } .logo__img--full { height: 40px; } }

/* 深底頁尾：酒紅字標在墨綠底上對比不足，改置於白底卡片上，維持品牌原色 */
.logo--on-dark {
  background: #fff; padding: 12px 16px; border-radius: var(--radius-lg);
  width: fit-content; box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.logo--on-dark .logo__img { height: 32px; }
.logo--on-dark .logo__img--full { height: 56px; }

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: var(--space-3); }
.nav__link {
  position: relative; font-size: 15px; font-weight: 500; padding: 8px 2px; color: var(--c-fg);
  transition: color .2s var(--ease);
}
.nav__link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--c-accent); transform: scaleX(0); transform-origin: left; transition: transform .24s var(--ease);
}
.nav__link:hover { color: var(--c-brand); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--c-brand); font-weight: 600; }

.header__cta { display: none; }
@media (min-width: 1024px) {
  .nav { display: block; }
  .header__cta { display: flex; align-items: center; gap: 12px; }
}

/* 語系切換 */
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 48px; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--c-fg-muted);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.lang-switch:hover { color: var(--c-brand); border-color: var(--c-brand); }
.lang-switch svg { width: 16px; height: 16px; }
.mobile-menu .lang-switch { width: fit-content; margin-top: var(--space-2); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; background: none; border: 1px solid var(--c-border); border-radius: var(--radius);
  transition: border-color .2s var(--ease);
}
.nav-toggle:hover { border-color: var(--c-brand); }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--c-fg); position: relative; transition: background-color .2s var(--ease); }
.nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: var(--c-fg);
  transition: transform .26s var(--ease), top .26s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
@media (min-width: 1024px) { .nav-toggle { display: none; } }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0; z-index: 99;
  background: var(--c-bg); padding: var(--space-4) var(--gutter);
  display: flex; flex-direction: column; gap: var(--space-2);
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s;
  overflow-y: auto;
}
.mobile-menu.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
.mobile-menu a:not(.btn) {
  display: block; padding: 16px 0; font-size: 20px; font-family: var(--font-display); font-weight: 600;
  border-bottom: 1px solid var(--c-border);
}
.mobile-menu .btn { margin-top: var(--space-2); }
@media (min-width: 1024px) { .mobile-menu { display: none; } }
body.is-locked { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { position: relative; color: var(--c-on-dark); overflow: hidden; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  /* 暖調近黑遮罩：與品牌酒紅同溫層，不與 logo 打架 */
  background: linear-gradient(100deg, rgba(26,14,15,.94) 0%, rgba(26,14,15,.82) 42%, rgba(26,14,15,.50) 100%);
}
.hero__inner { padding-block: clamp(var(--space-5), 12vw, 140px); max-width: 860px; }
.hero h1 { color: #fff; margin-bottom: var(--space-3); }
.hero h1 em { font-style: normal; color: var(--c-accent-lt); }
.hero .lead { color: var(--c-on-dark-mut); margin-bottom: var(--space-4); }
.hero__pain { display: grid; gap: 10px; margin: 0 0 var(--space-4); }
.hero__pain li { display: flex; gap: 12px; align-items: flex-start; color: var(--c-on-dark-mut); font-size: 15px; }
.hero__pain svg { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--c-accent-lt); }
.hero--sub .hero__inner { padding-block: clamp(var(--space-5), 9vw, 110px); }

/* ---------- Stat strip ---------- */
.stats { border-top: 1px solid rgba(244,246,242,.16); }
.stats__grid { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .stats__grid { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: var(--space-3) var(--space-3) var(--space-3) 0; }
.stat__num { font-family: var(--font-display); font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 700; color: #fff; line-height: 1.1; }
.stat__label { font-size: 13.5px; color: var(--c-on-dark-mut); margin-top: 6px; }

/* ---------- Cards ---------- */
.card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; height: 100%;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #D3DACF; }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--c-muted); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.045); }
.card__body { padding: var(--space-3); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card__tag { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-accent); }
.card__body p { color: var(--c-fg-muted); font-size: 15px; }
.card__foot { margin-top: auto; padding-top: var(--space-2); border-top: 1px solid var(--c-border); }
.card__result { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.card__result div { min-width: 96px; }
.card__result b { display: block; font-family: var(--font-display); font-size: 1.375rem; color: var(--c-primary); line-height: 1.2; }
.card__result span { font-size: 12.5px; color: var(--c-fg-muted); }

/* Solution block */
.solution { display: flex; flex-direction: column; gap: var(--space-2); }
.solution__num {
  font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .1em;
  color: var(--c-accent); border-top: 2px solid var(--c-accent); padding-top: 12px; width: fit-content; min-width: 44px;
}
.solution__media { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 4px; }
.solution__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.solution:hover .solution__media img { transform: scale(1.04); }
.solution p { color: var(--c-fg-muted); font-size: 15.5px; }
.solution__pain {
  font-size: 13.5px; color: var(--c-fg-muted); background: var(--c-muted);
  border-left: 3px solid var(--c-border); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- Trust strip ---------- */
/* 自適應欄數：標章數量增減時版面不會留空欄，卡片寬度亦不失控 */
.trust { display: grid; gap: var(--space-2); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) {
  /* 240px 上限是為了讓 about.html 右欄（約 532px）仍容得下兩欄並排 */
  .trust { grid-template-columns: repeat(auto-fit, minmax(0, 240px)); justify-content: start; }
}
.trust__item {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: var(--space-3) var(--space-2); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.trust__item svg { width: 30px; height: 30px; color: var(--c-primary); }
.trust__item b { font-size: 14.5px; }
.trust__item span { font-size: 12.5px; color: var(--c-fg-muted); }

.quote {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); height: 100%;
}
.quote__stars { display: flex; gap: 3px; color: var(--c-accent); }
.quote__stars svg { width: 16px; height: 16px; }
.quote blockquote { margin: 0; font-size: 15.5px; line-height: 1.8; }
.quote figcaption { margin-top: auto; font-size: 13.5px; color: var(--c-fg-muted); border-top: 1px solid var(--c-border); padding-top: var(--space-2); }
.quote figcaption b { display: block; color: var(--c-fg); font-size: 14.5px; }

/* ---------- Final CTA ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; background: var(--c-brand); color: #fff; }
.cta-band::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .18;
  background-image: url('https://images.unsplash.com/photo-1563822249366-3efb23b8e0c9?auto=format&fit=crop&w=1600&q=60');
  background-size: cover; background-position: center;
}
.cta-band__inner { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.cta-band h2 { color: #fff; max-width: 22ch; }
.cta-band p { color: rgba(255,255,255,.82); max-width: 56ch; }
@media (min-width: 1024px) {
  .cta-band__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-5); }
}

/* ---------- Tables (services) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
caption { text-align: left; padding: var(--space-3) var(--space-3) 0; font-size: 14px; color: var(--c-fg-muted); }
th, td { padding: 16px var(--space-3); text-align: left; border-bottom: 1px solid var(--c-border); font-size: 15px; vertical-align: top; }
thead th { background: var(--c-muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-fg-muted); font-weight: 600; }
tbody th { font-weight: 600; color: var(--c-fg); width: 22%; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.is-us { background: rgba(18,61,47,.045); color: var(--c-fg); font-weight: 500; }
.cell-flag { display: inline-flex; align-items: center; gap: 8px; }
.cell-flag svg { width: 17px; height: 17px; flex: none; }
.cell-flag--yes svg { color: var(--c-primary); }
.cell-flag--no svg { color: #94A29A; }

/* Service matrix */
.svc {
  display: flex; flex-direction: column; gap: var(--space-2);
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: var(--space-3); height: 100%;
  transition: border-color .26s var(--ease), box-shadow .26s var(--ease), transform .26s var(--ease);
}
.svc:hover { border-color: var(--c-primary); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.svc__icon {
  width: 46px; height: 46px; border-radius: var(--radius); background: var(--c-muted);
  display: grid; place-items: center; color: var(--c-primary);
}
.svc__icon svg { width: 23px; height: 23px; }
.svc ul { display: grid; gap: 8px; margin-top: 4px; }
.svc li { display: flex; gap: 10px; font-size: 14.5px; color: var(--c-fg-muted); }
.svc li svg { width: 16px; height: 16px; flex: none; margin-top: 5px; color: var(--c-accent); }
.svc__meta { margin-top: auto; padding-top: var(--space-2); border-top: 1px solid var(--c-border); font-size: 13.5px; color: var(--c-fg-muted); }
.svc__meta b { color: var(--c-primary); font-family: var(--font-display); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--c-border); }
.faq__item { border-bottom: 1px solid var(--c-border); }
.faq__q {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3);
  background: none; border: 0; padding: var(--space-3) 0; text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1rem, 1.6vw, 1.125rem); color: var(--c-fg);
  transition: color .2s var(--ease);
}
.faq__q:hover { color: var(--c-primary); }
.faq__icon { flex: none; width: 22px; height: 22px; position: relative; margin-top: 4px; }
.faq__icon::before, .faq__icon::after {
  content: ''; position: absolute; background: var(--c-accent); transition: transform .26s var(--ease);
  top: 50%; left: 0; width: 100%; height: 2px; margin-top: -1px;
}
.faq__icon::after { transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__icon::after { transform: rotate(0deg); }
/* 摺疊狀態只在 JS 可用時套用；JS 失效時答案維持展開，內容不會消失 */
.faq__a { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .3s var(--ease); }
.js .faq__a { grid-template-rows: 0fr; }
:root:not(.js) .faq__icon { display: none; }
.faq__a > div { overflow: hidden; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a p { color: var(--c-fg-muted); font-size: 15.5px; padding-bottom: var(--space-3); max-width: 74ch; }

/* ---------- Split (about / contact) ---------- */
.split { display: grid; gap: var(--space-4); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: var(--space-5); } }
.split__media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__body > * + * { margin-top: var(--space-2); }
.split__body p { color: var(--c-fg-muted); }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: grid; gap: var(--space-4); padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--c-border); }
.tl__item { position: relative; }
.tl__item::before {
  content: ''; position: absolute; left: -28px; top: 8px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--c-bg); border: 2px solid var(--c-accent);
}
.tl__year { font-family: var(--font-display); font-weight: 700; color: var(--c-accent); font-size: 15px; letter-spacing: .04em; }
.tl__item h3 { font-size: 1.125rem; margin: 4px 0 6px; }
.tl__item p { color: var(--c-fg-muted); font-size: 15px; max-width: 64ch; }

/* ---------- Team ---------- */
.person { display: flex; flex-direction: column; gap: var(--space-2); }
.person__photo { aspect-ratio: 3 / 4; border-radius: var(--radius-lg); overflow: hidden; background: var(--c-muted); }
.person__photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92); transition: transform .5s var(--ease); }
.person:hover .person__photo img { transform: scale(1.04); }
.person__role { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); font-weight: 600; }
.person p { font-size: 14.5px; color: var(--c-fg-muted); }

/* ---------- Contact ---------- */
.contact-item { display: flex; gap: var(--space-2); padding: var(--space-3) 0; border-bottom: 1px solid var(--c-border); }
.contact-item:first-of-type { padding-top: 0; }
.contact-item__icon { flex: none; width: 42px; height: 42px; border-radius: var(--radius); background: var(--c-muted); display: grid; place-items: center; color: var(--c-primary); }
.contact-item__icon svg { width: 20px; height: 20px; }
.contact-item h3 { font-size: 15px; margin-bottom: 2px; }
.contact-item a, .contact-item p { font-size: 15px; color: var(--c-fg-muted); }
/* 觸控目標：以 padding 擴大熱區至 44px，負 margin 抵銷視覺位移 */
.contact-item a, .form__foot a { display: inline-block; padding-block: 12px; margin-block: -12px; }
.contact-item a:hover { color: var(--c-primary); text-decoration: underline; }

.social { display: flex; gap: 10px; margin-top: var(--space-3); }
.social a {
  width: 44px; height: 44px; border: 1px solid var(--c-border); border-radius: var(--radius);
  display: grid; place-items: center; color: var(--c-fg-muted);
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.social a:hover { color: #fff; background: var(--c-primary); border-color: var(--c-primary); }
.social svg { width: 19px; height: 19px; }

.map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--c-border); background: var(--c-muted); }
.map iframe { display: block; width: 100%; height: 420px; border: 0; }

/* ---------- Form ---------- */
.form { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: clamp(var(--space-3), 4vw, var(--space-4)); }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: var(--space-3); }
.field label { font-size: 14.5px; font-weight: 600; }
.field .req { color: #B91C1C; }
.field .hint { font-size: 13px; color: var(--c-fg-muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 15px; color: var(--c-fg);
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.65; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23566159' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 42px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(18,61,47,.14); }
.field .error { font-size: 13px; color: #B91C1C; display: none; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #B91C1C; }
.field.is-invalid .error { display: block; }
.field-note {
  display: none; gap: 10px; font-size: 14px; line-height: 1.65;
  background: rgba(161,98,7,.07); border-left: 3px solid var(--c-accent);
  padding: 12px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin: -8px 0 var(--space-3);
}
.field-note.is-shown { display: flex; }
.field-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--c-accent); }
.form__foot { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); }
.form__status { font-size: 14.5px; padding: 12px 14px; border-radius: var(--radius); display: none; }
.form__status.is-shown { display: block; }
.form__status--ok { background: rgba(18,61,47,.08); color: var(--c-primary); border: 1px solid rgba(18,61,47,.2); }
/* 送出失敗必須明顯有別於成功：白底 #B3261E 為 6.3:1，符合對比要求 */
.form__status--err { background: rgba(179,38,30,.07); color: #B3261E; border: 1px solid rgba(179,38,30,.28); }
/* 蜜罐欄位：對真人隱藏但仍在無障礙樹之外，不可用 display:none（部分機器人會偵測） */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.footer { background: var(--c-ink); color: var(--c-on-dark-mut); padding-block: var(--space-5) var(--space-3); font-size: 14.5px; }
.footer__grid { display: grid; gap: var(--space-4); }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--space-4); } }
.footer h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: var(--space-2); font-family: var(--font-sans); font-weight: 600; }
.footer li { line-height: 1.6; }
.footer li + li { margin-top: 2px; }
/* 觸控目標：頁尾連結補足垂直點擊區至 44px 以上 */
.footer li a, .footer__legal a { display: inline-block; padding-block: 11px; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__about { max-width: 34ch; margin-top: var(--space-2); line-height: 1.75; }
.footer__bottom {
  margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid rgba(244,246,242,.14);
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); justify-content: space-between; font-size: 13px;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- Reveal motion (Standard tier, CSS + IntersectionObserver) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover, .svc:hover { transform: none; }
}

@media print {
  .header, .mobile-menu, .cta-band, .nav-toggle { display: none !important; }
  body { background: #fff; }
}
