/* =========================================================
   COMILE 網路行銷 · 全域設計系統
   深穩深灰 + 橙色 CTA · Noto Sans TC + Inter Tight
   全站頁面載入即生效
   ========================================================= */

:root {
  /* 色彩 */
  --bg-dark: #161618;
  --bg-darker: #101012;
  --card-dark: #1F1F22;
  --bg-light: #F7F6F0;
  --card-light: #FFFFFF;

  --text-dark: #161618;
  --text-invert: #F5F2EE;
  --text-muted: #5A5A60;
  --text-muted-invert: #9A9AA0;

  --accent: #FF8C42;
  --accent-hover: #FF7A2E;
  --accent-soft: rgba(255, 140, 66, 0.12);

  --border-light: #EBE6DB;
  --border-dark: #2A2A2E;

  /* 字體 */
  --font-zh: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-en: "Inter Tight", "Noto Sans TC", sans-serif;

  /* 尺度 */
  --maxw: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-zh);
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

/* 數字 / 拉丁字元使用 Inter Tight */
.num, .en { font-family: var(--font-en); font-feature-settings: "tnum"; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 96px 0; }
.section--dark { background: var(--bg-dark); color: var(--text-invert); }
.section--light { background: var(--bg-light); color: var(--text-dark); }
.section--darker { background: var(--bg-darker); color: var(--text-invert); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.section-sub {
  margin-top: 16px;
  font-size: 17px;
  color: var(--text-muted);
}
.section--dark .section-sub { color: var(--text-muted-invert); }

/* ---------- Eyebrow / Badge ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
}
.eyebrow.solid { background: var(--accent); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost {
  background: transparent;
  color: var(--text-invert);
  border-color: rgba(245, 242, 238, 0.22);
}
.btn-ghost:hover { border-color: rgba(245, 242, 238, 0.5); }
.btn-ghost-dark {
  background: transparent;
  color: var(--text-dark);
  border-color: var(--border-light);
}
.btn-ghost-dark:hover { border-color: var(--text-muted); }
/* 首頁「每月成效報告」卡內 CTA：文字改為品牌橙 */
.btn-sample { color: var(--accent); }
.btn-sample:hover { color: var(--accent-hover); border-color: var(--accent); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-dark);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent);
  display: grid; place-items: center;
  color: #fff; font-weight: 900; font-family: var(--font-en);
  font-size: 20px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { color: var(--text-invert); font-size: 18px; letter-spacing: 0.02em; }
.brand-text small { color: var(--text-muted-invert); font-size: 11px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--text-muted-invert);
  font-size: 15px;
  font-weight: 500;
  transition: color .2s ease;
}
.nav a:hover { color: var(--text-invert); }
.nav a.active { color: var(--accent); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 20px; }
.header-phone {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-invert); font-family: var(--font-en); font-weight: 600; font-size: 14px;
}
.header-phone svg { width: 16px; height: 16px; }

/* 手機選單按鈕 */
.nav-toggle { display: none; background: none; border: 0; color: var(--text-invert); cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero { background: var(--bg-dark); color: var(--text-invert); padding: 96px 0 104px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-top: 22px;
}
.hero .lead {
  margin-top: 22px;
  font-size: 18px;
  color: var(--text-muted-invert);
  max-width: 540px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.hero-trust {
  margin-top: 32px; display: flex; align-items: center; gap: 18px;
  color: var(--text-muted-invert); font-size: 14px;
}
.hero-trust .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-muted-invert); opacity: .6; }

/* Hero 視覺：排名追蹤卡 */
.rank-card {
  background: var(--card-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 28px;
}
.rank-card .rc-top { display: flex; align-items: center; justify-content: space-between; }
.rank-card .rc-label { color: var(--text-muted-invert); font-size: 13px; }
.rank-card .rc-keyword { color: var(--text-invert); font-size: 16px; font-weight: 700; margin-top: 6px; }
.rank-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(64, 200, 120, 0.14); color: #4FD98A;
  padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; font-family: var(--font-en);
}
.rank-row { display: flex; align-items: baseline; gap: 14px; margin-top: 28px; }
.rank-from { color: var(--text-muted-invert); font-size: 40px; font-weight: 800; font-family: var(--font-en); text-decoration: line-through; opacity: .6; }
.rank-arrow { color: var(--accent); }
.rank-to { color: var(--accent); font-size: 72px; font-weight: 900; font-family: var(--font-en); line-height: 1; }
.rank-chart { margin-top: 24px; width: 100%; height: 90px; }

/* ---------- 服務卡片 ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.svc-card {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.section--dark .svc-card { background: var(--card-dark); border-color: var(--border-dark); }
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.10); }
.svc-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 20px;
}
.svc-icon svg { width: 26px; height: 26px; }
.svc-card h3 { font-size: 20px; font-weight: 700; }
.svc-card p { margin-top: 12px; color: var(--text-muted); font-size: 15px; }
.section--dark .svc-card p { color: var(--text-muted-invert); }
.svc-card .svc-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: var(--accent); font-weight: 700; font-size: 14px; }
.svc-card .svc-link svg { width: 16px; height: 16px; transition: transform .2s ease; }
.svc-card:hover .svc-link svg { transform: translateX(4px); }

/* ---------- 服務流程 ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 8px; }
.step {
  position: relative;
  padding: 28px 24px;
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}
.section--dark .step { background: var(--card-dark); border-color: var(--border-dark); }
.step .step-no {
  font-family: var(--font-en); font-weight: 800; font-size: 14px;
  color: var(--accent); letter-spacing: .08em;
}
.step h4 { margin-top: 12px; font-size: 17px; font-weight: 700; }
.step p { margin-top: 8px; font-size: 14px; color: var(--text-muted); }
.section--dark .step p { color: var(--text-muted-invert); }

/* ---------- 成效數據 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat {
  padding: 32px 28px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  background: var(--bg-darker);
}
.stat .stat-num {
  font-family: var(--font-en); font-weight: 900; font-size: 48px; line-height: 1;
  color: var(--accent);
}
.stat .stat-label { margin-top: 12px; color: var(--text-invert); font-size: 15px; font-weight: 500; }
.stat .stat-desc { margin-top: 6px; color: var(--text-muted-invert); font-size: 13px; }

/* ---------- 客戶見證 ---------- */
.testi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testi-card {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 30px;
}
.testi-card .quote { font-size: 15px; color: var(--text-dark); line-height: 1.7; }
.testi-card .stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 14px; font-size: 14px; }
.testi-who { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.testi-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 800;
}
.testi-who strong { display: block; font-size: 15px; }
.testi-who span { font-size: 13px; color: var(--text-muted); }

/* ---------- 為什麼選擇我們 ---------- */
.why-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.why-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.why-item {
  display: flex; gap: 14px;
  padding: 22px;
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}
.why-item .check {
  flex: none; width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.why-item .check svg { width: 16px; height: 16px; }
.why-item h4 { font-size: 16px; font-weight: 700; }
.why-item p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.report-card {
  background: var(--bg-darker);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 32px;
}
.report-card h4 { color: var(--text-invert); font-size: 18px; }
.report-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--border-dark); }
.report-row:last-child { border-bottom: 0; }
.report-row .rk { color: var(--text-muted-invert); font-size: 14px; }
.report-row .rv { color: var(--text-invert); font-family: var(--font-en); font-weight: 700; }
.report-row .rv.up { color: #4FD98A; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border-dark); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; background: var(--bg-darker); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px; color: var(--text-invert); font-size: 17px; font-weight: 600; font-family: var(--font-zh);
}
.faq-q .ico { flex: none; width: 24px; height: 24px; transition: transform .25s ease; color: var(--accent); }
.faq-item.open .faq-q .ico { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a p { padding: 0 26px 24px; color: var(--text-muted-invert); font-size: 15px; line-height: 1.75; }

/* ---------- 價格 ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.price-card {
  background: var(--card-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 24px 50px rgba(255,140,66,.12);
}
.price-card .tier { color: var(--text-invert); font-size: 18px; font-weight: 700; }
.price-card .badge {
  display: inline-block; margin-left: 10px; padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle;
}
.price-card .amount { margin-top: 18px; display: flex; align-items: baseline; gap: 6px; }
.price-card .amount .cur { color: var(--text-invert); font-size: 20px; font-weight: 700; }
.price-card .amount .num { color: var(--accent); font-family: var(--font-en); font-weight: 900; font-size: 44px; line-height: 1; }
.price-card .amount .per { color: var(--text-muted-invert); font-size: 14px; }
.price-card .feats { margin: 24px 0; }
.price-card .feats li { display: flex; gap: 10px; padding: 9px 0; color: var(--text-muted-invert); font-size: 14px; border-bottom: 1px solid var(--border-dark); }
.price-card .feats li svg { flex: none; width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }

/* ---------- 底部轉化 CTA ---------- */
.cta-band { background: var(--accent); color: #fff; border-radius: 24px; padding: 56px 48px; text-align: center; }
.cta-band h2 { font-size: clamp(26px, 3.5vw, 38px); font-weight: 900; }
.cta-band p { margin-top: 14px; font-size: 17px; opacity: .92; }
.cta-band .btn { margin-top: 28px; background: #fff; color: var(--accent); }
.cta-band .btn:hover { background: #fff; opacity: .9; }

/* ---------- Contact ---------- */
.contact-hero { background: var(--bg-light); padding: 88px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.contact-left h1 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 900; line-height: 1.15; margin-top: 20px; }
.contact-left .lead { margin-top: 20px; font-size: 17px; color: var(--text-muted); max-width: 520px; }

.quick-box {
  margin-top: 36px; background: #fff; border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 26px 30px;
}
.quick-box .qb-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.quick-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.quick-row:last-child { border-bottom: 0; }
.quick-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.quick-ico svg { width: 18px; height: 18px; }
.quick-row .qr-label { font-size: 12px; color: var(--text-muted); }
.quick-row .qr-val { font-size: 15px; font-weight: 600; font-family: var(--font-en); }

/* 表單卡 */
.form-card {
  background: #fff; border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 40px;
}
.form-card .fc-eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.form-card h3 { font-size: 24px; font-weight: 900; margin-top: 8px; }
.form-card .fc-sub { color: var(--text-muted); font-size: 14px; margin-top: 8px; margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; padding: 0 16px; height: 52px;
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  background: var(--bg-light); font-family: var(--font-zh); font-size: 15px; color: var(--text-dark);
  transition: border-color .2s ease, background .2s ease;
}
.field textarea { height: 110px; padding: 14px 16px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9A9A9F; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-darker); color: var(--text-muted-invert); padding: 72px 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--border-dark); align-items: start; }
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand p { max-width: 420px; font-size: 14px; line-height: 1.7; }
.footer-contact { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 10px; color: var(--text-invert); }
.footer-contact svg { width: 18px; height: 18px; color: var(--accent); }
.footer-col h5 { color: var(--text-invert); font-size: 13px; font-weight: 700; margin-bottom: 16px; letter-spacing: .03em; }
.footer-col a { display: block; padding: 7px 0; font-size: 14px; color: var(--text-muted-invert); transition: color .2s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 28px; font-size: 13px; flex-wrap: wrap; }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a:hover { color: var(--text-invert); }

/* ---------- 通用內頁 Hero（淺色小標題區） ---------- */
.page-hero { background: var(--bg-dark); color: var(--text-invert); padding: 72px 0 80px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 900; margin-top: 18px; }
.page-hero p { margin-top: 16px; color: var(--text-muted-invert); font-size: 17px; max-width: 620px; }

/* 內容區（其餘頁面套用主題用） */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { font-size: 26px; font-weight: 800; margin: 36px 0 14px; }
.prose h3 { font-size: 19px; font-weight: 700; margin: 26px 0 10px; }
.prose p { color: var(--text-muted); font-size: 16px; line-height: 1.8; margin-bottom: 14px; }
.prose ul.bullets li { position: relative; padding-left: 24px; margin-bottom: 10px; color: var(--text-muted); }
.prose ul.bullets li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- 響應式 ---------- */
@media (max-width: 980px) {
  .hero-grid, .contact-grid, .why-grid { grid-template-columns: 1fr; gap: 48px; }
  .grid-3, .testi, .pricing { grid-template-columns: 1fr 1fr; }
  .process, .stats { grid-template-columns: 1fr 1fr; }
  .why-list { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg-dark); padding: 8px 24px 16px; border-bottom: 1px solid var(--border-dark); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--border-dark); }
  .nav-toggle { display: block; }
  .header-phone { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .grid-3, .testi, .pricing, .process, .stats, .grid-2 { grid-template-columns: 1fr; }
  .why-list { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 24px; }
  .form-card, .quick-box { padding: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- 無障礙 / 動作偏好 ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* 跳至主要內容（鍵盤／螢幕閱讀器） */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  padding: 10px 18px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 700;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

/* Footer 內嵌的後台選單（登錄／發佈／設置） */
.inline-menu { display: inline-flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; }
.inline-menu li { display: inline; list-style: none; }
.inline-menu li a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
