/* =============================================================
   JET OPTO — 新首頁共用基礎（V1/V2/V3 三版本共用）
   header / footer / marquee / 數據列 / 影片 / CTA / 版本切換 dock
   依賴：hero-review.css（排版 tokens）
   ============================================================= */

/* ---------- 正式導航 ---------- */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 120;
  display: flex; align-items: center;
  height: 74px;
  padding: 0 var(--gutter);
  transition: background .45s, box-shadow .45s, transform .5s var(--ease-out);
}
.site-nav.scrolled {
  background: rgba(250, 251, 252, .84);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(16, 22, 30, .07), 0 10px 40px rgba(16, 22, 30, .05);
}
.site-nav.hidden { transform: translateY(-100%); }
.site-nav .brand { display: flex; align-items: center; margin-right: auto; }
.site-nav .brand img { height: 57px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links > .ni { position: relative; }
.nav-links > .ni > a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; color: rgba(16, 22, 30, .72);
  transition: color .3s, background .3s;
}
.nav-links > .ni > a:hover, .nav-links > .ni:focus-within > a { color: #10161e; background: rgba(16, 22, 30, .06); }
/* ── 極小實心三角 caret(2026-07-20 精巧版):5×4px,hover 翻轉染色 ── */
.ni .caret {
  display: inline-block; width: 0; height: 0; margin-left: 1px;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4.5px solid currentColor;
  opacity: .28;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .3s, border-top-color .3s;
}
.ni:hover .caret, .ni:focus-within .caret {
  opacity: 1; transform: rotate(180deg);
  border-top-color: rgb(var(--ckpt-rgb));
}
.ni-drop {
  position: absolute; top: calc(100% + 12px); left: 50%; translate: -50% 0;
  min-width: 212px; padding: 8px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 22, 30, .08);
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(16, 22, 30, .14);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), visibility 0s .3s;
}
.ni:hover .ni-drop, .ni:focus-within .ni-drop { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.ni-drop a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; border-radius: 9px;
  font-size: 14px; font-weight: 500; color: rgba(16, 22, 30, .7);
  transition: background .25s, color .25s, padding-left .25s;
  white-space: nowrap;
}
.ni-drop a:hover { color: #10161e; background: rgba(var(--d-rgb, var(--ckpt-rgb)), .1); padding-left: 18px; }
.ni-drop a i { width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--d-rgb, var(--ckpt-rgb))); flex: none; }

.nav-lang {
  display: flex; gap: 2px; margin-left: 14px; padding: 3px;
  border: 1px solid rgba(16, 22, 30, .18); border-radius: 99px;
}
.nav-lang a {
  padding: 4px 11px; border-radius: 99px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .1em;
  color: rgba(16, 22, 30, .5);
  transition: color .3s, background .3s;
}
.nav-lang a:hover { color: #10161e; }
.nav-lang a.on { background: #10161e; color: #fff; }

/* 行動漢堡 + 全屏選單 */
/* 漢堡按鈕:圓形,兩線絕對置中、僅 transform 動畫,開關原地不位移(2026-07-24,參考 Vigorplus) */
.nav-burger { display: none; margin-left: 12px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(16, 22, 30, .2); place-items: center; z-index: 220; position: relative; }
.nav-burger span { position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; background: transparent; transform: translate(-50%, -50%); }
.nav-burger span::before, .nav-burger span::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; background: #10161e; transition: transform .35s var(--ease-out); }
.nav-burger span::before { transform: translate(-50%, calc(-50% - 5px)); }
.nav-burger span::after { transform: translate(-50%, calc(-50% + 5px)); }
body.menu-open .nav-burger span::before { transform: translate(-50%, -50%) rotate(45deg); }
body.menu-open .nav-burger span::after { transform: translate(-50%, -50%) rotate(-45deg); }
.nav-mobile {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(248, 250, 252, .97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 100px var(--gutter) 40px;
  overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s;
}
body.menu-open .nav-mobile { opacity: 1; visibility: visible; transition-delay: 0s; }
.nav-mobile a { display: block; padding: 14px 0; font-size: 19px; font-weight: 700; color: #10161e; border-bottom: 1px solid rgba(16, 22, 30, .08); }
.nav-mobile a small { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .24em; color: rgba(16, 22, 30, .4); margin-bottom: 2px; }
.nav-mobile .nav-lang { margin: 22px 0 0; display: inline-flex; }

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; }
  /* 語系切換移到漢堡左側（一起靠右），參考 Vigorplus */
  .site-nav .nav-lang { display: inline-flex; margin-left: auto; }
  .nav-mobile .nav-lang { display: none; }  /* 隱藏 overlay 內重複語系 */
}
@media (min-width: 1081px) { .nav-mobile { display: none; } }
/* 選單開啟時,頁首語系切換在深色 overlay 上維持亮色可讀 */
body.menu-open .site-nav .nav-lang { border-color: rgba(255, 255, 255, .28); }
body.menu-open .site-nav .nav-lang a { color: rgba(226, 236, 248, .72); }
body.menu-open .site-nav .nav-lang a.on { background: #eef3fa; color: #0c1016; }

/* ---------- 通用區塊 ---------- */
.sec-pad { padding: clamp(84px, 12vh, 150px) var(--gutter); }
.wrap { max-width: 1440px; margin-inline: auto; }
.sec-no {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .3em;
  color: rgba(16, 22, 30, .42);
  text-transform: uppercase;
}
.sec-no::after { content: ""; flex: 1; height: 1px; background: rgba(16, 22, 30, .12); }
.sec-h {
  margin-top: 22px;
  font-size: clamp(30px, 4.4vw, 62px);
  font-weight: 900; line-height: 1.14; letter-spacing: -.015em;
  color: #10161e;
}
.sec-h em { font-style: normal; background: linear-gradient(100deg, var(--ent), var(--ckpt) 55%, var(--safe)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sec-sub { margin-top: 16px; max-width: 620px; color: rgba(16, 22, 30, .6); font-size: clamp(14.5px, 1.2vw, 17px); line-height: 1.85; }

/* ---------- 客戶 marquee ---------- */
.clients-marquee { overflow: hidden; position: relative; }
.clients-track { display: flex; align-items: center; gap: clamp(40px, 5vw, 90px); width: max-content; animation: cm-flow var(--dur, 42s) linear infinite; padding-block: 24px; }
.clients-marquee.rev .clients-track { animation-direction: reverse; }
.clients-marquee:hover .clients-track { animation-play-state: paused; }
@keyframes cm-flow { to { transform: translateX(-50%); } }
.clients-track img {
  height: clamp(30px, 3.2vw, 44px); width: auto;
  filter: grayscale(1); opacity: .55;
  transition: filter .4s, opacity .4s, transform .4s;
}
.clients-track img:hover { filter: none; opacity: 1; transform: scale(1.08); }

/* ---------- 數據列 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-row .stat { padding: 26px 4px 0; border-top: 2px solid rgba(16, 22, 30, .12); }
.stat-row .stat b {
  display: block;
  font-size: clamp(30px, 3.6vw, 52px); font-weight: 900; letter-spacing: -.02em; line-height: 1;
  color: #10161e;
}
.stat-row .stat b small { font-size: .45em; font-weight: 700; margin-left: 4px; letter-spacing: .04em; }
.stat-row .stat span { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em; color: rgba(16, 22, 30, .48); text-transform: uppercase; }
@media (max-width: 760px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 影片 ---------- */
.video-shell {
  position: relative; max-width: 1180px; margin-inline: auto;
  border-radius: clamp(16px, 2vw, 28px); overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0c1117;
  box-shadow: 0 40px 110px rgba(16, 22, 30, .28);
}
.video-shell iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-shell .vposter {
  position: absolute; inset: 0; cursor: pointer; border: 0; width: 100%;
  background: linear-gradient(140deg, #131a24, #1d2c3d 55%, #10202c);
  display: grid; place-items: center;
}
.video-shell .vposter::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(50% 70% at 70% 30%, rgba(56, 189, 248, .2), transparent 65%),
    radial-gradient(46% 60% at 28% 72%, rgba(240, 111, 167, .13), transparent 65%);
}
.vplay {
  position: relative; width: 92px; height: 92px; border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  border: 1.5px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  transition: transform .45s var(--ease-out), background .35s;
}
.vposter:hover .vplay { transform: scale(1.12); background: rgba(255, 255, 255, .2); }
.vplay::after { content: ""; margin-left: 5px; border-left: 22px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; }
.vposter .vlabel {
  position: absolute; bottom: 26px; left: 0; right: 0; text-align: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .3em; color: rgba(255, 255, 255, .65); text-transform: uppercase;
}

/* ---------- CTA ---------- */
.cta-final { text-align: center; }
.cta-final .sec-h { font-size: clamp(34px, 5vw, 72px); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 40px; }
.cta-actions .hbtn.solid { background: #10161e; color: #fff; border-color: #10161e; box-shadow: 0 12px 36px rgba(16, 22, 30, .25); }
.cta-actions .hbtn.ghost { color: #10161e; border-color: rgba(16, 22, 30, .32); }
.cta-actions .hbtn.ghost:hover { border-color: #10161e; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(16, 22, 30, .1);
  background: #eef1f4;
  padding: clamp(50px, 7vh, 80px) var(--gutter) 0;
}
.footer-grid {
  max-width: 1440px; margin-inline: auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 44px;
  padding-bottom: 48px;
}
.footer-brand img { height: 42px; }
.footer-brand p { margin-top: 16px; max-width: 300px; font-size: 13.5px; line-height: 1.9; color: rgba(16, 22, 30, .55); }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: rgba(16, 22, 30, .45); margin: 0 0 16px; }
.footer-col a { display: block; padding: 5px 0; font-size: 14px; color: rgba(16, 22, 30, .68); transition: color .25s, transform .25s; }
.footer-col a:hover { color: #10161e; transform: translateX(4px); }
.footer-bottom {
  max-width: 1440px; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid rgba(16, 22, 30, .09);
  padding: 20px 0 26px;
  font-size: 12.5px; color: rgba(16, 22, 30, .45);
}
.footer-bottom .tri { display: inline-flex; gap: 6px; }
.footer-bottom .tri i { width: 22px; height: 3px; border-radius: 3px; }
.footer-bottom .tri i:nth-child(1) { background: var(--ent); }
.footer-bottom .tri i:nth-child(2) { background: var(--ckpt); }
.footer-bottom .tri i:nth-child(3) { background: var(--safe); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Reveal 基礎（JS 啟用才隱藏；無 JS 可讀） ---------- */
html.anim [data-rv] { opacity: 0; }
html.no-motion [data-rv] { opacity: 1 !important; transform: none !important; }

/* ---------- 版本切換 dock（審閱期間，選定後移除） ---------- */
.ver-dock {
  position: fixed; right: 18px; bottom: 18px; z-index: 300;
  display: flex; align-items: center; gap: 4px; padding: 5px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(16, 22, 30, .12);
  border-radius: 99px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 34px rgba(16, 22, 30, .16);
  font-family: var(--font-mono);
}
.ver-dock .lbl { padding: 0 4px 0 10px; font-size: 9.5px; letter-spacing: .2em; color: rgba(16, 22, 30, .4); }
.ver-dock a {
  padding: 7px 13px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em;
  color: rgba(16, 22, 30, .55);
  transition: color .3s, background .3s;
}
.ver-dock a:hover { color: #10161e; }
.ver-dock a.on { background: #10161e; color: #fff; }

/* ══ CJK 標題防孤字(2026-07-20) ══ */
html[lang="zh-Hant"] h1, html[lang="zh-Hant"] h2, html[lang="zh-Hant"] h3,
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3 { text-wrap: balance; }

/* ══ Footer 社群連結(2026-07-20) ══ */
.foot-social { display: flex; gap: 10px; margin-top: 18px; }
.foot-social a {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .92);
  transition: border-color .3s, background .3s, color .3s, transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.foot-social a:hover {
  transform: translateY(-3px);
  color: #fff;
  border-color: var(--ckpt, #38BDF8);
  background: rgba(56, 189, 248, .16);
}
.foot-social svg { width: 17px; height: 17px; fill: currentColor; display: block; }

/* ══ 手機選單開啟時,導航列(含漢堡X)提到全屏選單之上,才有明確的關閉入口(2026-07-20) ══ */
body.menu-open .site-nav {
  z-index: 240;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.menu-open .site-nav.hidden { transform: none; }  /* 選單開著時導航不得縮走 */
