@charset "utf-8";

/* ========================================================================
   DataGraph 公共樣式 common.css
   主題色 #1050BF · 淺色主題 · 中英文混排
   ======================================================================== */

/* ---------- 設計變量 ---------- */
:root {
  --dg-primary: #1050BF;
  --dg-primary-dark: #0c3d92;
  --dg-primary-light: #e8f0fd;
  --dg-primary-soft: #f3f7ff;
  --dg-ink: #0f1b2d;
  --dg-text: #2c3a4d;
  --dg-muted: #647189;
  --dg-line: #e4e9f2;
  --dg-bg: #ffffff;
  --dg-bg-alt: #f6f8fc;
  --dg-radius: 14px;
  --dg-radius-lg: 22px;
  --dg-shadow-sm: 0 2px 10px rgba(16, 80, 191, 0.06);
  --dg-shadow: 0 14px 40px rgba(16, 80, 191, 0.10);
  --dg-shadow-lg: 0 30px 70px rgba(16, 80, 191, 0.14);
  --dg-maxw: 1200px;
  --dg-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "微軟雅黑", "Helvetica Neue",
    Helvetica, Arial, sans-serif;
}

/* ---------- 基礎重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--dg-font);
  color: var(--dg-text);
  background: var(--dg-bg);
  line-height: 1.75;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

h1, h2, h3, h4 { color: var(--dg-ink); line-height: 1.3; font-weight: 700; }

/* ---------- 通用佈局工具 ---------- */
.dg-container {
  width: 100%;
  max-width: var(--dg-maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.dg-section { padding: 88px 0; }
.dg-section--alt { background: var(--dg-bg-alt); }

.dg-section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.dg-section-head .dg-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dg-primary);
  margin-bottom: 14px;
}
.dg-section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.dg-section-head p { color: var(--dg-muted); font-size: 17px; }

/* ---------- 按鈕 ---------- */
.dg-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.dg-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* 立即購買：主按鈕，突顯 */
.dg-btn--primary {
  background: var(--dg-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(16, 80, 191, 0.28);
}
.dg-btn--primary:hover {
  background: var(--dg-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(16, 80, 191, 0.34);
}

/* 下載試用：次按鈕，弱化 */
.dg-btn--ghost {
  background: #fff;
  color: var(--dg-primary);
  border-color: var(--dg-line);
}
.dg-btn--ghost:hover {
  border-color: var(--dg-primary);
  background: var(--dg-primary-soft);
}

/* ======================================================================
   導航欄 header（由 nav.js 注入）
   ====================================================================== */
#dg-header { display: contents; }
.dg-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--dg-line);
}
.dg-header__inner {
  max-width: var(--dg-maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dg-brand { display: flex; align-items: center; gap: 12px; }
.dg-brand__logo { width: 40px; height: 40px; border-radius: 9px; }
.dg-brand > span { display: flex; flex-direction: column; gap: 5px; }
.dg-brand > span br { display: none; }
.dg-brand__name { font-size: 19px; font-weight: 700; color: var(--dg-ink); line-height: 1.1; }
.dg-brand__sub { font-size: 11px; color: var(--dg-muted); font-weight: 500; line-height: 1.1; }

.dg-nav { display: flex; align-items: center; gap: 34px; flex: 1; }
.dg-nav__menu { display: flex; align-items: center; justify-content: center; gap: 30px; flex: 1; }
.dg-nav__menu a {
  font-size: 15px;
  font-weight: 500;
  color: var(--dg-text);
  position: relative;
  padding: 6px 0;
  transition: color 0.18s ease;
}
.dg-nav__menu a:hover,
.dg-nav__menu a.is-active { color: var(--dg-primary); }
.dg-nav__menu a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--dg-primary);
  border-radius: 2px;
}
.dg-nav__actions { display: flex; align-items: center; gap: 12px; }

/* 語言切換 */
.dg-lang { position: relative; }
.dg-lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dg-text);
  background: #fff;
  border: 1px solid var(--dg-line);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.dg-lang__btn:hover { border-color: var(--dg-primary); color: var(--dg-primary); background: var(--dg-primary-soft); }
.dg-lang__btn > svg:first-child { width: 17px; height: 17px; }
.dg-lang__btn > svg:last-child { width: 15px; height: 15px; opacity: 0.7; transition: transform 0.2s ease; }
.dg-lang.is-open .dg-lang__btn > svg:last-child { transform: rotate(180deg); }
.dg-lang__cur { white-space: nowrap; }

.dg-lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 184px;
  background: #fff;
  border: 1px solid var(--dg-line);
  border-radius: 12px;
  box-shadow: var(--dg-shadow);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 1100;
}
.dg-lang.is-open .dg-lang__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dg-lang__menu a {
  display: block;
  font-size: 14px;
  color: var(--dg-text);
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.dg-lang__menu a:hover { background: var(--dg-bg-alt); color: var(--dg-primary); }
.dg-lang__menu a.is-active { color: var(--dg-primary); font-weight: 600; background: var(--dg-primary-soft); }

.dg-nav__toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--dg-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.dg-nav__toggle span,
.dg-nav__toggle span::before,
.dg-nav__toggle span::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--dg-ink);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease;
}
.dg-nav__toggle span::before { position: absolute; top: -6px; }
.dg-nav__toggle span::after { position: absolute; top: 6px; }

@media (max-width: 920px) {
  .dg-nav__toggle { display: flex; }
  .dg-nav {
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--dg-line);
    box-shadow: var(--dg-shadow);
    padding: 12px 24px 24px;
    display: none;
  }
  .dg-nav.is-open { display: flex; }
  .dg-nav__menu { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .dg-nav__menu a { padding: 14px 0; border-bottom: 1px solid var(--dg-line); }
  .dg-nav__actions { flex-direction: column; align-items: stretch; width: 100%; margin-top: 16px; gap: 10px; }
  .dg-nav__actions .dg-btn { justify-content: center; }
  .dg-lang { width: 100%; }
  .dg-lang__btn { width: 100%; justify-content: center; }
  .dg-lang__menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; min-width: 0; width: 100%; margin-top: 8px; display: none; }
  .dg-lang.is-open .dg-lang__menu { display: block; }
}

/* ======================================================================
   頁腳 footer（由 footer.js 注入）
   ====================================================================== */
.dg-footer {
  background: var(--dg-ink);
  color: #c7d2e3;
  padding: 64px 0 30px;
}
.dg-footer__top {
  max-width: var(--dg-maxw);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.dg-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  text-align: left;
}
.dg-footer__logo img { width: 40px; height: 40px; border-radius: 9px; }
.dg-footer__logo > span { display: flex; flex-direction: column; gap: 5px; }
.dg-footer__logo > span br { display: none; }
.dg-footer__logo .n { color: #fff; font-size: 19px; font-weight: 700; line-height: 1.1; }
.dg-footer__logo .s { color: #8b9bb4; font-size: 11px; line-height: 1.1; }
.dg-footer__intro {
  color: #93a1ba;
  font-size: 14.5px;
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto;
}

/* 授權經銷商提示 */
.dg-footer__notice {
  max-width: 880px;
  width: calc(100% - 48px);
  margin: 36px auto 0;
  padding: 20px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(16, 80, 191, 0.16);
  border-radius: 12px;
}
.dg-footer__notice-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #7fa8ee;
}
.dg-footer__notice-text .zh {
  color: #e3ebf8;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 8px;
}
.dg-footer__notice-text .en {
  color: #93a1ba;
  font-size: 12.5px;
  line-height: 1.7;
}

.dg-footer__bottom {
  max-width: var(--dg-maxw);
  margin: 40px auto 0;
  padding: 26px 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #8b9bb4;
}

@media (max-width: 600px) {
  .dg-footer__notice { flex-direction: column; gap: 10px; }
  .dg-footer__bottom { justify-content: center; text-align: center; }
}
