/* ============================================================
   Carbidea — C 风格全站样式（制造商务实派）
   ============================================================ */
:root {
  --paper: #FBFAF7;
  --white: #FFFFFF;
  --ink: #1D2A33;
  --ink-2: #4E5B63;
  --blue: #1E4E8C;
  --blue-dark: #163A66;
  --mid-blue: #356699;
  --slate: #6E8CB3;
  --line: #D9D4CB;
  --shadow: 0 2px 10px rgba(29, 42, 51, 0.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  /* 站点背景：纸色 85% 遮罩 + 素材背景图（图以 15% 强度透出，覆盖全视口） */
  background:
    linear-gradient(rgba(251, 250, 247, 0.85), rgba(251, 250, 247, 0.85)),
    url('assets/bg-site.jpg') center / cover no-repeat fixed;
  color: var(--ink);
  font-family: "Segoe UI", Arial, "Helvetica Neue", sans-serif;
  line-height: 1.65; font-size: 16px;
}
img { max-width: 100%; }
a { color: var(--blue); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
header { background: var(--white); color: var(--ink); border-bottom: 1px solid var(--line); }
.topbar {
  display: flex; justify-content: flex-end; gap: 28px;
  padding: 8px 0; font-size: 0.8rem; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.nav-main { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { height: 46px; width: auto; }
.brand-text { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1.1; }
.brand-text small { font-size: 0.68rem; color: var(--ink-2); font-weight: 400; display: block; }
.nav-links { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav-links a {
  color: var(--ink-2); text-decoration: none; padding: 9px 15px; font-size: 0.93rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); background: #EEF3F9; }
.nav-links .cta { background: var(--blue); color: #fff; border-radius: 3px; padding: 10px 18px; }
.nav-links .cta:hover { background: var(--blue-dark); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 3px;
  font-size: 0.95rem; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer;
}
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-outline { border: 1.5px solid var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: #EEF3F9; }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: #E8EEF6; }

/* ---------- hero ---------- */
.hero {
  /* hero 区（导航与徽章横幅之间）：白 85% 遮罩 + 背景图（15% 透出，固定视口） */
  background:
    linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)),
    url('assets/bg-site.jpg') center / cover no-repeat fixed;
  border-bottom: 1px solid var(--line);
}
.hero-slogan { color: var(--blue); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 10px; }
.slogan-line { color: var(--blue); font-size: 0.95rem; margin-bottom: 12px; }
.slogan-line em { font-style: italic; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center; padding: 56px 0; }
.hero h1 { font-size: 2.4rem; line-height: 1.22; font-weight: 700; margin-bottom: 16px; }
.hero p { color: var(--ink-2); font-size: 1.05rem; max-width: 500px; margin-bottom: 24px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero img { width: 100%; border-radius: 4px; display: block; }
.hero-facts { display: flex; gap: 34px; margin-top: 30px; flex-wrap: wrap; }
.hero-facts div strong { display: block; font-size: 1.05rem; }
.hero-facts div span { font-size: 0.85rem; color: var(--ink-2); }

/* ---------- badges strip ---------- */
.badges { background: var(--blue); color: #fff; }
.badges-inner { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; font-size: 0.88rem; flex-wrap: wrap; }
.badges-inner span { opacity: 0.94; }

/* ---------- sections ---------- */
section.sec { padding: 56px 0; }
.sec-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec h2 { font-size: 1.7rem; margin-bottom: 8px; }
.sec .sub { color: var(--ink-2); margin-bottom: 32px; max-width: 640px; }
.page-hero { background: var(--white); border-bottom: 1px solid var(--line); padding: 44px 0; }
.page-hero h1 { font-size: 2rem; margin-bottom: 8px; }
.page-hero p { color: var(--ink-2); max-width: 680px; }

/* ---------- product cards ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.prod-card { background: var(--white); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); }
a.prod-card { display: block; text-decoration: none; color: inherit; transition: border-color 0.2s, box-shadow 0.2s; }
a.prod-card:hover { border-color: var(--mid-blue); box-shadow: 0 4px 16px rgba(30, 78, 140, 0.16); }
.prod-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.prod-card .body { padding: 14px 16px; }
.prod-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.prod-card p { font-size: 0.87rem; color: var(--ink-2); }
.prod-card .tag { display: inline-block; margin-top: 10px; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); font-weight: 600; }

/* ---------- product detail rows (products page) ---------- */
.prod-row {
  display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start;
  padding: 36px 0; border-bottom: 1px solid var(--line);
}
.prod-row:last-child { border-bottom: none; }
.prod-row img { width: 100%; border-radius: 4px; }
.prod-row h3 { font-size: 1.35rem; margin-bottom: 4px; }
.prod-row .prod-series { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); font-weight: 600; margin-bottom: 12px; }
.prod-row p { color: var(--ink-2); margin-bottom: 12px; max-width: 640px; }
.prod-row ul { margin: 8px 0 0 18px; color: var(--ink-2); font-size: 0.94rem; }
.prod-row li { margin-bottom: 4px; }
.prod-spec { display: flex; gap: 26px; margin-top: 14px; flex-wrap: wrap; font-size: 0.88rem; }
.prod-spec div strong { color: var(--ink); }

/* ---------- capabilities ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cap-card { background: var(--white); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); }
.cap-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.cap-card h4 { font-size: 1.05rem; margin: 14px 16px 6px; }
.cap-card p { font-size: 0.9rem; color: var(--ink-2); margin: 0 16px 16px; line-height: 1.6; }
.qc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.qc-item { background: var(--white); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); }
.qc-item img { width: 100%; height: 190px; object-fit: cover; display: block; border-bottom: 1px solid var(--line); }
.qc-item h4 { font-size: 1rem; margin: 14px 16px 6px; color: var(--ink); }
.qc-item p { font-size: 0.88rem; color: var(--ink-2); margin: 0 16px 16px; line-height: 1.55; }
.factory-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.factory-grid img { width: 100%; height: 260px; object-fit: cover; border-radius: 4px; display: block; }

/* ---------- product gallery (real photos per category) ---------- */
.prod-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.prod-gallery img { width: 100%; height: 130px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }
.prod-thumb-icons { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 16px; color: var(--ink-2); font-size: 0.92rem; }

/* ---------- two-col / check list ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.check-list { list-style: none; }
.check-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.96rem; display: flex; gap: 10px; }
.check-list li::before { content: "\2713"; color: var(--blue); font-weight: 700; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.step {
  background: var(--white); border: 1px solid var(--line); border-radius: 4px;
  padding: 18px 16px; border-top: 4px solid var(--blue);
}
.step .num { font-size: 0.8rem; color: var(--blue); font-weight: 700; letter-spacing: 0.08em; }
.step h4 { font-size: 1rem; margin: 8px 0 6px; }
.step p { font-size: 0.85rem; color: var(--ink-2); }

/* ---------- how it works: horizontal blocks ---------- */
.how-grid {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: nowrap;
}
.how-step {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 4px;
  padding: 20px 14px;
  display: flex; flex-direction: column;
  position: relative;
  border: 1px solid rgba(30, 78, 140, 0.16);
}
.how-step .how-num {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; margin-bottom: 10px;
  opacity: 0.9;
  font-variant-numeric: tabular-nums;
}
.how-step h4 { font-size: 1rem; margin: 0 0 8px; font-weight: 700; }
.how-step p { font-size: 0.83rem; margin: 0; line-height: 1.5; opacity: 0.94; }
.how-arrow {
  align-self: center;
  color: var(--slate); font-size: 1.4rem; font-weight: 600;
  line-height: 1; user-select: none; flex: 0 0 auto;
}

/* 六个方块：前三个蓝色阶（深→浅），后三个灰色阶（深→浅）。
   注意：how-step 与 how-arrow 在 .how-grid 内交错排列，须用 :nth-of-type(dv) 按 div 序号选取，
   不能用 :nth-child（会命中箭头 span，导致方块 04-06 落回默认背景）。 */
.how-step:nth-of-type(1),
.how-step:nth-of-type(2),
.how-step:nth-of-type(3),
.how-step:nth-of-type(4) { color: #fff; }
.how-step:nth-of-type(1) { background: #1E4E8C; }
.how-step:nth-of-type(2) { background: #35669B; }
.how-step:nth-of-type(3) { background: #4A78AC; }
.how-step:nth-of-type(4) { background: #6B7A8C; }
.how-step:nth-of-type(5) { background: #9AA6B0; color: var(--ink); }
.how-step:nth-of-type(6) { background: #E2E7EC; color: var(--ink); }

/* ---------- resources ---------- */
.res-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.res-card { background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: 20px; box-shadow: var(--shadow); }
.res-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.res-card p { font-size: 0.9rem; color: var(--ink-2); }
.res-card a { color: var(--blue); font-size: 0.9rem; text-decoration: none; display: inline-block; margin-top: 10px; font-weight: 600; }
.table-wrap { overflow-x: auto; max-width: 900px; }
.grade-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); font-size: 0.92rem; }
.grade-table th { background: var(--blue); color: #fff; text-align: left; padding: 12px 16px; }
.grade-table td { padding: 11px 16px; color: var(--ink-2); border-top: 1px solid var(--line); }
.grade-table tr:nth-child(even) td { background: #F5F7FA; }
.grade-table td strong { color: var(--ink); }
.guide-q { background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: 20px 24px; margin-bottom: 14px; max-width: 860px; box-shadow: var(--shadow); }
.guide-q h3 { font-size: 1.02rem; margin-bottom: 8px; }
.guide-q p { font-size: 0.94rem; color: var(--ink-2); }
.refs { margin-top: 24px; max-width: 860px; font-size: 0.85rem; color: var(--ink-2); }
.refs h4 { color: var(--ink); margin-bottom: 8px; font-size: 0.95rem; }
.refs ol { margin-left: 20px; }
.refs li { margin-bottom: 4px; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: start; }
.about-grid p { color: var(--ink-2); margin-bottom: 16px; }
.spec-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); }
.spec-table th, .spec-table td { border: 1px solid var(--line); padding: 11px 14px; text-align: left; font-size: 0.9rem; }
.spec-table th { background: #F0F3F7; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.contact-info h3 { font-size: 1.15rem; margin: 22px 0 8px; }
.contact-info h3:first-child { margin-top: 0; }
.contact-info p, .contact-info a { font-size: 1rem; color: var(--ink-2); }
.contact-info a { color: var(--blue); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 4px;
  font-family: inherit; font-size: 0.95rem; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.field-hint { font-size: 0.8rem; color: var(--ink-2); margin-top: 5px; }
.file-row { display: flex; align-items: center; gap: 12px; }
.field input.file-input-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  margin: -1px !important; padding: 0 !important; border: 0 !important;
  clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important;
  overflow: hidden !important; white-space: nowrap !important;
}
.file-btn {
  display: inline-block; padding: 10px 18px; cursor: pointer;
  border: 1.5px dashed var(--blue); border-radius: 4px;
  color: var(--blue); font-weight: 600; font-size: 0.9rem; background: #fff; white-space: nowrap;
}
.file-btn:hover { background: #EEF3F9; }
.file-name { font-size: 0.85rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; max-width: 55%; white-space: nowrap; }

/* ---------- CTA / footer ---------- */
.cta { background: var(--blue); color: #fff; }
.cta-inner { padding: 48px 0; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta h2 { font-size: 1.5rem; margin-bottom: 6px; }
.cta p { opacity: 0.9; font-size: 0.95rem; }
footer { background: var(--ink); color: #AEB8C1; padding: 28px 0; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; }
.foot a { color: #C9D2DB; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero img { order: -1; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .cap-grid, .qc-grid { grid-template-columns: repeat(2, 1fr); }
  .factory-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .two-col, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .prod-row { grid-template-columns: 1fr; }
  .prod-gallery { grid-template-columns: repeat(3, 1fr); }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 7px 9px; font-size: 0.84rem; }
}
@media (max-width: 600px) {
  .wrap {
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
  }
  .brand img { height: 38px; }
  .nav-main { flex-wrap: wrap; gap: 8px; }
  .nav-links { width: 100%; justify-content: flex-start; }
  .nav-links a { padding: 6px 9px; font-size: 0.82rem; }
  .nav-links .cta { margin-left: auto; }
  .hero { padding: 40px 0 48px; }
  .hero h1 { font-size: 1.75rem; line-height: 1.35; }
  .hero img { border-radius: 10px; }
  .hero-btns { gap: 12px; }
  .hero-btns .btn { width: 100%; text-align: center; }
  .hero-facts { gap: 16px 26px; }
  .badges-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; font-size: 0.8rem; padding: 18px 0; }
  section.sec { padding: 44px 0; }
  .prod-grid { grid-template-columns: 1fr; gap: 18px; }
  .prod-card .body { padding: 16px 18px; }
  .prod-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .prod-gallery img { height: 120px; }
  .cap-grid, .qc-grid { grid-template-columns: 1fr; gap: 16px; }
  .cap-card img { height: 200px; }
  .factory-grid img { height: 200px; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .how-grid { flex-wrap: wrap; gap: 10px; }
  .how-step { flex: 1 1 calc(50% - 5px); padding: 16px 14px; }
  .how-step h4 { font-size: 0.98rem; }
  .how-step p { font-size: 0.82rem; }
  .how-arrow { display: none; }
  .res-cards { grid-template-columns: 1fr; gap: 14px; }
  .check-list li { padding: 12px 0; }
  .grade-table th, .grade-table td { padding: 8px 8px; font-size: 0.78rem; }
  .grade-table th:nth-child(5), .grade-table td:nth-child(5) { display: none; }
  .guide-q { padding: 16px 18px; }
  .contact-grid { gap: 34px; }
  .cta-inner {
    flex-direction: column; align-items: flex-start;
    gap: 18px; padding: 38px 0 44px;
  }
  .cta h2 { font-size: 1.35rem; }
  .cta p { line-height: 1.65; }
  .cta .btn-white { width: 100%; text-align: center; }
  .foot { gap: 6px; }
}

/* ---------- certifications ---------- */
.cert-block {
  margin-top: 24px; padding: 18px; text-align: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow);
}
.cert-block img { width: 120px; height: auto; display: block; margin: 0 auto 12px; }
.cert-block p { font-size: 0.88rem; color: var(--ink-2); margin-bottom: 0; }
.cert-block strong { color: var(--ink); }
