@font-face { font-family: 'Archivo'; src: url('../fonts/archivo.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/ibm-plex-mono.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/ibm-plex-mono-medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('../fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Noto Sans TC'; src: url('../fonts/noto-sans-tc.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Noto Serif TC'; src: url('../fonts/noto-serif-tc.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
/* ==========================================================
   TnAID B站｜A 版「檔案：延續主站語彙」
   ========================================================== */

/* ---------- Tokens ---------- */
:root {
  /* 品牌色（CI）*/
  --c-yellow: #FEDE00;   /* Pantone 7405C（CI 上 WEB 值誤植為 #595757，依 RGB 254/222/0 修正） */
  --c-gray:   #7C878E;   /* Pantone 430C */
  --c-ink:    #3E3A39;   /* Pantone Black 7C */
  /* 延伸色 */
  --c-olive:  #7A6812;   /* 強調文字（主站橄欖金，加深以符合對比） */
  --c-muted:  #5F6970;   /* 次要文字 */
  --c-tint:   #F1EDE4;   /* 米色區塊底 */
  --c-line:   #E6E2DA;
  --c-line-2: #DDD6C8;
  --c-ph:     #EDEBE6;   /* 照片佔位底 */
  --c-white:  #FFFFFF;

  --f-en:    'Archivo', sans-serif;
  --f-serif: 'Noto Serif TC', serif;
  --f-sans:  'Noto Sans TC', sans-serif;

  --container: 1200px;
  --gutter: 24px;
  --section-y: 96px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-ink);
  font-family: var(--f-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-olive); }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--c-olive); outline-offset: 2px; }

.container { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--tint { background: var(--c-tint); }
.section--rule { border-top: 1px solid var(--c-line); }

.eyebrow { margin: 0 0 20px; font-size: 12px; letter-spacing: .2em; font-weight: 700; color: var(--c-olive); }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; margin-bottom: 48px; }
.section-head--flat { margin-bottom: 0; }
.section-head__en { margin: 0; font-family: var(--f-en); font-weight: 800; font-size: 48px; line-height: 1; text-transform: uppercase; }
.section-head__zh { font-size: 13px; letter-spacing: .2em; color: var(--c-muted); }

.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 32px; border: 0; font-size: 15px; letter-spacing: .15em; cursor: pointer; }
.btn--dark { background: var(--c-ink); color: var(--c-white); }
.btn--dark:hover { background: #000; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--c-line); background: var(--c-white); position: sticky; top: 0; z-index: 50; }
.site-header__inner { --gutter: clamp(16px, 4vw, 24px); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.site-menu { position: relative; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; color: var(--c-ink); cursor: pointer; list-style: none; }
.menu-toggle::-webkit-details-marker { display: none; }
.menu-toggle:hover { color: var(--c-olive); }
.menu-toggle__close, .site-menu[open] .menu-toggle__open { display: none; }
.site-menu[open] .menu-toggle__close { display: block; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__en { font-family: var(--f-en); font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.brand__zh { font-size: 11px; letter-spacing: .3em; }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 14px; letter-spacing: .06em; }
.site-nav a { display: flex; align-items: center; min-height: 44px; white-space: nowrap; }

/* ---------- Hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 48px; padding-top: 96px; padding-bottom: 80px; }
.hero__title { flex: 999 1 560px; min-width: 0; }
.hero__aside { flex: 1 1 320px; min-width: 0; }
.display { margin: 0; font-family: var(--f-en); font-weight: 800; font-size: clamp(48px, 7vw, 92px); line-height: .95; letter-spacing: -.01em; text-transform: uppercase; }
.is-accent { color: var(--c-olive); }
.hero__sub { margin: 20px 0 0; font-size: 14px; letter-spacing: .3em; }
.hero__lead { margin: 0 0 32px; font-family: var(--f-serif); font-size: 16px; line-height: 2; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding-top: 20px; border-top: 1px solid var(--c-ink); }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dd { margin: 0; font-family: var(--f-en); font-weight: 500; font-size: 40px; line-height: 1; }
.stats dt { margin-top: 8px; font-size: 12px; color: var(--c-muted); }

/* ---------- About ---------- */
.about { display: flex; flex-wrap: wrap; gap: 64px; }
.mission-list { flex: 999 1 520px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.mission-list li { display: flex; align-items: baseline; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--c-line); font-family: var(--f-serif); font-size: 18px; }
.mission-list__no { flex-shrink: 0; width: 28px; font-family: var(--f-en); font-weight: 800; font-size: 14px; color: var(--c-olive); }
.history { flex: 1 1 300px; min-width: 0; background: var(--c-tint); padding: 32px; }
.history__title { margin: 0 0 24px; font-size: 12px; letter-spacing: .2em; font-weight: 700; }
.history__list { list-style: none; margin: 0; padding: 0; }
.history__list li { display: flex; gap: 20px; padding: 14px 0; border-top: 1px solid var(--c-line-2); font-size: 14px; }
.history__year { flex-shrink: 0; width: 64px; font-family: var(--f-en); font-weight: 800; font-size: 15px; }

/* ---------- 廠聯會夥伴 ---------- */
.partners__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; }
.filter__btn { min-height: 44px; padding: 10px 16px; border: 1px solid var(--c-ink); background: var(--c-white); color: var(--c-ink); font-size: 13px; cursor: pointer; }
.filter__btn.is-active { background: var(--c-ink); color: var(--c-white); }
.vendor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); }
.vendor { display: flex; flex-direction: column; gap: 6px; min-height: 200px; padding: 28px 24px; background: var(--c-white); }
.vendor[hidden] { display: none; }
.vendor__logo { height: 56px; display: flex; align-items: center; font-family: var(--f-en); font-size: 12px; letter-spacing: .2em; color: #A8A297; }
.vendor__logo img { max-height: 56px; width: auto; }
.vendor__cat { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--c-olive); }
.vendor__name { font-family: var(--f-serif); font-weight: 600; font-size: 19px; }
.vendor__brand { font-size: 13px; color: var(--c-muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-ink); color: #E8E6E1; padding: 56px 0; font-size: 13px; line-height: 2; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.site-footer__name { font-family: var(--f-en); font-weight: 800; font-size: 20px; color: var(--c-white); }
.site-footer a:hover { color: var(--c-yellow); }

/* ---------- RWD ---------- */
@media (max-width: 860px) {
  :root { --section-y: 64px; }
  .section-head__en { font-size: 36px; }
  .menu-toggle { display: flex; }
  .site-nav { position: absolute; top: calc(100% + 18px); right: 0; flex-direction: column; align-items: stretch; gap: 0; width: min(360px, calc(100vw - 2 * var(--gutter))); max-height: calc(100dvh - 96px); overflow-y: auto; padding: 8px; border: 1px solid var(--c-line); background: var(--c-white); box-shadow: 0 12px 24px #3e3a3914; }
  .site-nav a { min-height: 52px; padding: 12px 20px; }
  .site-nav a:hover { background: var(--c-tint); }
}

[hidden] { display: none !important; }
html { scroll-padding-top: 112px; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 200; padding: 12px 20px; color: var(--c-ink); background: var(--c-yellow); }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.site-nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.partners__head { align-items: flex-start; }
.filter { flex-basis: 100%; }
.directory-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
#result-count { margin: 0; color: var(--c-muted); font-size: 13px; }
.search-form { display: flex; align-items: center; border-bottom: 1px solid var(--c-ink); }
.search-form input { width: 220px; max-width: 100%; min-height: 44px; padding: 8px 0; font: inherit; font-size: 14px; color: var(--c-ink); border: 0; background: transparent; }
.search-form button { width: 44px; height: 44px; border: 0; background: none; color: var(--c-ink); font-size: 24px; cursor: pointer; }
.vendor { min-width: 0; }
.vendor__name { overflow-wrap: anywhere; }
.vendor__logo img { max-width: 100%; object-fit: contain; }
.no-results { padding: 40px 24px; text-align: center; background: var(--c-tint); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
