/* ==========================================================================
   上海开物智合数控科技有限公司 · 官网样式
   ========================================================================== */

/* --------------------------------------------------------------- 设计变量 */
:root {
  --ink: #0f1c2e;
  --ink-2: #2c3e52;
  --ink-3: #5b6b7d;
  --ink-4: #8a97a6;

  --primary: #0d5aa7;
  --primary-600: #0a4a8a;
  --primary-700: #0a3f75;
  --primary-50: #eaf2fb;
  --primary-100: #d6e6f7;

  --accent: #ff7a00;
  --accent-600: #e56a00;
  --accent-50: #fff3e6;

  --bg: #f6f8fb;
  --surface: #ffffff;
  --line: #e2e8f0;
  --line-2: #eef2f7;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(15, 28, 46, .06), 0 1px 3px rgba(15, 28, 46, .05);
  --shadow: 0 4px 12px rgba(15, 28, 46, .07), 0 1px 3px rgba(15, 28, 46, .05);
  --shadow-lg: 0 18px 40px rgba(15, 28, 46, .12), 0 4px 12px rgba(15, 28, 46, .06);

  --container: 1200px;
  --header-h: 68px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ------------------------------------------------------------------ 基础 */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.01em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* --------------------------------------------------------------- 布局工具 */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 84px 0; }
.section--tight { padding: 60px 0; }
.section--alt { background: var(--bg); }

.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head--left { margin-left: 0; text-align: left; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-50);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

.section-title { font-size: 34px; margin-bottom: 14px; }
.section-sub { color: var(--ink-3); font-size: 15.5px; }

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

/* ------------------------------------------------------------------ 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all .2s var(--ease);
  white-space: nowrap;
}

.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--primary-600); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }

.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-600); color: #fff; transform: translateY(-1px); }

.btn--ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: rgba(255,255,255,.22); color: #fff; }

.btn--outline { background: transparent; color: var(--primary); border-color: var(--primary-100); }
.btn--outline:hover { background: var(--primary-50); border-color: var(--primary); }

.btn--sm { padding: 9px 18px; font-size: 13.5px; }

/* ------------------------------------------------------------------ 头部 */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 16px rgba(15, 28, 46, .05);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
/* 公司横版 logo：矢量拉丁版「KaiwuCNC」（logo.svg，固有 342×50，比例 6.844）。
   矢量 + 透明背景，任意像素比都锐利；按高度自适应、宽度等比 → 38px 高时约 260px 宽 */
.brand img { height: 38px; width: auto; display: block; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all .18s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--primary); background: var(--primary-50); }

.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.header-phone { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--ink); }
.header-phone svg { width: 16px; height: 16px; color: var(--primary); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  align-items: center; justify-content: center;
}
.nav-toggle span { position: relative; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: all .2s var(--ease); }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: all .2s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.is-open span::after { top: 0; transform: rotate(-45deg); }

/* ------------------------------------------------------------------ Hero */
.hero {
  position: relative;
  min-height: 620px;
  margin-top: var(--header-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(118deg, #0a3f75 0%, #0d5aa7 52%, #1470c9 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s var(--ease);
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}
.hero-slide.is-active .hero-bg { animation: heroZoom 9s var(--ease) forwards; }
@keyframes heroZoom { from { transform: scale(1.06); } to { transform: scale(1); } }

.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(7, 26, 48, .9) 0%, rgba(9, 40, 74, .74) 42%, rgba(12, 56, 100, .42) 100%);
}

/* 无配图时的几何底纹 */
.hero-pattern {
  position: absolute; inset: 0;
  opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 70% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 70% 40%, #000 30%, transparent 78%);
}

/* 文案区：占据统计条以上的空间并垂直居中 */
.hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 92px 0 88px;
}

.hero-content { max-width: 720px; color: #fff; }

.hero-tag {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .1em;
  color: #cfe4fb;
  border: 1px solid rgba(207, 228, 251, .32);
  background: rgba(255,255,255,.08);
  border-radius: 999px; padding: 6px 16px; margin-bottom: 22px;
}
.hero-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.hero-title {
  font-size: 50px;
  line-height: 1.16;
  color: #fff;
  margin-bottom: 18px;
  letter-spacing: -.02em;
}
.hero-sub {
  font-size: 17px;
  line-height: 1.85;
  color: rgba(255, 255, 255, .84);
  margin-bottom: 32px;
  max-width: 640px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* 轮播指示点：贴近文案区底部（位于统计条上方） */
.hero-dots {
  position: absolute;
  left: 0; right: 0; bottom: 30px;
  z-index: 3;
  display: flex; justify-content: center; gap: 10px;
}
.hero-dot {
  width: 30px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,.32);
  border: 0; padding: 0;
  transition: all .3s var(--ease);
}
.hero-dot.is-active { background: var(--accent); width: 46px; }

/* 数据条 */
.hero-stats {
  position: relative; z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, .16);
  background: rgba(6, 22, 40, .34);
  backdrop-filter: blur(6px);
}
.hero-stat { padding: 22px 24px; border-right: 1px solid rgba(255,255,255,.12); }
.hero-stat:last-child { border-right: 0; }
.hero-stat-value { font-size: 27px; font-weight: 800; color: #fff; line-height: 1.2; letter-spacing: -.01em; }
.hero-stat-value small { font-size: 15px; font-weight: 600; margin-left: 3px; color: var(--accent); }
.hero-stat-label { font-size: 13px; color: rgba(255,255,255,.66); margin-top: 3px; }

/* ---------------------------------------------------------------- 产品线 */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px 22px;
  transition: all .25s var(--ease);
  overflow: hidden;
}
.product-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.product-card:hover {
  border-color: var(--primary-100);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.product-card:hover::before { transform: scaleX(1); }

.product-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }

.product-icon {
  flex-shrink: 0;
  width: 50px; height: 50px;
  border-radius: 13px;
  background: var(--primary-50);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  transition: all .25s var(--ease);
}
.product-icon svg { width: 26px; height: 26px; }
.product-card:hover .product-icon { background: var(--primary); color: #fff; }

.product-name { font-size: 18px; margin-bottom: 4px; }
.product-sub { font-size: 13px; color: var(--ink-3); line-height: 1.5; }

.product-badge {
  display: inline-block;
  font-size: 11.5px; font-weight: 600;
  color: var(--primary);
  background: var(--primary-50);
  border-radius: 4px; padding: 2px 8px; margin-bottom: 12px;
}
.product-card[data-featured="1"] .product-badge { color: var(--accent-600); background: var(--accent-50); }

.product-summary {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.75;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-features { margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 7px; }
.product-features li {
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 3px 11px;
}

.product-more {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--primary);
  background: none; border: 0; padding: 0; align-self: flex-start;
}
.product-more svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.product-card:hover .product-more svg { transform: translateX(3px); }

/* -------------------------------------------------------------- 解决方案 */
.solution-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: all .25s var(--ease);
  display: flex; flex-direction: column;
}
.solution-card:hover { border-color: var(--primary-100); box-shadow: var(--shadow); transform: translateY(-3px); }
.solution-industry {
  font-size: 12.5px; font-weight: 600; color: var(--accent-600);
  background: var(--accent-50); border-radius: 4px;
  padding: 3px 10px; display: inline-block; margin-bottom: 15px; align-self: flex-start;
}
.solution-title { font-size: 18.5px; margin-bottom: 11px; }
.solution-summary { font-size: 14px; color: var(--ink-3); line-height: 1.8; }

/* -------------------------------------------------------------- 客户案例 */
.case-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .25s var(--ease);
  display: flex; flex-direction: column;
}
.case-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--primary-100); }
.case-cover {
  height: 152px;
  background: linear-gradient(125deg, #0a3f75, #1470c9);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.case-cover img { width: 100%; height: 100%; object-fit: cover; }
.case-cover-pattern {
  position: absolute; inset: 0; opacity: .4;
  background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 30px 30px;
}
.case-cover-label {
  position: relative; z-index: 2;
  color: rgba(255,255,255,.9); font-size: 13px; font-weight: 600; letter-spacing: .08em;
}
.case-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.case-title { font-size: 16.5px; margin-bottom: 8px; line-height: 1.45; }
.case-client { font-size: 12.5px; color: var(--ink-4); margin-bottom: 12px; }
.case-summary { font-size: 13.5px; color: var(--ink-3); line-height: 1.75; }

/* -------------------------------------------------------------- 关于我们 */
.about-layout {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.about-body { font-size: 15px; color: var(--ink-2); line-height: 1.9; }
.about-body p { margin-bottom: 1em; }

.about-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 30px; }
.about-stat {
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.about-stat-value { font-size: 25px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.about-stat-label { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

.about-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 380px;
  background: linear-gradient(135deg, #0a3f75, #1470c9);
  display: flex; align-items: center; justify-content: center;
}
.about-visual img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.about-visual-pattern {
  position: absolute; inset: 0; opacity: .45;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 40px 40px;
}
.about-visual-mark { position: relative; z-index: 2; opacity: .92; }
.about-visual-mark svg { width: 128px; height: 128px; }

/* -------------------------------------------------------------- 新闻动态 */
.news-list { display: grid; gap: 14px; }
.news-item {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all .22s var(--ease);
}
.news-item:hover { border-color: var(--primary-100); box-shadow: var(--shadow); transform: translateX(4px); }
.news-date {
  flex-shrink: 0;
  width: 82px; text-align: center;
  border-right: 1px solid var(--line-2);
  padding-right: 20px;
}
.news-day { font-size: 24px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.news-ym { font-size: 12px; color: var(--ink-4); }
.news-main { flex: 1; min-width: 0; }
.news-title { font-size: 16px; margin-bottom: 5px; }
.news-summary {
  font-size: 13.5px; color: var(--ink-3); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.news-tag { font-size: 11.5px; font-weight: 600; color: var(--primary); background: var(--primary-50); border-radius: 4px; padding: 2px 9px; margin-left: 10px; }
.news-tag--top { color: var(--accent-600); background: var(--accent-50); }

/* -------------------------------------------------------------- 联系我们 */
.contact-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }

.contact-list { display: grid; gap: 6px; }
.contact-row {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px dashed var(--line);
}
.contact-row:last-child { border-bottom: 0; }
.contact-ico {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  background: var(--primary-50); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.contact-ico svg { width: 19px; height: 19px; }
.contact-label { font-size: 12.5px; color: var(--ink-4); margin-bottom: 1px; }
.contact-value { font-size: 15px; font-weight: 600; color: var(--ink); word-break: break-all; }
.contact-value a { color: var(--ink); }
.contact-value a:hover { color: var(--primary); }

.contact-qr { margin-top: 18px; text-align: center; }
.contact-qr img { width: 132px; height: 132px; border: 1px solid var(--line); border-radius: var(--radius); padding: 5px; background: #fff; }
.contact-qr figcaption { font-size: 12.5px; color: var(--ink-4); margin-top: 8px; }

/* 表单 */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-title { font-size: 20px; margin-bottom: 6px; }
.form-hint { font-size: 13.5px; color: var(--ink-3); margin-bottom: 24px; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.form-field label .req { color: var(--accent); margin-left: 2px; }

.input, .textarea, .select {
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 90, 167, .12);
}
.textarea { resize: vertical; min-height: 110px; }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }

.form-actions { margin-top: 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-note { font-size: 12.5px; color: var(--ink-4); }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------ 页脚 */
.site-footer { background: #0a1626; color: rgba(255,255,255,.62); padding: 56px 0 0; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; }
.footer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
/* 页脚是深色底（#0a1626），K 标记主色为黑/墨绿，做反白剪影处理。
   源图 197×177 为透明背景的纯 K（不再是带灰底板的方形图），
   故按高度定尺、宽度等比，避免把 K 压成正方形 */
.footer-brand img { height: 32px; width: auto; filter: brightness(0) invert(1); }
.footer-brand-name { font-size: 16px; font-weight: 700; color: #fff; }
.footer-desc { font-size: 13.5px; line-height: 1.85; max-width: 340px; }

.footer-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 13.5px; color: rgba(255,255,255,.6); }
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: rgba(255,255,255,.45);
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ 弹层 */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(9, 22, 38, .58);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), visibility .25s var(--ease);
}
.modal-mask.is-open { opacity: 1; visibility: visible; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 860px;
  max-height: 88vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: translateY(18px) scale(.985);
  transition: transform .3s var(--ease);
}
.modal-mask.is-open .modal { transform: none; }

.modal-head {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head-main { flex: 1; min-width: 0; }
.modal-title { font-size: 22px; margin-bottom: 5px; }
.modal-sub { font-size: 13.5px; color: var(--ink-3); }
.modal-close {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  transition: all .18s var(--ease);
}
.modal-close:hover { background: var(--bg); color: var(--ink); border-color: var(--ink-4); }

.modal-body { padding: 26px 28px 30px; overflow-y: auto; }
.modal-body h4 { font-size: 16px; margin: 24px 0 12px; padding-left: 11px; border-left: 3px solid var(--primary); }
.modal-body h4:first-child { margin-top: 0; }
.modal-body p { font-size: 14.5px; color: var(--ink-2); line-height: 1.9; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature-item {
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.feature-item h5 { margin: 0 0 6px; font-size: 14.5px; color: var(--ink); }
.feature-item p { font-size: 13.5px; color: var(--ink-3); margin: 0; line-height: 1.72; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table tr { border-bottom: 1px solid var(--line-2); }
.spec-table tr:last-child { border-bottom: 0; }
.spec-table th {
  text-align: left; font-weight: 600; color: var(--ink-3);
  padding: 11px 16px 11px 0; width: 34%; vertical-align: top;
}
.spec-table td { padding: 11px 0; color: var(--ink); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-grid img { border-radius: var(--radius-sm); border: 1px solid var(--line); aspect-ratio: 4/3; object-fit: cover; }

.modal-foot {
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  display: flex; justify-content: flex-end; gap: 12px;
}

/* ------------------------------------------------------------------ 提示 */
.toast-wrap {
  position: fixed; z-index: 300;
  top: 84px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  min-width: 240px; max-width: 380px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 13px 18px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: flex-start; gap: 10px;
  animation: toastIn .28s var(--ease);
  pointer-events: auto;
}
.toast--success { background: #0f7a48; }
.toast--error { background: #b3261e; }
.toast--info { background: var(--primary-700); }
@keyframes toastIn { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }

/* -------------------------------------------------------------- 滚动揭示 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ======================================================= 详情页（服务端渲染） */
/* 页面由 server/src/render/detail.js 直出，这里只管排版。
   小节标题刻意与产品弹层的 .modal-body h4 用同一套观感（左侧色条），
   让「弹层预览」和「完整页面」看起来是同一个东西的两个尺度。
   注意：本节必须放在下面的 @media 之前，否则同优先级下会覆盖响应式规则。 */

/* 面包屑 */
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-4);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--ink-4); }
.breadcrumb-current { color: var(--ink); font-weight: 600; }

/* 标题区 */
.detail-head { margin-bottom: 28px; }
.detail-title {
  /* 用 clamp 自适应，省掉一条媒体查询规则 */
  font-size: clamp(25px, 4.2vw, 36px);
  line-height: 1.3;
  margin: 10px 0 0;
  color: var(--ink);
  overflow-wrap: break-word;
}
.detail-sub { font-size: 16px; color: var(--ink-3); margin: 12px 0 0; line-height: 1.7; }

/* 元信息行（日期 / 作者 / 行业 / 客户…） */
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  font-size: 13.5px; color: var(--ink-3);
  margin-bottom: 22px;
}
.detail-meta-item { display: inline-flex; align-items: center; gap: 6px; }

/* 封面图 */
.detail-cover {
  display: block;
  width: 100%; height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  margin-bottom: 28px;
}

/* 正文排版 */
.detail-body { font-size: 15px; color: var(--ink-2); line-height: 1.95; }
.detail-body h2 {
  font-size: 17px;
  margin: 34px 0 14px;
  padding-left: 11px;
  border-left: 3px solid var(--primary);
  color: var(--ink);
}
.detail-body h2:first-child { margin-top: 0; }
.detail-body h3 { font-size: 16px; margin: 24px 0 12px; color: var(--ink); }
.detail-body p { margin: 0 0 14px; }
.detail-body ul, .detail-body ol { margin: 0 0 14px; padding-left: 22px; }
.detail-body li { margin-bottom: 7px; }
.detail-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.detail-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.detail-body blockquote {
  margin: 0 0 16px;
  padding: 12px 18px;
  border-left: 3px solid var(--primary-100);
  background: var(--primary-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.detail-body table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14.5px; }
.detail-body th, .detail-body td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; }
.detail-body th { color: var(--ink); font-weight: 600; background: var(--bg); }

/* 引导摘要（正文为空时用摘要兜底） */
.detail-lead { font-size: 16.5px; color: var(--ink-2); line-height: 1.9; }

/* 功能点：复用弹层的 .feature-grid / .feature-item，
   但详情页小标题是 h3（弹层里是 h5，语义上不适合跳级），补一条同级规则 */
.detail-body .feature-item h3 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }

/* 参数表：宽屏上限制宽度，避免一行拉得太长不好读 */
.detail-body .spec-table { max-width: 760px; }

/* 最新动态 */
.more-list { list-style: none; padding: 0; margin: 0; }
.more-list li { border-bottom: 1px solid var(--line-2); }
.more-list li:last-child { border-bottom: 0; }
.more-list a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 13px 0;
  color: var(--ink);
  text-decoration: none;
}
.more-list a:hover .more-list-title { color: var(--primary); }
.more-list-date {
  flex: none;
  font-size: 13px; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.more-list-title { font-size: 15px; }

/* 底部行动号召 */
.detail-cta {
  margin-top: 44px;
  padding: 24px 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px;
}
.detail-cta p { margin: 0; font-size: 16px; color: var(--ink); }

/* ------------------------------------------------------------------- 404 */
.notfound { text-align: center; padding: 30px 0 10px; }
.notfound-code {
  font-size: clamp(64px, 12vw, 104px);
  font-weight: 800; line-height: 1;
  letter-spacing: 3px;
  color: var(--primary-100);
}
.notfound-title { font-size: clamp(21px, 3.4vw, 27px); margin: 10px 0 10px; color: var(--ink); }
.notfound-desc { font-size: 15px; color: var(--ink-3); margin: 0 0 26px; }
.notfound-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide.is-active .hero-bg { animation: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------------ 骨架 */
.skeleton {
  background: linear-gradient(90deg, var(--line-2) 25%, #f7f9fc 37%, var(--line-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skeleton-card { height: 268px; }

.empty-state { text-align: center; padding: 54px 20px; color: var(--ink-4); font-size: 14px; }

/* ========================================================== 站内搜索 */
/* 搜索入口是"点开才出现"的面板，而不是常驻输入框：
   页头已经有 logo + 6 个导航 + 电话 + CTA，再塞一个输入框在 1024px 附近必然挤爆。
   面板形态在桌面与手机上是同一套交互，也省得维护两种布局。 */
.site-search { position: relative; display: flex; align-items: center; }

.search-toggle {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
  transition: all .18s var(--ease);
}
.search-toggle:hover, .search-toggle[aria-expanded="true"] {
  background: var(--primary-50);
  border-color: var(--primary-100);
  color: var(--primary);
}
.search-toggle svg { width: 20px; height: 20px; }

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 400px;
  max-width: calc(100vw - 32px);
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 70;
}
.search-panel[hidden] { display: none; }

.search-box {
  display: flex; align-items: center; gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.search-box svg { width: 17px; height: 17px; flex: none; color: var(--ink-4); }
.search-input {
  flex: 1; min-width: 0;
  height: 42px;
  border: 0; outline: 0;
  background: transparent;
  font: inherit; font-size: 14.5px;
  color: var(--ink);
}
.search-input::placeholder { color: var(--ink-4); }
/* 去掉 type=search 自带的清除按钮：与面板里的交互重复，且各浏览器样式不一 */
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.search-results { margin-top: 8px; max-height: 380px; overflow-y: auto; }
.search-results[hidden] { display: none; }

.search-group + .search-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.search-group-label {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px 4px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--ink-4);
}
.search-group-count {
  padding: 0 6px;
  border-radius: 999px;
  background: var(--line-2);
  font-size: 11px; font-weight: 600;
}

.search-hit {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: inherit;
  transition: background .15s var(--ease);
}
.search-hit:hover, .search-hit.is-active { background: var(--primary-50); color: inherit; }
.search-hit-title { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.search-hit:hover .search-hit-title, .search-hit.is-active .search-hit-title { color: var(--primary); }
.search-hit-sub {
  display: block;
  margin-top: 2px;
  font-size: 12.5px; color: var(--ink-4);
  /* 摘要统一收成一行：长短不一的摘要会让结果列表高低不齐、难以扫读 */
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

.search-empty { padding: 22px 10px; text-align: center; font-size: 13.5px; color: var(--ink-4); }

/* ================================================ 列表卡片可跳转详情页 */
/* 方案/案例卡片从 <article> 改成了 <a>。全局规则 `a { color: var(--primary) }`
   会让摘要文字变成蓝色链接色，所以这里显式继承正文色。 */
.solution-card, .case-card { color: inherit; cursor: pointer; }
.solution-card:hover, .case-card:hover { color: inherit; }
.solution-card .solution-summary, .case-card .case-summary { color: var(--ink-3); }

.product-actions {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 4px;
}
/* .product-more 原来靠 margin-top:auto 顶到卡片底部，现在这个职责交给了 .product-actions */
.product-actions .product-more { margin-top: 0; align-self: center; }
.product-page-link {
  font-size: 13px; font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}
.product-page-link:hover { color: var(--accent); }

.section-more { margin-top: 26px; display: flex; justify-content: center; }

/* ============================================================ 新闻列表 */
.news-title a { color: inherit; }
.news-title a:hover { color: var(--primary); }

.news-pager {
  margin-top: 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
}
.pager-link {
  min-width: 38px; height: 38px;
  padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px; color: var(--ink-2);
  transition: all .18s var(--ease);
}
.pager-link:hover { border-color: var(--primary-100); background: var(--primary-50); color: var(--primary); }
.pager-link.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager-link.is-disabled { color: var(--ink-4); background: var(--bg); cursor: not-allowed; }
.pager-gap { color: var(--ink-4); padding: 0 2px; }
.news-pager-hint { margin-top: 14px; text-align: center; font-size: 13.5px; }

/* ============================================================== 响应式 */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .contact-layout { grid-template-columns: 1fr; gap: 36px; }
  .footer-top { grid-template-columns: repeat(2, 1fr); gap: 32px; }

  /* 820–1080px 这一段页头最挤：导航仍是横排，电话、CTA、搜索入口也都在。
     加了搜索入口后必须同时收紧间距，否则整行会顶出容器（横向滚动条）。
     这里选择"压缩"而不是"隐藏电话"——缩小间距不丢信息。 */
  .header-inner { gap: 16px; }
  .header-actions { gap: 10px; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .header-phone { font-size: 13px; gap: 5px; }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 38px; }
  .section { padding: 64px 0; }
  .section-title { font-size: 28px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat { border-bottom: 1px solid rgba(255,255,255,.12); }
  .hero-stat:nth-child(2n) { border-right: 0; }
}

@media (max-width: 820px) {
  :root { --header-h: 60px; }

  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 14px 20px 22px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: all .25s var(--ease);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    margin-left: 0;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 12px 14px; font-size: 15.5px; border-radius: var(--radius-sm); }
  .nav a:hover { background: var(--primary-50); }

  .nav-toggle { display: flex; }
  .header-actions .header-phone { display: none; }
  .header-actions .btn { display: none; }

  /* 搜索面板在手机上改为贴页头通栏展开：右对齐的固定宽度面板在 390px 屏上会溢出 */
  .search-panel {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    left: 12px; right: 12px;
    width: auto;
    max-width: none;
  }
  .search-results { max-height: calc(100vh - var(--header-h) - 150px); }
  .product-actions { gap: 8px; }

  .hero { min-height: 480px; }
  .hero-inner { padding: 56px 0 72px; }
  .hero-title { font-size: 31px; }
  .hero-sub { font-size: 15.5px; }

  .product-card { padding: 22px 20px 18px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 20px; padding-right: 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .form-card { padding: 24px 20px; }
  .news-item { flex-direction: column; align-items: flex-start; gap: 12px; }
  .news-date { border-right: 0; border-bottom: 1px solid var(--line-2); padding: 0 0 10px; width: auto; text-align: left; display: flex; align-items: baseline; gap: 6px; }
  .news-day { font-size: 19px; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat { border-right: 1px solid rgba(255,255,255,.12); }
  .hero-stat:nth-child(2n) { border-right: 0; }
  .hero-stat { padding: 16px 18px; }
  .hero-stat-value { font-size: 22px; }
  .hero-title { font-size: 27px; }
  .section-title { font-size: 24px; }
  .hero-actions .btn { width: 100%; }
  .footer-top { grid-template-columns: 1fr; }
  .toast-wrap { left: 16px; right: 16px; top: 72px; }
  .toast { min-width: 0; }
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal { max-height: 94vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-width: none; }
}

/* ------------------------------------------------------------- 打印样式 */
@media print {
  .site-header, .hero-dots, .site-footer, .form-card, .modal-mask { display: none; }
  .hero { margin-top: 0; min-height: auto; }
  body { font-size: 12pt; }
}
