/* style.css — DC Power 全站样式（风格① 熔铜工业）
   类名契约卡：仅本文件 + design-patterns.md 骨架类名，禁自创。 */

/* ============ 基础 ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #E2A968; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-3); }
section { padding: var(--space-5) 0; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 var(--space-2); }
h2 { font-size: var(--fs-h2); color: var(--ink); }
h3 { font-size: var(--fs-h3); font-family: var(--font-body); font-weight: 700; }
p { margin: 0 0 var(--space-2); color: var(--muted); }
.lede { font-size: 1.06rem; color: var(--ink); }

/* ============ 眉标（P12 terminal-label） ============ */
.terminal-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-2);
}
.terminal-label::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(217,154,85,.7);
}

/* ============ 头部导航 ============ */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22,17,12,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.logo .logo-mark { width: 34px; height: 34px; border-radius: 6px; background: var(--sig-copper); border: 1px solid var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); color: var(--accent); font-size: 0.8rem; }
.nav { display: flex; align-items: center; gap: var(--space-3); }
.nav a { color: var(--muted); font-size: 0.92rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav .has-drop { position: relative; }
.nav .dropdown {
  position: absolute; top: 100%; left: 0; min-width: 230px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-1) 0; display: none; z-index: 60;
}
.nav .has-drop.open .dropdown { display: block; }
.nav .dropdown a { display: block; padding: 8px 16px; border: 0; font-size: 0.88rem; }
.nav .dropdown a:hover { background: var(--surface-2); color: var(--ink); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); font-family: var(--font-mono); padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.nav-cta { display: inline-flex; }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: var(--space-2); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav .dropdown { position: static; display: none; border: 0; padding-left: var(--space-2); }
  .nav .has-drop.open .dropdown { display: block; }
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn-bg); color: var(--btn-ink);
  padding: 12px 26px; border-radius: var(--btn-radius);
  font-weight: 700; font-size: 0.95rem; border: 0; cursor: pointer;
  min-height: 44px; transition: background .18s ease;
}
.btn:hover { background: var(--btn-hover); color: var(--btn-ink); }
.btn--ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn--ghost:hover { background: rgba(217,154,85,.12); color: var(--accent); }
.btn--sm { padding: 8px 16px; font-size: 0.86rem; min-height: 40px; }

/* ============ P1b Hero（左文右图 split） ============ */
.hero { padding: var(--space-6) 0 var(--space-5); }
.hero .split { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--space-5); align-items: center; }
.hero h1 { font-size: var(--fs-hero); }
.hero .hero-sub { font-size: 1.08rem; color: var(--muted); max-width: 34em; }
.hero .hero-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); flex-wrap: wrap; }
.hero .hero-meta { display: flex; gap: var(--space-3); margin-top: var(--space-3); font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); flex-wrap: wrap; }
.hero .hero-meta b { color: var(--accent); }
.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius-lg); border: 1px solid var(--line); aspect-ratio: 2/3; object-fit: cover; width: 100%; }
.hero-media::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-lg); background: linear-gradient(160deg, rgba(22,17,12,0) 55%, rgba(22,17,12,.5)); pointer-events: none; }

/* ============ P2 Split 通用 ============ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); align-items: center; }
.split.rev .split-media { order: 2; }
.split-media img { border-radius: var(--radius-lg); border: 1px solid var(--line); aspect-ratio: 2/3; object-fit: cover; width: 100%; }
.split-body h2 { margin-bottom: var(--space-2); }
.split-body ul { color: var(--muted); padding-left: 1.1em; margin: var(--space-2) 0; }
.split-body li { margin-bottom: 8px; }

/* ============ P3 Spec-Card ============ */
.spec-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-3); }
.spec-card table { width: 100%; border-collapse: collapse; }
.spec-card th { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.spec-card td { font-size: 0.9rem; color: var(--ink); padding: 8px; border-bottom: 1px solid rgba(217,154,85,.12); }
.spec-card tr:last-child td { border-bottom: 0; }

/* ============ P4 Stats Band ============ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3); }
.stat .num { font-family: var(--font-display); font-size: 1.9rem; color: var(--accent); line-height: 1.1; }
.stat .lbl { font-size: 0.84rem; color: var(--muted); margin-top: 6px; }

/* ============ P8 Grid + Card ============ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; color: var(--ink); min-width: 0; }
.card:hover { border-color: var(--accent); color: var(--ink); }
.card-media img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.card-body { padding: var(--space-2) var(--space-3) var(--space-3); }
.card-body h3 { font-size: 1.02rem; margin-bottom: 6px; }
.card-body p { font-size: 0.86rem; margin: 0; }
.card-body .card-more { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); margin-top: 8px; display: inline-block; }

/* ============ P5 数据表 ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data th { background: var(--surface-2); font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); text-align: left; padding: 12px 16px; }
table.data td { padding: 11px 16px; border-top: 1px solid rgba(217,154,85,.12); font-size: 0.9rem; color: var(--muted); }
table.data td:first-child { color: var(--ink); font-weight: 600; }
table.data tr:hover td { background: rgba(217,154,85,.05); }

/* ============ P6 Steps ============ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.steps--3 { grid-template-columns: repeat(3, 1fr); }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-3); position: relative; }
.step .step-no { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--paper); font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-2); }
.step h3 { font-size: 0.98rem; }
.step p { font-size: 0.86rem; margin: 0; }

/* ============ P7 FAQ ============ */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--space-2); background: var(--surface); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; color: var(--ink); font-family: var(--font-body); font-size: 0.96rem; font-weight: 600; padding: 16px 18px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.faq-q .faq-ico { font-family: var(--font-mono); color: var(--accent); transition: transform .2s ease; }
.faq-item.open .faq-ico { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 18px 16px; color: var(--muted); font-size: 0.9rem; }
.faq-item.open .faq-a { display: block; }

/* ============ P9 Quote Band（CTA） ============ */
.quote-band { position: relative; border-radius: var(--radius-lg); overflow: hidden; padding: var(--space-5) var(--space-4); background: var(--surface-2); }
.quote-band .quote-bg { position: absolute; inset: 0; background: var(--sig-copper); opacity: .14; pointer-events: none; }
.quote-band .quote-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.quote-band h2 { margin: 0; }
.quote-band p { margin: 6px 0 0; max-width: 46em; }

/* ============ P11 信任墙 ============ */
.cert-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.cert-badge { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-2); font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); text-align: center; }
.cert-badge b { display: block; color: var(--accent); font-size: 0.92rem; margin-bottom: 4px; }

/* ============ 签名：单线图铜线 ============ */
.sig-line { position: relative; }
.sig-line svg { width: 100%; height: 70px; display: block; opacity: .85; }

/* ============ 面包屑 ============ */
.breadcrumb { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-bottom: var(--space-2); }
.breadcrumb a { color: var(--accent); }

/* ============ P1d 轻 hero ============ */
.hero--light { padding: var(--space-4) 0 var(--space-3); border-bottom: 1px solid var(--line); }
.hero--light h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }

/* ============ P1e 主题背景 hero ============ */
.hero--bg { padding: var(--space-5) 0; border-bottom: 1px solid var(--line); }
.hero--bg h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); max-width: 20em; }
.hero--bg .hero-sub { font-size: 1.05rem; color: var(--muted); max-width: 42em; }

/* ============ 列表（check 样式） ============ */
.list-check { list-style: none; padding: 0; margin: var(--space-2) 0; }
.list-check li { position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--muted); }
.list-check li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); font-family: var(--font-mono); }

/* ============ 询盘弹窗（左图右表双栏） ============ */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,7,5,.75); z-index: 90; display: none; align-items: center; justify-content: center; padding: var(--space-3); }
.modal-backdrop.open { display: flex; }
.modal-dialog { display: grid; grid-template-columns: 1fr 1fr; max-width: 760px; width: 100%; background: var(--surface); border: 1px solid var(--accent-soft); border-radius: var(--radius-lg); overflow: hidden; max-height: 90vh; }
.modal-image-panel { position: relative; min-height: 100%; }
.modal-image-panel img { width: 100%; height: 100%; object-fit: cover; }
.modal-image-panel .modal-ov { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,17,12,.2), rgba(22,17,12,.85)); display: flex; flex-direction: column; justify-content: flex-end; padding: var(--space-3); }
.modal-image-panel .modal-ov h3 { color: var(--ink); }
.modal-image-panel .modal-ov p { font-size: 0.84rem; }
.modal-form-panel { padding: var(--space-4) var(--space-3); overflow-y: auto; }
.modal-form-panel h3 { margin-bottom: var(--space-2); }
.modal-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(22,17,12,.7); border: 1px solid var(--line); color: var(--ink); font-size: 1.1rem; cursor: pointer; z-index: 5; }
@media (max-width: 720px) {
  .modal-dialog { grid-template-columns: 1fr; }
  .modal-image-panel { display: none; }
}

/* ============ 表单 ============ */
.field { margin-bottom: var(--space-2); }
.field label { display: block; font-size: 0.82rem; font-family: var(--font-mono); color: var(--accent); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select, .field textarea { width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); padding: 11px 12px; font-family: var(--font-body); font-size: 0.92rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 96px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.form-note { font-size: 0.78rem; color: var(--muted); margin-top: 10px; }
.form-msg { display: none; margin-top: 10px; font-size: 0.86rem; padding: 10px 12px; border-radius: var(--radius); }
.form-msg.ok { display: block; background: rgba(62,230,160,.12); color: var(--ok); border: 1px solid rgba(62,230,160,.35); }
.form-msg.err { display: block; background: rgba(255,120,90,.12); color: #FF9D84; border: 1px solid rgba(255,120,90,.35); }

/* ============ 页脚 ============ */
.footer { border-top: 1px solid var(--line); padding: var(--space-5) 0 var(--space-3); background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-4); }
.footer h4 { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: var(--space-2); }
.footer a { display: block; color: var(--muted); font-size: 0.86rem; padding: 3px 0; }
.footer a:hover { color: var(--ink); }
.footer .foot-bottom { margin-top: var(--space-4); padding-top: var(--space-2); border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ============ 博客文章 ============ */
.article { max-width: 780px; margin: 0 auto; }
.article h2 { margin-top: var(--space-4); }
.article img { border-radius: var(--radius-lg); border: 1px solid var(--line); margin: var(--space-3) 0; }
.article blockquote { border-left: 3px solid var(--accent); margin: var(--space-3) 0; padding: 4px 0 4px var(--space-3); color: var(--ink); font-style: italic; }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .grid-3, .stats, .steps, .cert-wall { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero .split, .split { grid-template-columns: 1fr; }
  .split.rev .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2, .stats, .steps, .steps--3, .cert-wall, .form-row { grid-template-columns: 1fr; }
  section { padding: var(--space-4) 0; }
  .quote-band .quote-inner { flex-direction: column; align-items: flex-start; }
}
