/* 主色由 theme.css 提供（build.py 按 site.config.json 生成） */
:root {
  --ink: #141B26;
  --ink-2: #4B5565;
  --ink-3: #6B7483;
  --line: #E2E5EA;
  --band: #F4F5F7;
  --bg: #FFFFFF;
  --chat-wall: #EFEAE2;
  --bubble-out: #D9FDD3;
  --bubble-in: #FFFFFF;
  --ok: #1F7A4D;
  --err: #B42318;
  --radius: 10px;
  --wrap: 1160px;
  --font-zh: "Chiron Hei HK", "Noto Sans HK", "Noto Sans CJK HK", "PingFang HK", "Microsoft JhengHei", sans-serif;
  --font-en: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-zh); font-size: 17px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.lang-en { font-family: var(--font-en); line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 800; letter-spacing: 0; }
.lang-en h1, .lang-en h2 { letter-spacing: -0.015em; }
h1 { font-size: clamp(34px, 5.2vw, 58px); }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: 20px; font-weight: 700; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid var(--accent);
  background: var(--accent); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; font-family: var(--font-en); }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: inline-block; }
.logo-img { width: 32px; height: 32px; border-radius: 7px; }
.site-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.site-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-size: 16px; }
.site-nav ul a:hover, .site-nav .lang:hover, .site-nav .login:hover { color: var(--accent-dark); }
.site-nav a[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.site-nav .lang, .site-nav .login { color: var(--ink-2); }
.site-nav .btn { color: #fff; }
.menu-btn { display: none; margin-left: auto; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font: inherit; font-size: 15px; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 18px; margin: 0; }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a, .site-nav .lang, .site-nav .login { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 14px; }
}

/* ---------- sections ---------- */
section { padding: 88px 0; }
@media (max-width: 600px) { section { padding: 60px 0; } }
.band { background: var(--band); }
.lead { font-size: 19px; color: var(--ink-2); max-width: 40em; }
.lang-en .lead { max-width: 36em; }
.sec-head { max-width: 760px; margin-bottom: 44px; }
.sec-head p { margin-top: 14px; }
.soon { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 1px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 13px; font-weight: 700; line-height: 1.7; white-space: nowrap; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.hero h1 { max-width: 11em; }
.lang-en .hero h1 { max-width: 15em; font-size: clamp(32px, 4.4vw, 52px); }
.hero .lead { margin-top: 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 18px; font-size: 15px; color: var(--ink-3); }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } }

/* 示範：群發 + 追問 */
.demo { position: relative; justify-self: center; width: min(100%, 420px); }
.demo-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 0 0; border-bottom: 0; }
.demo-stats div { padding: 12px 14px; border-right: 1px solid var(--line); }
.demo-stats div:last-child { border-right: 0; }
.demo-stats b { display: block; font-family: var(--font-en); font-size: 21px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.demo-stats span { font-size: 13px; color: var(--ink-3); }
.chat { background: var(--chat-wall); border: 1px solid var(--line); border-radius: 0 0 14px 14px; padding: 18px 14px 20px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.55; }
.chat-day { align-self: center; background: rgba(255,255,255,.85); color: var(--ink-3); font-size: 12px; padding: 2px 10px; border-radius: 6px; }
.bubble { max-width: 86%; padding: 9px 12px 7px; border-radius: 10px; box-shadow: 0 1px 0 rgba(20,27,38,.08); position: relative; }
.bubble.out { align-self: flex-end; background: var(--bubble-out); border-top-right-radius: 3px; }
.bubble.in { align-self: flex-start; background: var(--bubble-in); border-top-left-radius: 3px; }
.bubble time { display: block; text-align: right; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.bubble p { margin: 0; }
.who { display: block; font-size: 12px; font-weight: 700; color: var(--ink-3); margin-bottom: 2px; }

/* 優惠碼：撕位票根 */
.coupon { display: flex; margin: 9px 0 3px; border-radius: 8px; overflow: hidden; background: #fff; border: 1px dashed rgba(20,27,38,.25); }
.coupon-code { padding: 8px 12px; font-family: var(--font-code); font-weight: 600; font-size: 16px; letter-spacing: .06em; color: var(--accent-dark); border-right: 2px dashed rgba(20,27,38,.2); position: relative; }
.coupon-code::before, .coupon-code::after { content: ""; position: absolute; right: -8px; width: 14px; height: 14px; border-radius: 50%; background: var(--bubble-out); }
.coupon-code::before { top: -8px; } .coupon-code::after { bottom: -8px; }
.coupon-meta { padding: 8px 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; align-self: center; }

.source { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 700; }
.source svg { flex: none; }
.handoff { align-self: center; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; color: var(--ink-2); }
.handoff i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.demo-caption { margin-top: 12px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* 一次性入場：訊息逐條出現（只喺 JS 加咗 .play 先會動） */
.demo.play .step { opacity: 0; transform: translateY(8px); animation: rise .45s ease forwards; }
.demo.play .step:nth-child(2) { animation-delay: .25s; }
.demo.play .step:nth-child(3) { animation-delay: 1.15s; }
.demo.play .step:nth-child(4) { animation-delay: 2.05s; }
.demo.play .step:nth-child(5) { animation-delay: 2.95s; }
.demo.play .step:nth-child(6) { animation-delay: 3.6s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .demo.play .step { animation: none; opacity: 1; transform: none; } }

/* ---------- switching ---------- */
.switch-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.switch-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.switch-list li { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
.switch-list h3 { font-size: 18px; }
.switch-list p { margin: 0; color: var(--ink-2); }
@media (max-width: 920px) { .switch-grid { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 600px) { .switch-list li { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- steps（真正有次序） ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.steps li { counter-increment: s; padding: 0 24px 0 0; position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font-en); font-weight: 800; margin-bottom: 16px; position: relative; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 20px; left: 40px; right: 0; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 18px; margin-bottom: 8px; }
.steps p { color: var(--ink-2); margin: 0; font-size: 16px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .steps li { padding: 0 0 0 58px; }
  .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .steps li::after { top: 44px; bottom: -26px; left: 19px; right: auto; width: 2px; height: auto; }
}

/* ---------- features ---------- */
.feat-lead { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.feat-lead article { padding: 28px 32px 30px 0; border-bottom: 1px solid var(--line); }
.feat-lead article:nth-child(odd) { border-right: 1px solid var(--line); }
.feat-lead article:nth-child(even) { padding-left: 32px; padding-right: 0; }
.feat-lead h3 { font-size: 21px; margin-bottom: 10px; }
.feat-lead p { color: var(--ink-2); margin: 0; }
.feat-more { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; }
.feat-more h3 { font-size: 17px; margin-bottom: 4px; }
.feat-more p { color: var(--ink-2); margin: 0; font-size: 15.5px; }
@media (max-width: 760px) {
  .feat-lead { grid-template-columns: 1fr; }
  .feat-lead article, .feat-lead article:nth-child(even) { padding: 24px 0; border-right: 0; }
  .feat-more { grid-template-columns: 1fr; }
}

/* ---------- trust ---------- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.facts div { padding: 6px 24px 6px 0; }
.facts div + div { padding-left: 24px; border-left: 1px solid rgba(255,255,255,.18); }
.facts h3 { font-size: 17px; margin-bottom: 6px; }
.facts p { margin: 0; color: rgba(255,255,255,.72); font-size: 15px; }
.dark { background: var(--ink); color: #fff; }
.dark .lead { color: rgba(255,255,255,.75); }
@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr 1fr; gap: 24px 0; }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts div, .facts div + div { padding: 0; border: 0; } }

/* ---------- CTA band ---------- */
.cta-band { background: var(--accent); color: #fff; padding: 64px 0; }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-row h2 { max-width: 18em; }
.cta-row p { margin: 10px 0 0; color: #fff; }
.cta-band .btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta-band .btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 700; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.faq details > div { padding: 0 0 20px; color: var(--ink-2); max-width: 44em; }

/* ---------- page head (inner pages) ---------- */
.page-head { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.page-head .lead { margin-top: 16px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 64px; align-items: start; }
.contact-aside h2 { font-size: 22px; margin-bottom: 14px; }
.contact-aside ol { margin: 0 0 28px; padding-left: 1.2em; color: var(--ink-2); }
.contact-aside li { margin-bottom: 8px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } .contact-form { order: -1; } }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 700; font-size: 15px; }
.req { color: var(--accent-dark); }
.opt { font-weight: 400; color: var(--ink-3); }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid #C9CED6; border-radius: 8px; background: #fff;
  font: inherit; font-size: 16px; color: var(--ink);
}
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.field [aria-invalid="true"] { border-color: var(--err); }
.err-msg { color: var(--err); font-size: 14px; min-height: 0; }
.err-msg:empty { display: none; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1.5px solid #C9CED6; border-radius: 999px; cursor: pointer; font-size: 15px; background: #fff; }
.chip input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.consent input { width: 20px; height: 20px; margin-top: 4px; flex: none; accent-color: var(--ink); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { font-size: 15px; }
.form-status.error { color: var(--err); }
.done { border: 2px solid var(--ok); border-radius: var(--radius); padding: 28px; }
.done h2 { font-size: 24px; margin-bottom: 10px; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }

/* ---------- legal ---------- */
.legal { max-width: 760px; padding-top: 48px; padding-bottom: 88px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; }
.legal h3 { font-size: 18px; margin: 24px 0 8px; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.legal .updated { color: var(--ink-3); font-size: 15px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 48px 0 24px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot-note { color: var(--ink-3); margin-top: 14px; }
.foot-h { font-weight: 700; margin-bottom: 8px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 6px; }
.site-foot ul a, .foot-note a { color: var(--ink-2); text-decoration: none; }
.site-foot ul a:hover, .foot-note a:hover { color: var(--accent-dark); text-decoration: underline; }
.foot-base { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* 404 */
.nf { padding: 120px 0; }
.nf p { color: var(--ink-2); }
.more-link { margin-top: 36px; }
.page-head .updated { color: var(--ink-3); font-size: 15px; margin: 12px 0 0; }
h1, h2, h3 { text-wrap: balance; }
@media (max-width: 600px) { .hero { padding: 44px 0 64px; } }
.field label.consent { font-weight: 400; }
.form-note { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--ink-3); }
