/* ═══ 全站共用：色票、頁首選單、頁尾 ═══ */
:root {
  --bg: #F7F7F6; --surface: #FFFFFF; --panel: #EDEEEC;
  --ink: #1A2223; --ink-mid: #465557; --ink-soft: #6C7B7D; --line: #E0E2DF;
  --accent: #0C6F75; --accent-soft: #E1EFEF; --cta-ink: #FFFFFF; --heat: #C2551F;
  --f-body: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1415; --surface: #161D1E; --panel: #1A2223; --ink: #E4E9E9; --ink-mid: #C2CFD0;
    --ink-soft: #9CABAC; --line: #2E3839; --accent: #3AB2B8; --accent-soft: #12302F; --cta-ink: #05191B; --heat: #EE8552;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1415; --surface: #161D1E; --panel: #1A2223; --ink: #E4E9E9; --ink-mid: #C2CFD0;
  --ink-soft: #9CABAC; --line: #2E3839; --accent: #3AB2B8; --accent-soft: #12302F; --cta-ink: #05191B; --heat: #EE8552;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); line-height: 1.85; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--accent); color: var(--cta-ink); padding: .5rem 1rem; border-radius: 6px; }

/* ── 頁首 ── */
.sh { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.sh-in { max-width: 72rem; margin: 0 auto; padding: .55rem 1.25rem; display: flex; align-items: center; gap: 1rem; }
.sh-logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; flex: none; }
.sh-logo .chip { background: #241A18; border-radius: 6px; padding: .3rem .5rem; display: flex; }
.sh-logo .chip img { height: 32px; width: auto; display: block; }
.sh-logo .nm { display: block; font-weight: 900; font-size: 1.08rem; line-height: 1.2; letter-spacing: .03em; }
.sh-logo .sb { display: block; font-size: .74rem; color: var(--ink-soft); line-height: 1.3; }
.sh-nav { display: flex; flex-wrap: wrap; gap: .1rem 1.05rem; margin-left: auto; font-size: .95rem; font-weight: 700; }
.sh-nav a { color: var(--ink-mid); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.sh-nav a:hover { color: var(--ink); }
.sh-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.sh-line { flex: none; background: var(--accent); color: var(--cta-ink); font-weight: 700; font-size: .92rem; text-decoration: none; padding: .45rem .9rem; border-radius: 6px; white-space: nowrap; }
.sh-menu { display: none; margin-left: auto; }
.sh-menu summary { list-style: none; cursor: pointer; font-weight: 700; font-size: .95rem; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 6px; }
.sh-menu summary::-webkit-details-marker { display: none; }
.sh-menu[open] summary { background: var(--panel); }
.sh-menu nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 10px 24px rgba(0,0,0,.12); padding: .4rem 1.25rem 1rem; display: grid; }
.sh-menu nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.sh-menu nav a[aria-current="page"] { color: var(--accent); }
.sh-menu nav a.ln { border: 0; margin-top: .8rem; text-align: center; background: var(--accent); color: var(--cta-ink); border-radius: 6px; }
@media (max-width: 1040px) {
  .sh-nav, .sh-line { display: none; }
  .sh-menu { display: block; }
}
:is(a, button, summary, input, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── 頁尾 ── */
.sf { background: var(--panel); border-top: 1px solid var(--line); font-size: .95rem; color: var(--ink-mid); }
.sf-in { max-width: 72rem; margin: 0 auto; padding: 2.8rem 1.25rem 2rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.sf .k { font-size: .78rem; font-weight: 700; letter-spacing: .16em; color: var(--ink-soft); margin-bottom: .5rem; }
.sf a { color: var(--ink-mid); text-decoration: none; }
.sf a:hover { color: var(--accent); }
.sf ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.sf .chip { background: #241A18; border-radius: 6px; padding: .35rem .55rem; display: inline-flex; margin-bottom: .7rem; }
.sf .chip img { height: 36px; width: auto; display: block; }
.sf .co b { color: var(--ink); }
.sf-bot { max-width: 72rem; margin: 0 auto; padding: 1rem 1.25rem 2.2rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-soft); }
@media (max-width: 860px) { .sf-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .sf-in { grid-template-columns: 1fr; } }

/* ── 麵包屑 ── */
.crumb { max-width: 60rem; margin: 0 auto; padding: 1rem 1.75rem 0; font-size: .85rem; color: var(--ink-soft); }
.crumb a { color: var(--ink-soft); }
@media (max-width: 760px) { .crumb { padding: .8rem 1.25rem 0; } }

/* ── 動畫 ── */
@media (prefers-reduced-motion: no-preference) {
  .js-anim .rv { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
  .js-anim .rv.in { opacity: 1; transform: none; }
  .js-anim .scan img { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s cubic-bezier(.4,0,.2,1); transition-delay: var(--d, 0s); }
  .js-anim .scan.in img { clip-path: inset(0 0 0 0); }
  .js-anim .scan .tmk { opacity: 0; transition: opacity .5s ease; }
  .js-anim .scan.in .tmk { opacity: 1; transition-delay: calc(var(--d, 0s) + 1.3s); }
  .hx-bg { animation: xp-kb 16s ease-out both; }
  .hx-in > * { animation: xp-up .9s cubic-bezier(.2,.7,.2,1) both; }
  .hx-in > *:nth-child(2) { animation-delay: .12s; }
  .hx-in > *:nth-child(3) { animation-delay: .24s; }
  .hx-in > *:nth-child(4) { animation-delay: .36s; }
  .doors-wrap .door { animation: xp-up .9s .45s cubic-bezier(.2,.7,.2,1) both; }
  .doors-wrap .door + .door { animation-delay: .57s; }
  .cta, .door, .tool, .proof-more, .sh-line { transition: transform .2s ease, box-shadow .2s ease, border-color .15s ease; }
  .cta:hover, .tool:hover, .proof-more:hover, .sh-line:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.18); }
  .door:hover { transform: translateY(-4px); }
}
@keyframes xp-kb { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes xp-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
