/* ==========================================================================
   Huamao 華楙生技 — 全站樣式
   斷點：桌機 (default) / 平板 max-width 1200px / 手機 max-width 860px
   ========================================================================== */

:root {
  --navy:        #0B1B33;
  --navy-mid:    #123156;
  --blue:        #1B5FE0;
  --cyan:        #00A8E8;
  --cyan-light:  #6FD4FF;
  --bg:          #F6F8FC;
  --bg-alt:      #EDF1F8;
  --text:        #0B1B33;
  --text-muted:  #56657E;
  --text-soft:   #3E4C63;
  --text-faint:  #8B98AC;
  --line:        rgba(11, 27, 51, 0.14);
  --font-zh:     'Noto Sans TC', sans-serif;
  --font-en:     'Barlow Condensed', sans-serif;
  --ease:        cubic-bezier(.22, .8, .28, 1);
  --pad-x:       96px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  font-family: var(--font-zh);
  color: var(--text);
  overflow-x: hidden;
}

a { color: var(--text); text-decoration: none; transition: color 240ms ease; }
a:hover { color: var(--blue); }
img { display: block; }
::selection { background: var(--blue); color: #fff; }

.en { font-family: var(--font-en); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  z-index: 100;
  padding: 12px 24px;
  border-radius: 0 0 12px 12px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  letter-spacing: .1em;
  transform: translateX(-50%);
  transition: top 200ms ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* --------------------------------------------------------------------------
   捲動進場（reveal）
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 820ms var(--ease), transform 940ms var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

/*
 * 交錯的延遲刻意不寫在 CSS 裡，由 site.js 依「實際進場的順序」直接設
 * 行內樣式，進場跑完再清掉。
 *
 * 原本是 .reveal:nth-child(2..5) 各給 100~400ms，有兩個問題：
 *
 * 1. nth-child 數的是 DOM 順序，不是版面上的第幾個。產品列表三欄時
 *    只有前五個有延遲，於是第二排變成「第 6 張最先出現、然後才是
 *    第 4、5 張」。欄數在三個斷點還會變（4/3 → 2 → 1），要寫對就得
 *    每個 grid、每個斷點各來一組規則，跟 grid-template-columns 綁死。
 *
 * 2. transition-delay 是長寫法、權重 (0,2,0)，會蓋過元素自己那條
 *    transition 縮寫裡隱含的 delay: 0s。而 .reveal 常常就掛在卡片本身
 *    （<a class="prod-card reveal">），結果那些卡片的 hover 也要先等
 *    300／400ms 才開始動 —— 看起來就是「頓頓的」。
 *
 * 行內樣式權重最高、又能精準清除，兩個問題一起消失。
 */

/* 進場跑完就把 will-change 收掉：留著等於每個元素都是一個永遠不會
   回收的合成層，一頁十幾張卡片就是十幾層 GPU 記憶體。 */
.reveal.is-done { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* --------------------------------------------------------------------------
   頁首
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 84px;
  padding: 0 44px;
  color: var(--bg);
  background: transparent;
  transition: background 500ms ease, box-shadow 500ms ease, color 500ms ease;
}
.site-header.is-solid {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 1px 0 rgba(11, 27, 51, .12);
  color: var(--navy);
}

.site-header__logo {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(12, 26, 48, .14);
}
.site-header__logo img { height: 30px; width: auto; }

/* 桌機主選單：submenu 純 CSS hover，不需 JS */
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav__item { position: relative; }
.main-nav__link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  color: inherit;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .16em;
  white-space: nowrap;
}
.main-nav__link:hover { color: inherit; }
.main-nav__caret {
  width: 4px; height: 4px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: .7;
}
.main-nav__caret--right {
  border-bottom: 0;
  border-top: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: .6;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  padding: 10px 0;
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 18px 46px rgba(11, 27, 51, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 240ms ease, transform 240ms ease, visibility 240ms;
}
.submenu--nested { top: -10px; left: 100%; min-width: 190px; }
.main-nav__item:hover > .submenu,
.main-nav__item:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }

.submenu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .1em;
  white-space: nowrap;
}
.submenu__link:hover { background: var(--bg-alt); color: var(--blue); }

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.burger span { display: flex; flex-direction: column; gap: 6px; width: 24px; }
.burger i { display: block; height: 1px; background: currentColor; }

/* --------------------------------------------------------------------------
   回到頂端
   -------------------------------------------------------------------------- */

.to-top {
  position: fixed;
  right: 32px; bottom: 32px;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  padding: 0;
  border: 1px solid rgba(27, 95, 224, .22);
  border-radius: 50%;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  color: var(--blue);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 320ms ease, transform 320ms ease, background 260ms ease, color 260ms ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.to-top i {
  display: block;
  width: 11px; height: 11px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg) translate(1px, 1px);
}

/* --------------------------------------------------------------------------
   語言切換（Google 翻譯）
   -------------------------------------------------------------------------- */

/* 只給輔助技術讀的文字 */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.lang {
  position: fixed;
  left: 32px; bottom: 32px;
  /* 跟「回到頂端」同一層：手機選單打開時（遮罩 70、抽屜 80）要被蓋住，
     不能浮在上面 */
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 14px;
  height: 44px;
  border: 1px solid rgba(27, 95, 224, .22);
  border-radius: 22px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(11, 27, 51, .1);
}
.lang[hidden] { display: none; }

.lang__label { display: flex; align-items: center; color: var(--blue); }

/* 地球：一個圓加上兩條經緯線 */
.lang__icon {
  position: relative;
  display: block;
  width: 15px; height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.lang__icon::before,
.lang__icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.lang__icon::before { border-width: 0 1.5px; border-radius: 50%; transform: scaleX(.45); }
.lang__icon::after  { border-width: 1.5px 0; border-radius: 0; transform: scaleY(.02); top: 50%; }

.lang__select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0 30px 0 4px;
  border: 0;
  background: transparent;
  /* 自己畫的箭頭：原生的樣式在各瀏覽器差很多 */
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) center, calc(100% - 10px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--navy);
  font-family: inherit;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .06em;
  line-height: 44px;
  cursor: pointer;
}
.lang__select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* Google 自己的介面全部藏掉：我們只把它當翻譯引擎，UI 用自己的 */
#google_translate_element { display: none; }
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-icon,
.goog-logo-link,
body > .skiptranslate { display: none !important; }
.goog-te-gadget { color: transparent !important; }

/* 翻譯啟用時 Google 會把 body 往下推 40px 空出它的橫幅，
   但橫幅已經被藏掉了，不推回來整頁會歪 */
body { top: 0 !important; }

@media (max-width: 860px) {
  .lang { left: 16px; bottom: 16px; height: 40px; padding: 0 4px 0 12px; }
  .lang__select { font-size: 13px; line-height: 40px; }
}

/* --------------------------------------------------------------------------
   手機抽屜選單
   -------------------------------------------------------------------------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  opacity: 0;
  background: rgba(12, 26, 48, .34);
  backdrop-filter: blur(10px) saturate(120%);
  transition: opacity 400ms ease;
}
.scrim.is-shown { display: block; }
.scrim.is-open { opacity: 1; }

.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: 86vw;
  max-width: 380px;
  background: #fff;
  box-shadow: 8px 0 40px rgba(11, 27, 51, .18);
  transform: translateX(-100%);
  transition: transform 460ms cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
}
.drawer.is-open { transform: none; }

.drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(11, 27, 51, .12);
}
.drawer__top img { height: 28px; width: auto; }
.drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 1px solid rgba(11, 27, 51, .10);
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--navy);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.drawer__close:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

.drawer__nav { display: flex; flex-direction: column; padding: 8px 0 40px; }
.drawer__phone {
  padding: 20px 20px 0;
  font-family: var(--font-en);
  font-size: 14px;
  letter-spacing: .24em;
  color: var(--text-faint);
}

.acc { display: flex; flex-direction: column; }
.acc--l1 { border-bottom: 1px solid rgba(11, 27, 51, .08); }
.acc__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acc__link {
  flex: 1;
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .14em;
}
.acc__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}
.acc__panel { display: none; flex-direction: column; padding: 2px 0 10px; background: #F4F7FC; }
.acc__panel.is-open { display: flex; }

.acc--l2 .acc__link { padding: 13px 20px 13px 34px; font-size: 14px; font-weight: 300; letter-spacing: .12em; color: #3A4A63; }
.acc--l2 .acc__toggle { width: 46px; height: 44px; font-size: 16px; }
.acc--l2 .acc__panel { padding: 2px 0 8px; background: #E9EFF9; }
.acc--l3 .acc__link { padding: 12px 20px 12px 48px; font-size: 13px; font-weight: 300; letter-spacing: .1em; color: #5A6779; }

.btn-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 26px 20px 0;
  padding: 15px 20px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--blue) 0%, var(--cyan) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .16em;
  box-shadow: 0 8px 22px rgba(27, 95, 224, .28);
  transition: box-shadow 260ms ease, transform 260ms ease;
}
.btn-pill:hover { color: #fff; box-shadow: 0 12px 28px rgba(27, 95, 224, .38); transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   主視覺
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  background: var(--navy);
}
.hero__track { position: absolute; inset: -12% 0; cursor: grab; }
.hero__track.is-dragging { cursor: grabbing; }
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 1100ms var(--ease);
}
.hero__slide.is-active { opacity: 1; z-index: 2; }
.hero__slide img,
.hero__slide video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: var(--navy);
}
/* 與 .banner__tint 同一套原則：只在文字處壓深，不替底圖上色。
   原本底部是 rgba(27,95,224,.42) 的飽和藍，會把輪播圖的下半部整片染藍。 */
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 55% at 50% 50%,
      rgba(11,27,51,.44) 0%, rgba(11,27,51,.20) 58%, rgba(11,27,51,0) 100%),
    linear-gradient(180deg,
      rgba(11,27,51,.56) 0%, rgba(11,27,51,.12) 26%, rgba(11,27,51,0) 46%),
    linear-gradient(0deg,
      rgba(11,27,51,.38) 0%, rgba(11,27,51,0) 26%);
}
.hero__body {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  place-items: center;
  /* 同 .banner__body：輪播圖也是後台可換的，亮度不可預期 */
  text-shadow: 0 1px 2px rgba(11,27,51,.30), 0 2px 18px rgba(11,27,51,.45);
  padding: 0 40px;
  text-align: center;
  color: var(--bg);
  pointer-events: none;
}
.hero__caption {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}
.hero__caption.is-active { opacity: 1; transform: none; transition-delay: 260ms; }
.hero__title {
  margin: 0;
  font-size: 46px;
  font-weight: 200;
  letter-spacing: .42em;
  text-indent: .42em;
  line-height: 1.8;
}
.hero__lead {
  margin: 0;
  max-width: 540px;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: .18em;
  line-height: 2.4;
  color: rgba(248, 250, 253, .86);
}

.hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border: 1px solid rgba(246, 248, 252, .4);
  border-radius: 50%;
  background: rgba(11, 27, 51, .22);
  backdrop-filter: blur(6px);
  color: var(--bg);
  font-size: 17px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 260ms ease, border-color 260ms ease;
}
.hero__arrow:hover { background: rgba(11, 27, 51, .5); border-color: rgba(246, 248, 252, .85); }
.hero__arrow--prev { left: 30px; }
.hero__arrow--next { right: 30px; }

.hero__dots {
  position: absolute;
  left: 50%; bottom: 40px;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 12px;
  transform: translateX(-50%);
}
.hero__dot {
  width: 26px; height: 2px;
  padding: 0;
  border: 0;
  background: rgba(246, 248, 252, .35);
  cursor: pointer;
  transition: background 300ms ease;
}
.hero__dot.is-active { background: var(--bg); }
.hero__nav[hidden] { display: none; }

.hero__cue {
  position: absolute;
  left: 50%; bottom: 86px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}
.hero__cue span {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: .3em;
  color: rgba(248, 250, 253, .7);
}
.hero__cue i {
  display: block;
  width: 1px; height: 40px;
  background: rgba(248, 250, 253, .45);
  animation: scrollcue 2.2s ease-in-out infinite;
}
@keyframes scrollcue {
  0%   { transform: translateY(-6px); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* --------------------------------------------------------------------------
   通用區塊
   -------------------------------------------------------------------------- */

.section { padding: 0 var(--pad-x) 150px; background: var(--bg); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 46px;
  border-bottom: 1px solid rgba(11, 27, 51, .16);
}
.section-head__text { display: flex; flex-direction: column; gap: 14px; }
.eyebrow { font-family: var(--font-en); font-size: 12px; letter-spacing: .4em; color: var(--cyan); }
.section-head h2, .h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: .1em;
}
.link-underline {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--navy);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .18em;
  white-space: nowrap;
  transition: border-color 240ms ease, color 240ms ease;
}
.link-underline:hover { border-color: var(--blue); }

/* 開場敘述 */
.intro {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  /* 直向 30px 是 eyebrow 與下面那一列的距離，橫向 88px 是兩欄的間距 */
  gap: 30px 88px;
  align-items: start;
  padding: 130px var(--pad-x) 110px;
  background: var(--bg);
}

/* eyebrow 自己佔滿一列，標題與內文才會落在同一列的頂端對齊。
   原本是靠 .intro p 的 padding-top:10px 手調，標題字級一改就歪。 */
.intro__eyebrow { grid-column: 1 / -1; position: relative; padding-left: 34px; }
.intro__eyebrow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 22px;
  height: 1px;
  background: var(--cyan);
}

.intro__heading {
  margin: 0;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: .06em;
  /* 原本 1.9。34px 的標題配上那個行距，兩行會讀成兩句話而不是一句話。
     中文顯示字級是該比西文鬆，但 1.45 才是這個字級該有的密度。 */
  line-height: 1.45;
  /* 讓瀏覽器把兩行拆得平均，不必在文案裡手寫斷行 */
  text-wrap: balance;
}

.intro__body {
  /* 短導言貼在大標旁邊時，行距要比長篇內文密一點，整塊才讀得成一個單位。
     長篇文章（.rich-text 預設 2.5）維持原本的編輯風格，不動它。 */
  line-height: 2.15;
}

/* 品牌故事 */
/* gap 取代原本那條虛線 —— 兩段之間的距離本來完全靠它撐著
   （150px 高 + 上下各 60px margin）。純留白不需要那麼多，
   150px 已經分得開，又不會斷成兩個區塊。 */
.story { display: flex; flex-direction: column; gap: 150px; padding: 90px 0 40px; background: var(--bg); }
.story__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
  padding: 0 var(--pad-x);
}
/* 圖左文右。DOM 順序永遠是「文字 → 圖片」，這裡用 order 對調 ——
   手機單欄堆疊時把 order 歸零就會回到一致的「文字在上、圖片在下」。 */
.story__row--media-first .story__text  { order: 2; }
.story__row--media-first .story__media { order: 1; }

.story__text { display: flex; flex-direction: column; gap: 22px; padding-bottom: 40px; }
/* 上下錯落：文字與圖片不齊頭，版面比較有呼吸。這跟對齊方向無關，
   所以綁在 row 的左右配置上，不再跟 text-align 混在同一個 class 裡。 */
.story__row--media-first .story__text { padding-bottom: 0; padding-top: 40px; }

/* 文字對齊獨立設定。原本 .story__text--right 同時決定「文字在哪一欄」與
   「靠哪邊對齊」，兩件事綁在一起，開放自由選左右之後就會出現連續幾段
   靠右對齊的中文長段落。 */
.story__text--right { text-align: right; }

.story__text h3 { margin: 0; font-size: 30px; font-weight: 500; letter-spacing: .08em; line-height: 1.8; }
.story__text p {
  margin: 0;
  font-size: 14px;
  font-weight: 300;
  line-height: 2.5;
  letter-spacing: .05em;
  color: var(--text-muted);
  text-wrap: pretty;
}
.story__text .link-underline { align-self: flex-start; margin-top: 8px; border-bottom-width: 1px; }
.story__media { position: relative; overflow: hidden; }
.story__media--portrait  { aspect-ratio: 4 / 5; }
.story__media--square    { aspect-ratio: 1 / 1; }
.story__media--landscape { aspect-ratio: 16 / 9; }
.story__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }

/* 數據 */
.numbers {
  position: relative;
  margin-top: 120px;
  padding: 130px 48px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-mid) 52%, var(--blue) 100%);
  color: #fff;
}
.numbers__bg { position: absolute; inset: -18% 0; }
.numbers__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.numbers__tint { position: absolute; inset: 0; background: var(--navy); opacity: .52; }
.numbers__tint--soft {
  opacity: 1;
  background: linear-gradient(180deg, rgba(11,27,51,.45) 0%, rgba(11,27,51,.06) 45%, rgba(11,27,51,.5) 100%);
}
.numbers__head {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.numbers__head .eyebrow { color: var(--cyan-light); }
.numbers__head h2 { margin: 0; font-size: 34px; font-weight: 500; letter-spacing: .1em; }
.numbers__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 66px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 44px 24px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(6px);
}
.stat__value { font-family: var(--font-en); font-size: 66px; font-weight: 300; line-height: 1; color: var(--cyan-light); }
.stat__label { font-size: 13px; font-weight: 300; letter-spacing: .22em; color: rgba(255, 255, 255, .78); }

/* 認證 */
.certs { padding: 150px var(--pad-x); background: var(--bg); }
.certs__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.certs__head p {
  margin: 0;
  max-width: 520px;
  font-size: 14px;
  font-weight: 300;
  line-height: 2.4;
  letter-spacing: .05em;
  color: var(--text-muted);
  text-wrap: pretty;
}
.certs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 72px;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(11, 27, 51, .06);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(11, 27, 51, .05);
  transition: transform 340ms var(--ease), box-shadow 340ms ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(11, 27, 51, .12); }
.card__media { position: relative; overflow: hidden; background: var(--bg-alt); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media--16x9 { aspect-ratio: 16 / 9; }
.card__media--3x2 { aspect-ratio: 3 / 2; }
.card__body { display: flex; flex-direction: column; gap: 12px; padding: 24px 26px 28px; }
.card__title { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: .1em; line-height: 1.6; color: var(--navy); }
.card__text {
  margin: 0;
  font-size: 15px;
  font-weight: 300;
  line-height: 2.1;
  letter-spacing: .03em;
  color: var(--text-soft);
  text-wrap: pretty;
}
.card__date { font-family: var(--font-en); font-size: 13px; letter-spacing: .24em; color: var(--cyan); }
.card--news .card__body { padding: 26px 26px 30px; }
.card--news .card__title { font-size: 20px; font-weight: 400; letter-spacing: .06em; line-height: 1.8; }

/* 產品系列 */
.series__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 56px;
  align-items: start;
}
.series-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 400px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--navy);
  transition: transform 340ms var(--ease), box-shadow 340ms ease;
}
.series-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(11, 27, 51, .22); }
.series-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.series-card__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,27,51,0) 35%, rgba(11,27,51,.82) 100%);
}
.series-card__body { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 8px; padding: 28px; }
.series-card__en { font-family: var(--font-en); font-size: 11px; letter-spacing: .3em; color: rgba(246, 248, 252, .72); }
.series-card__name { font-size: 21px; font-weight: 500; letter-spacing: .12em; color: #fff; }

/* 消息 */
.news__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 56px;
  align-items: stretch;
}

/* 聯絡 */
.contact {
  position: relative;
  overflow: hidden;
  padding: 160px var(--pad-x);
  background: var(--navy);
  color: #fff;
}
.contact__bg { position: absolute; inset: -20% 0; }
.contact__bg img { width: 100%; height: 100%; object-fit: cover; }
/* 這一段是刻意的深色區塊，但原本最深到 90%，底圖幾乎完全看不見 ——
   那就沒有放圖的意義了。降到看得出紋理、文字又仍然清楚的程度，
   並把結尾的飽和藍換成中性深藍。 */
.contact__tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(0,168,232,.16) 0%, transparent 55%),
    linear-gradient(120deg, rgba(11,27,51,.82) 0%, rgba(11,27,51,.58) 48%, rgba(11,27,51,.72) 100%);
}
.contact__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
}
.contact__body .eyebrow { color: rgba(255, 255, 255, .78); }
.contact__body h2 { margin: 0; font-size: 38px; font-weight: 500; letter-spacing: .1em; line-height: 1.8; }
.contact__body p {
  margin: 0;
  max-width: 520px;
  font-size: 14px;
  font-weight: 300;
  line-height: 2.4;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .88);
  text-wrap: pretty;
}
.contact__actions { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.btn-solid {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 38px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .2em;
}
.btn-solid:hover { background: #fff; color: var(--navy); }
.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 34px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-en);
  font-size: 16px;
  letter-spacing: .2em;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* 地圖 + 聯絡資訊 */
.map { display: grid; grid-template-columns: 1.15fr .85fr; align-items: stretch; background: var(--bg); }
.map__frame { position: relative; min-height: 440px; }
.map__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.map__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: 72px 64px;
  background: var(--blue);
  color: #fff;
}
.map__logo {
  display: flex;
  align-items: center;
  align-self: flex-start;
  padding: 12px 20px;
  border-radius: 16px;
  background: #fff;
}
.map__logo img { height: 40px; width: auto; }
.map__rows { display: flex; flex-direction: column; gap: 16px; }
.map__row { display: flex; align-items: baseline; gap: 12px; }
.map__key { min-width: 44px; font-size: 14px; font-weight: 300; letter-spacing: .12em; color: rgba(255, 255, 255, .72); }
.map__val { font-size: 15px; font-weight: 300; line-height: 1.9; letter-spacing: .04em; color: #fff; }
.map__val--en { font-family: var(--font-en); font-size: 22px; letter-spacing: .12em; }
.map__val--mail { word-break: break-all; }
a.map__val:hover { color: #C9DCFF; }
.map__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 14px 28px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .16em;
}
.map__cta:hover { background: #fff; color: var(--blue); }

/* 頁尾 */
.site-footer { padding: 96px var(--pad-x) 40px; background: var(--bg-alt); color: var(--navy); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.site-footer__col { display: flex; flex-direction: column; gap: 14px; }
.site-footer__brand { gap: 18px; }
.site-footer__brand img { height: 32px; width: auto; align-self: flex-start; }
.site-footer__brand p {
  margin: 0;
  max-width: 300px;
  font-size: 13px;
  font-weight: 300;
  line-height: 2.3;
  letter-spacing: .04em;
  color: var(--text-muted);
  text-wrap: pretty;
}
.site-footer h4 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .26em;
  color: var(--cyan);
  white-space: nowrap;
}
.site-footer__col a,
.site-footer__col span {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: .1em;
  color: var(--text-muted);
}
/* 電話與電郵是連結，但不希望它們看起來像頁尾的導覽連結 ——
   用底線標示可點，hover 才變色 */
.site-footer__contact {
  text-decoration: underline;
  text-decoration-color: rgba(11, 27, 51, .22);
  text-underline-offset: 4px;
  transition: color 220ms ease, text-decoration-color 220ms ease;
}
.site-footer__contact:hover {
  color: var(--blue);
  text-decoration-color: currentColor;
}

.drawer__phone { transition: color 220ms ease; }
a.drawer__phone:hover { color: var(--blue); }

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
}
.site-footer__bottom span { font-size: 12px; font-weight: 300; letter-spacing: .1em; color: var(--text-faint); }
.site-footer__bottom .en { letter-spacing: .3em; }

/* --------------------------------------------------------------------------
   平板 ≤ 1200px
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  :root { --pad-x: 48px; }

  .intro { grid-template-columns: 1fr; gap: 22px; padding: 90px var(--pad-x) 70px; }
  .story { gap: 110px; }
  .story__row { gap: 44px; }
  .certs { padding: 100px var(--pad-x); }
  .certs__grid { gap: 16px; margin-top: 52px; }
  .section { padding: 0 var(--pad-x) 100px; }
  .series__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
  .series-card { height: 300px; }
  .news__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }
  .map { grid-template-columns: 1fr; }
  .map__info { padding: 52px 48px; }
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
}

/* --------------------------------------------------------------------------
   手機 ≤ 860px
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  :root { --pad-x: 24px; }

  .site-header { height: 64px; padding: 0 20px; }
  .site-header__logo { padding: 7px 12px; border-radius: 12px; }
  .site-header__logo img { height: 22px; }
  .main-nav { display: none; }
  .burger { display: flex; }

  .to-top { right: 18px; bottom: 18px; width: 46px; height: 46px; }

  .hero { height: 88vh; min-height: 520px; }
  .hero__body { padding: 0 24px; }
  .hero__caption { gap: 22px; }
  .hero__title { font-size: 26px; letter-spacing: .28em; text-indent: .28em; }
  .hero__lead { font-size: 13px; letter-spacing: .12em; line-height: 2.1; }
  .hero__arrow { width: 40px; height: 40px; font-size: 14px; }
  .hero__arrow--prev { left: 12px; }
  .hero__arrow--next { right: 12px; }
  .hero__dots { bottom: 22px; gap: 9px; }
  .hero__cue { bottom: 56px; }

  .intro { gap: 18px; padding: 72px var(--pad-x) 60px; }
  .intro__heading { font-size: 25px; }
  .intro__body { font-size: 14px; line-height: 2.05; }


  .story { gap: 64px; padding: 50px 0 20px; }
  .story__row { grid-template-columns: 1fr; gap: 24px; }

  /* 單欄堆疊時左右沒有意義，order 歸零回到 DOM 順序 ——
     每一段都是「標題與文字在上、圖片在下」，各段節奏一致。 */
  .story__row--media-first .story__text,
  .story__row--media-first .story__media { order: 0; }

  /* 錯落的 padding 在單欄下只會變成多餘的空白 */
  .story__text,
  .story__row--media-first .story__text { gap: 14px; padding-top: 0; padding-bottom: 0; }

  /* 窄螢幕靠右對齊的中文很難讀，一律靠左 */
  .story__text--right { text-align: left; }

  .story__text h3 { font-size: 23px; }
  .story__text p { line-height: 2.2; }

  /* 手機上直式圖原本是 3/4，比桌機的 4/5 更高（1.33 vs 1.25 倍寬），
     整段幾乎佔滿一個螢幕。改回 4/5，並加上高度上限當保險 ——
     不管選哪種比例，單張圖都不該把整個畫面吃掉。 */
  .story__media--portrait { aspect-ratio: 4 / 5; }
  .story__media { max-height: 560px; }
  .story__media img { border-radius: 10px; }

  /* 連結在單欄下與文字齊頭 */
  .story__text .link-underline { margin-top: 2px; }
  /* 手機關閉視差，避免圖片被推出容器 */
  [data-parallax] { transform: none !important; }

  .numbers { margin-top: 60px; padding: 72px var(--pad-x); }
  .numbers__head h2 { font-size: 25px; }
  .numbers__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 40px; }
  .stat { padding: 28px 12px; gap: 6px; border-radius: 14px; }
  .stat__value { font-size: 42px; }
  .stat__label { font-size: 12px; letter-spacing: .14em; }

  .certs { padding: 76px var(--pad-x); }
  .certs__grid { grid-template-columns: 1fr; gap: 14px; margin-top: 40px; }
  .section { padding: 0 var(--pad-x) 76px; }
  .section-head { padding-bottom: 24px; gap: 20px; }
  .section-head h2, .h2 { font-size: 25px; }
  .link-underline { font-size: 13px; }

  .card { border-radius: 16px; }
  .card__body { padding: 14px 14px 18px; gap: 8px; }
  .card__title { font-size: 16px; letter-spacing: .04em; }
  .card__text { font-size: 14px; line-height: 1.9; }
  .card--news .card__body { padding: 20px 18px 24px; gap: 10px; }
  .card--news .card__title { font-size: 18px; }
  .card__media--16x9 { aspect-ratio: 16 / 10; }

  .series__grid { grid-template-columns: 1fr; gap: 14px; margin-top: 32px; }
  .series-card { height: 210px; border-radius: 14px; }
  .series-card__body { padding: 20px; }
  .series-card__name { font-size: 18px; }

  .news__grid { grid-template-columns: 1fr; gap: 16px; margin-top: 36px; }

  .contact { padding: 84px var(--pad-x); }
  .contact__body h2 { font-size: 26px; }
  .contact__actions { flex-direction: column; gap: 12px; width: 100%; }
  .contact__actions > * { width: 100%; }

  .map__frame { min-height: 300px; }
  .map__info { padding: 44px var(--pad-x); gap: 22px; }
  .map__logo img { height: 32px; }
  .map__cta { align-self: stretch; }

  .site-footer { padding: 60px var(--pad-x) 30px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 34px; padding-bottom: 34px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ==========================================================================
   富文字段落（後台編輯器產出的內容）
   標籤白名單見 App\Support\RichText::ALLOWED，這裡負責它們的長相。

   放在 site.css 而不是 pages.css：首頁的開場敘述也用同一組樣式，
   而首頁只載入 site.css。
   ========================================================================== */

.rich-text {
  font-size: 15px;
  font-weight: 300;
  line-height: 2.5;
  letter-spacing: .05em;
  color: var(--text-muted);
  text-wrap: pretty;
}

.rich-text > *:first-child { margin-top: 0; }
.rich-text > *:last-child  { margin-bottom: 0; }

.rich-text p { margin: 0 0 26px; }

.rich-text h2,
.rich-text h3,
.rich-text h4 {
  margin: 40px 0 18px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: .06em;
  color: var(--text);
}
.rich-text h2 { font-size: 22px; }
.rich-text h3 { font-size: 19px; }
.rich-text h4 { font-size: 17px; }

.rich-text strong, .rich-text b { font-weight: 500; color: var(--text); }
.rich-text em, .rich-text i    { font-style: italic; }
.rich-text u                   { text-decoration: underline; text-underline-offset: .25em; }
.rich-text s                   { text-decoration: line-through; color: var(--text-faint); }

.rich-text a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.rich-text a:hover { color: var(--cyan); }

.rich-text ul,
.rich-text ol { margin: 0 0 26px; padding-left: 1.7em; }
.rich-text li { margin-bottom: 6px; }

.rich-text blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 26px;
  border-left: 2px solid var(--blue);
  font-size: 17px;
  line-height: 2.2;
  letter-spacing: .06em;
  color: var(--text-soft);
}

/* 插入的圖片與影片一律撐滿段落寬度。
   刻意用 CSS 而不是行內 style：行內樣式會被 HTMLPurifier 清掉，
   而且版面本來就該由樣式表統一控制，不該讓每一篇文章各自寫死寬度。 */
.rich-text img,
.rich-text video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 32px 0;
  border-radius: 14px;
  background: var(--bg-alt);
}

.rich-text video { aspect-ratio: 16 / 9; object-fit: cover; }

@media (max-width: 860px) {
  .rich-text { line-height: 2.3; }
  .rich-text img, .rich-text video { margin: 24px 0; border-radius: 10px; }
}
