/* ==========================================================================
   图提取 ImageGrab - 全站样式
   设计规范：移动优先、CSS 变量统一管理、蓝紫渐变主色、圆角 + 柔和阴影
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 主色（蓝紫渐变） */
  --primary: #6366f1;
  --primary-2: #8b5cf6;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

  /* 文字 */
  --text: #1e293b;
  --text-2: #475569;
  --text-3: #94a3b8;

  /* 背景 / 边框 */
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-alt: #f6f7fb;
  --border: #e7eaf1;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 6px 16px -4px rgba(15, 23, 42, .10);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, .22);

  /* 圆角 */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  /* 布局 */
  --max-w: 1120px;
  --nav-h: 64px;
  --gutter: 20px;

  /* 动效 */
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; display: inline-block; vertical-align: middle; }
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(99, 102, 241, .10);
  color: var(--primary);
  white-space: nowrap;
}

/* 无障碍：跳转链接（仅聚焦时可见） */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* 通用容器 */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- 3. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 22px -8px rgba(99, 102, 241, .6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -8px rgba(99, 102, 241, .65); }

.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.btn-light {
  background: #fff;
  color: var(--primary);
}
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ---------- 4. 导航栏 ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.navbar.scrolled {
  background: rgba(255, 255, 255, .9);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 6px 14px -4px rgba(99, 102, 241, .55);
}
.logo-icon { width: 20px; height: 20px; }
.logo-en { font-weight: 500; font-size: 13px; color: var(--text-3); margin-left: 6px; }

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle.open .icon-menu { display: none; }
.nav-toggle.open .icon-close { display: block; }

/* 移动端：下拉菜单 */
.nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px var(--gutter) 20px;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.nav-menu.open { display: flex; }

.nav-link {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-link:hover { color: var(--primary); background: rgba(99, 102, 241, .06); }
.nav-link.active { color: var(--primary); }

.nav-cta {
  margin-top: 8px;
  text-align: center;
  background: var(--gradient);
  color: #fff !important;
  font-weight: 600;
}
.nav-cta:hover { filter: brightness(1.05); }

/* 平板及以上：横向导航 */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: none;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
  }
  .nav-cta {
    margin-top: 0;
    margin-left: 10px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
  }
}

/* ---------- 5. Hero 首屏区 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 88px;
  background:
    radial-gradient(55% 55% at 85% -5%, rgba(139, 92, 246, .14), transparent 60%),
    radial-gradient(45% 45% at 5% 15%, rgba(99, 102, 241, .12), transparent 60%),
    linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(99, 102, 241, .10);
  border: 1px solid rgba(99, 102, 241, .18);
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 18px;
  max-width: 540px;
  font-size: clamp(15px, 2.2vw, 17px);
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 38px;
}
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 26px; font-weight: 800; color: var(--primary); }
.stat span { font-size: 13px; color: var(--text-3); }

/* Hero 界面示意（纯 CSS 浏览器窗口 + 画廊 + 悬浮按钮） */
.hero-mock { position: relative; }
.mock-window {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}
.mock-dots { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #f87171; }
.dot.yellow { background: #fbbf24; }
.dot.green { background: #34d399; }
.mock-address {
  flex: 1;
  height: 28px;
  margin-left: 6px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  color: var(--text-3);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mock-body { padding: 16px; }
.mock-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mock-chip {
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}
.mock-chip.count b { color: var(--primary); }
.mock-chip.primary { background: var(--gradient); color: #fff; border-color: transparent; }

.mock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.mock-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--c1, #cbd5e1), var(--c2, #94a3b8));
}
/* 模拟商品主体（柔和的圆） */
.mock-thumb::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 54%;
  width: 56%;
  height: 56%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, .42);
}
/* 已勾选态 */
.mock-thumb.checked::after {
  content: "✓";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border-radius: 5px;
}

.mock-fab {
  position: absolute;
  right: 18px;
  bottom: -18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--gradient);
  border-radius: var(--radius-full);
  box-shadow: 0 14px 28px -8px rgba(99, 102, 241, .6);
}
.mock-fab svg { width: 16px; height: 16px; }

/* 向下滚动提示 */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  animation: float 2.2s ease-in-out infinite;
}
.scroll-hint svg { width: 22px; height: 22px; }
@keyframes float {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- 6. 通用区块 ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(99, 102, 241, .10);
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.4px;
}
.section-desc { margin-top: 14px; font-size: 15px; color: var(--text-2); }

/* ---------- 7. 产品介绍区 ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.intro-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.intro-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.intro-card h3 { margin: 18px 0 10px; font-size: 18px; font-weight: 700; }
.intro-card p { font-size: 14.5px; color: var(--text-2); }

/* 图标徽章 */
.icon-badge {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 18px -6px rgba(99, 102, 241, .55);
}
.icon-badge svg { width: 24px; height: 24px; }

/* ---------- 8. 核心功能区 ---------- */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.feature-card h3 { margin: 18px 0 10px; font-size: 18px; font-weight: 700; }
.feature-card p { font-size: 14.5px; color: var(--text-2); }

/* ---------- 9. 安装步骤区 ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.step-num {
  flex: none;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: var(--gradient);
  border-radius: 50%;
  box-shadow: 0 8px 16px -6px rgba(99, 102, 241, .55);
}
.step-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.step-body p { font-size: 14.5px; color: var(--text-2); }

/* ---------- 10. 底部 CTA ---------- */
.cta { padding: 72px 0; }
.cta-inner {
  text-align: center;
  padding: 56px 24px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 80% at 20% 0%, rgba(255, 255, 255, .18), transparent 60%),
    radial-gradient(60% 80% at 80% 100%, rgba(255, 255, 255, .12), transparent 60%),
    var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-inner h2 { font-size: clamp(22px, 4vw, 32px); font-weight: 800; }
.cta-inner p { margin-top: 12px; font-size: 16px; opacity: .9; }
.cta-actions { margin-top: 28px; }

/* ---------- 11. Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 40px 0;
}
.footer-inner { text-align: center; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
}
.footer-brand .logo-mark { width: 30px; height: 30px; border-radius: 9px; }
.footer-brand .logo-icon { width: 18px; height: 18px; }
.footer-meta { margin-top: 14px; font-size: 13px; color: var(--text-3); }
.footer-links { display: flex; justify-content: center; gap: 22px; margin-top: 16px; }
.footer-links a { font-size: 14px; color: var(--text-2); transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--primary); }
.footer-copy { margin-top: 18px; font-size: 13px; color: var(--text-3); }

/* ---------- 12. 滚动淡入动画 ---------- */
/* 仅在 JS 可用时隐藏（.js 由 main.js 注入），避免无 JS 时内容不可见 */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- 13. 响应式断点 ---------- */

/* 平板：768px ~ 1023px */
@media (min-width: 768px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; }
  .intro-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 88px 0; }
}

/* 桌面：≥ 1024px */
@media (min-width: 1024px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .step { flex-direction: column; }
  .section { padding: 104px 0; }
}

/* 超小屏兜底（≤ 320px 仍可用） */
@media (max-width: 360px) {
  :root { --gutter: 14px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 22px; }
}

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
