/* ============================================================
   墨涵软件官网 - 设计系统
   现代 / 专业 / 响应式
   ============================================================ */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-light: #eff6ff;
  --accent: #0ea5e9;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-dark: #0b1220;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);
  --maxw: 1180px;
  --header-h: 68px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font-size: 15px; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent; transition: all .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(37,99,235,.28); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); }
.btn-outline { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  z-index: 100; display: flex; align-items: center;
  background: rgba(255,255,255,0); transition: all .25s ease;
}
.site-header.scrolled {
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line); height: 60px;
}
.nav-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: #fff; font-size: 20px; }
.scrolled .logo { color: var(--ink); }

.logo-img { height: 38px; width: 38px; border-radius: 50%; object-fit: cover; display: block; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.site-footer .logo-img { height: 42px; width: 42px; }
.logo .mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; font-size: 15px; font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; color: rgba(255,255,255,.92); font-size: 15px; font-weight: 500;
  transition: all .2s;
}
.scrolled .nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.14); }
.scrolled .nav-links a:hover { color: var(--brand); background: var(--brand-light); }
.nav-links a.active { color: #fff; background: var(--brand); }
.scrolled .nav-links a.active { color: #fff; }
.nav-cta { margin-left: 10px; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.hamburger span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .25s; }
.scrolled .hamburger span { background: var(--ink); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端抽屉 */
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; width: 78%; max-width: 320px; z-index: 99;
  background: #fff; box-shadow: var(--shadow-lg); padding: 84px 22px 22px;
  transform: translateX(100%); transition: transform .28s ease; display: flex; flex-direction: column; gap: 4px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { padding: 13px 14px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 16px; }
.mobile-menu a:hover, .mobile-menu a.active { background: var(--brand-light); color: var(--brand); }
.mobile-menu .btn { margin-top: 14px; justify-content: center; }
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 98; opacity: 0; pointer-events: none; transition: .25s; }
.overlay.open { opacity: 1; pointer-events: auto; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  background: radial-gradient(1200px 600px at 70% -10%, #1e3a8a 0%, transparent 55%),
              linear-gradient(135deg, #0b1220 0%, #15294d 55%, #1d4ed8 130%);
  color: #fff; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5;
}
.hero .container { position: relative; z-index: 2; padding-top: var(--header-h); }
.hero-eyebrow {
  display: inline-block; padding: 6px 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  font-size: 13px; letter-spacing: 1px; margin-bottom: 22px; color: #cfe0ff;
}
.hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.15; font-weight: 800; letter-spacing: -1px; }
.hero h1 .hl { background: linear-gradient(90deg, #7dd3fc, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin: 22px 0 32px; font-size: clamp(16px, 2vw, 19px); color: #d6e2ff; max-width: 620px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badge {
  position: absolute; right: -60px; top: 18%; width: 260px; height: 260px; border-radius: 30px;
  background: linear-gradient(135deg, rgba(125,211,252,.22), rgba(165,180,252,.18));
  border: 1px solid rgba(255,255,255,.18); transform: rotate(12deg); z-index: 1; backdrop-filter: blur(4px);
}

/* ---------------- 区块通用 ---------------- */
.section { padding: 88px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-head .tag { color: var(--brand); font-weight: 700; letter-spacing: 2px; font-size: 13px; text-transform: uppercase; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); color: var(--ink); margin: 10px 0 14px; font-weight: 800; letter-spacing: -.5px; }
.section-head p { color: var(--muted); font-size: 16px; }

/* 卡片网格 */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: all .22s ease; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.feature .ic {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px;
  background: var(--brand-light); margin-bottom: 16px;
}
.feature h3 { color: var(--ink); font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

/* 产品卡 */
.product .p-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.product .p-icon { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; font-size: 26px; color: #fff; }
.product .p-cat { font-size: 12px; color: var(--brand); background: var(--brand-light); padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.product h3 { color: var(--ink); font-size: 19px; margin-bottom: 8px; }
.product p { color: var(--muted); font-size: 14.5px; }
.product .feats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.product .feats span { font-size: 12.5px; color: var(--ink-2); background: var(--bg-soft); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }

/* 案例卡 */
.case .c-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.case .c-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; color: #fff; }
.case .c-ind { font-size: 12px; color: var(--muted); }
.case h3 { color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.case p { color: var(--muted); font-size: 14.5px; }
.case .results { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.case .results span { font-size: 12.5px; font-weight: 600; color: #047857; background: #ecfdf5; padding: 5px 11px; border-radius: 8px; }

/* 时间线 */
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 34px 26px; }
.tl-item::before { content: ""; position: absolute; left: -27px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 3px var(--brand-light); }
.tl-item .yr { font-weight: 800; color: var(--brand); font-size: 15px; }
.tl-item h4 { color: var(--ink); font-size: 18px; margin: 2px 0 6px; }
.tl-item p { color: var(--muted); font-size: 15px; }

/* 新闻列表 */
.news-item { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.news-item .date { min-width: 78px; text-align: center; }
.news-item .date .d { font-size: 28px; font-weight: 800; color: var(--brand); line-height: 1; }
.news-item .date .m { font-size: 13px; color: var(--muted); }
.news-item h3 { color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.news-item h3 a:hover { color: var(--brand); }
.news-item p { color: var(--muted); font-size: 14.5px; }
.news-item .cat { font-size: 12px; color: var(--brand); background: var(--brand-light); padding: 3px 9px; border-radius: 999px; margin-left: 10px; }
.news-card .n-cover { height: 150px; border-radius: 12px; display: grid; place-items: center; font-size: 40px; color: #fff; margin-bottom: 14px; }

/* CTA 区 */
.cta {
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9); color: #fff; border-radius: 22px;
  padding: 54px 40px; text-align: center;
}
.cta h2 { font-size: clamp(24px,3vw,34px); margin-bottom: 12px; }
.cta p { color: #e0edff; margin-bottom: 26px; }

/* ---------------- 联系表单 ---------------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.contact-info .ci { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.contact-info .ci .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-light); color: var(--brand); display: grid; place-items: center; font-size: 20px; flex: none; }
.contact-info .ci .t { font-size: 13px; color: var(--muted); }
.contact-info .ci .v { color: var(--ink); font-weight: 600; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; color: var(--ink); font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; color: var(--ink); background: #fff; transition: border .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-light); }
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 8px; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; display: none; }
.alert.ok { display: block; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert.err { display: block; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: var(--bg-dark); color: #b9c4d6; padding: 56px 0 26px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-brand { flex: 1 1 280px; max-width: 360px; }
.footer-right { display: flex; gap: 56px; flex: 0 0 auto; }
.footer-follow h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.site-footer .logo { color: #fff; margin-bottom: 14px; }
.footer-qr { width: 96px; height: 96px; border-radius: 10px; display: block; margin-bottom: 8px; border: 1px solid rgba(255,255,255,.25); background: #fff; padding: 5px; }
.footer-qr-wrap { display: inline-flex; flex-direction: column; align-items: flex-start; }
.footer-qr-wrap span { font-size: 12px; color: rgba(255,255,255,.7); }
.site-footer p { font-size: 14px; color: #93a1b8; max-width: 320px; }
.footer-contact div { font-size: 14px; line-height: 1.75; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer #footer-name { white-space: nowrap; flex-shrink: 0; }
.footer-col a { display: block; font-size: 14px; color: #93a1b8; padding: 5px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #6b788f; }
.footer-bottom .footer-icp { color: #6b788f; text-decoration: none; }
.footer-bottom .footer-icp:hover { color: #fff; text-decoration: underline; }

/* 子页头图 */
.page-hero { background: linear-gradient(135deg, #0b1220, #1d4ed8 140%); color: #fff; padding: 130px 0 70px; }
.page-hero h1 { font-size: clamp(28px,4vw,44px); font-weight: 800; }
.page-hero p { color: #cfe0ff; margin-top: 12px; max-width: 640px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { flex-direction: column; }
  .footer-right { gap: 40px; }
  .contact-wrap { grid-template-columns: 1fr; }
  .hero-badge { display: none; }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .news-item { flex-direction: column; gap: 8px; }
  .footer-grid { flex-direction: column; gap: 28px; }
  .footer-right { flex-direction: column; gap: 24px; }
  .cta { padding: 40px 22px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}

/* ---------------- 弹窗 ---------------- */
#wb-modal { position: fixed; inset: 0; z-index: 200; display: none; }
#wb-modal.open { display: block; }
.modal-overlay { position: absolute; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); }
.modal-box {
  position: relative; max-width: 640px; margin: 7vh auto; max-height: 86vh; overflow: auto;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 0 0 30px;
  animation: pop .22s ease;
}
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.22); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; z-index: 3; }
.modal-close:hover { background: rgba(255,255,255,.35); }
.modal-body { padding: 0 30px; color: var(--ink-2); }
.modal-body .m-head { display: flex; gap: 16px; align-items: center; color: #fff; margin: 0 -30px 22px; padding: 30px; border-radius: 18px 18px 0 0; }
.modal-body .m-icon { width: 56px; height: 56px; border-radius: 14px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 30px; flex: none; }
.modal-body .m-cat { font-size: 13px; opacity: .9; }
.modal-body .m-head h2 { font-size: 24px; color: #fff; margin-top: 4px; }
.modal-body .m-sum { font-size: 16px; color: var(--ink); font-weight: 600; margin-bottom: 12px; }
.modal-body .m-feats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.modal-body .m-feats span { font-size: 13px; font-weight: 600; color: var(--brand); background: var(--brand-light); padding: 6px 12px; border-radius: 999px; }
.modal-body p { margin-bottom: 12px; }

/* 分类筛选 */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.filters button { padding: 9px 18px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); transition: .2s; }
.filters button:hover { border-color: var(--brand); color: var(--brand); }
.filters button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
