/* ==========================================================================
   global.css — 全域基礎樣式
   ========================================================================== */

/* ===== 自訂字體：王漢宗中明加重（Hero 大標題用） =====
   字體檔請放入 assets/fonts/，依實際副檔名擇一即可（woff2 最佳）。
   檔名請對齊：HanWangMingHeavy.woff2 / .woff / .ttf */
@font-face {
  font-family: "HanWangMingHeavy";
  src:
    url("../fonts/HanWangMingHeavy.woff2") format("woff2"),
    url("../fonts/HanWangMingHeavy.woff") format("woff"),
    url("../fonts/HanWangMingHeavy.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-color);
  background-color: var(--bg-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  line-height: var(--line-height-tight);
  color: var(--text-color);
}

/* 預設字級階層（依設計稿：主標題28 / 副標題24 / 小標題20 / 內文16…）。
   元件若用 class 自訂字級會覆蓋此預設；此處僅為內容區與未指定字級的標題提供基準。
   行動版於 responsive.css 等比下調。 */
h1 {
  font-size: var(--font-size-3xl);
} /* 28px */
h2 {
  font-size: var(--font-size-2xl);
} /* 24px */
h3 {
  font-size: var(--font-size-xl);
} /* 20px */
h4 {
  font-size: var(--font-size-lg);
} /* 18px */
h5 {
  font-size: var(--font-size-base);
} /* 16px */
h6 {
  font-size: var(--font-size-sm);
} /* 14px */

p {
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--color-primary);
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent);
}

/* 容器 */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* 區塊間距：只給顯式標記為 .page-section 的內容區，
   不再用 section[class^="page-"] 屬性匹配（會誤觸 page-hero / page-cases 等內頁包裝 section，
   且 (0,1,1) 的 specificity 會覆蓋頁面 CSS 的 .page-hero (0,1,0)）。
   section-* 共用組件（如 section-case-studies）保留屬性匹配。 */
.page-section,
section[class^="section-"] {
  padding: var(--spacing-3xl) 0;
}

/* 無障礙：僅供螢幕報讀器 */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
