/* ============================================================
   xugtek 官网共享样式(全部语言版本共用)
   零第三方依赖;主题色通过 CSS 变量定义
   ============================================================ */

/* ---------- 主题变量(亮 / 暗) ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --card: #ffffff;
  --text: #16161a;
  --text-muted: #5c5c66;
  --text-faint: #8a8a94;
  --border: #e6e6eb;
  --accent: #2c72da;
  --accent-soft: rgba(44, 114, 218, 0.10);
  --shadow: 0 1px 2px rgba(16, 16, 24, 0.04), 0 8px 24px rgba(16, 16, 24, 0.06);
  --shadow-lg: 0 2px 4px rgba(16, 16, 24, 0.05), 0 16px 40px rgba(16, 16, 24, 0.10);
  --nav-bg: rgba(255, 255, 255, 0.78);
  /* 图标(亮色版) */
  --icon-brand: url("../icons/brand.svg");
  --icon-ds: url("../icons/display-settings.png");
  --icon-sg: url("../icons/standgo.png");
}

/* 默认跟随系统;JS 里手动切换时写入 html[data-theme] 覆盖 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0f;
    --bg-soft: #121218;
    --card: #15151c;
    --text: #f2f2f5;
    --text-muted: #a4a4b0;
    --text-faint: #6f6f7a;
    --border: #26262e;
    --accent: #2c72da;
    --accent-soft: rgba(44, 114, 218, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.45);
    --nav-bg: rgba(11, 11, 15, 0.78);
    /* 图标(暗色版) */
    --icon-ds: url("../icons/display-settings-dark.png");
    --icon-sg: url("../icons/standgo-dark.png");
  }
}
html[data-theme="dark"] {
  --bg: #0b0b0f;
  --bg-soft: #121218;
  --card: #15151c;
  --text: #f2f2f5;
  --text-muted: #a4a4b0;
  --text-faint: #6f6f7a;
  --border: #26262e;
  --accent: #2c72da;
  --accent-soft: rgba(44, 114, 218, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.45);
  --nav-bg: rgba(11, 11, 15, 0.78);
  /* 图标(暗色版) */
  --icon-ds: url("../icons/display-settings-dark.png");
  --icon-sg: url("../icons/standgo-dark.png");
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}
::selection { background: var(--accent); color: #fff; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
section { scroll-margin-top: 72px; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--bg-soft) var(--icon-brand) center/contain no-repeat;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links > a { color: var(--text-muted); font-size: 14.5px; font-weight: 500; }
.nav-links > a:hover { color: var(--text); text-decoration: none; }

/* 语言切换(下拉) */
.lang-switch { position: relative; }
.lang-switch-btn {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0;
  border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); cursor: pointer;
  font-size: 14px; line-height: 1;
}
.lang-switch-btn:hover { color: var(--text); border-color: var(--text-faint); }
.lang-switch-btn svg { width: 13px; height: 13px; flex: none; }
.lang-switch-list {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 190px; padding: 6px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  list-style: none; display: none; z-index: 60;
}
/* 仅点击/聚焦展开,不响应 hover */
.lang-switch:focus-within .lang-switch-list,
.lang-switch.open .lang-switch-list { display: block; }
.lang-switch-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 10px; border-radius: 8px;
  color: var(--text-muted); font-size: 13.5px;
}
.lang-switch-list a:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; }
.lang-switch-list a.current { color: var(--accent); font-weight: 700; }
.lang-switch-list a.current::after { content: "✓"; font-weight: 700; }

/* 主题切换按钮 */
.theme-toggle {
  width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-faint); }
.theme-toggle svg { width: 14px; height: 14px; }
.icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 88px; text-align: center;
}
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 70%;
  background:
    radial-gradient(600px 260px at 50% 0%, var(--accent-soft), transparent 70%),
    radial-gradient(420px 200px at 18% 30%, rgba(44, 114, 218, 0.10), transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 52px); line-height: 1.2;
  letter-spacing: -0.02em; font-weight: 800;
}
.hero-cta { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 12px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; transition: border-color 0.15s ease, background 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { border-color: var(--text); text-decoration: none; }
.btn-ghost { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-faint); text-decoration: none; }

/* ---------- 通用 section 头 ---------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head .eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -0.015em; font-weight: 800; }
.section-head p { margin-top: 12px; color: var(--text-muted); font-size: 16px; }

/* ---------- 产品卡片 ---------- */
.products { padding: 8px 0 96px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 26px; }
.product-card {
  position: relative;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 32px 30px 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card .platform-tag {
  position: absolute; top: 26px; right: 26px;
  font-size: 12px; font-weight: 600; color: var(--text-faint);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px;
  white-space: nowrap;
}
.app-icon {
  width: 60px; height: 60px; border-radius: 15px;
  display: block; margin-bottom: 20px;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.08);
}
.app-icon.ds, .app-icon.sg { background-position: center; background-size: cover; background-repeat: no-repeat; }
.app-icon.ds { background-color: var(--bg-soft); background-image: var(--icon-ds); }
.app-icon.sg { background-color: var(--bg-soft); background-image: var(--icon-sg); }
.product-card h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.product-card .subtitle { font-size: 14.5px; font-weight: 600; color: var(--accent); margin-top: 2px; }
.product-card .desc { margin-top: 14px; color: var(--text-muted); font-size: 15px; }
.feature-list { list-style: none; margin: 20px 0 4px; display: grid; gap: 9px; }
.feature-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14.5px; color: var(--text);
}
.feature-list li::before {
  content: "✓"; flex: none;
  width: 17px; height: 17px; margin-top: 3px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; line-height: 1;
}
.product-foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.privacy-note { font-size: 12.5px; color: var(--text-faint); display: flex; align-items: center; gap: 5px; }
.privacy-note svg { width: 13px; height: 13px; }

/* ---------- 关于 / 理念 ---------- */
.about { padding: 88px 0; background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.about-item {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px 22px; box-shadow: var(--shadow);
}
.about-item .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.about-item .ic svg { width: 18px; height: 18px; }
.about-item h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.about-item p { font-size: 14px; color: var(--text-muted); }

/* ---------- 联系 ---------- */
.contact { padding: 96px 0; text-align: center; }
.contact-card {
  max-width: 560px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 44px 36px; box-shadow: var(--shadow);
}
.contact-card h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.015em; }
.contact-card > p { margin: 12px auto 28px; color: var(--text-muted); font-size: 15.5px; max-width: 420px; }
.contact-email {
  font-size: 18px; font-weight: 700; letter-spacing: 0.01em;
  color: var(--text); margin: -14px auto 26px;
}
.contact-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.contact-actions .btn { justify-content: center; }
.contact-note { margin-top: 22px; font-size: 13px; color: var(--text-faint); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 36px 0 44px; }
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--text-faint);
}
.footer-inner .links { display: flex; gap: 20px; }
.footer-inner a { color: var(--text-muted); }
.footer-inner a:hover { color: var(--text); }

/* ---------- 滚动浮现动画(无依赖,JS 增强) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式微调 ---------- */
@media (max-width: 640px) {
  .hero { padding: 72px 0 64px; }
  /* 手机端:平台标签移到标题上方独立一行,避免与 App 图标挤在一起 */
  .product-card .platform-tag {
    position: static; display: inline-block;
    margin: 0 0 14px; align-self: flex-start;
  }
  .product-card { padding: 26px 22px 24px; }
  .nav-links { gap: 12px; }
  /* 手机端:获取按钮独占一行,与隐私文案上下排列,两卡片行为一致 */
  .product-foot .btn { flex: 1 1 100%; justify-content: center; }
}
