/* =========================================================
   鴻儀科技 官網重新設計 — 共用樣式
   設計方向:工業檢測儀器的視覺語彙
   - 深石墨色為主,搭配「熱影像色階」漸層作為唯一的識別簽名
     (深藍 → 青綠 → 琥珀 → 熱橘,對應紅外線熱像儀的溫度色階)
   - 中文採 Noto Sans TC,英文標籤/數據採 JetBrains Mono、
     標題輔以 Space Grotesk,營造「儀器讀數」的技術感
   ========================================================= */

:root {
  /* 色彩系統 */
  --ink: #12181b;
  --ink-soft: #2a3337;
  --paper: #f3f4f1;
  --paper-raised: #ffffff;
  --steel: #5b6670;
  --line: #dcdfda;
  --line-dark: rgba(243, 244, 241, 0.16);

  /* LINE 官方品牌色(LINE Forest Green),專用於「加入 LINE」按鈕 */
  --line-green: #06c755;
  --line-green-dark: #05a648;

  /* 熱影像色階(唯一的識別簽名,節制使用) */
  --thermal-1: #1b3a6b;
  --thermal-2: #1e8c8c;
  --thermal-3: #f2b705;
  --thermal-4: #e8491d;
  /* 上面四色主要用在漸層與大面積色塊;小字標籤改用下面兩個加深版本,確保在淺色底上仍有足夠對比 */
  --thermal-2-text: #146464;
  --thermal-4-text: #b23712;
  --thermal-gradient: linear-gradient(
    90deg,
    var(--thermal-1) 0%,
    var(--thermal-2) 38%,
    var(--thermal-3) 68%,
    var(--thermal-4) 100%
  );

  /* 字體 */
  --font-display: "Space Grotesk", "Noto Sans TC", sans-serif;
  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-mono: "JetBrains Mono", "Noto Sans TC", monospace;

  --container: 1160px;
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; margin: 0 0 .5em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--ink-soft); text-wrap: pretty; }
a { color: inherit; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--thermal-2-text);
  margin: 0 0 .9em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: .75;
  margin: 0 0 1.1em;
}

/* 按鈕 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  cursor: pointer;
}
.btn-primary, .btn-line { font-size: 1.05rem; padding: 10px 20px; border-radius: 10px; }
.btn-primary { background: var(--line-green); color: #fff; }
.btn-primary:hover { background: var(--line-green-dark); }
.btn-line { background: var(--line-green); color: #fff; border-color: var(--line-green); }
.btn-line:hover { background: var(--line-green-dark); border-color: var(--line-green-dark); }
/* btn-bounce 已移除(2026-08-19):原本 hover 時按鈕會無限上下彈跳,
   一直跳的主 CTA 讀起來像廣告橫幅,而且 animation 會蓋掉 .btn 自己的 transition。
   現在改由下方的 cta-ping 聲波環負責 hover 回饋。 */

/* ---- 08 超聲波脈衝 CTA (2026-08-19 新增) --------------------------------
   滑鼠移到主要 CTA 上時,按鈕外圍擴散兩圈聲波環,呼應超聲波檢測。
   未滑過時完全静止,頁面上不會有一直在動的東西。純 CSS、不需改 HTML。
   .btn-line 在 860px 以下用 ::before 畫 LINE 圖示,所以那顆只用 ::after 一圈。
   ---------------------------------------------------------------------- */
.btn-primary, .btn-line { position: relative; }
.btn-primary::before,
.btn-primary::after,
.btn-line::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--line-green);
  pointer-events: none;
  opacity: 0;
}
.btn-primary:hover::before,
.btn-primary:hover::after,
.btn-line:hover::after {
  animation: cta-ping 2.6s cubic-bezier(.2, .6, .3, 1) infinite;
}
.btn-primary:hover::after { animation-delay: 1.3s; }
/* 用 inset 向外推而不是 transform: scale() ——
   按鈕是寬扁形狀,scale 會讓左右擴散得比上下多好幾倍,看起來像只有左右在發散。
   inset 是四邊等距,而且擴散距離固定 14px,不受按鈕寬度影響。 */
@keyframes cta-ping {
  0%        { inset: 0;      opacity: .9; }
  70%, 100% { inset: -14px;  opacity: 0; }
}

/* 次要聯絡管道(電話 / 表單)。深色底用 .btn-outline,淺色底加 --ink */
.btn-outline {
  background: transparent;
  color: var(--paper);
  border-color: rgba(243, 244, 241, .35);
  font-family: var(--font-mono);
  font-size: .95rem;
}
.btn-outline:hover { border-color: var(--thermal-3); color: var(--thermal-3); }
.btn-outline--ink { color: var(--ink); border-color: var(--line); }
.btn-outline--ink:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
/* 2026-08-19:原本 hover 只換邊框顏色,在深色 hero 上還會被 inline style 蓋掉,
   幾乎看不出變化。改用 currentColor —— 深色底就浮白、浅色底就浮黑,
   不用動 HTML 的 inline style 也兩邊都成立。 */
.btn-ghost:hover {
  border-color: currentColor;
  background: color-mix(in oklab, currentColor 12%, transparent);
}
/* 深色區塊(hero / CTA 區)裡的次要按鈕。
   2026-08-19:這兩行原本寫在各頁 HTML 的 inline style 裡,
   inline 優先度高於 CSS,會蓋掉上面的 hover 規則導致滑過沒反應,所以移到這裡統一管。 */
.hero .btn-ghost,
.cta .btn-ghost {
  color: var(--paper);
  border-color: rgba(243, 244, 241, .35);
}

/* =============== Header =============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
}
.nav-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 88px;
}
.logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: .02em;
  white-space: nowrap;
}
/* .logo span 已移除:logo 現在是兩張 <img>,裡面沒有 <span>(2026-08-19) */
.logo-icon { height: 56px; width: auto; display: block; margin-right: 12px; }
.logo-wordmark { height: 46px; width: auto; display: block; }

.main-nav {
  display: flex;
  gap: 26px;
  flex: 1;
  flex-wrap: wrap;
}
.main-nav a {
  color: var(--paper);
  opacity: .72;
  text-decoration: none;
  font-size: .93rem;
  padding: 6px 0;
  position: relative;
  transition: opacity .2s ease;
}
.main-nav a.active,
.main-nav a:hover { opacity: 1; }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--thermal-gradient);
}
.main-nav a.disabled { opacity: .35; cursor: default; pointer-events: none; }

.nav-toggle {
  display: none;
  width: 32px; height: 24px;
  background: none; border: none;
  position: relative;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 2px; background: var(--paper);
}
.nav-toggle::before { top: 0; }
.nav-toggle span { top: 11px; }
.nav-toggle::after { bottom: 0; }

/* 服務項目下拉選單(放在 Responsive 區塊之前,確保手機版 media query 的收合規則不會被這裡的桌機固定欄寬蓋掉) */
.nav-item { position: relative; display: flex; align-items: center; }
.dropdown-trigger {
  background: none;
  border: none;
  font: inherit;
  font-size: .93rem;
  color: var(--paper);
  opacity: .72;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 0;
  position: relative;
}
.dropdown-trigger:hover,
.dropdown-trigger[aria-expanded="true"],
.dropdown-trigger.active { opacity: 1; }
.dropdown-trigger.active::after {
  content: "";
  position: absolute;
  left: 0; right: 16px; bottom: -2px;
  height: 2px;
  background: var(--thermal-gradient);
}
.dropdown-trigger .caret {
  font-size: 1.1em;
  transition: transform .2s ease;
  display: inline-block;
}
.dropdown-trigger[aria-expanded="true"] .caret { transform: rotate(180deg); }

.dropdown-panel {
  position: absolute;
  top: calc(100% + 22px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  border: 1px solid var(--line-dark);
  padding: 28px;
  display: grid;
  grid-template-columns: repeat(3, 180px);
  gap: 30px;
  box-shadow: 0 24px 48px rgba(0,0,0,.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, top .18s ease;
  z-index: 60;
}
.dropdown-panel--brands { grid-template-columns: repeat(2, 150px); }
.dropdown-panel.open { opacity: 1; visibility: visible; top: calc(100% + 14px); }
.dropdown-heading {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--thermal-3);
  margin: 0 0 .9em;
}
.dropdown-col a {
  display: block;
  color: var(--paper);
  opacity: .8;
  text-decoration: none;
  padding: 7px 0;
  font-size: .92rem;
  position: relative;
}
.dropdown-col a:hover { opacity: 1; }
.dropdown-col a.active { opacity: 1; }
.dropdown-col a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--thermal-gradient);
}
.dropdown-col a.disabled { opacity: .35; pointer-events: none; }

/* 深色區塊共用的極淡格線底紋(儀器面板背景感,不搶焦點) */
.hero::before, .cta::before, .site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(243,244,241,.05) 0, rgba(243,244,241,.05) 1px, transparent 1px, transparent 48px),
    repeating-linear-gradient(90deg, rgba(243,244,241,.05) 0, rgba(243,244,241,.05) 1px, transparent 1px, transparent 48px);
  pointer-events: none;
  z-index: 0;
}
.hero > *, .cta > *, .site-footer > * { position: relative; z-index: 1; }

/* =============== Hero =============== */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 96px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero.has-photo {
  background-size: cover;
  background-position: center;
}
.hero-grid { max-width: 760px; }
.hero h1 { color: var(--paper); }
.hero .lede { color: var(--paper); opacity: .78; font-size: 1.08rem; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }

.hero-price-note {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin: 2px 0 14px;
  padding: 6px 18px;
  border: 1px solid var(--line-dark);
  border-left: 3px solid var(--thermal-3);
  background: rgba(243, 244, 241, .06);
}
.hero-price-note .price-cond {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--paper);
  opacity: .7;
}
.hero-price-note .price-num {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  color: var(--thermal-3);
}

/* =============== 麵包屑導覽 =============== */
.breadcrumb-bar {
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
}
.breadcrumb-bar .container { padding-top: 12px; padding-bottom: 12px; }
.breadcrumb-bar ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: .78rem;
}
.breadcrumb-bar li { display: flex; align-items: center; gap: 6px; color: var(--paper); opacity: .6; }
.breadcrumb-bar a { color: var(--paper); text-decoration: none; opacity: .85; }
.breadcrumb-bar a:hover { opacity: 1; color: var(--thermal-3); }
.breadcrumb-bar li[aria-current="page"] { opacity: 1; }
.breadcrumb-bar .sep { opacity: .4; }

/* ---- 02 偵測器游標 (2026-08-19 新增) -------------------------------
   游標變成一支偵測器,經過的地方才亮起來。
   只在有實體滑鼠的裝置上啟用(手機 / 平板完全不啟用),
   且 script.js 會先檢查「減少動態效果」的系統設定。
   光斑位置由 script.js 寫入 --dx / --dy 兩個自訂屬性。
   .hero::before 已經給格線底紋用了,所以這裡用 ::after。
   -------------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  .hero.detector::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity .45s ease;
    mix-blend-mode: screen;
    background: radial-gradient(80px 80px at var(--dx, 50%) var(--dy, 50%),
      rgba(242, 183, 5, .34) 0%,
      rgba(242, 183, 5, .13) 40%,
      transparent 68%);
  }
  .hero.detector.is-tracking::after { opacity: 1; }
}

.scan-line {
  height: 5px;
  width: 100%;
  background: var(--thermal-gradient);
  background-size: 200% 100%;
  margin-top: 56px;
  animation: scan-sweep 6s ease-in-out infinite;
}
@keyframes scan-sweep {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}
/* prefers-reduced-motion 的完整規則已整理到檔案最末端
   (必須放在所有動態規則之後才蓋得掉,尤其是 .js-reveal [data-reveal]) */

/* =============== Clients =============== */
.clients { padding: 40px 0; border-bottom: 1px solid var(--line); }
.client-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 0; padding: 0; }
.client-tags li {
  font-family: var(--font-mono);
  font-size: .85rem;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--steel);
}

/* =============== Intro / stat =============== */
.intro { padding: 84px 0; }
.intro-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
}
.intro h2 { max-width: 480px; }
.intro p { max-width: 500px; }
.intro ul { margin: 0 0 1em; padding-left: 20px; max-width: 500px; }
.intro ul li { margin-bottom: .4em; color: var(--ink-soft); }
.intro ul strong { color: var(--ink); }

.brand-photo-center { text-align: center; margin-top: 24px; }
.brand-photo-center .viewfinder { display: inline-block; margin-top: 0; }

.stat-card {
  background: var(--ink);
  color: var(--paper);
  padding: 40px 32px;
  border-radius: var(--radius);
  border-top: 3px solid transparent;
  border-image: var(--thermal-gradient) 1;
}
.stat-number {
  font-family: var(--font-mono);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--paper);
  margin: 0 0 .3em;
  line-height: 1;
  text-shadow: 0 0 12px rgba(242,183,5,.5), 0 0 28px rgba(242,183,5,.28);
}
.stat-number .unit { font-size: 1.6rem; opacity: .8; }
.stat-label { color: var(--paper); opacity: .75; margin: 0; font-size: .92rem; }

/* =============== Advantages =============== */
.advantages { padding: 0 0 84px; }
.adv-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 40px;
}
.adv-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-weight: 500;
}
/* .adv-list li::before(14px 橫線)已移除:全站每個 li 都有 .adv-icon,
   下方的 :has() 規則本來就把它關掉了,是死碼。(2026-08-19) */
.adv-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--thermal-4-text);
}
.adv-icon svg { width: 22px; height: 22px; }
.adv-list--positive .adv-icon { color: var(--thermal-2-text); }

/* =============== Services overview / detail =============== */
.services-overview, .services-detail { padding: 84px 0; }
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  margin: 32px 0 36px;
  border: 1px solid var(--line);
}
.service-card {
  position: relative;
  overflow: hidden;
  background: var(--paper-raised);
  padding: 30px 26px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.service-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(18,24,27,.08); }
.service-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(30,140,140,.16) 35%, rgba(242,183,5,.22) 60%, transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
.service-card:hover::after { left: 130%; transition: left 1s ease; }
.service-tag {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .12em;
  color: var(--thermal-4-text);
  margin-bottom: .8em;
}
.service-card p:last-child { margin-bottom: 0; font-size: .92rem; }

/* 交流分享文章卡片網格（依分類文章數量調整欄數，避免留空格） */
.article-grid-2, .article-grid-4 {
  display: grid;
  gap: 1px;
  background: var(--line);
  margin: 32px 0 36px;
  border: 1px solid var(--line);
}
.article-grid-2 { grid-template-columns: repeat(2, 1fr); }
.article-grid-4 { grid-template-columns: repeat(4, 1fr); }
.article-grid-1 { grid-template-columns: 1fr; max-width: 360px; }

/* 交流分享列表頁：左文章列表、右分類側欄 */
.news-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  align-items: start;
  margin-top: 32px;
}
.news-list { display: flex; flex-direction: column; }
.news-card {
  display: flex;
  gap: 24px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 100px;
}
.news-card:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.news-card-img-wrap { flex: 0 0 260px; overflow: hidden; border-radius: var(--radius); }
.news-card-img-wrap img { width: 100%; height: 172px; object-fit: cover; display: block; transition: transform .3s ease; }
.news-card:hover .news-card-img-wrap img { transform: scale(1.04); }
.news-card-body { flex: 1; min-width: 0; }
.news-card-body .service-tag { margin-bottom: .6em; }
.news-card-body h3 { margin: 0 0 .4em; font-size: 1.1rem; }
.news-card-body p:last-child { margin: 0; font-size: .92rem; color: var(--steel); }

.news-sidebar { position: sticky; top: 104px; }
.news-sidebar-title { font-family: var(--font-mono); font-size: .82rem; letter-spacing: .1em; color: var(--steel); margin-bottom: 16px; }
.news-cat-list { display: flex; flex-direction: column; gap: 2px; }
.news-cat-list a {
  display: block;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.news-cat-list a:hover { background: var(--paper-raised); color: var(--ink); border-left-color: var(--thermal-2); }

@media (max-width: 860px) {
  .news-layout { grid-template-columns: 1fr; gap: 32px; }
  .news-sidebar { position: static; order: -1; }
  .news-cat-list { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .news-cat-list a { border-left: none; border: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .news-card { flex-direction: column; gap: 14px; }
  .news-card-img-wrap { flex: none; width: 100%; }
  .news-card-img-wrap img { height: 200px; }
}

/* =============== 交流分享文章內文 =============== */
.article-body { max-width: 720px; }
.article-body h2 { margin-top: 1.5em; }
.article-body h3 { margin-top: 1.1em; }
.article-body p { margin: 0 0 1.1em; }
.article-body ul { margin: 0 0 1.2em; padding-left: 20px; }
.article-body li { margin-bottom: .5em; color: var(--ink-soft); }
.article-meta { color: var(--steel); font-family: var(--font-mono); font-size: .85rem; margin: 0 0 .5em; }
.article-hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}
/* 文章首圖跟內文欄同寬（720px）。原本沒有 max-width，會撐滿 container 的 1112px，
   比底下的文字欄寬 392px，3:2 的圖換算高度是 741px，一張圖就佔滿整個筆電螢幕。
   手機版 container 本來就不到 720px，這條在窄螢幕不會生效。 */
.viewfinder.article-hero-wrap { max-width: 720px; margin-bottom: 40px; }

/* ---- 門讀進度條 (2026-08-20 新增) --------------------------------------
   固定在 sticky header 下缘,隨文章本文的錯動進度填滿。
   由 script.js 偵測到 .article-body 後自動插入,所以 13 篇文章一行 HTML 都不用改。
   -------------------------------------------------------------------------- */
.read-progress {
  position: fixed;
  /* 89px = .nav-wrap 88px + border-bottom 1px,貼在 sticky 導覽列下缘不壓到邊框 */
  top: 89px;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 41;
  background: rgba(18, 24, 27, .08);
  pointer-events: none;
}
.read-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--thermal-gradient);
}

/* 觀景窗裝飾框：呼應 LOGO 的取景框意象，套在照片與數據卡片四周 */
.viewfinder { position: relative; }
.viewfinder::before, .viewfinder::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--thermal-3);
  pointer-events: none;
}
.viewfinder::before { top: -8px; left: -8px; border-right: none; border-bottom: none; }
.viewfinder::after { bottom: -8px; right: -8px; border-left: none; border-top: none; }
/* .viewfinder.article-hero-wrap 的 max-width 與 margin-bottom 合併寫在「交流分享文章內文」區塊 */

/* 服務詳細頁 */
.service-block {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 48px;
  padding: 52px 0;
  border-top: 1px solid var(--line);
  align-items: start;
  scroll-margin-top: 104px;
}
.service-block:first-child { border-top: none; }
.service-block .service-tag { margin-bottom: 1em; }
.service-block-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 260px;
  border-radius: var(--radius);
  display: block;
}
.viewfinder.service-block-img-wrap { margin-top: 20px; display: inline-block; }
.service-block > .service-block-img-wrap { margin-top: 0; justify-self: start; }
.intro-grid > .service-block-img-wrap { justify-self: start; }
.service-block > .note-box { grid-column: 1 / -1; }
.service-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 20px; }
.service-cols h3 {
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--steel);
  margin: 0 0 .8em;
  text-transform: uppercase;
}
.service-cols ul { margin: 0; padding-left: 18px; }
.service-cols li { margin-bottom: .5em; color: var(--ink-soft); }

/* =============== 最新資訊：分類圖例／消息清單 =============== */
.update-cat-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 20px 0 48px; }
.update-cat-legend .service-tag { display: inline-block; }
.update-cat-legend p { margin: .4em 0 0; color: var(--ink-soft); }
.update-list { margin-bottom: 56px; }
.update-item { max-width: 720px; padding: 32px 0; border-top: 1px solid var(--line); }
.update-item:first-child { border-top: none; padding-top: 0; }
.update-item h3 { margin: 0 0 .3em; }
.update-date { font-family: var(--font-mono); font-size: .82rem; color: var(--steel); margin-bottom: 1em; }
.update-item p:not(.update-date):not(.service-tag) { margin-bottom: 1em; color: var(--ink-soft); }
.update-item a { color: var(--thermal-2-text); font-weight: 700; text-decoration: none; }
.update-item a:hover { text-decoration: underline; }

/* =============== Brands =============== */
.brands { padding: 0 0 84px; }
.brand-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 14px;
}
.brand-list li {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  letter-spacing: .02em;
  display: flex;
  align-items: center;
}
.brand-list img { height: 60px; width: auto; object-fit: contain; display: block; }
.brand-list a { display: block; transition: opacity .15s ease; }
.brand-list a:hover { opacity: 1; }

/* =============== CTA band =============== */
.cta { background: var(--ink); color: var(--paper); padding: 72px 0; position: relative; overflow: hidden; }
.cta-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { color: var(--paper); max-width: 720px; margin: 0; }

/* =============== Footer =============== */
.site-footer { background: var(--ink); color: var(--paper); padding: 64px 0 28px; position: relative; overflow: hidden; }
.footer-grid {
  display: grid;
  grid-template-columns: .8fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-grid p, .footer-grid a { color: var(--paper); opacity: .78; font-size: .9rem; text-decoration: none; }
.footer-grid a:hover { opacity: 1; }
.footer-grid .footer-brand {
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  opacity: 1;
}
.footer-grid .section-label { color: var(--thermal-3); opacity: 1; font-weight: 700; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid ul li { margin-bottom: .2em; }
/* .footer-grid ul li a 的 padding: 4px 已移除:被下方 .footer-grid a { padding: 9px 0 }
   同特異性、位置在後而完全蓋掉,從未生效。9px 對觸控也比較友善。(2026-08-19) */
.footer-grid ul li a:hover { opacity: 1; text-decoration: underline; }
.footer-grid a { display: block; padding: 9px 0; }
.footer-bottom { padding-top: 24px; font-size: .85rem; opacity: .6; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; color: var(--paper); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--paper); text-decoration: none; padding: 9px 0; }
.footer-bottom-links a:hover { text-decoration: underline; }
.footer-grid a.social-link { display: flex; align-items: center; gap: 10px; }
.footer-grid a.social-link svg { flex-shrink: 0; }

/* =============== Responsive =============== */
@media (max-width: 860px) {
  .site-header .container { padding: 0 16px; }
  .nav-wrap { gap: 12px; }
  .logo { flex-shrink: 0; }
  .logo-icon { height: 40px; margin-right: 8px; }
  .logo-wordmark { height: 33px; }
  .nav-toggle { flex-shrink: 0; }
  .btn-line {
    flex-shrink: 0;
    margin-left: auto;
    width: 44px;
    height: 44px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    justify-content: center;
    font-size: 0;
  }
  .btn-line::before {
    content: "";
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 12a8 8 0 1 1 3.1 6.3L4 20l1.2-3.6A7.96 7.96 0 0 1 4 12Z'/><circle cx='8.5' cy='12' r='.6' fill='white' stroke='none'/><circle cx='12' cy='12' r='.6' fill='white' stroke='none'/><circle cx='15.5' cy='12' r='.6' fill='white' stroke='none'/></svg>") no-repeat center / contain;
  }
  .main-nav { display: none; }
  .nav-toggle { display: block; width: 44px; height: 44px; }
  .nav-toggle span,
  .nav-toggle::before,
  .nav-toggle::after { left: 6px; right: 6px; }
  .nav-toggle::before { top: 10px; }
  .nav-toggle span { top: 21px; }
  .nav-toggle::after { bottom: 10px; }
  .site-header.open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 88px; left: 0; right: 0;
    background: var(--ink);
    padding: 20px 24px 28px;
    gap: 16px;
    border-bottom: 1px solid var(--line-dark);
  }
  .nav-item { width: 100%; flex-direction: column; align-items: flex-start; }
  .dropdown-trigger { width: 100%; justify-content: space-between; padding: 6px 0; }
  .dropdown-panel {
    position: static;
    transform: none;
    top: auto;
    opacity: 1;
    visibility: visible;
    display: none;
    grid-template-columns: 1fr;
    gap: 18px;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 10px 0 4px 14px;
  }
  .dropdown-panel.open { display: grid; }
  .dropdown-panel--brands { grid-template-columns: 1fr; }
  .intro-grid, .service-block { grid-template-columns: 1fr; }
  .update-cat-legend { grid-template-columns: 1fr; gap: 20px; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .service-cols { grid-template-columns: 1fr; }
  .adv-list { grid-template-columns: 1fr; }
  .brand-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .brand-list li { justify-content: center; padding: 14px; }
  .brand-list img { height: auto; max-height: 44px; width: auto; max-width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-grid-2, .article-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .service-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 48px; }
  .article-grid-2, .article-grid-4 { grid-template-columns: 1fr; }
}

/* 捲動淡入(與 js/script.js 的 IntersectionObserver 搭配)
   ---------------------------------------------------------------------------
   2026-08-19 改為「預設可見」:淡入效果改由 <html class="js-reveal"> 開啟。
   script.js 必須在確認 IntersectionObserver 可用後、建立 observer 之前加上:

       document.documentElement.classList.add('js-reveal');

   這樣一來 script.js 載入失敗、被廣告阻擋器攔下、或瀏覽器不支援
   IntersectionObserver 時,內容會照常顯示(只是少了淡入),
   而不是永久停在 opacity: 0 變成空白頁。
   --------------------------------------------------------------------------- */
[data-reveal] { opacity: 1; }
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

/* 清洗前後對比(電櫃清洗頁面使用) */
.before-after-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 32px;
}
.before-after-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.before-after-item { position: relative; overflow: hidden; border-radius: var(--radius); }
.before-after-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.before-after-tag {
  position: absolute;
  top: 10px; left: 10px;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
  padding: 4px 9px;
  border-radius: 2px;
  background: rgba(18, 24, 27, .82);
  color: var(--paper);
}
.before-after-item.is-after .before-after-tag { background: var(--thermal-2); color: #fff; }
@media (max-width: 860px) {
  .before-after-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .before-after-grid { grid-template-columns: 1fr; }
}
/* ---- 清洗前後對比滑桿 (2026-08-20 新增) ------------------------------
   原本是兩張圖並排,現在疊在同一個位置用滑桿刷開。
   拖曳、點擊任意位置、鍵盤左右鍵都可以操作(下層是真的 input[type=range])。
   圖片一律裁成 3:4 並 object-fit: cover,兩張取景不同時仍能對齊。
   -------------------------------------------------------------------------- */
.ba-compare {
  --pos: 50%;
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  touch-action: pan-y;
}
.ba-layer { position: absolute; inset: 0; }
.ba-layer img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-after { clip-path: inset(0 0 0 var(--pos)); }
.ba-layer .before-after-tag { z-index: 2; }
.ba-before .before-after-tag { left: 10px; right: auto; }
.ba-after .before-after-tag { right: 10px; left: auto; background: var(--thermal-2); color: #fff; }

.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--thermal-3);
  z-index: 3;
  pointer-events: none;
}
.ba-handle::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border: 2px solid var(--thermal-3);
  border-radius: 50%;
  background: rgba(18, 24, 27, .72);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}
.ba-handle::before {
  content: "\2039\2003\203A";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-family: var(--font-mono);
  font-size: .9rem;
  line-height: 1;
  color: var(--paper);
}
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  z-index: 4;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.ba-range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 100%; }
.ba-range::-moz-range-thumb { width: 44px; height: 100%; border: none; }
/* 觸控裝置(2026-10-15):停用內建 range 的觸控,改由 script.js 接手,
   手指按在照片任何位置左右滑都能拖、上下滑照常捲動頁面。滑鼠與鍵盤操作不受影響 */
@media (hover: none) and (pointer: coarse) {
  .ba-range { pointer-events: none; }
}
.ba-compare:focus-within { outline: 2px solid var(--thermal-3); outline-offset: 3px; }
@media (max-width: 860px) {
  .ba-handle::after { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
}
.ba-hint {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--font-mono);
  /* .75rem = 12px,對齊 MOBILE-RESPONSIVE-AUDIT 問題5 訂下的小標籤下限 */
  font-size: .75rem;
  letter-spacing: .1em;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 2px;
  background: rgba(18, 24, 27, .82);
  color: var(--paper);
  pointer-events: none;
  transition: opacity .35s ease;
}
.ba-compare.is-touched .ba-hint { opacity: 0; }
.ba-caption {
  margin: 12px 0 0;
  font-size: .88rem;
  color: var(--steel);
  font-family: var(--font-mono);
  line-height: 1.7;
}

/* ---- 品牌牆:平常灰階,hover 才回彩色 (2026-08-20) ---- */
.brand-list img {
  filter: grayscale(1);
  opacity: .85;
  transition: filter .3s ease, opacity .3s ease;
}
.brand-list a:hover img { filter: none; opacity: 1; }

/* ---- 流程步驟:左側連接線 + 依序進場 (2026-08-20) ------------
   進場動畫只在 .js-reveal … .is-visible 下才套用,
   所以 script.js 没跑時步驟是一開始就看得見的。
   -------------------------------------------------------------------------- */
.process-list li { position: relative; }
.process-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 82px;
  bottom: -18px;
  width: 2px;
  background: linear-gradient(180deg, var(--thermal-3), rgba(242, 183, 5, .18));
  transform-origin: top;
}
.process-list li:first-child:not(:last-child)::after { top: 64px; }

@keyframes process-step-in {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes process-line-draw {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
.js-reveal [data-reveal].is-visible .process-list > li {
  animation: process-step-in .5s cubic-bezier(.2, .8, .2, 1) both;
}
.js-reveal [data-reveal].is-visible .process-list > li:not(:last-child)::after {
  animation: process-line-draw .4s ease both;
}
.js-reveal [data-reveal].is-visible .process-list > li:nth-child(1) { animation-delay: .05s; }
.js-reveal [data-reveal].is-visible .process-list > li:nth-child(2) { animation-delay: .17s; }
.js-reveal [data-reveal].is-visible .process-list > li:nth-child(3) { animation-delay: .29s; }
.js-reveal [data-reveal].is-visible .process-list > li:nth-child(4) { animation-delay: .41s; }
.js-reveal [data-reveal].is-visible .process-list > li:nth-child(5) { animation-delay: .53s; }
.js-reveal [data-reveal].is-visible .process-list > li:nth-child(1)::after { animation-delay: .25s; }
.js-reveal [data-reveal].is-visible .process-list > li:nth-child(2)::after { animation-delay: .37s; }
.js-reveal [data-reveal].is-visible .process-list > li:nth-child(3)::after { animation-delay: .49s; }
.js-reveal [data-reveal].is-visible .process-list > li:nth-child(4)::after { animation-delay: .61s; }

/* ---- 實際案例數字 (2026-08-20 新增) ---- */
.case-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 24px 0 18px;
}
.case-stat { background: var(--paper-raised); padding: 28px 24px; }
.case-stat-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--ink);
  margin: 0 0 .45em;
  font-variant-numeric: tabular-nums;
}
.case-stat-num .unit {
  font-size: 1rem;
  color: var(--thermal-4-text);
  margin-left: .3em;
  letter-spacing: .02em;
}
.case-stat-label { margin: 0; font-size: .9rem; color: var(--steel); line-height: 1.7; }
.case-stats-foot { font-size: .88rem; color: var(--steel); margin: 0; }
.case-stats-foot a { color: var(--thermal-2-text); font-weight: 700; text-decoration: none; }
.case-stats-foot a:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .case-stats { grid-template-columns: 1fr; }
  .case-stat { padding: 22px 20px; }
  .case-stat-num { font-size: 2.1rem; }
}

.agent-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 32px;
}
.agent-demo-item { margin: 0; }
.agent-demo-item .viewfinder { display: block; width: fit-content; margin: 0 auto; }
.agent-demo-item img { width: auto; height: auto; max-width: 100%; max-height: 260px; display: block; border-radius: var(--radius); }
.agent-demo-item figcaption { margin-top: 12px; font-size: .88rem; color: var(--steel); }
@media (max-width: 520px) {
  .agent-demo-grid { grid-template-columns: 1fr; }
}

/* 流程步驟清單(電櫃清洗等頁面使用) */
.process-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}
.process-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.process-list li:first-child { border-top: none; padding-top: 0; }
.process-list .step-icon {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.process-list .step-icon svg {
  width: 26px; height: 26px;
  stroke: var(--paper);
  overflow: visible;
}
.process-list .step-num {
  position: absolute;
  bottom: -4px; right: -4px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .78rem;
  color: var(--ink);
  background: var(--thermal-3);
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  display: flex; align-items: center; justify-content: center;
}
.process-list h3 { margin: 0 0 .3em; font-size: 1rem; }
.process-list p { margin: 0; font-size: .92rem; }

/* 誠實提醒框(風險告知等段落使用) */
.note-box {
  border-left: 3px solid var(--thermal-3);
  background: var(--paper-raised);
  padding: 26px 30px;
  margin: 8px 0;
}
.note-box ul { margin: 0 0 1em; padding-left: 18px; }
.note-box li { margin-bottom: .5em; color: var(--ink-soft); }
.note-box p:last-child { margin-bottom: 0; font-weight: 500; }

/* 讓鍵盤操作者看得到焦點 */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--thermal-3);
  outline-offset: 2px;
}


/* =========================================================
   減少動態效果偏好 (prefers-reduced-motion)
   2026-08-19:原本只關掉 scan-line 與 scroll-behavior,
   btn-bounce、cta-ping、data-reveal、service-card 掃光、
   news 圖片放大都沒被關掉。這裡一次補齊。
   必須放在檔案最末端 —— 特異性相同時由後者勝出。
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .scan-line { animation: none; }

  /* 按鈕:不脈衝 */
  .btn { transition: none; }
  .btn-primary::before,
  .btn-primary::after,
  .btn-line::after,
  .btn-primary:hover::before,
  .btn-primary:hover::after,
  .btn-line:hover::after { animation: none; opacity: 0; }

  /* 捲動淡入:直接顯示 */
  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* 卡片浮起與斜向掃光 */
  .service-card { transition: none; }
  .service-card:hover { transform: none; box-shadow: none; }
  .service-card::after { display: none; }
  .service-card:hover::after { transition: none; }

  /* 偵測器游標光斑 */
  .hero.detector::after { display: none; }

  /* 流程步驟依序進場、連接線畫線 */
  .js-reveal [data-reveal].is-visible .process-list > li,
  .js-reveal [data-reveal].is-visible .process-list > li:not(:last-child)::after { animation: none; }

  /* 門讀進度條保留(它是資訊不是裝飾),只抽掉漸變 */
  .read-progress > span { transition: none; }

  /* 品牌牆灰階切換、對比滑桿提示 */
  .brand-list img, .ba-hint { transition: none; }

  /* 文章縮圖放大、下拉展開、觀景窗等其餘轉場 */
  .news-card-img-wrap img,
  .news-card:hover .news-card-img-wrap img { transition: none; transform: none; }
  .dropdown-panel,
  .dropdown-trigger .caret,
  .news-cat-list a,
  .brand-list a,
  .main-nav a { transition: none; }
}
