/* ============================================================
   AmpRack design-tokens.css — P3 石墨暖灰 × F1 Space Grotesk 系
   方向 B「机房值守终端 NOC Phosphor Console」
   本文件为全站唯一样式令牌源（禁跨站复制，v14.2）
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600;800&display=swap');

:root {
  /* ---- 底色系统（石墨暖灰，去蓝存灰）---- */
  --bg: #121417;            /* 页面底 */
  --bg-soft: #16191D;       /* 次级底 */
  --panel: #1A1D21;         /* 卡片/面板 */
  --panel-2: #1F2328;       /* 提升面板/悬浮 */
  --ink: #F0EDE6;           /* 主文字（暖白）*/
  --ink-dim: #A6A9AF;       /* 次级文字/遥测读数 */
  --muted: #8B8E94;         /* 弱化文字 */
  --border: #26292E;        /* 描边 */
  --border-soft: #202329;   /* 弱描边 */

  /* ---- 琥珀 accent（全站群唯一暖琥珀站）---- */
  --amber: #FFAA1F;
  --amber-deep: #C87F0A;    /* hover/按压 */
  --amber-glow: rgba(255, 170, 31, 0.16);
  --cta-ink: #141414;       /* 琥珀按钮上的文字 */

  /* ---- 状态色（仅小面积 LED 点/告警，不作主 accent）---- */
  --ok: #57C785;
  --alert: #E5484D;

  /* ---- 字体三角色（F1）---- */
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* ---- 节奏 ---- */
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  --section-pad: 72px;
  --max-w: 1180px;
}

/* ---- 基础 ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
section { padding: var(--section-pad) 0; }
img { display: block; max-width: 100%; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-deep); }

/* ---- 标题节奏（硬约束 43：margin-bottom ≥16px）---- */
h1, .h1 { font-family: var(--font-display); font-size: 46px; line-height: 1.12; letter-spacing: -1px; font-weight: 700; margin-bottom: 20px; }
h2, .h2 { font-family: var(--font-display); font-size: 32px; line-height: 1.2; letter-spacing: -.6px; font-weight: 700; margin-bottom: 18px; }
h3, .h3 { font-family: var(--font-display); font-size: 20px; line-height: 1.3; font-weight: 700; margin-bottom: 16px; }
.eyebrow {
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--amber);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber-glow); }

/* ---- 正文容器（硬约束 42：禁裸长文本）---- */
.lede { font-size: 18px; color: var(--ink-dim); max-width: 640px; margin-bottom: 16px; }
.prose { color: var(--ink-dim); max-width: 680px; margin-bottom: 16px; }
.prose b, .prose strong { color: var(--ink); }

/* ---- 签名元素：遥测读数 chip（P-TEL，全站 ≤8 处）---- */
.readout-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.readout {
  font-family: var(--font-mono); font-size: 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 13px; color: var(--ink-dim);
}
.readout b { color: var(--amber); font-weight: 600; }
.readout .led { display: inline-flex; gap: 2px; margin-left: 8px; vertical-align: middle; }
.readout .led i { width: 4px; height: 10px; background: var(--border); border-radius: 1px; }
.readout .led i.on { background: var(--amber); }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  padding: 14px 26px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; transition: all .18s ease; min-height: 48px;
}
.btn-amber { background: var(--amber); color: var(--cta-ink); }
.btn-amber:hover { background: var(--amber-deep); color: var(--cta-ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ---- 卡片 ---- */
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--amber); transform: translateY(-2px); }
.card h3 { color: var(--ink); }
.card p { color: var(--ink-dim); font-size: 15px; }
.card .spec { font-family: var(--font-mono); font-size: 14px; color: var(--ink-dim); margin-top: 12px; }

/* ---- 网格（硬约束 18/21：min-width:0 + 卡数=列数整倍数）---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }

/* ---- 图位（硬约束 40/41：容器比例=图片实际比例，禁拉伸）---- */
.ar-3-2 { aspect-ratio: 3 / 2; }
.ar-2-3 { aspect-ratio: 2 / 3; }
.ar-1-1 { aspect-ratio: 1 / 1; }
.frame-img { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
.frame-img img { width: 100%; height: 100%; object-fit: cover; }
.frame-img img.img-1-1 { aspect-ratio: 1 / 1; }

/* ---- Split 分屏（图文同高：用户硬偏好）---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: stretch; }
.split .split-media { min-height: 100%; }
.split .split-media .frame-img { height: 100%; }
.split .split-media img { height: 100%; object-fit: cover; }
.split.rev .split-media { order: 2; }
.split.rev .split-body { order: 1; }

/* ---- 表格（P5，包 table-wrap 防溢出）---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec-table th { font-family: var(--font-mono); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; text-align: left; color: var(--amber); background: var(--panel-2); padding: 12px 16px; border-bottom: 1px solid var(--border); }
.spec-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); color: var(--ink-dim); }
.spec-table tr:last-child td { border-bottom: none; }
.spec-table td:first-child { color: var(--ink); font-weight: 500; }

/* ---- FAQ 手风琴 ---- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; background: none; border: none; color: var(--ink); font-family: var(--font-body); font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; min-height: 48px; }
.faq-q::after { content: '▾'; font-family: var(--font-body); color: var(--amber); transition: transform .2s ease; }
.faq-item.open .faq-q::after { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-a { max-height: 600px; }
.faq-a-inner { padding: 0 22px 20px; color: var(--ink-dim); font-size: 15px; }

/* ---- Quote Band（P9）---- */
.quote-band { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 44px; text-align: center; }
.quote-band h2 { margin-bottom: 18px; }
.quote-band .btn { margin-top: 6px; }

/* ---- 弹窗（硬约束 22：左图右表双栏）---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(8, 9, 11, .78); display: none; align-items: center; justify-content: center; z-index: 90; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-dialog { display: grid; grid-template-columns: 1fr 1fr; max-width: 760px; width: 100%; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.modal-image-panel { position: relative; min-height: 320px; background: var(--panel); }
.modal-image-panel img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.modal-image-panel .m-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8,9,11,.85)); display: flex; align-items: flex-end; padding: 22px; }
.modal-image-panel .m-overlay b { font-family: var(--font-display); font-size: 20px; color: #fff; }
.modal-form-panel { padding: 30px; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel-2); color: var(--ink); font-size: 18px; cursor: pointer; }

/* ---- 表单 ---- */
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--ink); font-family: var(--font-body); font-size: 15px;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 2px solid var(--amber-glow); border-color: var(--amber); }

/* ---- 扫描线质感（方向 B 全局氛围，极低对比）---- */
.scanlines { position: relative; }
.scanlines::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 2px, transparent 2px 4px); }

/* ---- 深浅节奏（用户偏好：深色板块不相邻，本站全深底 → 用 panel/panel-2/bg 三层底交替 + 分隔线过渡）---- */
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-panel { background: var(--panel); }

/* ---- 响应式（硬约束 7/8/18）---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  h1, .h1 { font-size: 38px; }
  h2, .h2 { font-size: 28px; }
}
@media (max-width: 720px) {
  :root { --section-pad: 52px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split.rev .split-media { order: 1; }
  .split.rev .split-body { order: 2; }
  .modal-dialog { grid-template-columns: 1fr; }
  .modal-image-panel { min-height: 200px; }
  h1, .h1 { font-size: 31px; }
  h2, .h2 { font-size: 24px; }
  body { font-size: 15px; }
  .prose, .lede { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   结构组件扩展（Phase 3 契约类名 · worker 只用这些，禁止自创）
   ============================================================ */

/* ---- P1c 首页 hero（大图铺底+左文遮罩）---- */
.hero-home { position: relative; min-height: 78vh; display: flex; align-items: center; overflow: hidden; padding: 90px 0; }
.hero-home .hero-media { position: absolute; inset: 0; }
.hero-home .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-home .hero-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,20,23,.94) 0%, rgba(18,20,23,.82) 34%, rgba(18,20,23,.30) 68%, rgba(18,20,23,.12) 100%); }
.hero-home .hero-content { position: relative; z-index: 2; max-width: 620px; }
.hero-home .h1 { font-size: 52px; }

/* ---- P4 stats band ---- */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; }
.stat-num { font-family: var(--font-display); font-size: 38px; font-weight: 700; color: var(--amber); letter-spacing: -1px; line-height: 1.05; margin-bottom: 10px; }
.stat-num small { font-size: 20px; }
.stat-label { color: var(--ink-dim); font-size: 14px; line-height: 1.5; }

/* ---- P6 steps（≤3 列，6 步用 3×2）---- */
.steps--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--amber); color: var(--amber); font-family: var(--font-mono); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.step h3 { font-size: 17px; }
.step p { color: var(--ink-dim); font-size: 14.5px; }

/* ---- P11 cert wall（文字徽章，禁虚构 logo）---- */
.cert-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cert-badge { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 14px; text-align: center; font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: .04em; }
.cert-badge span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ---- P-TEL 遥测带 ---- */
.tel-band { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; }
.tel-head { font-family: var(--font-mono); font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin-bottom: 16px; }
.tel-head::before { content: '● '; color: var(--ok); }

/* ---- P1d 轻 hero（信息页）---- */
.page-hero { padding: 64px 0 44px; border-bottom: 1px solid var(--border-soft); background: var(--bg-soft); }
.page-hero .lede { margin-bottom: 0; }

/* ---- P1e 子页主题 hero ---- */
.theme-hero { position: relative; overflow: hidden; padding: 84px 0; }
.theme-hero .hero-media { position: absolute; inset: 0; }
.theme-hero .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.theme-hero .hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,20,23,.55), rgba(18,20,23,.94)); }
.theme-hero .hero-content { position: relative; z-index: 2; max-width: 680px; }

/* ---- 选型器（纯前端筛选 chips）---- */
.filter-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.filter-chip { font-family: var(--font-mono); font-size: 14px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--panel); color: var(--ink-dim); cursor: pointer; min-height: 44px; }
.filter-chip:hover { border-color: var(--amber); color: var(--amber); }
.filter-chip.on { background: var(--amber); border-color: var(--amber); color: var(--cta-ink); font-weight: 600; }

/* ---- 链接卡片 more 行 ---- */
.card-more { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 14px; color: var(--amber); margin-top: 14px; padding: 6px 0; min-height: 32px; }
.card-more:hover { color: var(--amber-deep); }

/* ---- 文档列表（支持资产/下载清单）---- */
.doc-list { list-style: none; }
.doc-list li { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); color: var(--ink-dim); font-size: 14.5px; }
.doc-list li:last-child { border-bottom: none; }
.doc-list .doc-tag { font-family: var(--font-mono); font-size: 14px; color: var(--amber); white-space: nowrap; }

/* ---- 联系页双栏 ---- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
.info-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.info-panel .spec { font-family: var(--font-mono); font-size: 14px; color: var(--ink-dim); padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.info-panel .spec:last-child { border-bottom: none; }
.info-panel .spec b { color: var(--amber); font-weight: 600; }

/* ---- Sources 脚注（行业页数据来源）---- */
.sources-note { font-size: 14px; color: var(--muted); border-top: 1px solid var(--border-soft); padding-top: 14px; margin-top: 26px; }

/* ---- 文章/博客 ---- */
.post-meta { font-family: var(--font-mono); font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.prose table { margin: 18px 0; }
.prose h3 { margin-top: 28px; }

@media (max-width: 1024px) {
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .steps--3 { grid-template-columns: repeat(2, 1fr); }
  .cert-wall { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-home .h1 { font-size: 40px; }
}
@media (max-width: 720px) {
  .stats-band, .steps--3, .cert-wall { grid-template-columns: 1fr; }
  .hero-home { min-height: 72vh; }
  .hero-home .h1 { font-size: 31px; }
}

/* ---- 工具类（替代内联 style，验收 0 内联）---- */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.btn-row.center { justify-content: center; margin-top: 0; }
.btn-full { width: 100%; justify-content: center; }
.m-sub { color: #CBD2D9; font-size: 14px; margin-top: 6px; }
.m-lede { color: #A6A9AF; font-size: 14px; margin-bottom: 16px; }
.form-status { font-size: 14px; margin-top: 10px; color: var(--ok); display: none; }
.quote-band .prose { margin: 0 auto 18px; max-width: 560px; }
.tel-band .prose { max-width: 760px; }
.mt-s { margin-top: 14px; }
.tight-h { margin-bottom: 6px; }

/* 选型器空态 */
.filter-empty td { color: var(--ink-dim); font-size: 15px; padding: 22px 16px; }
.hidden-row { display: none; }
