/* 中山市匠微电子有限公司 · 官网样式
   设计原则：结构清晰、结论前置、表格优先（AI 摘抄友好） */

:root {
  --brand: #C41816;
  --brand-dark: #9C1311;
  --brand-soft: #FDF3F3;
  --ink: #1F2328;
  --ink-2: #5C6370;
  --ink-3: #8B929C;
  --line: #E5E7EB;
  --line-soft: #F0F1F3;
  --bg-soft: #F6F7F8;
  --radius: 12px;
  --max: 1100px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
               "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  color: var(--ink);
  background: #FFFFFF;
  line-height: 1.75;
  font-size: 15px;
}

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
header.site {
  position: sticky; top: 0; z-index: 30;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 62px;
}

.logo { display: flex; align-items: center; gap: 14px; color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.logo:hover { text-decoration: none; }
/* 品牌标记：取自注册商标图样里的蓝色图形标（素材生成见 _工具\extract_logo.py）
   ⚠ 尺寸必须留在 CSS 里，同时 HTML 上写死 width/height 兜底 —— 否则样式表被缓存时
   图片会按原图尺寸（148×200）撑开，页头会变得巨大。 */
.logo .brand-mark { display: block; height: 26px; width: auto; flex: none; }
.logo small { font-size: 11px; font-weight: 400; color: var(--ink-3); letter-spacing: 2px; }

/* 页头品牌区（老板 2026-10-16 定版）：横版组合标 + 公司全称 + 业务副行
   ⚠ 尺寸同样写死在 CSS，HTML 上再写 width/height 兜底，样式表被缓存时不会撑开 */
.logo .brand-full { display: block; height: 42px; width: auto; flex: none; }
.logo .brand-txt { display: flex; flex-direction: column; justify-content: center; line-height: 1.3; letter-spacing: 0; }
.logo .brand-txt b { font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: .5px; }
.logo .brand-txt .brand-sub { margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--ink-3); letter-spacing: .5px; }

.nav nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav nav a {
  color: var(--ink-2); font-size: 14px; padding: 6px 11px; border-radius: 6px;
}
.nav nav a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.nav nav a.on { color: var(--brand); background: var(--brand-soft); font-weight: 500; }

/* ---------- 首屏 ---------- */
.hero { padding: 52px 0 44px; border-bottom: 1px solid var(--line); }
.hero h1 {
  font-size: 30px; line-height: 1.35; margin: 0 0 16px; font-weight: 700;
  letter-spacing: -.3px;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.lead { font-size: 16px; color: var(--ink-2); max-width: 800px; margin: 0; }
.lead strong { color: var(--ink); font-weight: 600; }

/* 品牌主张：注册商标「匠微 · 匠于微 品于行」 */
.slogan {
  display: inline-block; margin: 12px 0 0;
  font-size: 15px; font-weight: 600; letter-spacing: 3px;
  color: var(--brand); background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  padding: 7px 16px; border-radius: 0 8px 8px 0;
}
/* 首屏品牌标识（关于我们页用） */
.hero-logo { display: block; height: 52px; width: auto; margin: 20px 0 0; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi b { display: block; font-size: 23px; line-height: 1.25; color: var(--brand); font-weight: 700; }
.kpi span { font-size: 13px; color: var(--ink-2); }

/* ---------- 区块 ---------- */
.sect { padding: 46px 0; border-bottom: 1px solid var(--line); }
.sect:last-of-type { border-bottom: 0; }
.sect h2 {
  font-size: 21px; font-weight: 600; margin: 0 0 10px;
  position: relative; padding-left: 14px; letter-spacing: -.2px;
}
.sect h2::before {
  content: ""; position: absolute; left: 0; top: 5px; bottom: 5px;
  width: 3px; background: var(--brand); border-radius: 2px;
}
.sect h3 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; }
.sect .sub { color: var(--ink-2); font-size: 14px; margin: 0 0 20px; max-width: 820px; }
.sect p { margin: 0 0 12px; }
.sect .note { font-size: 13px; color: var(--ink-3); margin-top: 12px; }

/* ---------- 表格 ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
thead th { background: var(--bg-soft); font-weight: 600; color: var(--ink); white-space: nowrap; font-size: 13.5px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FCFCFD; }
td strong { font-weight: 600; }

/* 定义表（实体信息） */
table.plain { min-width: 480px; }
table.plain th { width: 168px; font-weight: 500; color: var(--ink-2); background: #FFF; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  background: #FFF;
}
.card h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.card p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

/* ---------- 流程 ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 12px; }
.steps li {
  counter-increment: s; position: relative; padding: 0 0 0 44px;
  font-size: 14px; color: var(--ink-2); min-height: 30px;
}
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 700; line-height: 30px; text-align: center;
}
.steps li b { display: block; color: var(--ink); font-size: 14.5px; font-weight: 600; }

/* ---------- 问答 ---------- */
.qa { border-bottom: 1px solid var(--line-soft); padding: 18px 0; }
.qa:last-child { border-bottom: 0; }
.qa q, .qa .q {
  display: block; font-size: 15.5px; font-weight: 600; color: var(--ink);
  margin-bottom: 6px; quotes: none;
}
.qa .a { margin: 0; font-size: 14px; color: var(--ink-2); }
.qa .a b { color: var(--ink); font-weight: 600; }

/* ---------- 待确认标记（骨架阶段用，信息补全后删除） ---------- */
.tbd {
  display: inline-block; padding: 0 7px; border-radius: 4px;
  background: #FFF6E5; border: 1px solid #FFE0A3; color: #8A5A00;
  font-size: 12px; white-space: nowrap; line-height: 1.7;
}

/* ---------- 行动区 ---------- */
.cta {
  background: var(--bg-soft); border-radius: var(--radius);
  padding: 26px 28px; margin-top: 8px;
}
.cta h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.cta p { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); }
.btn {
  display: inline-block; background: var(--brand); color: #FFF;
  padding: 10px 22px; border-radius: 8px; font-size: 14.5px; font-weight: 500;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; color: #FFF; }

/* ---------- 宣传视频 ---------- */
.video-sect { background: var(--bg-soft); }
.vwrap { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: center; }
.vtext h2 { margin-bottom: 10px; }
.vlist { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.vlist li { position: relative; padding-left: 19px; font-size: 14px; color: var(--ink-2); }
.vlist li::before {
  content: ""; position: absolute; left: 2px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}
.vtext .btn { margin-top: 4px; }
.vbox { display: flex; justify-content: center; }
/* 竖屏宣传片（540×720）。尺寸写死在 CSS，同时 <video> 上写死 width/height 兜底，
   避免样式表被缓存时视频按原尺寸撑开。 */
video.promo {
  display: block; width: 100%; max-width: 300px; height: auto;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: #0B1220;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
}

/* ---------- 页脚 ---------- */
footer.site {
  background: var(--bg-soft); border-top: 1px solid var(--line);
  padding: 34px 0 30px; font-size: 13px; color: var(--ink-2);
}
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
footer.site h5 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
footer.site p { margin: 0 0 6px; }
/* 页脚品牌标识（完整组合标） */
.foot-logo { display: block; height: 32px; width: auto; margin: 0 0 12px; }
footer.site .bottom {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  font-size: 12.5px; color: var(--ink-3);
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid.c3 { grid-template-columns: repeat(2, 1fr); }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
  /* 宣传视频：窄屏改为上下堆叠，视频在上、说明在下 */
  .vwrap { grid-template-columns: 1fr; gap: 22px; }
  .vbox { order: -1; }
}
@media (max-width: 620px) {
  body { font-size: 14.5px; }
  .hero { padding: 34px 0 30px; }
  .hero h1 { font-size: 23px; }
  .lead { font-size: 15px; }
  .nav { min-height: auto; padding: 10px 0; flex-wrap: wrap; }
  .nav nav { width: 100%; gap: 2px; }
  .nav nav a { padding: 5px 9px; font-size: 13.5px; }
  .grid.c2, .grid.c3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi b { font-size: 20px; }
  .sect { padding: 34px 0; }
  .logo .brand-mark { height: 22px; }
  .logo { gap: 10px; }
  .logo .brand-full { height: 30px; }
  .logo .brand-txt b { font-size: 13px; letter-spacing: 0; }
  .logo .brand-txt .brand-sub { font-size: 10px; letter-spacing: 0; }
  .hero-logo { height: 40px; }
  .foot-logo { height: 28px; margin-bottom: 10px; }
  .slogan { font-size: 14px; letter-spacing: 2px; }
  video.promo { max-width: 250px; }
  .vtext .btn { display: block; text-align: center; }
  footer.site .cols { grid-template-columns: 1fr; gap: 18px; }
}
