/* ============================================================
   surface.代加工.中国 — 表面处理中台
   暗色科技风设计系统（原创，非模板）
   ============================================================ */

:root {
  --bg: #0a0e16;
  --bg-soft: #0f1420;
  --surface: #131a28;
  --surface-2: #18212f;
  --border: #243042;
  --border-soft: #1b2433;
  --text: #e7eef7;
  --text-muted: #9fb0c3;
  --text-dim: #6b7d92;
  --brand: #2dd4bf;
  --brand-2: #6366f1;
  --brand-glow: rgba(45, 212, 191, .35);
  --accent: #f5b740;
  --danger: #f87171;
  --ok: #34d399;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 48px -22px rgba(0,0,0,.75);
  --shadow-soft: 0 8px 28px -18px rgba(0,0,0,.7);
  --maxw: 1200px;
  --h2-inset: 0px;
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(99,102,241,.14), transparent 60%),
    radial-gradient(1000px 600px at -6% 8%, rgba(45,212,191,.10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { line-height: 1.3; font-weight: 700; letter-spacing: .2px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  backdrop-filter: saturate(150%) blur(14px);
  background: rgba(10,14,22,.72);
  border-bottom: 1px solid var(--border-soft);
}
.nav { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #04121a; font-weight: 900; font-size: 17px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 6px 20px -8px var(--brand-glow);
}
.brand small { display:block; font-size: 11px; font-weight: 500; color: var(--text-dim); letter-spacing: 1px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-links > .nav-item { position: relative; }
.nav-links a.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 13px; border-radius: 9px; color: var(--text-muted);
  font-size: 14.5px; font-weight: 500; transition: .18s;
}
.nav-links a.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.nav-link.active { color: var(--brand); }
/* 二级分类折叠（移动端/文章产品） */
.nav-sub {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px; box-shadow: var(--shadow);
  display: none; flex-direction: column; z-index: 60;
}
.nav-item:hover .nav-sub, .nav-item:focus-within .nav-sub { display: flex; }
.nav-sub a { padding: 9px 11px; border-radius: 8px; color: var(--text-muted); font-size: 14px; }
.nav-sub a:hover { background: var(--surface-2); color: var(--text); }
.nav-toggle { display: none; margin-left: auto; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); width: 42px; height: 38px; border-radius: 9px; cursor: pointer; font-size: 18px; }

/* ---------- Hero / sections ---------- */
main { padding-top: 64px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.eyebrow { color: var(--brand); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; }
.section-title { font-size: clamp(26px, 3.4vw, 38px); margin: 10px 0 14px; }
.section-lead { color: var(--text-muted); max-width: 760px; }

.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 84px;
  border-bottom: 1px solid var(--border-soft);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(transparent 95%, rgba(45,212,191,.07) 95%);
  background-size: 100% 26px; opacity: .5;
}
.hero h1 { font-size: clamp(32px, 5vw, 56px); margin: 14px 0 18px; max-width: 16ch; }
.hero h1 .grad { background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--text-muted); max-width: 720px; }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 12px 20px; border-radius: 11px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); transition: .18s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--brand); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #04121a; border: none; box-shadow: 0 12px 30px -14px var(--brand-glow); }
.btn-ghost { background: transparent; }

/* stat row */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 46px; }
.stat { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px; }
.stat .n { font-size: 30px; font-weight: 800; color: var(--brand); }
.stat .l { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }

/* ---------- Cards / grids ---------- */
.grid-cards { display: grid; gap: 20px; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 24px; transition: .2s; position: relative; overflow: hidden;
}
.card:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow); }
.card .ico { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(45,212,191,.12); color: var(--brand); font-size: 22px; margin-bottom: 14px; }
.card h3 { font-size: 18px; margin: 0 0 8px; }
.card p { color: var(--text-muted); font-size: 14.5px; margin: 0; }
.card .tag-row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-text { font-size: 12px; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border-soft);
  padding: 3px 9px; border-radius: 999px; }

/* feature list */
.feature-list { display: grid; gap: 14px; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature .dot { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(99,102,241,.14); color: var(--brand-2); font-weight: 800; font-size: 14px; }
.feature h4 { margin: 0 0 3px; font-size: 16px; }
.feature p { margin: 0; color: var(--text-muted); font-size: 14.5px; }

/* ---------- Breadcrumb (对齐 H2 左缘) ---------- */
.breadcrumb { font-size: 13px; color: var(--text-dim); padding: 18px 0 6px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; align-items: center; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "›"; color: var(--text-dim); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb [aria-current="page"] { color: var(--text); }

/* ---------- Article / Product layout (V7: left TOC) ---------- */
.article-layout { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 40px; align-items: start; }
.toc-aside { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; }
.toc-aside nav { border-left: 2px solid var(--border); padding-left: 14px; }
.toc-aside .toc-title { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.toc-aside a { display: block; padding: 6px 0; color: var(--text-muted); font-size: 13.5px; border-left: 2px solid transparent; margin-left: -16px; padding-left: 14px; }
.toc-aside a:hover { color: var(--brand); border-left-color: var(--brand); }

.article-main { min-width: 0; }
.article-main h1 { font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 18px; }

/* 摘要块 */
.summary-block {
  background: linear-gradient(180deg, rgba(45,212,191,.06), rgba(99,102,241,.04));
  border: 1px solid var(--border-soft); border-left: 3px solid var(--brand);
  border-radius: 10px; padding: 18px 20px; color: var(--text); font-size: 15px; margin-bottom: 18px;
}
/* 核心结论 callout */
.core-conclusion {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; margin-bottom: 26px;
}
.core-conclusion .cc-title { font-weight: 700; color: var(--brand); font-size: 14px; letter-spacing: 1px; margin-bottom: 10px; }
.core-conclusion ol { margin: 0; padding-left: 20px; }
.core-conclusion li { margin: 7px 0; color: var(--text); }
.core-conclusion b { color: var(--accent); }

.keyword-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.keyword-row .tag-text { font-size: 12.5px; }

.article-body h2 { font-size: 24px; margin: 38px 0 14px; padding-top: 6px; scroll-margin-top: 84px; }
.article-body h3 { font-size: 19px; margin: 26px 0 10px; scroll-margin-top: 84px; color: #cfe0ee; }
.article-body p { color: #d2dde9; margin: 12px 0; }
.article-body ul, .article-body ol { color: #d2dde9; padding-left: 22px; }
.article-body li { margin: 7px 0; }
.article-body strong { color: #fff; }
.article-body code { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--border-soft); padding: 1px 6px; border-radius: 6px; font-size: 13.5px; color: var(--brand); }

/* 参数表 table.spec */
table.spec { width: 100%; border-collapse: collapse; margin: 16px 0 22px; font-size: 14.5px; border-radius: 10px; overflow: hidden; }
table.spec thead th { background: #0c1422; color: var(--text); text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); font-weight: 700; }
table.spec tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); color: var(--text-muted); }
table.spec tbody tr:nth-child(even) { background: rgba(255,255,255,.015); }
table.spec tbody td:first-child { color: var(--text); font-weight: 600; }

.callout-note { background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.25); border-radius: 10px; padding: 13px 16px; font-size: 14px; color: #cdd7ff; margin: 16px 0; }
.case-study { background: linear-gradient(180deg, rgba(52,211,153,.07), transparent); border: 1px solid rgba(52,211,153,.22); border-left: 3px solid var(--ok); border-radius: 10px; padding: 16px 18px; margin: 22px 0; }
.case-study .cs-title { color: var(--ok); font-weight: 700; font-size: 13px; letter-spacing: 1px; margin-bottom: 8px; }

/* 更新时间行 */
.update-line { font-size: 13px; color: var(--text-dim); margin: 6px 0 20px; }
.update-line time { color: var(--text-muted); }

/* FAQ (V7 faq_div) */
.faq-wrap { margin: 30px 0; }
.faq-wrap > h2 { font-size: 22px; }
.faq-item { border: 1px solid var(--border-soft); border-radius: 12px; padding: 16px 18px; margin: 12px 0; background: var(--surface); }
.faq-q { font-weight: 700; color: var(--text); margin: 0 0 8px; font-size: 16px; }
.faq-q::before { content: "Q"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: rgba(45,212,191,.14); color: var(--brand); font-size: 12px; margin-right: 9px; vertical-align: -3px; }
.faq-a { color: var(--text-muted); margin: 0; font-size: 14.5px; }

/* 相关阅读 */
.related { margin-top: 40px; border-top: 1px solid var(--border-soft); padding-top: 26px; }
.related h2 { font-size: 20px; margin: 0 0 16px; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.related li a { display: flex; gap: 10px; align-items: baseline; color: var(--text); padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface); transition: .18s; }
.related li a:hover { border-color: var(--brand); }
.related li .r-why { color: var(--text-dim); font-size: 13px; margin-left: auto; text-align: right; }

/* ---------- List / category pages ---------- */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.cat-tab { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); font-size: 14px; background: var(--surface); transition: .16s; }
.cat-tab:hover { color: var(--text); border-color: var(--brand); }
.cat-tab.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #04121a; border: none; font-weight: 600; }

.list-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 40px; align-items: start; }
.post-list { display: grid; gap: 16px; }
.post-item { display: block; border: 1px solid var(--border-soft); border-radius: 12px; padding: 18px 20px; background: var(--surface); transition: .18s; }
.post-item:hover { border-color: var(--brand); transform: translateY(-2px); }
.post-item .pi-cat { font-size: 12px; color: var(--brand); letter-spacing: 1px; text-transform: uppercase; }
.post-item h3 { margin: 6px 0 8px; font-size: 18px; }
.post-item p { color: var(--text-muted); font-size: 14px; margin: 0 0 10px; }

/* ---------- Floating capsule ---------- */
.float-capsule { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 12px; }
.capsule-btn {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: 999px; padding: 11px 16px;
  color: var(--text); font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-soft); transition: .18s;
}
.capsule-btn:hover { border-color: var(--brand); transform: translateX(-3px); }
.capsule-btn .ci { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(45,212,191,.15); color: var(--brand); font-size: 15px; }
.capsule-btn.top .ci { background: rgba(99,102,241,.15); color: var(--brand-2); }

/* WeChat modal */
.wechat-modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; background: rgba(4,7,12,.74); backdrop-filter: blur(4px); }
.wechat-modal.open { display: grid; }
.wechat-modal .wm-box { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); text-align: center; }
.wechat-modal .wm-box img { width: 300px; height: 500px; object-fit: contain; border-radius: 10px; background: #fff; }
.wechat-modal .wm-box .wm-tip { color: var(--text-muted); font-size: 13px; margin-top: 12px; }
.wechat-modal .wm-close { position: absolute; top: 14px; right: 18px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); width: 36px; height: 36px; border-radius: 9px; cursor: pointer; font-size: 18px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); margin-top: 60px; padding: 48px 0 30px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { font-size: 14px; color: var(--text); margin: 0 0 14px; }
.footer-grid a { display: block; color: var(--text-muted); font-size: 14px; padding: 5px 0; }
.footer-grid a:hover { color: var(--brand); }
.footer-about p { color: var(--text-muted); font-size: 14px; max-width: 34ch; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--text-dim); font-size: 13px; }

/* ---------- Misc ---------- */
.notice { border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 16px; background: var(--surface); color: var(--text-muted); font-size: 14px; }
.page-head { padding: 120px 0 12px; }
.page-head h1 { font-size: clamp(28px, 4vw, 42px); margin: 8px 0 10px; }
.divider { height: 1px; background: var(--border-soft); margin: 0; border: 0; }
.banner-soft { background: linear-gradient(180deg, rgba(45,212,191,.05), transparent); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .article-layout, .list-layout { grid-template-columns: 1fr; }
  .toc-aside { position: static; max-height: none; margin-bottom: 20px; }
  .toc-aside nav { border-left: none; padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .cols-3, .cols-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 720px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 2px; background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 12px; }
  .nav-links.open { display: flex; }
  .nav-links .nav-sub { position: static; display: flex; box-shadow: none; border: none; background: transparent; padding-left: 12px; }
  .nav-item:hover .nav-sub { display: none; }
  .nav-item.open .nav-sub { display: flex; }
  .nav-toggle { display: block; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .float-capsule { right: 12px; }
  .wechat-modal .wm-box img { width: 260px; height: 433px; }
}
