/* =============================================================================
   泽算AI赋能 · 官网（peixun.zesuanai.com）样式
   -----------------------------------------------------------------------------
   零依赖、纯静态：不引任何 CDN 与框架，产物可直接 rsync 到 nginx 挂载点。
   设计口径（来自需求文档）：
     · 深蓝渐变 #0A1628 营造专业稳重感；
     · 工种语言优先——界面上不出现技术术语（守卫见 tests/site.test.mjs）；
     · 支持 PC 与移动端自适应，单页长滚动。

   ★ LOGO 用哪一版是有讲究的（管理后台的 branding 测试踩过）：
     深色底放彩色版 → 深蓝笔画消失在深蓝底上；浅色底放白色版 → 白底白字。
     所以导航用 logo-white.png，页脚（浅底）用 logo-color.png。
   ============================================================================= */

:root {
  --navy: #0A1628;
  --navy-2: #14294A;
  --accent: #2F6BFF;
  --accent-2: #5B8CFF;
  --ink: #16202E;
  --muted: #5A6675;
  --line: #E6EAF0;
  --bg-alt: #F5F7FA;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(16, 32, 56, .08);
  --wrap: 1120px;
  /* ★ 品牌 lockup 的两个尺寸（评审：中文名要与字母 LOGO 一样大）。
     数字刻意不同，但**看起来一样高**：
       · 小标的墨迹几乎撑满外框（216×128 的图，墨迹 y:1–126），
         所以它的视觉高度 ≈ 渲染高度 --brand-mark；
       · CJK 字形的墨迹只占字号的约 88%，
         26px 的中文 ≈ 23px 墨高，才与 24px 的小标齐平。
     把两个值放在一起，是为了让"一样大"这件事只有一个地方可改。 */
  --brand-mark: 24px;
  --brand-name: 26px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }

/* ---------------------------------------------------------------- 顶部导航 */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 22, 40, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
/* 品牌区 = ZE 小标 + 中文产品名（与管理后台顶栏同一套 lockup）。
   ★ 这里刻意**不用** 640×130 的整条字标：它是 4.9:1 的拉丁文 ZESUAN，
     放在「泽算AI赋能」前面会宽出一倍，而且中文读者会把两个名字并排读成
     "两个品牌"。小标是 1.69:1，配中文名的总宽约 130px，手机上也不挤。 */
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand img { height: var(--brand-mark); width: auto; display: block; }
.nav-brand-name {
  color: #fff; font-size: var(--brand-name); font-weight: 600;
  letter-spacing: .01em; white-space: nowrap;
  /* 行高必须压到 1：否则 26px 的字会把 56px 的导航条撑高（body 的 1.75 会算出 45px 行盒） */
  line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: #D6DEEA; font-size: 15px; }
.nav-links a:hover { color: #fff; text-decoration: none; }
/* 「返回泽算Token」放在最右侧、单独描边：它通向另一个产品，不是本页的锚点 */
.nav-links .nav-back {
  color: #fff; border: 1px solid rgba(255, 255, 255, .35);
  padding: 5px 12px; border-radius: 999px;
}
.nav-links .nav-back:hover { background: rgba(255, 255, 255, .12); }

/* ------------------------------------------------------------ 第一屏（痛点） */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 72px 0 64px;
}
.hero-title {
  font-size: clamp(26px, 4.4vw, 44px);
  line-height: 1.3; margin: 0 0 14px; font-weight: 700;
}
.hero-sub { font-size: clamp(16px, 2vw, 20px); color: #B9C6D8; margin: 0 0 38px; }

.pain-cards { margin-bottom: 40px; }
.pain-card { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }
.pain-card h3 { color: #fff; }
.pain-card p { color: #C4D0E0; }

.claim {
  font-size: clamp(18px, 2.4vw, 26px); font-weight: 600; line-height: 1.55;
  text-align: center; margin: 0 auto 34px; max-width: 820px;
}
.claim-light { color: #fff; }

/* ------------------------------------------------------------------ 通用块 */
.section { padding: 66px 0; scroll-margin-top: 62px; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
}
.section-dark .sec-title { color: #fff; }

.sec-title {
  font-size: clamp(21px, 3vw, 30px); line-height: 1.4;
  margin: 0 0 10px; font-weight: 700; text-align: center;
}
.sec-sub { text-align: center; color: var(--muted); margin: 0 0 40px; }

/* 类别标签（"这一屏讲的是哪项服务"）。
   ★ 文字色刻意不用 --accent（#2F6BFF）：它在 #EAF0FF 底上只有 3.94:1，
     不满足小字号文字的 AA 门槛（4.5:1）。改用 #2559DB → 5.21:1。
     tests/site.test.mjs 里有一条按同样公式算对比度的断言，改色会被它拦住。 */
.eyebrow-row { text-align: center; margin: 0 0 12px; }
.eyebrow {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  background: #EAF0FF; color: #2559DB;
  font-size: 14px; font-weight: 600; letter-spacing: .06em;
}
.lead-p { font-size: 18px; font-weight: 600; }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 12px; font-size: 18px; }
.card p { margin: 0 0 10px; color: #3B4757; }
.card p:last-child { margin-bottom: 0; }

.dark-card { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
.dark-card h3 { color: #fff; }
.dark-card p { color: #C4D0E0; }

.step-tag {
  display: inline-block; font-size: 12px; letter-spacing: .06em;
  color: var(--accent); background: #EAF0FF; border-radius: 999px;
  padding: 3px 10px; margin-bottom: 12px;
}
.step-goal { color: var(--ink) !important; }

.product-card dl, .case-card dl { margin: 0 0 16px; }
/* ★ 三张产品卡片的「周期 / 价格」必须横向对齐（评审反馈）。
   网格项默认 stretch，所以三张卡片**等高**；再把卡片做成纵向 flex、
   让 meta 行 `margin-top: auto` 顶到底部，三条虚线就落在同一条水平线上。
   不做这一步时，meta 跟着上面文字的长度走，三张卡片各停在不同高度。 */
.product-card, .case-card { display: flex; flex-direction: column; }
.product-meta { margin-top: auto; }
.case-card .badge { margin-top: auto; align-self: flex-start; }
.product-card dt, .case-card dt {
  font-size: 13px; color: var(--muted); margin-top: 12px;
}
.product-card dd, .case-card dd { margin: 2px 0 0; color: #3B4757; }
.product-meta {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  border-top: 1px dashed var(--line); padding-top: 14px;
  font-size: 14px; color: var(--accent); font-weight: 600;
}
.badge {
  display: inline-block; font-size: 12px; color: var(--muted);
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 10px;
}

/* -------------------------------------------------------------- 交付承诺表 */
.promise-table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.promise-table th, .promise-table td {
  text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.promise-table thead th { background: var(--navy); color: #fff; font-weight: 600; }
.promise-table tbody tr:last-child td { border-bottom: 0; }
.promise-table td:first-child { width: 30%; color: var(--muted); }

/* -------------------------------------------------------------------- 按钮 */
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  padding: 12px 26px; border-radius: 999px; text-align: center;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 18px rgba(47, 107, 255, .28); }
.btn-primary:hover { background: #2559DB; }
.btn-primary[disabled] { background: #9DB4E8; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-block { width: 100%; }

/* -------------------------------------------------------------- 联系与表单 */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 30px; align-items: start; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-table th { width: 88px; color: var(--muted); font-weight: 500; }

.apply-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .req { color: #E5484D; }
.field .hint { color: var(--muted); font-weight: 400; }
.field input, .field select {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #CFD8E3; border-radius: 10px; padding: 11px 13px;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 107, 255, .15);
}
.field input[aria-invalid="true"] { border-color: #E5484D; }
.field select[disabled] { background: #F3F5F9; color: var(--muted); }
.field-note { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.field-note.ok { color: #12805C; }
.field-note.bad { color: #B54708; }

.form-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.form-error {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 10px;
  background: #FEF3F2; border: 1px solid #FDA29B; color: #912018; font-size: 14px;
}
.form-done {
  background: #ECFDF3; border: 1px solid #A6F4C5; color: #054F31;
  border-radius: 10px; padding: 16px; font-size: 15px;
}
.form-done strong { display: block; margin-bottom: 6px; }

/* -------------------------------------------------------------------- 页脚 */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 40px 0 34px; text-align: center; }
.footer-logo { margin-bottom: 10px; }
.footer-slogan { color: var(--ink); font-weight: 600; margin: 0 0 18px; }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin: 0 0 18px; }
.footer-copy { font-size: 13px; color: var(--muted); margin: 0; }
.footer-copy a { color: var(--muted); }

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 900px) {
  /* 品牌 lockup 同步降一档：两个值一起改，比例保持不变（看起来还是一样高） */
  :root { --brand-mark: 22px; --brand-name: 24px; }
  .grid-3, .grid-2, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding: 54px 0 48px; }
  .section { padding: 52px 0; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 14px; }
  .promise-table td:first-child { width: 40%; }
}

@media (max-width: 640px) {
  /* 窄屏收起锚点导航，只留品牌与「返回泽算Token」——把横向空间让给转化入口 */
  .nav-links a:not(.nav-back) { display: none; }
  .card { padding: 20px; }
  .promise-table th, .promise-table td { padding: 12px 13px; font-size: 15px; }
  .cta-row .btn { width: 100%; }
}
