/* 訊速科技官網 — 品牌色取自名片 */
:root {
  --navy: #14305C;
  --navy-2: #0E2447;
  --navy-3: #1C3E73;
  --blue: #2BA3E0;
  --blue-d: #1B86BE;
  --gold: #F5B800;
  --line: #06C755;
  --line-d: #05A847;
  --ink: #16233A;
  --ink-2: #4A5872;
  --muted: #7A8699;
  --bg: #FFFFFF;
  --bg-alt: #F3F6FB;
  --border: #DFE5EF;
  --card: #FFFFFF;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 36, 71, .06), 0 8px 24px rgba(16, 36, 71, .06);
  --font: "Noto Sans TC", "Inter", system-ui, -apple-system, "Microsoft JhengHei", sans-serif;
  --font-en: "Inter", "Noto Sans TC", system-ui, sans-serif;
  --hdr: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.75; font-size: 16px; }
img, svg, iframe { max-width: 100%; display: block; }
a { color: var(--blue-d); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, Consolas, monospace; background: var(--bg-alt); padding: .1em .4em; border-radius: 4px; font-size: .92em; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }
.center { text-align: center; }
.mt { margin-top: 2rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }

.ico { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: -.25em; }
.ico.sm { width: 1em; height: 1em; vertical-align: -.15em; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.4em; border-radius: 999px;
  font-weight: 700; font-size: 1rem; border: 2px solid transparent; cursor: pointer; transition: .15s; line-height: 1.2;
  font-family: inherit; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.sm { padding: .5em 1em; font-size: .9rem; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-d); }
.btn-primary[disabled] { opacity: .6; cursor: wait; transform: none; }
.btn-line { background: var(--line); color: #fff; }
.btn-line:hover { background: var(--line-d); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.16); }
.btn-outline { color: var(--navy); border-color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.more { display: inline-flex; align-items: center; gap: .35em; font-weight: 700; color: var(--blue-d); }

/* ---------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(20, 48, 92, .97); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08); }
.hdr { display: flex; align-items: center; justify-content: space-between; height: var(--hdr); gap: 16px; }
.logo { display: flex; align-items: baseline; gap: 10px; color: #fff; }
.logo:hover { text-decoration: none; }
.logo-en { font-family: var(--font-en); font-weight: 600; font-size: 1.4rem; letter-spacing: -.01em; }
.logo-en i { font-style: normal; color: var(--blue); font-weight: 400; }
.logo-zh { font-weight: 700; letter-spacing: .3em; font-size: 1rem; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: #DCE5F3; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.nav .nav-line { color: #fff; margin-left: 8px; }
.nav .nav-line:hover { background: var(--line-d); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.nav-toggle .ico { width: 28px; height: 28px; }

/* ---------- hero */
.hero { background:
    radial-gradient(1000px 500px at 85% 10%, rgba(43,163,224,.22), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; padding: 72px 0 40px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
.hero-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; position: relative; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 700; letter-spacing: .01em; }
.hero .hl { color: var(--gold); display: inline-block; }
.eyebrow { font-family: var(--font-en); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 600;
  color: var(--blue); margin-bottom: .6em; }
.lead { font-size: 1.1rem; color: var(--ink-2); }
.hero .lead, .page-hero .lead { color: #C9D3E3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6rem 0 1.2rem; }
.hero-actions.center { justify-content: center; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: #C9D3E3; font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: 6px; }
.hero-points .ico { color: var(--gold); }

.hero-visual { display: flex; justify-content: center; }
.orbit { position: relative; width: min(380px, 80vw); aspect-ratio: 1; border-radius: 50%;
  border: 1px dashed rgba(255,255,255,.18); }
.orbit::before { content: ""; position: absolute; inset: 18%; border-radius: 50%; border: 1px solid rgba(43,163,224,.35); }
.core { position: absolute; inset: 33%; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(circle at 35% 30%, var(--navy-3), var(--navy-2)); box-shadow: 0 0 60px rgba(43,163,224,.35);
  font-family: var(--font-en); font-weight: 600; font-size: 1.25rem; line-height: 1.1; }
.core i { font-style: normal; color: var(--blue); font-weight: 400; }
.node { position: absolute; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 16px; display: grid; place-items: center;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); color: var(--gold); }
.node .ico { width: 28px; height: 28px; }
.n1 { left: 50%; top: 0; } .n2 { left: 93.3%; top: 25%; } .n3 { left: 93.3%; top: 75%; }
.n4 { left: 50%; top: 100%; color: var(--blue); } .n5 { left: 6.7%; top: 75%; color: var(--blue); } .n6 { left: 6.7%; top: 25%; color: var(--blue); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 56px; background: rgba(255,255,255,.12);
  border-radius: var(--radius); overflow: hidden; position: relative; }
.stat { background: var(--navy-2); padding: 20px; text-align: center; }
.stat b { display: block; font-family: var(--font-en); font-size: 2rem; color: #fff; line-height: 1.2; }
.stat span { color: #A9B6CC; font-size: .9rem; }

/* ---------- page hero */
.page-hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 48px 0 44px; }
.page-hero.tall { padding: 110px 0; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.page-hero .lead a { color: var(--gold); }
.crumb { font-size: .85rem; color: #A9B6CC; margin-bottom: 1rem; }
.crumb a { color: #C9D3E3; }
.ph-row { display: flex; gap: 20px; align-items: flex-start; }

/* ---------- sections */
.sec { padding: 72px 0; }
.sec.alt { background: var(--bg-alt); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.sec-head p { color: var(--ink-2); }
.h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
.h3 { font-size: 1.3rem; }
.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }

.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.15rem; }
.card p { color: var(--ink-2); margin-bottom: .6em; }
.card p:last-child { margin-bottom: 0; }
a.card { color: inherit; display: block; transition: .15s; }
a.card:hover { text-decoration: none; border-color: var(--blue); transform: translateY(-3px); }

.svc-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: var(--gold); }
.svc-ico .ico { width: 26px; height: 26px; }
.svc-ico.lg { width: 72px; height: 72px; flex: none; border: 1px solid rgba(255,255,255,.18); }
.svc-ico.lg .ico { width: 36px; height: 36px; }
.svc-card { position: relative; }
.badge { position: absolute; top: 20px; right: 20px; font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: #FFF4CC; color: #8A6700; }
.badge.new { background: #DFF2FC; color: #0F6E9E; }

.why .card { text-align: left; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; counter-reset: s; }
.steps li { position: relative; padding: 20px 16px; background: var(--bg-alt); border-radius: var(--radius); }
.steps b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--gold);
  font-family: var(--font-en); margin-bottom: 10px; }
.steps h3 { font-size: 1.05rem; margin-bottom: .25em; }
.steps p { font-size: .9rem; color: var(--ink-2); margin: 0; }

/* cases */
.case-card { display: flex; flex-direction: column; }
.case-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 10px; font-size: .8rem; }
.tag { background: var(--navy); color: #fff; padding: 2px 10px; border-radius: 999px; font-weight: 700; }
.client { color: var(--muted); }
.case-card dl { margin: 0 0 1rem; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .92rem; flex: 1; }
.case-card dt { font-weight: 700; color: var(--navy); }
.case-card dd { margin: 0; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chips.center { justify-content: center; margin-bottom: 0; }
.chip { border: 1px solid var(--border); background: #fff; color: var(--ink); padding: 6px 16px; border-radius: 999px;
  font-size: .92rem; cursor: pointer; font-family: inherit; }
.chip:hover { border-color: var(--blue); text-decoration: none; }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.case-card[hidden] { display: none; }

/* service page */
.pain-list, .check-list, .num-list { padding: 0; margin: 0; }
.pain-list, .check-list { list-style: none; }
.pain-list li, .check-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.pain-list li:last-child, .check-list li:last-child { border-bottom: 0; }
.pain-list .ico { color: #D9822B; margin-top: .3em; }
.check-list .ico { color: var(--line-d); margin-top: .3em; }
.num-list { padding-left: 1.3em; }
.num-list li { margin-bottom: .5em; }
.fit h3 { margin-bottom: .2em; }
.item h3 { display: flex; gap: 8px; align-items: flex-start; }
.item h3 .ico { color: var(--blue); margin-top: .15em; }
.combo h3 { color: var(--navy); }

/* faq */
.faq details { border: 1px solid var(--border); border-radius: 12px; background: #fff; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--blue); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 16px; margin: 0; color: var(--ink-2); }

/* support */
.channel .more { margin-top: .5rem; }
.channel.line .svc-ico { background: var(--line); color: #fff; }
.emerg h3 { display: flex; gap: 8px; align-items: center; color: var(--navy); }
.emerg h3 .ico { color: #D9822B; }
.emerg ol { margin: 0; padding-left: 1.3em; color: var(--ink-2); }
.emerg li { margin-bottom: .35em; }

/* forms */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.form input, .form select, .form textarea { font: inherit; font-size: 16px; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.form .invalid { border-color: #D64545; background: #FFF7F7; }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form label.check input { width: auto; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute !important; left: -9999px !important; }
.form button { justify-self: start; }
.form-result:empty { display: none; }
.form-result { padding: 16px; border-radius: 10px; }
.form-result.ok { background: #EAF8EF; border: 1px solid #9BD8B1; }
.form-result.err { background: #FFF4E5; border: 1px solid #F2C27A; }
.form-result .ticket { font-family: var(--font-en); font-size: 1.4rem; font-weight: 700; color: var(--navy); display: block; margin: .25em 0; }

/* contact */
.contact-side { display: grid; gap: 20px; }
.line-card { background: #F0FBF4; border-color: #BDE8CC; }
.line-card h3 { display: flex; gap: 8px; align-items: center; color: var(--line-d); }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.contact-list .ico { margin-top: .3em; }
.contact-list.big { font-size: 1.05rem; }
.contact-list.big .ico { color: var(--blue); }
.map { padding: 0; overflow: hidden; }
.map iframe { width: 100%; height: 260px; border: 0; }

/* about */
.company table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.company th, .company td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.company th { width: 6.5em; color: var(--muted); font-weight: 500; }
.tech-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tech-cloud span { background: #fff; border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; font-size: .92rem;
  font-family: var(--font-en); color: var(--navy); }

.prose h2 { font-size: 1.2rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.3em; }

/* cta band */
.cta-band { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-3) 100%); color: #fff; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: 1.7rem; margin-bottom: .25em; }
.cta-band p { color: #C9D3E3; margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* footer */
.site-footer { background: #0A1B36; color: #A9B6CC; padding: 56px 0 24px; font-size: .92rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1em; }
.site-footer a { color: #C9D3E3; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ftr { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.5fr; gap: 32px; }
.ftr-brand .logo { margin-bottom: .8em; }
.ftr .muted { color: #7F8DA6; }
.copy { border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 20px; font-size: .82rem; color: #7F8DA6; }

/* floating contact */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 10px; }
.fab-btn { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: .15s; }
.fab-btn:hover { transform: scale(1.06); text-decoration: none; }
.fab-btn .ico { width: 26px; height: 26px; }
.fab-btn span { display: none; }
.fab-line { background: var(--line); }
.fab-tel { background: var(--blue); }
.fab-form { background: var(--navy); border: 1px solid rgba(255,255,255,.2); }

/* ---------- responsive */
@media (max-width: 1024px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .ftr { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; top: var(--hdr); left: 0; right: 0; bottom: 0; background: var(--navy-2); flex-direction: column;
    align-items: stretch; padding: 16px 20px; gap: 0; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility 0s .2s; }
  .nav.open { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s; }
  .nav a { padding: 14px 8px; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); padding-left: 14px; }
  .nav .nav-line { margin: 16px 0 0; justify-content: center; border-radius: 999px; border: 0; }
  .hero-inner, .two { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { padding-bottom: 64px; }
  .wrap { padding: 0 16px; }
  .logo-zh { display: none; }
  .hero { padding: 48px 0 32px; }
  .sec { padding: 52px 0; }
  .g2, .g3, .g4, .row2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .ftr { grid-template-columns: 1fr; }
  .ph-row { flex-direction: column; gap: 12px; }
  .svc-ico.lg { width: 56px; height: 56px; }
  .hero-actions .btn, .cta-actions .btn { flex: 1 1 100%; }
  .form button { justify-self: stretch; }
  /* 手機改為底部固定三格 */
  .fab { left: 0; right: 0; bottom: 0; grid-template-columns: repeat(3, 1fr); gap: 0; box-shadow: 0 -4px 16px rgba(0,0,0,.15); }
  .fab-btn { width: auto; height: 60px; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; gap: 2px;
    align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; }
  .fab-btn:hover { transform: none; }
  .fab-btn .ico { width: 22px; height: 22px; }
  .fab-btn span { display: block; }
  .fab-form { border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   P1.5 動畫元件（全部 CSS 驅動；JS 只切換 class／data-step）
   ===================================================================== */

/* ---------- 捲動淡入：JS 只對「還沒進入畫面」的元素加 .pre，避免閃爍 */
.pre { opacity: 0; transform: translateY(24px); }
.reveal-in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }

/* ---------- Hero 資料流 */
.flow { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow line { stroke: var(--blue); stroke-width: .5; stroke-dasharray: 1.5 2.5; opacity: .75; animation: flow 1.6s linear infinite; }
.flow line:nth-child(2n) { animation-duration: 2.1s; stroke: var(--gold); opacity: .6; }
@keyframes flow { to { stroke-dashoffset: -8; } }
.node { animation: node 4s ease-in-out infinite; }
.n2 { animation-delay: .6s; } .n3 { animation-delay: 1.2s; } .n4 { animation-delay: 1.8s; } .n5 { animation-delay: 2.4s; } .n6 { animation-delay: 3s; }
@keyframes node { 0%, 100% { box-shadow: 0 0 0 0 rgba(43,163,224,0); } 50% { box-shadow: 0 0 0 8px rgba(43,163,224,.15); } }
.core { animation: core 3s ease-in-out infinite; }
@keyframes core { 50% { box-shadow: 0 0 90px rgba(43,163,224,.55); } }

/* ---------- 服務流程時間軸（捲到時依序點亮） */
.steps { position: relative; }
.steps li { z-index: 1; }
.steps b { position: relative; z-index: 2; }
.steps.lit li { animation: stepIn .5s both; }
.steps.lit li:nth-child(2) { animation-delay: .25s; } .steps.lit li:nth-child(3) { animation-delay: .5s; }
.steps.lit li:nth-child(4) { animation-delay: .75s; } .steps.lit li:nth-child(5) { animation-delay: 1s; } .steps.lit li:nth-child(6) { animation-delay: 1.25s; }
.steps.lit li b { animation: stepDot .5s both; animation-delay: inherit; }
@keyframes stepIn { from { opacity: .25; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes stepDot { from { background: #C9D3E3; color: #fff; } to { background: var(--navy); color: var(--gold); } }
.steps::before { content: ""; position: absolute; left: 16px; right: 16px; top: 38px; height: 3px; background: var(--border); }
.steps::after { content: ""; position: absolute; left: 16px; top: 38px; height: 3px; width: 0; background: linear-gradient(90deg, var(--blue), var(--gold)); transition: width 1.6s ease; }
.steps.lit::after { width: calc(100% - 32px); }

/* ---------- viz 共用 */
.viz { background: linear-gradient(160deg, #0F2648, #17386A); border-radius: 12px; padding: 14px; margin: -8px -8px 16px; color: #DCE5F3; position: relative; }
.viz-stage { min-height: 150px; display: flex; flex-direction: column; justify-content: center; }
.viz-switch { display: inline-flex; background: rgba(255,255,255,.08); border-radius: 999px; padding: 3px; margin-bottom: 10px; }
.viz-switch button { font: inherit; font-size: .78rem; font-weight: 700; border: 0; background: none; color: #A9B6CC; padding: 6px 14px; min-height: 32px; border-radius: 999px; cursor: pointer; transition: .3s; }
.viz-switch .vb { background: #D9534F; color: #fff; }
.viz.after .viz-switch .vb { background: none; color: #A9B6CC; }
.viz.after .viz-switch .va { background: var(--line); color: #fff; }
.viz-cap { margin: 8px 0 0; font-size: .82rem; min-height: 1.4em; position: relative; }
.viz-cap span { transition: opacity .4s; }
.viz-cap .va { position: absolute; left: 0; top: 0; opacity: 0; color: #7EE2A8; }
.viz-cap .vb { color: #FFB3B0; }
.viz.after .viz-cap .vb { opacity: 0; }
.viz.after .viz-cap .va { opacity: 1; }

/* meter */
.meter-top, .chart-top { display: flex; justify-content: space-between; align-items: baseline; font-size: .85rem; margin-bottom: 8px; }
.meter-num { font-family: var(--font-en); font-size: 2rem; color: #FF7B76; transition: color .6s; }
.viz.after .meter-num { color: #7EE2A8; }
.meter-track { height: 16px; background: rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #F5B800, #E5534B); transition: width 1.2s cubic-bezier(.3,.7,.2,1), background .6s; }
.viz.after .meter-fill { background: linear-gradient(90deg, #2BA3E0, #06C755); }
.meter-scale { display: flex; justify-content: space-between; font-size: .72rem; color: #7F8DA6; margin-top: 4px; font-family: var(--font-en); }

/* chart */
.chart { width: 100%; height: auto; }
.chart .grid line { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.chart .ax { fill: #7F8DA6; font-size: 8px; text-anchor: end; font-family: var(--font-en); }
.chart polyline { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-dasharray: 1; transition: stroke-dashoffset 1.4s ease, opacity .6s; }
.chart .pb { stroke: #FF7B76; stroke-dashoffset: 0; }
.chart .pa { stroke: #7EE2A8; stroke-dashoffset: 1; }
.viz.after .chart .pb { opacity: .15; }
.viz.after .chart .pa { stroke-dashoffset: 0; }

/* mesh */
.mesh { width: 100%; height: auto; }
.mesh .floor { stroke: rgba(255,255,255,.08); stroke-dasharray: 4 4; }
.mesh .l { stroke-width: 1.4; stroke-dasharray: 1; transition: stroke-dashoffset 1s ease, opacity .5s; }
.mesh .lb .l { stroke: #FFB3B0; stroke-dashoffset: 0; opacity: .8; }
.mesh .la .l { stroke: #7EE2A8; stroke-dashoffset: 1; }
.viz.after .mesh .lb .l { opacity: 0; }
.viz.after .mesh .la .l { stroke-dashoffset: 0; }
.mesh .e { fill: #8C9AB3; transition: fill .6s .4s; }
.mesh .e.far { fill: #5A6880; stroke: #E5534B; stroke-width: 1.5; }
.viz.after .mesh .e { fill: #7EE2A8; stroke: none; }
.mesh .r { fill: var(--blue); opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.3); transition: .5s; }
.viz.after .mesh .r { opacity: 1; transform: none; }
.mesh .c { fill: var(--gold); }
.mesh .ct { fill: var(--navy); font-size: 10px; font-weight: 700; text-anchor: middle; font-family: var(--font-en); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .72rem; color: #A9B6CC; margin-top: 4px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.lg-c { background: var(--gold); } .legend .lg-r { background: var(--blue); border-radius: 2px; } .lg-e { background: #7EE2A8; }

/* status */
.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.status-list li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; background: rgba(255,255,255,.05); border-radius: 8px; padding: 8px 10px; font-size: .85rem; }
.status-list .dot { width: 10px; height: 10px; border-radius: 50%; background: #E5534B; box-shadow: 0 0 0 3px rgba(229,83,75,.2); transition: .4s; }
.status-list .v { display: grid; text-align: right; font-weight: 700; }
.status-list em { font-style: normal; grid-area: 1 / 1; transition: opacity .35s; }
.status-list .vb { color: #FFB3B0; }
.status-list .va { color: #7EE2A8; opacity: 0; }
.viz.after .status-list .dot { background: var(--line); box-shadow: 0 0 0 3px rgba(6,199,85,.2); }
.viz.after .status-list .vb { opacity: 0; }
.viz.after .status-list .va { opacity: 1; }
.status-list li:nth-child(2) * { transition-delay: .15s; } .status-list li:nth-child(3) * { transition-delay: .3s; }
.status-list li:nth-child(4) * { transition-delay: .45s; } .status-list li:nth-child(5) * { transition-delay: .6s; }

/* shade */
.shade { width: 100%; height: auto; }
.shade .f { fill: transparent; stroke: #A9B6CC; stroke-width: 1; stroke-dasharray: 3 2; transition: fill 1s, stroke .6s; }
.shade .light { fill: url(#sh-lt); opacity: 0; transition: opacity 1.2s .5s; }
.viz.after .shade .f { stroke: rgba(0,0,0,.15); stroke-dasharray: none; }
.viz.after .shade .wl { fill: url(#sh-wl); } .viz.after .shade .wr { fill: url(#sh-wr); } .viz.after .shade .fl { fill: url(#sh-fl); }
.viz.after .shade .win { fill: #BFE3F7; } .viz.after .shade .sofa { fill: #3D5A80; } .viz.after .shade .sofa2 { fill: #2E4766; }
.viz.after .shade .tbl { fill: #F4F1EA; } .viz.after .shade .light { opacity: .7; }

/* phone */
.viz-phone { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.phone { width: 200px; aspect-ratio: 9 / 18; background: #0A0F18; border-radius: 28px; padding: 9px; box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 0 0 2px #2A3345; }
.viz-phone.big .phone { width: 250px; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 20px; overflow: hidden; background: #8CABD9; }
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; transform: translateX(16px); transition: opacity .45s, transform .45s; background: #8CABD9; font-size: 11px; color: #111; }
.scr.on { opacity: 1; transform: none; }
.ph-head { background: #1F2A3A; color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 22px 12px 8px; font-size: 12px; }
.bub { max-width: 82%; margin: 8px 10px 0; padding: 7px 10px; border-radius: 14px; background: #fff; line-height: 1.45; }
.bub.me { align-self: flex-end; background: #A6E57E; }
.scr.on .bub { animation: pop .4s both; }
.scr.on .bub + .bub { animation-delay: .6s; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.96); } }
.ph-menu { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #CBD5E1; }
.ph-menu span { background: #F7F9FC; padding: 14px 4px; text-align: center; font-weight: 700; font-size: 10.5px; }
.ph-menu span.hi { background: var(--line); color: #fff; }
.scr.on .ph-menu span.hi, .scr.on .ph-btn { animation: tap 1.4s .5s both; }
@keyframes tap { 0%, 55% { transform: none; } 65% { transform: scale(.92); filter: brightness(.85); } 100% { transform: none; } }
.ph-form, .ph-list { background: #fff; flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.ph-form label { display: grid; gap: 3px; font-size: 10px; color: #667; }
.fld { border: 1px solid #D5DCE6; border-radius: 6px; padding: 6px 8px; color: #111; font-size: 11px; }
.ph-btn { margin-top: auto; background: var(--line); color: #fff; text-align: center; padding: 9px; border-radius: 999px; font-weight: 700; }
.pl-row { display: flex; justify-content: space-between; border: 1px solid #E3E8EF; border-radius: 8px; padding: 10px 8px; }
.pl-row.sel { border-color: var(--line); background: #EEFBF3; }
.ph-done { flex: 1; background: #fff; display: grid; place-content: center; text-align: center; gap: 4px; padding: 12px; }
.ph-done .ok { width: 54px; height: 54px; margin: 0 auto 6px; border-radius: 50%; background: var(--line); color: #fff; font-size: 28px; display: grid; place-items: center; }
.scr.on .ph-done .ok, .scr.on .ph-unlock { animation: pop .5s .3s both; }
.ph-done b { font-size: 14px; } .ph-done p { color: #667; margin: 0; }
.ph-unlock { margin: auto 12px 14px; background: #fff; border-radius: 12px; padding: 14px; text-align: center; font-weight: 700; }
.ph-unlock span { display: block; font-size: 30px; }
.step-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.step-dots button { font: inherit; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05);
  color: #A9B6CC; padding: 5px 10px 5px 5px; min-height: 36px; border-radius: 999px; font-size: .75rem; cursor: pointer; transition: .3s; }
.step-dots b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); font-family: var(--font-en); }
.step-dots button.on { color: #fff; border-color: var(--line); }
.step-dots button.on b { background: var(--line); }
.demo .viz { margin: 0; padding: 24px; }
.demo-row { align-items: center; }

/* 監控儀表板 */
.dash { background: #0B1A33; border-radius: 10px; padding: 12px; position: relative; overflow: hidden; }
.dash-head { display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: 10px; }
.live { color: #7EE2A8; font-family: var(--font-en); font-size: .72rem; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-bottom: 44px; }
.hc { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; padding: 10px; font-size: .78rem; display: grid; gap: 2px; align-content: start; transition: .4s; min-height: 78px; }
.hc i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); box-shadow: 0 0 0 3px rgba(6,199,85,.18); }
.hc b { color: #fff; } .hc .ok-t { color: #A9B6CC; }
.hc .bad-t, .hc .fix-t { display: none; }
.viz-dash[data-step="1"] .hc1, .viz-dash[data-step="2"] .hc1 { border-color: #E5534B; background: rgba(229,83,75,.14); animation: shake .5s; }
.viz-dash[data-step="1"] .hc1 i, .viz-dash[data-step="2"] .hc1 i { background: #E5534B; box-shadow: 0 0 0 3px rgba(229,83,75,.25); }
.viz-dash[data-step="1"] .hc1 .ok-t, .viz-dash[data-step="2"] .hc1 .ok-t, .viz-dash[data-step="3"] .hc1 .ok-t { display: none; }
.viz-dash[data-step="1"] .hc1 .bad-t, .viz-dash[data-step="2"] .hc1 .bad-t { display: block; color: #FFB3B0; }
.viz-dash[data-step="3"] .hc1 .fix-t { display: block; color: #7EE2A8; }
.viz-dash[data-step="3"] .hc1 { border-color: var(--line); }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.toast { position: absolute; left: 12px; right: 12px; bottom: 12px; background: #fff; color: var(--ink); border-radius: 8px; padding: 8px 12px; font-size: .8rem; font-weight: 700;
  transform: translateY(160%); transition: transform .45s cubic-bezier(.3,.7,.2,1.2); }
.viz-dash[data-step="2"] .toast { transform: none; }
.hidden-steps { display: none; }
.viz-dash .step-dots { margin-top: 12px; }

/* 工單進度 */
.viz-ticket { margin: 12px 0 16px; padding: 14px 16px; }
.tk-no { font-size: .82rem; margin-bottom: 10px; }
.tk-no code { background: rgba(255,255,255,.1); color: #fff; }
.tk { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tk li { text-align: center; font-size: .75rem; opacity: .45; transition: opacity .4s; }
.tk li b { width: 30px; height: 30px; margin: 0 auto 4px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); font-family: var(--font-en); transition: .4s; }
.tk h4 { color: #fff; font-size: .82rem; margin: 0; }
.tk p { color: #A9B6CC; margin: 2px 0 0; font-size: .7rem; line-height: 1.4; }
.tk li.on { opacity: 1; }
.tk li.on b { background: var(--line); color: #fff; box-shadow: 0 0 0 4px rgba(6,199,85,.2); }

/* 影片與圖片 */
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, var(--navy), var(--navy-3)); }
.yt img, .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--navy); font-size: 28px; cursor: pointer; }
.yt-note { position: absolute; left: 12px; bottom: 8px; margin: 0; color: #fff; font-size: .8rem; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.clip { margin: 0; } .clip video { width: 100%; border-radius: var(--radius); background: var(--navy); }
.clip figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
picture img { width: 100%; height: auto; border-radius: var(--radius); }

/* =====================================================================
   P1.5 多裝置強化
   ===================================================================== */
/* hover 位移只給有滑鼠的裝置，觸控不會卡在 hover 狀態 */
@media (hover: none) {
  a.card:hover, .btn:hover, .fab-btn:hover { transform: none; }
}
.chip { min-height: 44px; }
.site-footer li a { display: inline-block; padding: 4px 0; }
.fab { bottom: calc(20px + env(safe-area-inset-bottom)); right: calc(20px + env(safe-area-inset-right)); }

/* 平板橫式／小筆電：選單間距縮小、隱藏中文 logo，避免擠成兩行 */
@media (min-width: 901px) and (max-width: 1180px) {
  .logo-zh { display: none; }
  .nav a { padding: 8px 9px; }
}
@media (max-width: 1024px) {
  .steps::before, .steps::after { display: none; }
}
/* 平板直式 */
@media (min-width: 641px) and (max-width: 900px) {
  .demo-row { grid-template-columns: 1fr; }
}
/* 手機：服務流程改直式時間軸、客服列避開 iPhone 底部橫條 */
@media (max-width: 640px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .fab { right: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom); background: var(--navy); }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; background: none; padding: 0 0 18px; border-radius: 0; }
  .steps li b { grid-row: span 2; margin: 0; }
  .steps li h3, .steps li p { grid-column: 2; }
  .steps li::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 0; width: 2px; background: var(--border); }
  .steps li:last-child::after { display: none; }
  .tk { grid-template-columns: repeat(2, 1fr); row-gap: 12px; }
  .dash-grid { grid-template-columns: repeat(2, 1fr); padding-bottom: 60px; }
  .viz-phone.big .phone { width: 220px; }
}
/* 橫拿手機（高度矮） */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 28px 0 24px; }
  .page-hero { padding: 28px 0; }
  .stats { margin-top: 24px; }
}
/* 減少動態效果：直接顯示最終狀態 */
@media (prefers-reduced-motion: reduce) {
  .pre { opacity: 1; transform: none; }
  .flow line, .node, .core, .live, .steps.lit li, .steps.lit li b, .scr.on .bub, .scr.on .ph-done .ok,
  .scr.on .ph-unlock, .scr.on .ph-menu span.hi, .scr.on .ph-btn, .hc { animation: none !important; }
  .steps::after { width: calc(100% - 32px); }
}

/* LINE QR Code：只在平板／電腦顯示 */
.line-qr { margin: 4px 0 14px; text-align: center; }
.line-qr img { width: 180px; height: 180px; margin: 0 auto; border-radius: 10px; background: #fff; padding: 6px; border: 1px solid var(--border); }
.line-qr figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 640px) { .line-qr { display: none; } }

/* 服務卡片數量是奇數時，最後一張橫跨整列，避免孤零零一張 */
@media (min-width: 901px) { .svc-grid > :last-child:nth-child(3n+1) { grid-column: 1 / -1; } }
@media (min-width: 641px) and (max-width: 900px) { .svc-grid > :last-child:nth-child(2n+1) { grid-column: 1 / -1; } }
