/* ==================================================================
   恆健藥廠 · 設計系統底層
   ================================================================== */

/* ---------------- 設計令牌 ---------------- */
:root {
  /* 主色系 */
  --green-900: #073d2c;
  --green-800: #0b5f43;
  --green-700: #0f7554;
  --green-600: #128a63;
  --green-100: #e6f2ed;
  --green-050: #f2f9f6;

  /* 青綠（強調） */
  --teal-700: #005c5c;
  --teal-600: #007575;
  --teal-500: #00908f;
  --teal-100: #e0f2f2;

  /* 深藍（輔色） */
  --navy-700: #0d2050;
  --navy-600: #132d6c;
  --navy-100: #e8f1fd;

  /* 淺綠點綴 */
  --lime-400: #addc91;
  --lime-300: #c8e8b4;
  --lime-100: #edf8e5;

  /* 中性 */
  --white: #ffffff;
  --gray-050: #f7f8f8;
  --gray-100: #f0f2f2;
  --gray-200: #e2e2e2;
  --gray-300: #cfd2d2;
  --gray-400: #a8adad;
  --gray-500: #8f8f8f;
  --gray-600: #6b7070;
  --gray-700: #4a4f4f;
  --ink: #1a1f1f;

  /* 功能色 */
  --danger: #c0392b;
  --warn: #d98324;
  --ok: #2e8b57;

  /* 字體 */
  --font-sans: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', 'Helvetica Neue', Arial, sans-serif;
  --font-num: 'Oswald', 'Noto Sans TC', 'Arial Narrow', sans-serif;

  /* 間距節奏 */
  --sec-y: 5.75rem;
  --sec-y-sm: 4rem;
  --gutter: 1.5rem;

  /* 過渡 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.35s;

  /* 陰影（極克制，原站幾乎不用陰影） */
  --shadow-sm: 0 2px 10px rgba(11, 95, 67, 0.06);
  --shadow-md: 0 8px 28px rgba(11, 95, 67, 0.1);
}

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

/* [hidden] 必須壓過任何 display 設定 */
[hidden] {
  display: none !important;
}

html {
  /* 根字号：全站 rem 的基准（1rem = 这个值）。
     1024~1440 屏都是 16px（和原来每个字号写死 px 的效果完全一致，不会变小），
     1600 屏起开始放大，1920 屏 18px —— 宽屏上字不会显得小。
     只改这一个数，全站所有用 rem 写的字号、间距会一起等比缩放，
     不同电脑上看过去的版式比例才一致。 */
  font-size: clamp(16px, 1.11vw, 18px);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
p,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--green-800);
  color: #fff;
}

/* 滾動條（桌面） */
@media (min-width: 1024px) {
  ::-webkit-scrollbar {
    width: 0.625rem;
    height: 0.625rem;
  }
  ::-webkit-scrollbar-track {
    background: var(--gray-100);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--gray-300);
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--green-700);
  }
}

/* ---------------- 版心 ---------------- */
.wrap {
  width: 100%;
  max-width: 77.5rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.wrap--narrow {
  max-width: 57.5rem;
}

.wrap--wide {
  max-width: 90rem;
}

/* ---------------- 字體排印 ---------------- */
.h1 {
  font-size: clamp(1.875rem, 3.4vw, 2.875rem);
  line-height: 1.28;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.125rem);
  line-height: 1.32;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.h3 {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.45;
  font-weight: 600;
  color: var(--ink);
}

.h4 {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--ink);
}

.lead {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--gray-600);
}

.body {
  font-size: 0.9063rem;
  line-height: 1.95;
  color: var(--gray-600);
}

/* 區塊標題（原站特徵：青綠大標 + 下方短線） */
.sechead {
  text-align: center;
  margin-bottom: 3.5rem;
}

.sechead--left {
  text-align: left;
}

.sechead__title {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 700;
  color: var(--teal-600);
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.sechead__sub {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  letter-spacing: 0.02em;
}

.sechead__line {
  width: 2.875rem;
  height: 3px;
  background: var(--lime-400);
  margin: 1.25rem auto 0;
}

.sechead--left .sechead__line {
  margin-left: 0;
}

/* 深色底上的區塊標題 */
.on-dark .sechead__title {
  color: var(--white);
}
.on-dark .sechead__sub {
  color: rgba(255, 255, 255, 0.72);
}
.on-dark .sechead__line {
  background: var(--lime-400);
}

/* 大數字（Oswald 撐氣勢） */
.bignum {
  font-family: var(--font-num);
  font-weight: 500;
  line-height: 0.9;
  color: var(--teal-600);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.bignum__unit {
  font-family: var(--font-sans);
  font-size: 0.34em;
  font-weight: 500;
  vertical-align: super;
  letter-spacing: 0;
  margin-left: 0.08em;
}

/* ---------------- 按鈕 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0 1.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--teal-600);
  border: 1px solid var(--teal-600);
  border-radius: 0;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn:hover {
  background: var(--green-800);
  border-color: var(--green-800);
}

.btn:active {
  transform: translateY(1px);
}

.btn--ghost {
  background: transparent;
  color: var(--teal-600);
  border-color: var(--teal-600);
}

.btn--ghost:hover {
  background: var(--teal-600);
  color: #fff;
}

.btn--light {
  background: #fff;
  color: var(--green-800);
  border-color: #fff;
}

.btn--light:hover {
  background: var(--lime-400);
  border-color: var(--lime-400);
  color: var(--green-900);
}

.btn--line {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn--line:hover {
  background: #fff;
  color: var(--green-800);
  border-color: #fff;
}

.btn--lg {
  min-height: 3.25rem;
  padding: 0 2.5rem;
  font-size: 0.9375rem;
}

.btn--block {
  width: 100%;
}

/* 文字箭頭連結 */
.linkarrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8438rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--teal-600);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color var(--dur) var(--ease), gap var(--dur) var(--ease);
}

.linkarrow::after {
  content: "→";
  font-size: 0.8125rem;
  transition: transform var(--dur) var(--ease);
}

.linkarrow:hover {
  border-bottom-color: var(--teal-600);
}

.linkarrow:hover::after {
  transform: translateX(4px);
}

.linkarrow--light {
  color: #fff;
}
.linkarrow--light:hover {
  border-bottom-color: #fff;
}

/* ---------------- 裝飾 ---------------- */
.rule {
  height: 1px;
  background: var(--gray-200);
}

.rule--lime {
  background: var(--lime-400);
  height: 3px;
}

/* 圖片容器（固定比例，避免載入時抖動） */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--gray-100);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.frame--43 {
  aspect-ratio: 4 / 3;
}
.frame--11 {
  aspect-ratio: 1 / 1;
}
.frame--32 {
  aspect-ratio: 3 / 2;
}
.frame--169 {
  aspect-ratio: 16 / 9;
}

/* ---------------- 進場動畫 ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------------- 工具類 ---------------- */
.center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}
.mt-s {
  margin-top: 0.75rem;
}
.mt-m {
  margin-top: 1.5rem;
}
.mt-l {
  margin-top: 2.5rem;
}
.mt-xl {
  margin-top: 3.5rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
