:root {
  --ink: #0f1729;
  --ink-soft: #45506a;
  --ink-faint: #8a93a8;
  --line: #e6e9f0;
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --blue: #1f5eff;
  --blue-dark: #1546c8;
  --blue-soft: #eaf0ff;
  --navy: #0b1f4d;
  --green: #15843c;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(16, 30, 60, 0.06);
  --shadow: 0 18px 48px rgba(16, 30, 60, 0.10);
  --shadow-lg: 0 30px 80px rgba(16, 30, 60, 0.16);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container { width: min(1140px, calc(100% - 48px)); margin: 0 auto; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: 0.2px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--blue); text-transform: uppercase; margin-bottom: 16px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 24px; border-radius: 10px; font-size: 15px; font-weight: 700;
  cursor: pointer; border: 1px solid transparent; transition: transform 0.12s, box-shadow 0.12s, background 0.12s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(31, 94, 255, 0.28); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-light { background: #fff; color: var(--navy); }

/* 導覽 */
.nav { position: sticky; top: 0; z-index: 50; transition: background 0.2s, box-shadow 0.2s, border-color 0.2s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(255, 255, 255, 0.85); backdrop-filter: saturate(1.4) blur(12px); border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.nav-brand { font-family: "LXGW WenKai TC", serif; font-size: 24px; font-weight: 700; color: var(--ink); }
.nav-brand span { font-family: "Noto Sans TC", sans-serif; font-size: 13px; font-weight: 500; color: var(--ink-faint); margin-left: 8px; letter-spacing: 1px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { font-size: 15px; color: var(--ink-soft); font-weight: 500; }
.nav-links a:hover { color: var(--blue); }

/* Hero */
.hero { padding: 64px 0 96px; background: radial-gradient(120% 90% at 80% -10%, #eef3ff 0%, transparent 55%), var(--bg); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.hero-copy h1 { font-size: 52px; font-weight: 800; letter-spacing: 0; margin: 14px 0 20px; }
.hero-copy > p { font-size: 17px; color: var(--ink-soft); max-width: 520px; }
.hero-actions { display: flex; gap: 12px; margin: 30px 0 36px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 30px; flex-wrap: wrap; }
.hero-trust div { display: flex; flex-direction: column; }
.hero-trust strong { font-size: 30px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-trust span { font-size: 13px; color: var(--ink-faint); }

/* 視窗 mockup */
.hero-visual { position: relative; }
.window { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.window-bar { display: flex; gap: 7px; padding: 13px 16px; background: #f2f4f9; border-bottom: 1px solid var(--line); }
.window-bar span { width: 11px; height: 11px; border-radius: 50%; background: #d4d9e4; }
.window-bar span:nth-child(1) { background: #ff6157; } .window-bar span:nth-child(2) { background: #ffbd2e; } .window-bar span:nth-child(3) { background: #28c840; }
.window-body { display: grid; grid-template-columns: 116px 1fr; min-height: 320px; }
.mock-side { background: var(--navy); color: #aab8d6; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.mock-brand { font-family: "LXGW WenKai TC", serif; color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.mock-side a { font-size: 12.5px; padding: 7px 8px; border-radius: 7px; color: #aab8d6; }
.mock-side a.active { background: rgba(255, 255, 255, 0.12); color: #fff; }
.mock-main { padding: 18px; }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.mock-stat { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.mock-stat span { display: block; font-size: 11px; color: var(--ink-faint); }
.mock-stat b { font-size: 18px; font-weight: 800; }
.mock-stat.accent b { color: var(--blue); } .mock-stat.good b { color: var(--green); font-size: 15px; }
.mock-chart { height: 90px; margin-bottom: 14px; }
.mock-rows { display: flex; flex-direction: column; gap: 8px; }
.mock-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-soft); padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; }
.mock-row i { width: 8px; height: 8px; border-radius: 50%; background: #ffbd2e; }
.mock-row em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--ink-faint); }
.mock-row em.b { color: var(--blue); }
.card-float {
  position: absolute; left: -28px; bottom: 38px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 12px 16px; display: flex; align-items: center; gap: 11px;
}
.card-float strong { display: block; font-size: 13.5px; } .card-float span { font-size: 12px; color: var(--ink-faint); }
.cf-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(21, 132, 60, 0.16); }

/* Section */
.section { padding: 92px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: 36px; font-weight: 800; margin-bottom: 14px; }
.section-head p { font-size: 16px; color: var(--ink-soft); }

/* 功能格 */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow-sm); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3dcf2; }
.feature h3 { font-size: 17px; margin: 16px 0 8px; }
.feature p { font-size: 14px; color: var(--ink-soft); }
.ficon { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.ficon svg { width: 23px; height: 23px; }

/* 流程 */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.flow li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow-sm); }
.flow-no { font-size: 14px; font-weight: 800; color: var(--blue); letter-spacing: 1px; }
.flow li h3 { font-size: 18px; margin: 10px 0 8px; }
.flow li p { font-size: 14px; color: var(--ink-soft); }

/* split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split.reverse .split-copy { order: 2; }
.split-copy h2 { font-size: 34px; font-weight: 800; margin: 12px 0 18px; }
.split-copy > p { font-size: 16px; color: var(--ink-soft); margin-bottom: 22px; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; font-size: 15px; color: var(--ink); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--blue-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231f5eff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }

/* 貨態 timeline 卡 */
.track-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.track-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.track-head strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.pill-orange { background: #fdf0de; color: #b25e09; }
.track-timeline { list-style: none; margin: 0; padding: 0; }
.track-timeline li { position: relative; padding: 0 0 22px 26px; }
.track-timeline li::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -4px; width: 2px; background: var(--line); }
.track-timeline li:last-child::before { display: none; }
.track-timeline .dot { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--line); transition: all 0.3s; }
.track-timeline li[data-done] .dot { background: var(--blue); border-color: var(--blue); }
.track-timeline li.cur .dot { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 5px var(--blue-soft); }
.track-timeline b { font-size: 14.5px; display: block; }
.track-timeline time { font-size: 12.5px; color: var(--ink-faint); }
.track-timeline li:not([data-done]):not(.cur) b { color: var(--ink-faint); }

/* 報表卡 */
.report-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.rc-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.rc-kpis div { background: var(--bg-alt); border-radius: 12px; padding: 12px 14px; }
.rc-kpis span { font-size: 12px; color: var(--ink-faint); }
.rc-kpis b { display: block; font-size: 20px; font-weight: 800; margin-top: 2px; }
.rc-kpis em { font-size: 12px; font-style: normal; font-weight: 700; }
.rc-kpis em.up { color: var(--green); }
.rc-chart { height: 130px; margin-bottom: 16px; }
.rc-rank { display: flex; flex-direction: column; gap: 10px; }
.rk { display: flex; align-items: center; gap: 10px; }
.rk i { width: 20px; height: 20px; border-radius: 6px; background: var(--blue-soft); color: var(--blue-dark); font-size: 11px; font-weight: 800; font-style: normal; display: flex; align-items: center; justify-content: center; }
.rk span { font-size: 13px; width: 96px; flex-shrink: 0; }
.rk .bar { flex: 1; height: 8px; background: var(--bg-alt); border-radius: 5px; overflow: hidden; }
.rk .bar b { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-dark)); border-radius: 5px; }

/* 每功能標題 + 互動示範 iframe */
.feat-head { max-width: 720px; margin: 0 auto 30px; text-align: center; }
.feat-head h2 { font-size: 34px; font-weight: 800; margin: 14px 0 12px; }
.feat-head p { font-size: 16px; color: var(--ink-soft); margin-bottom: 16px; }
.ticks-inline { display: flex; flex-wrap: wrap; gap: 9px 22px; justify-content: center; }
.ticks-inline li { font-size: 14px; }
.demo-tip { text-align: center; font-size: 13px; color: var(--ink-faint); margin-top: 14px; }
.demo-wrap { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.demo-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #f2f4f9; border-bottom: 1px solid var(--line); }
.demo-bar span { width: 10px; height: 10px; border-radius: 50%; background: #d4d9e4; }
.demo-bar em { margin-left: 8px; font-style: normal; font-size: 13px; color: var(--ink-faint); }
.demo-open { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--blue); }
.demo-frame { display: block; width: 100%; height: 720px; border: 0; background: #f4f6f9; }
@media (max-width: 820px) { .demo-frame { height: 560px; } }

/* 系統畫面一覽 */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.shot { margin: 0; }
.shot-frame { background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #f2f4f9; border-bottom: 1px solid var(--line); }
.shot-bar span { width: 8px; height: 8px; border-radius: 50%; background: #d4d9e4; }
.shot-bar em { margin-left: 8px; font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink-faint); }
.shot-body { padding: 14px; min-height: 188px; }
.shot figcaption { margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); text-align: center; }

.m-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.m-stat { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; }
.m-stat span { display: block; font-size: 10.5px; color: var(--ink-faint); }
.m-stat b { font-size: 16px; font-weight: 800; }
.m-stat.accent b { color: var(--blue); } .m-stat.good b { color: var(--green); font-size: 13px; }

.m-tbl { display: flex; flex-direction: column; gap: 7px; }
.m-tr { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.m-tr span:first-child { font-weight: 500; color: var(--ink); }
.m-tr em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--ink-faint); }
.m-tr .ava { width: 22px; height: 22px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.m-tag { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.m-tag.amber { background: #fdf0de; color: #b25e09; } .m-tag.blue { background: var(--blue-soft); color: var(--blue-dark); }
.m-tag.green { background: #e3f4e9; color: var(--green); } .m-tag.gray { background: #eef0f4; color: var(--ink-soft); }
.m-tag.red { background: #fdeae7; color: #c0392b; } .m-tag.gold { background: #fdecc8; color: #8a5a00; }
.m-tr .m-tag + em { margin-left: 8px; }

.m-chips { display: flex; gap: 6px; margin-bottom: 12px; }
.m-chips i { font-style: normal; font-size: 11.5px; padding: 5px 11px; border-radius: 999px; background: var(--bg-alt); color: var(--ink-soft); }
.m-chips i.on { background: var(--blue); color: #fff; }

/* 抽屜 mock */
.drawer-mock { background: #fff; }
.dm-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.dm-head b { font-size: 15px; }
.dm-card { background: var(--bg-alt); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.dm-t { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; color: var(--ink-faint); margin: 4px 0 9px; }
.dm-kv { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; }
.dm-kv span { color: var(--ink-faint); } .dm-kv b { font-weight: 600; }
.dm-btn { width: 100%; padding: 10px; border: none; border-radius: 9px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; }
.dm-steps { display: flex; gap: 6px; margin-bottom: 14px; }
.dm-steps i { flex: 1; height: 6px; border-radius: 4px; background: var(--line); }
.dm-steps i.d { background: var(--blue); } .dm-steps i.cur { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.dm-tl { list-style: none; margin: 0; padding: 0; }
.dm-tl li { position: relative; padding: 0 0 12px 18px; font-size: 12.5px; color: var(--ink-faint); }
.dm-tl li span { position: absolute; left: 0; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dm-tl li.cur { color: var(--ink); font-weight: 600; } .dm-tl li.cur span { background: var(--blue); }

/* 寄件單 mock */
.label-mock { font-size: 12px; color: var(--ink); }
.lm-type { text-align: center; border: 1px solid var(--ink); border-radius: 4px; padding: 3px; font-weight: 700; margin-bottom: 10px; font-size: 11px; }
.lm-pick { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.lm-big { font-size: 14px; font-weight: 700; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.lm-barcode { height: 38px; margin: 10px 0 4px; background: repeating-linear-gradient(90deg, #111 0 2px, #fff 2px 4px, #111 4px 5px, #fff 5px 9px); }
.lm-row { font-size: 12px; color: var(--ink-soft); }

/* kanban */
.m-kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kb-h { font-size: 11px; font-weight: 700; padding: 6px 8px; border-radius: 7px; margin-bottom: 8px; display: flex; justify-content: space-between; }
.kb-h.blue { background: var(--blue-soft); color: var(--blue-dark); } .kb-h.amber { background: #fdf0de; color: #b25e09; } .kb-h.green { background: #e3f4e9; color: var(--green); }
.kb-c { height: 26px; border: 1px solid var(--line); border-radius: 7px; margin-bottom: 7px; }

.m-chart { height: 96px; }
.m-rank { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.m-rank i { width: 19px; height: 19px; border-radius: 6px; background: var(--blue-soft); color: var(--blue-dark); font-size: 11px; font-weight: 800; font-style: normal; display: flex; align-items: center; justify-content: center; }
.m-rank span { font-size: 12px; width: 80px; flex-shrink: 0; }
.m-rank .b { flex: 1; height: 8px; background: var(--bg-alt); border-radius: 5px; overflow: hidden; }
.m-rank .b u { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-dark)); }

/* 權限 pills */
.perm-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.perm-pills i { font-style: normal; font-size: 11.5px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); }
.perm-pills i.on { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }

/* 設定 toggle row */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.set-row b { display: block; font-size: 13px; } .set-row span { font-size: 11.5px; color: var(--ink-faint); }
.sw { width: 40px; height: 23px; border-radius: 999px; background: var(--line); position: relative; flex-shrink: 0; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: left 0.15s; }
.sw.on { background: var(--blue); } .sw.on::after { left: 20px; }

/* 安全 */
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sec-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow-sm); }
.sec-card h3 { font-size: 18px; margin: 16px 0 8px; }
.sec-card p { font-size: 14px; color: var(--ink-soft); }

/* CTA */
.cta { padding: 84px 0; background: linear-gradient(150deg, #0b1f4d, #1f5eff); }
.cta-inner { text-align: center; color: #fff; }
.cta-inner h2 { font-size: 34px; font-weight: 800; margin-bottom: 12px; }
.cta-inner p { font-size: 16px; color: rgba(255, 255, 255, 0.82); margin-bottom: 26px; }

/* Footer */
.footer { padding: 30px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-brand { font-family: "LXGW WenKai TC", serif; font-size: 18px; font-weight: 700; }
.footer-note { font-size: 13px; color: var(--ink-faint); }

/* 進場動畫（僅在 JS 啟用時隱藏，避免 JS 失敗造成整頁空白） */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* RWD */
@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .sec-grid { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav-links { display: none; }
  .hero-grid, .split, .split.reverse .split-copy { grid-template-columns: 1fr; order: 0; }
  .hero-copy h1 { font-size: 40px; }
  .section { padding: 64px 0; }
  .section-head h2, .split-copy h2, .cta-inner h2 { font-size: 28px; }
  .card-float { display: none; }
}
@media (max-width: 520px) {
  .feature-grid, .flow, .shots { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 33px; }
  .rc-kpis { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
