/* ============================================================
   PJSCAFFOLD — 工业风样式
   配色：钢灰 / 混凝土 / 安全橙 / 警示黄
   ============================================================ */
:root {
  --dark: #16181c;
  --steel: #23272e;
  --steel-2: #2c313a;
  --concrete: #f4f2ee;
  --paper: #ffffff;
  --ink: #22262c;
  --muted: #6b7280;
  --line: #dcd8d0;
  --orange: #ff6a00;
  --orange-d: #e05e00;
  --yellow: #ffc400;
  --shadow: 6px 6px 0 rgba(22, 24, 28, 0.12);
  --shadow-hard: 6px 6px 0 var(--dark);
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--concrete);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- 警示条纹 ---------- */
.hazard {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--dark) 14px 28px);
}

/* ---------- 顶栏 ---------- */
.site-header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--orange);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo {
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 1px;
  color: #fff;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 2px;
}
.logo span { color: var(--orange); }
.logo i {
  width: 9px; height: 9px; background: var(--yellow);
  display: inline-block; margin-left: 4px;
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  color: #b9bec7;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 8px 14px;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}
.nav a:hover { color: #fff; }
.nav a.active { color: var(--orange); border-bottom-color: var(--orange); }
.header-cta { margin-left: 6px; }
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid #4a5058;
  color: #fff;
  font-size: 20px;
  padding: 4px 10px;
  cursor: pointer;
  margin-left: auto;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1px;
  padding: 13px 30px;
  border: 2px solid var(--dark);
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  text-transform: uppercase;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--dark); }
.btn-ghost { background: transparent; color: #fff; box-shadow: 4px 4px 0 var(--orange); }
.btn-ghost:hover { box-shadow: 2px 2px 0 var(--orange); }
.btn-small { padding: 8px 18px; font-size: 13px; box-shadow: 4px 4px 0 var(--dark); }
.btn-line { background: var(--paper); color: var(--dark); }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(rgba(22, 24, 28, 0.88), rgba(22, 24, 28, 0.94)),
    repeating-linear-gradient(0deg, transparent 0 59px, rgba(255, 255, 255, 0.05) 59px 60px),
    repeating-linear-gradient(90deg, transparent 0 59px, rgba(255, 255, 255, 0.05) 59px 60px),
    var(--steel);
  color: #fff;
  padding: 96px 0 110px;
  position: relative;
}
.hero-kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  padding: 5px 14px;
  margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p.lead {
  max-width: 640px;
  margin: 22px 0 36px;
  color: #aeb4bd;
  font-size: 17px;
}
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 0;
  margin-top: 64px;
  border: 1px solid #3a4049;
  max-width: 720px;
}
.hero-stats > div {
  flex: 1;
  padding: 18px 10px;
  text-align: center;
  border-right: 1px solid #3a4049;
}
.hero-stats > div:last-child { border-right: 0; }
.hero-stats b { display: block; font-size: 28px; color: var(--yellow); font-weight: 900; }
.hero-stats span { font-size: 12px; color: #8a9099; letter-spacing: 2px; }

/* ---------- 区块标题 ---------- */
.section { padding: 84px 0; }
.section.alt { background: var(--paper); }
.sec-head { margin-bottom: 46px; }
.sec-tag {
  font-family: var(--mono);
  color: var(--orange);
  font-size: 13px;
  letter-spacing: 4px;
  font-weight: 700;
}
.sec-head h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}
.sec-head .bar { width: 56px; height: 6px; background: var(--orange); margin-top: 14px; }
.sec-head.center { text-align: center; }
.sec-head.center .bar { margin: 14px auto 0; }
.sec-head p.desc { color: var(--muted); margin-top: 14px; max-width: 640px; }
.sec-head.center p.desc { margin-left: auto; margin-right: auto; }

/* ---------- 卡片 ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--paper);
  border: 2px solid var(--dark);
  box-shadow: var(--shadow);
  padding: 30px 26px;
  transition: transform 0.15s;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 rgba(22, 24, 28, 0.15); }
.card .icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--dark);
  margin-bottom: 20px;
}
.card .icon svg { width: 28px; height: 28px; stroke: var(--yellow); fill: none; stroke-width: 1.8; }
.card h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.card p { font-size: 14px; color: var(--muted); }
.card .more { display: inline-block; margin-top: 16px; color: var(--orange); font-weight: 700; font-size: 13px; letter-spacing: 1px; }

/* ---------- 产品卡上传图片（默认模糊，悬停变高清） ---------- */
.card .icon.pimg-wrap {
  width: 100%; height: 200px;
  padding: 0; margin-bottom: 20px;
  background: var(--steel);
  overflow: hidden; position: relative;
  display: block;
}
.card .icon.pimg-wrap svg { display: none; }
.card .icon.pimg-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: blur(1.5px) grayscale(6%) brightness(1);
  transform: scale(1.08);
  transition: filter 0.55s ease, transform 0.55s ease;
}
.card:hover .icon.pimg-wrap img {
  filter: blur(0) grayscale(0) brightness(1);
  transform: scale(1.0);
}
/* 无图产品保持原 SVG 图标样式不变 */
/* 图片作为整卡背景：文字压在图上，默认朦胧，悬停显影 */
.card.has-pimg { position: relative; overflow: hidden; }
.card .pimg-card-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(5px) grayscale(20%);
  transform: scale(1.07);
  transition: filter 0.55s ease, transform 0.55s ease;
}
.card .pimg-card-ov {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(255, 255, 255, 0.85);
  transition: background 0.55s ease;
}
.card.has-pimg > *:not(.pimg-card-bg):not(.pimg-card-ov) { position: relative; z-index: 2; }
.card.has-pimg .icon { display: none; }
.card.has-pimg:hover .pimg-card-bg { filter: blur(0) grayscale(0); transform: scale(1); }
.card.has-pimg:hover .pimg-card-ov { background: rgba(255, 255, 255, 0.35); }

/* ---------- 新闻卡片 ---------- */
.news-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.news-cover {
  height: 150px;
  background: linear-gradient(135deg, var(--steel) 0%, var(--steel-2) 60%, var(--dark) 100%);
  position: relative;
  display: flex; align-items: flex-end; padding: 14px;
}
.news-cover::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(255, 255, 255, 0.06) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(255, 255, 255, 0.06) 23px 24px);
}
.news-cover .cat {
  position: relative;
  background: var(--yellow);
  color: var(--dark);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 12px;
  letter-spacing: 2px;
}
.news-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.news-body h3 { font-size: 17px; line-height: 1.45; }
.news-body h3 a:hover { color: var(--orange); }
.news-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.news-body p { font-size: 14px; color: var(--muted); margin-top: 10px; flex: 1; }

/* ---------- CTA 横幅 ---------- */
.cta-band {
  background: var(--orange);
  border-top: 4px solid var(--dark);
  border-bottom: 4px solid var(--dark);
  padding: 56px 0;
  color: #fff;
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(24px, 3.5vw, 34px); font-weight: 900; text-transform: uppercase; }
.cta-inner p { color: #ffe1cc; margin-top: 6px; }
.cta-band .btn { background: var(--dark); border-color: var(--dark); box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.25); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--dark); color: #8a9099; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 46px; }
.site-footer h4 { color: #fff; font-size: 14px; letter-spacing: 2px; margin-bottom: 16px; text-transform: uppercase; }
.site-footer .logo { font-size: 20px; margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; font-size: 14px; }
.site-footer li a:hover { color: var(--orange); }
.footer-bottom {
  border-top: 1px solid #2c313a;
  padding: 18px 0;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a:hover { color: var(--orange); }

/* ---------- 页面横幅（内页头部） ---------- */
.page-hero {
  background:
    linear-gradient(rgba(22, 24, 28, 0.9), rgba(22, 24, 28, 0.95)),
    repeating-linear-gradient(90deg, transparent 0 59px, rgba(255, 255, 255, 0.05) 59px 60px),
    var(--steel);
  color: #fff;
  padding: 58px 0;
}
.page-hero h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 900; text-transform: uppercase; letter-spacing: 1px; }
.page-hero .crumb { font-family: var(--mono); font-size: 13px; color: #8a9099; margin-top: 10px; }
.page-hero .crumb a { color: var(--yellow); }

/* ---------- 文章页 ---------- */
.article-wrap { max-width: 800px; margin: 0 auto; }
.article-head { padding: 48px 0 28px; border-bottom: 4px solid var(--dark); margin-bottom: 36px; }
.article-head .cat {
  display: inline-block;
  background: var(--yellow);
  border: 2px solid var(--dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 2px 12px;
  margin-bottom: 16px;
}
.article-head h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 900; line-height: 1.35; }
.article-head .meta { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 14px; }
.article-content { font-size: 16.5px; }
.article-content h2 {
  font-size: 22px;
  margin: 38px 0 16px;
  padding-left: 14px;
  border-left: 5px solid var(--orange);
  font-weight: 800;
}
.article-content h3 { font-size: 18px; margin: 28px 0 12px; font-weight: 800; }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin: 0 0 18px 26px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
  border: 2px solid var(--dark);
  border-left: 6px solid var(--yellow);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin: 26px 0;
  font-weight: 600;
}
.article-content code {
  font-family: var(--mono);
  background: #eee9df;
  padding: 2px 6px;
  font-size: 0.9em;
}
.article-content img { border: 2px solid var(--dark); }
.article-content a { color: var(--orange-d); font-weight: 600; text-decoration: underline; }
.article-content hr { border: none; border-top: 2px dashed var(--line); margin: 32px 0; }

/* ---------- 联系页 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 34px; align-items: start; }
.info-item { display: flex; gap: 16px; margin-bottom: 24px; }
.info-item .icon {
  width: 46px; height: 46px; flex: none;
  background: var(--dark);
  display: flex; align-items: center; justify-content: center;
}
.info-item .icon svg { width: 22px; height: 22px; stroke: var(--yellow); fill: none; stroke-width: 1.8; }
.info-item b { display: block; font-size: 15px; }
.info-item span { font-size: 14px; color: var(--muted); }
.form-card { background: var(--paper); border: 2px solid var(--dark); box-shadow: var(--shadow); padding: 34px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 2px solid var(--dark);
  background: #faf9f6;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--orange); background: #fff; }
.form-msg { margin-top: 14px; font-weight: 700; font-size: 14px; display: none; }
.form-msg.ok { color: #1a7f37; display: block; }
.form-msg.err { color: #c62828; display: block; }

/* ---------- 关于页 ---------- */
.about-lead { font-size: 18px; max-width: 780px; }
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--dark); background: var(--paper); box-shadow: var(--shadow); }
.stat-band > div { padding: 30px 12px; text-align: center; border-right: 2px solid var(--dark); }
.stat-band > div:last-child { border-right: 0; }
.stat-band b { display: block; font-size: 34px; font-weight: 900; color: var(--orange); }
.stat-band b small { font-size: 18px; }
.stat-band span { font-size: 13px; letter-spacing: 2px; color: var(--muted); }

/* ---------- 后台 ---------- */
body.admin-body { background: var(--steel); min-height: 100vh; }
.admin-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card {
  width: 100%; max-width: 400px;
  background: var(--paper);
  border: 2px solid var(--dark);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.35);
  padding: 40px 36px;
}
.login-card .logo { color: var(--dark); margin-bottom: 8px; }
.login-card h1 { font-size: 20px; margin-bottom: 24px; }
.login-tip { font-size: 12.5px; color: var(--muted); margin-top: 16px; font-family: var(--mono); }
.admin-shell { display: none; }
.admin-topbar {
  background: var(--dark);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  height: 62px;
  border-bottom: 3px solid var(--orange);
  position: sticky; top: 0; z-index: 50;
}
.admin-topbar .logo { font-size: 19px; }
.admin-topbar .spacer { flex: 1; }
.admin-topbar .btn-view { color: var(--yellow); font-size: 13px; font-weight: 700; letter-spacing: 1px; }
.admin-topbar .btn-view:hover { color: #fff; }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 34px 22px 80px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-tabs button {
  background: var(--steel-2);
  border: 2px solid transparent;
  color: #b9bec7;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 10px 22px;
  cursor: pointer;
}
.admin-tabs button.active { background: var(--orange); color: #fff; }
.admin-tabs button:hover { color: #fff; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.panel-head h2 { color: #fff; font-size: 20px; letter-spacing: 1px; }

/* ---------- 后台表格（移动端横向滚动） ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 2px solid var(--dark); }
.table-wrap .admin-table { border: 0; min-width: 720px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--paper); border: 2px solid var(--dark); }
.admin-table th {
  background: var(--dark);
  color: #fff;
  text-align: left;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 12px 14px;
}
.admin-table td { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.admin-table tr:hover td { background: #faf6ee; }
.tag-pub { background: #d9f2e0; color: #1a7f37; font-size: 12px; font-weight: 700; padding: 2px 10px; border: 1px solid #1a7f37; }
.tag-draft { background: #fdeecd; color: #92600a; font-size: 12px; font-weight: 700; padding: 2px 10px; border: 1px solid #92600a; }
.tag-unread { background: #ffe0d6; color: #c14a00; font-size: 12px; font-weight: 700; padding: 2px 10px; border: 1px solid #c14a00; }
.row-actions a, .row-actions button {
  background: none; border: none; cursor: pointer;
  color: var(--orange-d); font-weight: 700; font-size: 13px; margin-right: 12px; padding: 0;
  font-family: inherit;
}
.row-actions .danger { color: #c62828; }

.editor-card { background: var(--paper); border: 2px solid var(--dark); padding: 30px; }
.editor-grid { display: grid; grid-template-columns: 1fr 320px; gap: 26px; }
.preview-box { border: 2px dashed var(--line); padding: 22px; overflow: auto; max-height: 640px; background: #fff; }
.status-line { margin-top: 16px; font-weight: 700; font-size: 14px; min-height: 20px; }
.status-line.ok { color: #1a7f37; }
.status-line.err { color: #c62828; }

/* ---------- Markdown 预览（后台） ---------- */
.md-preview h2 { font-size: 20px; margin: 22px 0 12px; padding-left: 12px; border-left: 4px solid var(--orange); }
.md-preview h3 { font-size: 17px; margin: 20px 0 10px; }
.md-preview p { margin-bottom: 12px; }
.md-preview ul, .md-preview ol { margin: 0 0 14px 24px; }
.md-preview blockquote { border-left: 4px solid var(--yellow); background: #faf6ee; padding: 12px 16px; margin: 16px 0; }
.md-preview code { font-family: var(--mono); background: #eee9df; padding: 1px 5px; font-size: 0.9em; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid, .editor-grid { grid-template-columns: 1fr; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .stat-band > div { border-bottom: 2px solid var(--dark); }
  .section { padding: 64px 0; }
  .admin-main { padding: 26px 16px 70px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .nav {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 12px 20px 20px;
    border-bottom: 3px solid var(--orange);
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 4px; border-bottom: 1px solid #2c313a; }
  .nav-toggle { display: block; padding: 6px 14px; }
  .header-cta { display: none; }
  .header-inner { gap: 16px; }
  .logo { font-size: 21px; }

  .hero { padding: 56px 0 64px; }
  .hero h1 { font-size: clamp(30px, 9vw, 40px); }
  .hero p.lead { font-size: 15.5px; }
  .hero-stats { flex-direction: column; margin-top: 44px; }
  .hero-stats > div { border-right: 0; border-bottom: 1px solid #3a4049; }
  .hero-stats > div:last-child { border-bottom: 0; }
  .hero-stats b { font-size: 24px; }
  .hero-actions .btn { width: 100%; text-align: center; }

  .sec-head { margin-bottom: 34px; }
  .card { padding: 24px 20px; }
  .news-cover { height: 130px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
  .stat-band b { font-size: 26px; }

  .page-hero { padding: 44px 0; }
  .article-head { padding: 34px 0 22px; }
  .article-content { font-size: 16px; }

  /* 表单控件 ≥16px，避免 iOS 聚焦自动放大 */
  .field input, .field textarea, .field select { font-size: 16px; padding: 12px 14px; }
  .form-card { padding: 26px 18px; }
  .info-item { gap: 12px; }

  /* 后台移动端 */
  .admin-login { padding: 16px; }
  .login-card { padding: 30px 22px; }
  .admin-topbar { padding: 0 14px; gap: 12px; height: 56px; }
  .admin-topbar .topbar-label { display: none; }
  .admin-main { padding: 18px 12px 60px; }
  .admin-tabs { gap: 6px; margin-bottom: 20px; }
  .admin-tabs button { padding: 10px 16px; font-size: 13px; }
  .editor-card { padding: 20px 16px; }
  .preview-box { padding: 16px; max-height: 480px; }
  .panel-head h2 { font-size: 17px; }
  .row-actions a, .row-actions button { margin-right: 10px; }
}
