/* 首頁大圖 A 版（2026-10-20；曾老闆 10/16 參考圖、老闆選 A——決策帳本施工卡 2026-10-20、登記簿 R72）
   來源：evidence/hero-reference-20261016/src/hero-preview.css 的 A 版規則（預覽說明條、B／C 版規則、Google Fonts 已拿掉）。
   只在首頁載入（fields.json pages.home.stylesheets 最後一支）。
   ⚠️ decision.css 把 .hero 的 ::before/::after 全部 display:none !important → 背景一律用真元素（.hx-layer），不用偽元素。
   字型：Noto Sans TC 子集（SIL OFL 1.1，授權檔 /assets/hero-20261020/OFL.txt），只含大圖區的字；
         老闆之後在後台改大圖文字、用到子集沒有的字時，那幾個字會用電腦內建字型顯示（不會缺字）。 */

@font-face { font-family: "JX Hero"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/hero-20261020/noto-sans-tc-hero-500.woff") format("woff"); }
@font-face { font-family: "JX Hero"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/hero-20261020/noto-sans-tc-hero-700.woff") format("woff"); }
@font-face { font-family: "JX Hero"; font-style: normal; font-weight: 900; font-display: swap; src: url("/assets/hero-20261020/noto-sans-tc-hero-900.woff") format("woff"); }

.hx {
  --hx-navy: #00235d;      /* 參考圖大標第一行（取樣） */
  --hx-blue: #0068d4;      /* 參考圖大標第二行（取樣） */
  --hx-ink: #28303d;       /* 參考圖副標（取樣） */
  --hx-body: #4f5764;      /* 參考圖內文（取樣） */
  --hx-btn: #0048ae;       /* 參考圖按鈕（取樣） */
  --hx-link: #0b4aa8;
  --hx-eyebrow: #1d5fbf;
  --hx-sky: #f3f7fc;
  --hx-font: "JX Hero", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ── 骨架 ── */
.site-main .hero.media-hero.launch-hero.hx {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; align-items: center;
  min-height: clamp(560px, calc(100svh - var(--header-h) - 40px), 760px);
  gap: 0; padding: 56px var(--pad) 64px; background: var(--hx-sky); overflow: hidden; isolation: isolate;
}
.hx .hx-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hx .hero-copy { position: relative; z-index: 3; max-width: min(660px, 48vw); padding: 0; align-self: center; }

/* 底圖：老闆給的無字底圖滿版；後台「首頁大圖」換圖時同樣滿版裁切 */
.hx .hx-photo picture { display: block; width: 100%; height: 100%; }
/* 垂直 15%：寬螢幕（1920 以上）底圖會被上下裁，偏上對齊才不會切到最上面那根接頭；1440 以下沒有上下裁 */
.hx .hx-photo img, .hx .hx-photo img[data-cms-media] { display: block; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; object-fit: cover; object-position: 72% 15%; }
.hx .hx-wash { z-index: 1; background: linear-gradient(90deg, #ffffffd0 0%, #ffffffa0 30%, #ffffff00 50%); }

/* ── 字級（照參考圖比例：大標約畫面寬 6%、副標約大標 45%） ── */
.hx .eyebrow { gap: 20px; margin-bottom: 22px; color: var(--hx-eyebrow); font-size: 15px; font-weight: 600; letter-spacing: .36em; }
.hx .eyebrow i { width: 64px; height: 3px; background: var(--hx-eyebrow); }
.hx h1, .hx h1:lang(zh-Hant) { max-width: none; margin: 0 0 18px; color: var(--hx-navy); font-family: var(--hx-font); font-weight: 900; font-size: clamp(46px, 6vw, 92px); line-height: 1.13; letter-spacing: -.005em; }
.hx h1 em { color: var(--hx-blue); font-style: normal; white-space: nowrap; }
.hx h1 em::after { display: none; }
.hx .hero-tagline { margin: 0 0 20px; color: var(--hx-ink); font-family: var(--hx-font); font-weight: 900; font-size: clamp(24px, 2.7vw, 40px); line-height: 1.35; letter-spacing: .01em; }
.hx .hero-lede { max-width: 30em; margin: 0 0 36px; color: var(--hx-body); font-family: var(--hx-font); font-weight: 500; font-size: clamp(16px, 1.45vw, 21px); line-height: 1.72; }
.hx .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 48px; margin-top: 0; }
.hx .button-primary { min-width: 0; min-height: 58px; gap: 18px; justify-content: center; padding: 0 38px; border: 0; border-radius: 4px; background: var(--hx-btn); color: #fff; font-family: var(--hx-font); font-size: 19px; font-weight: 700; letter-spacing: .05em; box-shadow: 0 10px 24px #0048ae2e; }
.hx .button-primary:hover { background: #003a8f; color: #fff; }
.hx .text-link { gap: 14px; border-bottom: 0; padding: 8px 0; color: var(--hx-link); font-family: var(--hx-font); font-size: 19px; font-weight: 700; letter-spacing: .05em; }
.hx .text-link:hover { color: var(--hx-navy); }
.hx .button-primary:focus-visible, .hx .text-link:focus-visible { outline: 3px solid var(--hx-blue); outline-offset: 3px; }
html[lang="en"] .hx h1 { max-width: 13ch; font-size: clamp(38px, 4.3vw, 64px); line-height: 1.06; letter-spacing: -.02em; }
html[lang="en"] .hx h1 em { white-space: normal; }
html[lang="en"] .hx .hero-tagline { font-weight: 900; font-size: clamp(21px, 2vw, 30px); letter-spacing: -.005em; }
html[lang="en"] .hx .hero-lede { font-size: clamp(16px, 1.25vw, 19px); }
html[lang="en"] .hx .button-primary, html[lang="en"] .hx .text-link { letter-spacing: .01em; }

/* ── 小筆電（1200～1279）：文字欄收窄，零件不壓到文字 ── */
@media (max-width: 1279px) and (min-width: 1200px) {
  .hx .hero-copy { max-width: min(520px, 42vw); }
  .hx h1, .hx h1:lang(zh-Hant) { font-size: clamp(46px, 5.6vw, 72px); }
  .hx .hero-lede { max-width: 26em; }
  .hx .hx-wash { background: linear-gradient(90deg, #ffffffd8 0%, #ffffffb4 38%, #ffffff00 58%); }
  .hx .hx-photo img, .hx .hx-photo img[data-cms-media] { object-position: 78% 15%; } /* 右邊那根管件末端不出框 */
}

/* ── 平板與手機（1199 以下）：文字在上、零件在下（底圖換成只裁出零件區的那張，零件整組都看得到）
   原因：寬度不到 1200 時，滿版底圖的零件一定會壓到左邊文字（10/20 實測 768／1024／1100 都壓到） ── */
@media (max-width: 1199px) {
  .site-main .hero.media-hero.launch-hero.hx { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding: 48px var(--pad) 0; }
  .hx .hero-copy { max-width: 640px; }
  .hx .hx-wash { display: none; }
  .hx .hx-layer.hx-photo { position: relative; inset: auto; order: 2; align-self: center; width: min(100%, 820px); aspect-ratio: 924 / 600; margin: 36px 0 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%); }
  .hx .hx-photo img, .hx .hx-photo img[data-cms-media] { object-position: 50% 50%; }
}

/* ── 手機：同上，字級縮小、零件圖滿版到左右邊 ── */
@media (max-width: 767px) {
  .site-main .hero.media-hero.launch-hero.hx { padding: 28px 20px 0; }
  .hx .hero-copy { max-width: none; }
  .hx .eyebrow { gap: 14px; margin-bottom: 16px; font-size: 12px; letter-spacing: .3em; }
  .hx .eyebrow i { width: 40px; height: 2px; }
  .hx h1, .hx h1:lang(zh-Hant) { margin-bottom: 14px; font-size: clamp(36px, 11.2vw, 50px); line-height: 1.16; }
  html[lang="en"] .hx h1 { max-width: none; font-size: clamp(32px, 9.2vw, 44px); }
  .hx .hero-tagline { margin-bottom: 14px; font-size: clamp(20px, 6vw, 26px); }
  .hx .hero-lede { margin-bottom: 24px; font-size: 16px; line-height: 1.7; }
  .hx .hero-actions { gap: 12px 26px; }
  .hx .hero-actions .button { width: auto; min-height: 52px; padding: 0 26px; font-size: 17px; }
  .hx .hero-actions .text-link { font-size: 17px; }
  .hx .hx-layer.hx-photo { align-self: stretch; width: auto; margin: 26px -20px 0; -webkit-mask-image: none; mask-image: none; }
}
