/* ============================================================
   美算盘官网 · Apple 设计系统（依据 DESIGN.md）
   单一强调色 Action Blue #0066cc · 明暗瓷片交替 · 无装饰渐变
   唯一投影仅用于产品图像 · 药丸形 CTA · SF Pro 字体栈
   ============================================================ */
:root {
  /* colors */
  --primary: #0066cc;
  --primary-focus: #0071e3;
  --primary-on-dark: #2997ff;
  --ink: #1d1d1f;
  --ink-80: #333333;
  --ink-48: #7a7a7a;
  --on-dark: #ffffff;
  --muted-dark: #cccccc;
  --canvas: #ffffff;
  --parchment: #f5f5f7;
  --tile-1: #272729;
  --tile-2: #2a2a2c;
  --tile-3: #252527;
  --black: #000000;
  --hairline: #e0e0e0;
  /* the one and only shadow — product imagery only */
  --shadow-product: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;
  /* radii */
  --r-sm: 8px;
  --r-lg: 18px;
  --r-pill: 9999px;
  /* font */
  --font: "SF Pro Display", "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- 容器 ---------- */
.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.wrap-text { max-width: 680px; margin: 0 auto; text-align: center; }
.center { text-align: center; }

/* ---------- 排版 ---------- */
.t-eyebrow { font-size: 12px; font-weight: 400; letter-spacing: -0.12px; text-transform: uppercase; color: var(--primary); }
.t-hero { font-size: 56px; font-weight: 600; line-height: 1.07; letter-spacing: -0.28px; }
.t-display { font-size: 40px; font-weight: 600; line-height: 1.1; letter-spacing: 0; }
.t-lead { font-size: 28px; font-weight: 400; line-height: 1.14; letter-spacing: 0.196px; }
.t-airy { font-size: 24px; font-weight: 300; line-height: 1.5; letter-spacing: 0; }
.t-caption { font-size: 14px; font-weight: 400; line-height: 1.43; letter-spacing: -0.224px; }
.muted { color: var(--ink-48); }
.tile-dark .muted, .tile-dark2 .muted, .tile-dark3 .muted { color: var(--muted-dark); }

/* ---------- 按钮（药丸 CTA） ---------- */
.btn {
  display: inline-block; padding: 11px 22px; border-radius: var(--r-pill);
  font-size: 17px; font-weight: 400; letter-spacing: -0.374px; line-height: 1;
  border: 1px solid transparent; cursor: pointer; text-align: center;
  transition: transform 0.1s ease;
}
.btn:active { transform: scale(0.95); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:focus { outline: 2px solid var(--primary-focus); outline-offset: 2px; }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-sm { padding: 6px 16px; font-size: 14px; letter-spacing: -0.224px; }

/* ---------- 文字链接 ---------- */
.tlink { color: var(--primary); font-size: 17px; font-weight: 400; letter-spacing: -0.374px; }
.tlink-sm { font-size: 14px; letter-spacing: -0.224px; }
.tile-dark .tlink, .tile-dark2 .tlink, .tile-dark3 .tlink { color: var(--primary-on-dark); }

/* ---------- 双行导航：黑色全局导航 ---------- */
.site-header { position: sticky; top: 0; z-index: 100; }
.gn { background: var(--black); color: var(--on-dark); height: 44px; }
.gn-inner { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.gn-brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; letter-spacing: -0.374px; color: #fff; }
.gn-logo { width: 20px; height: 20px; border-radius: 4px; overflow: hidden; flex: none; }
.gn-logo img { width: 100%; height: 100%; object-fit: cover; }
.gn-links { display: flex; gap: 20px; }
.gn-link { font-size: 12px; font-weight: 400; letter-spacing: -0.12px; color: rgba(255, 255, 255, 0.8); }
.gn-link:hover { color: #fff; }
.gn-link.active { color: #fff; }
.gn-actions { display: flex; align-items: center; gap: 20px; }
.gn-login { color: rgba(255, 255, 255, 0.8); }
.gn-login:hover { color: #fff; }

/* 汉堡菜单（≤834px 显示） */
.hamburger {
  display: none; width: 44px; height: 44px; background: transparent; border: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.hamburger span { display: block; width: 20px; height: 1.5px; background: #fff; }

/* 移动端折叠菜单 */
.mobile-tray { display: none; background: var(--black); }
.mobile-tray.open { display: block; }
.mobile-tray a { display: block; padding: 14px 24px; font-size: 17px; color: #fff; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.mobile-tray a.active { color: var(--primary-on-dark); }

/* ---------- 磨砂子导航 ---------- */
.subnav {
  background: rgba(245, 245, 247, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline); height: 52px;
}
.subnav-inner { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.subnav-title { font-size: 21px; font-weight: 600; letter-spacing: 0.231px; }
.subnav-actions { display: flex; align-items: center; gap: 20px; }
.subnav-link { font-size: 14px; font-weight: 400; letter-spacing: -0.224px; color: var(--ink); }
.subnav-link:hover { color: var(--primary); }

/* ---------- 全出血瓷片 ---------- */
.tile { padding: 80px 0; }
.tile-white { background: var(--canvas); color: var(--ink); }
.tile-parchment { background: var(--parchment); color: var(--ink); }
.tile-dark { background: var(--tile-1); color: var(--on-dark); }
.tile-dark2 { background: var(--tile-2); color: var(--on-dark); }
.tile-dark3 { background: var(--tile-3); color: var(--on-dark); }
.tile-dark .t-eyebrow, .tile-dark2 .t-eyebrow, .tile-dark3 .t-eyebrow { color: var(--primary-on-dark); }

/* ---------- Hero（白瓷片） ---------- */
.hero { padding: 96px 0 80px; }
.hero-cta { margin-top: 32px; display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; }
.hero-cta .tlink { font-size: 17px; }

/* ---------- 首页大图（单一产品截图，唯一投影） ---------- */
.hero-image {
  display: block; width: 100%; max-width: 1080px; height: auto;
  margin: 56px auto 0; border-radius: var(--r-sm); box-shadow: var(--shadow-product);
}

/* ---------- 品牌墙 ---------- */
.brands { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 56px; font-size: 17px; font-weight: 600; letter-spacing: -0.374px; color: var(--ink-48); }

/* ---------- 深色能力瓷片 ---------- */
.dark-cols { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.dark-cols.cols-4 { grid-template-columns: repeat(4, 1fr); }
.dark-cols h3 { font-size: 21px; font-weight: 600; letter-spacing: 0.231px; }
.dark-cols p { margin-top: 8px; font-size: 15px; line-height: 1.5; letter-spacing: -0.224px; color: var(--muted-dark); }

/* ---------- 数据统计 ---------- */
.stats { margin-top: 56px; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 32px 72px; }
.stat b { display: block; font-size: 34px; font-weight: 600; letter-spacing: -0.374px; color: #fff; }
.stat span { display: block; margin-top: 4px; font-size: 14px; letter-spacing: -0.224px; color: var(--muted-dark); }
.stats.light { justify-content: center; text-align: center; }
.stats.light .stat b { color: var(--ink); }
.stats.light .stat span { color: var(--ink-48); }

/* ---------- 工具卡片：白底 + 发丝线 + 18px 圆角，无投影 ---------- */
.card {
  background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 24px; display: flex; flex-direction: column;
}
.card h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.374px; color: var(--ink); }
.card p { margin: 8px 0 0; font-size: 14px; line-height: 1.5; letter-spacing: -0.224px; color: var(--ink-80); }
.card .tlink { margin-top: auto; padding-top: 16px; align-self: flex-start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ---------- FAQ（GEO：AI 引擎可引用的问答区） ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { padding: 24px 0; border-bottom: 1px solid var(--hairline); }
.faq-item:first-child { padding-top: 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-q { margin: 0 0 8px; font-size: 17px; font-weight: 600; letter-spacing: -0.374px; color: var(--ink); }
.faq-a { margin: 0; font-size: 15px; line-height: 1.6; letter-spacing: -0.224px; color: var(--ink-80); }

/* ---------- 预约演示（深色瓷片） ---------- */
.contact { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.contact-form { display: flex; gap: 12px; flex-wrap: wrap; }
.input-pill {
  height: 44px; width: 240px; padding: 0 20px;
  border-radius: var(--r-pill); border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--canvas); color: var(--ink);
  font-size: 17px; letter-spacing: -0.374px; font-family: var(--font); outline: none;
}
.input-pill:focus { border-color: var(--primary-focus); }

/* ---------- 定价卡 ---------- */
.price-card { position: relative; padding: 32px 24px; }
.price-card.rec { border: 2px solid var(--primary-focus); }
.chip-rec { position: absolute; top: 20px; right: 20px; background: var(--primary); color: #fff; font-size: 12px; letter-spacing: -0.12px; padding: 3px 10px; border-radius: var(--r-pill); }
.p-desc { color: var(--ink-48) !important; }
.p-price { margin-top: 20px; display: flex; align-items: baseline; gap: 4px; }
.p-num { font-size: 34px; font-weight: 600; letter-spacing: -0.374px; }
.p-per { font-size: 14px; color: var(--ink-48); }
.p-list { list-style: none; margin: 16px 0 24px; padding: 0; }
.p-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.5; letter-spacing: -0.224px; color: var(--ink-80); padding: 5px 0; }
.check { color: var(--primary); font-weight: 600; flex: none; }
.p-note { margin-top: 32px; text-align: center; color: var(--ink-48); }

/* ---------- 页脚（羊皮纸，密排链接） ---------- */
.footer { background: var(--parchment); color: var(--ink-80); padding: 64px 0; }
.f-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.f-col h4 { font-size: 14px; font-weight: 600; letter-spacing: -0.224px; color: var(--ink); margin-bottom: 12px; }
.f-col a { display: block; font-size: 17px; font-weight: 400; line-height: 2.41; letter-spacing: 0; color: var(--ink-80); }
.f-col a:hover { color: var(--ink); }
.f-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--hairline); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; letter-spacing: -0.12px; color: var(--ink-48); }

/* 页脚二维码 + ICP 备案 */
.f-qr { display: flex; gap: 40px; justify-content: center; padding-top: 40px; }
.f-qr-item { text-align: center; }
.f-qr-box {
  width: 150px; height: 150px; margin: 0 auto;
  border: 1px dashed var(--hairline); border-radius: var(--r-sm);
  background: var(--canvas); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.f-qr-box img { width: 100%; height: 100%; object-fit: cover; }
.f-qr-item span { display: block; margin-top: 8px; font-size: 12px; letter-spacing: -0.12px; color: var(--ink-48); }
.f-icp { margin-top: 16px; text-align: center; font-size: 12px; letter-spacing: -0.12px; color: var(--ink-48); }
.f-icp a { color: var(--ink-48); }
.f-icp a:hover { color: var(--ink); }

/* ---------- Toast 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--r-sm);
  font-size: 14px; letter-spacing: -0.224px; opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s; z-index: 120;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- 响应式 ---------- */
@media (max-width: 1068px) {
  .t-hero { font-size: 40px; }
  .t-display { font-size: 34px; }
}
@media (max-width: 834px) {
  .gn-links { display: none; }
  .hamburger { display: flex; }
  .gn-login { display: none; }
  .subnav-link { display: none; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .dark-cols, .dark-cols.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .f-grid { grid-template-columns: repeat(2, 1fr); }
  .tile { padding: 64px 0; }
  .hero { padding: 64px 0 80px; }
  .stats { grid-template-columns: repeat(2, auto); }
}
@media (max-width: 734px) {
  .tile { padding: 56px 0; }
  .t-lead { font-size: 24px; }
  .t-airy { font-size: 21px; }
}
@media (max-width: 640px) {
  .t-hero { font-size: 34px; }
  .t-display { font-size: 32px; }
  .grid-3 { grid-template-columns: 1fr; }
  .dark-cols, .dark-cols.cols-4 { grid-template-columns: 1fr; }
  .f-grid { grid-template-columns: 1fr; }
  .subnav-title { font-size: 17px; letter-spacing: 0; }
  .contact { flex-direction: column; align-items: flex-start; }
  .contact-form, .input-pill { width: 100%; }
  .contact-form .btn { flex: 1; }
  .hero-cta .btn { width: 100%; max-width: 320px; }
}
@media (max-width: 419px) {
  .t-hero { font-size: 28px; }
  .t-display { font-size: 28px; }
}
