/*
Theme Name: Mingyuan Corporate
Theme URI: https://www.mingyuanerp.com
Author: Mingyuan
Description: 德阳明远科技有限公司企业官网主题，面向制造业 MES / ERP 产品展示。零依赖、响应式、可编辑。
Version: 1.0.0
Text Domain: mingyuan
*/

:root {
  --brand: #1a56b0;
  --brand-600: #154696;
  --brand-900: #0a1e3c;
  --accent: #2f8fef;
  --ink: #101c2b;
  --ink-2: #3c4d61;
  --muted: #6b7c90;
  --line: #e5ebf2;
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --bg-deep: #0a1a30;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 40, 74, .07);
  --container: 1200px;
}

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

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-600); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.3; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 3.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: 56px 0; }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brand); font-weight: 700; margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand img { height: 38px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 1.02rem; color: var(--ink); letter-spacing: .04em; }
.brand-text em { font-style: normal; font-size: .62rem; letter-spacing: .2em; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  display: inline-flex; align-items: center; height: 38px; padding: 0 14px;
  border-radius: 8px; color: var(--ink-2); font-size: .95rem; font-weight: 500;
}
.nav a:hover { background: var(--bg-soft); color: var(--brand); }
.nav a.is-active { color: var(--brand); background: rgba(26, 86, 176, .08); }
.nav-group { position: relative; }
.nav-group > a::after {
  content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); margin-left: 7px; margin-top: -3px;
}
.nav-sub {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  display: none; flex-direction: column;
}
/* 下拉面板顶边与导航词底边之间有 8px 视觉间距。这段空隙若不能被指针命中，
   :hover 会在鼠标下移的途中中断，面板随即收起（表现为"鼠标一动子项就没了"）。
   这里补一条透明桥接区填满空隙，指针经过时仍算悬停在 .nav-sub 内。 */
.nav-sub::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -9px; height: 9px;
}
.nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { display: flex; }
.nav-sub a { height: 40px; border-radius: 8px; }
.header-cta { flex: 0 0 auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 10px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(26, 86, 176, .22); }
.btn--primary:hover { background: var(--brand-600); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn--light { background: #fff; color: var(--brand-900); }
.btn--light:hover { background: #eef4ff; color: var(--brand-900); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn--outline-light:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; padding: 0; align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 500px at 15% -10%, #1d4f8f 0%, transparent 60%),
              linear-gradient(135deg, #08172b 0%, #0d2545 55%, #123a63 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  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: linear-gradient(to bottom, #000 0%, transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 56px; align-items: center; padding-top: 96px; padding-bottom: 104px;
}
.hero .eyebrow { color: #8fc0ff; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero p.lead { color: rgba(255, 255, 255, .76); font-size: 1.06rem; max-width: 560px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 26px; color: rgba(255, 255, 255, .5); font-size: .86rem; }

.dash {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px; padding: 18px; box-shadow: 0 30px 60px rgba(0, 0, 0, .28);
}
.dash-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.dash-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.28); }
.dash-title { font-size: .8rem; color: rgba(255,255,255,.62); letter-spacing: .08em; }
.dash-body { display: grid; gap: 10px; }
.dash-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: rgba(255, 255, 255, .07); border-radius: 10px; padding: 12px 14px;
}
.dash-row span { font-size: .86rem; color: rgba(255,255,255,.86); }
.dash-bar { flex: 1; height: 6px; border-radius: 99px; background: rgba(255,255,255,.13); position: relative; overflow: hidden; }
.dash-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, #3f8bfa, #6fb3ff); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.dash-cell { background: rgba(255,255,255,.07); border-radius: 10px; padding: 12px 14px; }
.dash-cell b { display: block; color: #fff; font-weight: 600; font-size: 1.02rem; margin-bottom: 2px; }
.dash-cell em { font-style: normal; font-size: .78rem; color: rgba(255,255,255,.55); }

/* ---------- Stats strip ---------- */
.facts { background: #fff; border-bottom: 1px solid var(--line); }
.facts-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 30px 24px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact b { display: block; font-size: 1.5rem; color: var(--ink); line-height: 1.2; margin-bottom: 4px; }
.fact span { color: var(--muted); font-size: .9rem; }

/* ---------- Module grid ---------- */
.modules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.module {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.module:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cfe0f5; }
.module .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #eaf2ff, #dce9fd); color: var(--brand); margin-bottom: 16px;
}
.module h3 { margin-bottom: 8px; font-size: 1.05rem; }
.module p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.7; }

/* ---------- Advantages ---------- */
.advantages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.adv {
  display: flex; align-items: flex-start; gap: 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 18px;
}
.adv .ico { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; color: var(--brand); }
.adv h4 { margin: 0; font-size: .98rem; font-weight: 600; }

/* ---------- Solutions ---------- */
.solutions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.solution {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(160deg, #0d2545, #164a80); color: #fff;
  padding: 34px 28px; min-height: 230px; display: flex; flex-direction: column; justify-content: flex-end;
}
.solution::after {
  content: ""; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px;
  border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.solution h3 { color: #fff; margin-bottom: 10px; position: relative; z-index: 1; }
.solution p { color: rgba(255,255,255,.72); margin: 0; font-size: .92rem; position: relative; z-index: 1; }
.solution .tag {
  position: absolute; top: 22px; left: 28px; font-size: .74rem; letter-spacing: .16em;
  color: #8fc0ff; text-transform: uppercase;
}

/* ---------- Customers ---------- */
.customers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.customer {
  height: 74px; display: grid; place-items: center; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; color: var(--ink-2);
  font-weight: 600; font-size: .94rem; text-align: center; padding: 0 10px;
}

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-card .cover {
  aspect-ratio: 16 / 9; position: relative; overflow: hidden;
  background: linear-gradient(145deg, #0b2340 0%, #12396a 55%, #1a56b0 100%);
}
.news-card .cover::before {
  content: ""; position: absolute; inset: 0; opacity: .6;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 34px 34px;
}
.news-card .cover::after {
  content: ""; position: absolute; right: -46px; bottom: -60px; width: 190px; height: 190px;
  border-radius: 50%; background: rgba(255,255,255,.07);
}
.news-card .cover span {
  position: absolute; left: 18px; bottom: 16px; z-index: 1;
  font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}
.news-card .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card .date { font-size: .8rem; color: var(--muted); }
.news-card h3 { font-size: 1.02rem; margin: 0; }
.news-card p { margin: 0; color: var(--muted); font-size: .9rem; flex: 1; }
.more-link { font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(120deg, #0a1e3c, #15488a 60%, #1a56b0);
  color: #fff; border-radius: 20px; padding: 50px; display: flex;
  align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta h2 { color: #fff; margin-bottom: 8px; }
.cta p { color: rgba(255,255,255,.72); margin: 0; }

/* ---------- Page hero ---------- */
.page-hero {
  background: linear-gradient(135deg, #0a1c33, #123a63);
  color: #fff; padding: 72px 0 64px; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px;
  border-radius: 50%; background: radial-gradient(circle, rgba(63,139,250,.28), transparent 68%);
}
.page-hero .eyebrow { color: #8fc0ff; }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 2.8vw, 2.5rem); margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,.74); max-width: 640px; margin: 0; position: relative; z-index: 1; }

/* ---------- Content blocks ---------- */
.prose { max-width: 820px; }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.5em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; margin-bottom: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose img { border-radius: 12px; box-shadow: var(--shadow); margin: 24px 0; }

.feature-list { display: grid; gap: 14px; }
.feature {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.feature .num {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(26,86,176,.1); color: var(--brand); font-weight: 700; font-size: .85rem;
}
.feature p { margin: 0; color: var(--ink-2); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split--reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }

.shots { display: grid; gap: 22px; }
.shot { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shot img { border-radius: 0; box-shadow: none; margin: 0; }
.shot figcaption { padding: 14px 18px; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- Article ---------- */
.article-head { max-width: 820px; margin: 0 auto 36px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: .88rem; margin-bottom: 18px; }
.article-body { max-width: 820px; margin: 0 auto; }
.article-body p { font-size: 1.02rem; line-height: 1.9; }
.article-body h2 { font-size: 1.35rem; margin-top: 1.8em; }
.article-nav {
  max-width: 820px; margin: 56px auto 0; display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; border-top: 1px solid var(--line); padding-top: 26px;
}
.article-nav a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-2); }
.article-nav a:hover { border-color: #cfe0f5; background: var(--bg-soft); }
.article-nav small { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 4px; }

/* ---------- Archive ---------- */
.post-list { display: grid; gap: 16px; }
.post-item {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
}
.post-item time { color: var(--muted); font-size: .86rem; }
.post-item h3 { margin: 0 0 6px; font-size: 1.05rem; }
.post-item p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0a1626; color: rgba(255,255,255,.62); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer a { color: rgba(255,255,255,.66); }
.site-footer a:hover { color: #fff; }
.footer-links { display: grid; gap: 10px; font-size: .92rem; }
.footer-contact { display: grid; gap: 12px; font-size: .92rem; }
.footer-contact div { display: flex; gap: 10px; }
.footer-brand p { font-size: .92rem; color: rgba(255,255,255,.55); max-width: 320px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo img { height: 38px; width: auto; }
.footer-logo span { display: flex; flex-direction: column; line-height: 1.15; }
.footer-logo b { color: #fff; font-size: 1.02rem; letter-spacing: .04em; }
.footer-logo em { font-style: normal; color: rgba(255,255,255,.45); font-size: .62rem; letter-spacing: .2em; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem;
}
.footer-bottom a { color: rgba(255,255,255,.5); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding-top: 72px; padding-bottom: 80px; }
  .modules { grid-template-columns: repeat(2, 1fr); }
  .advantages { grid-template-columns: repeat(2, 1fr); }
  .solutions { grid-template-columns: 1fr; }
  .solution { min-height: 0; padding: 26px 24px; justify-content: flex-start; }
  .solution .tag { position: static; display: block; margin-bottom: 10px; }
  .customers { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .facts-inner { grid-template-columns: repeat(2, 1fr); }
  .fact { border-right: 0; border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split--reverse .split-media { order: 0; }
  .section { padding: 64px 0; }
  .cta { padding: 34px 26px; }
  .post-item { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 640px) {
  .modules, .advantages, .news-grid, .customers { grid-template-columns: 1fr; }
  .customers { grid-template-columns: 1fr 1fr; }
  .article-nav { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 860px) {
  .nav-mobile { display: block; }
}

/* Mobile nav panel injected by JS */
.nav-panel {
  display: none; position: fixed; inset: 74px 0 0 0; background: #fff; padding: 18px 24px 32px;
  overflow-y: auto; z-index: 49; border-top: 1px solid var(--line);
}
.nav-panel.is-open { display: block; }
.nav-panel > .container { padding-left: 0; padding-right: 0; }
.nav-panel a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.nav-panel .btn { margin-top: 20px; width: 100%; height: auto; padding: 14px 20px; justify-content: center; border-bottom: 0; }
