/* ==========================================================================
   奈支付 官网设计系统 (naipay.css)
   - 全部规则限定在 .np-site 内，避免与母版 main.css 冲突
   - 品牌红 #C8102E；克制用色、大留白、细边框、几乎不用阴影 = 简洁大气
   ========================================================================== */

.np-site {
  --np-brand: #c8102e;
  --np-brand-dark: #a50d26;
  --np-brand-soft: #fef2f4;
  --np-ink: #0f172a;
  --np-ink-2: #334155;
  --np-muted: #64748b;
  --np-line: #e2e8f0;
  --np-line-soft: #eef2f6;
  --np-bg: #ffffff;
  --np-bg-soft: #f8fafc;
  --np-radius: 14px;
  --np-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px -20px rgba(15, 23, 42, 0.14);
  --np-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --np-wrap: 1180px;

  font-family: var(--np-font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--np-ink-2);
  background: var(--np-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.np-site h1, .np-site h2, .np-site h3, .np-site h4, .np-site h5 {
  margin: 0;
  color: var(--np-ink);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.np-site p { margin: 0; font-size: 1rem; color: var(--np-ink-2); }
.np-site b, .np-site strong, .np-site span, .np-site td { word-break: break-word; }
.np-site a { color: var(--np-brand); text-decoration: none; transition: color .18s ease, background-color .18s ease, border-color .18s ease; }
.np-site a:hover { color: var(--np-brand-dark); }
.np-site img { max-width: 100%; height: auto; }
.np-site ul { margin: 0; padding: 0; list-style: none; }
.np-site hr { border: 0; border-top: 1px solid var(--np-line); margin: 0; }

/* ---------- 布局 ---------- */
.np-wrap { width: 100%; max-width: var(--np-wrap); margin: 0 auto; padding: 0 24px; }
.np-section { padding: 104px 0; }
.np-section--soft { background: var(--np-bg-soft); }
.np-section--tight { padding: 72px 0; }

.np-eyebrow {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--np-brand);
}
.np-h2 { font-size: clamp(26px, 3vw, 36px); margin: 14px 0 14px; }
.np-lead { font-size: 1.0625rem; color: var(--np-muted); max-width: 720px; }
.np-head { max-width: 760px; margin-bottom: 56px; }
.np-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.np-head--center .np-lead { margin-left: auto; margin-right: auto; }

/* ---------- 顶栏 ---------- */
.np-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--np-line-soft);
}
.np-header-inner { display: flex; align-items: center; gap: 32px; height: 76px; }
.np-logo { display: flex; align-items: center; flex: none; }
.np-logo img { max-height: 46px; width: auto; display: block; }
.np-nav { display: flex; align-items: center; gap: 30px; margin-left: 12px; }
.np-nav a { font-size: .9375rem; color: var(--np-ink-2); font-weight: 500; }
.np-nav a:hover { color: var(--np-brand); }
.np-header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.np-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
/* 注意：选择器必须带 .np-site 前缀。基础规则 `.np-site a{color:品牌红}` 是 (0,1,1)，
   若按钮只写 `.np-btn--primary`(0,1,0) 会被它压过 → 红底红字、按钮文字看不见。 */
.np-site .np-btn--primary { background: var(--np-brand); color: #fff; }
.np-site .np-btn--primary:hover { background: var(--np-brand-dark); color: #fff; }
.np-site .np-btn--ghost { background: #fff; color: var(--np-ink); border-color: var(--np-line); }
.np-site .np-btn--ghost:hover { border-color: #cbd5e1; color: var(--np-ink); background: #fff; }
.np-site .np-btn--text { height: 44px; padding: 0 6px; color: var(--np-ink-2); font-weight: 600; background: none; border-color: transparent; }
.np-site .np-btn--text:hover { color: var(--np-brand); }
.np-btn--lg { height: 52px; padding: 0 28px; font-size: 1rem; border-radius: 12px; }
.np-btn--block { width: 100%; }

.np-nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 1px solid var(--np-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.np-nav-toggle span { display: block; width: 18px; height: 2px; background: var(--np-ink); position: relative; }
.np-nav-toggle span::before, .np-nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--np-ink);
}
.np-nav-toggle span::before { top: -6px; }
.np-nav-toggle span::after { top: 6px; }

/* ---------- 首屏 ---------- */
.np-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
  background:
    radial-gradient(1100px 460px at 78% -12%, var(--np-brand-soft) 0%, rgba(254, 242, 244, 0) 62%),
    linear-gradient(180deg, #fff 0%, var(--np-bg-soft) 100%);
  border-bottom: 1px solid var(--np-line-soft);
}
.np-hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--np-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--np-line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(760px 380px at 22% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(760px 380px at 22% 30%, #000 0%, transparent 78%);
  opacity: .7;
  pointer-events: none;
}
.np-hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.np-hero h1 { font-size: clamp(30px, 4.6vw, 56px); letter-spacing: -0.025em; margin: 18px 0 20px; }
/* 母版 main.css 有 h1 br{display:none}，所以换行用 block span，不用 <br> */
.np-hero h1 span { display: block; }
.np-hero h1 em { font-style: normal; color: var(--np-brand); }
.np-hero-sub { font-size: 1.125rem; color: var(--np-muted); max-width: 560px; }
.np-hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.np-hero-note { margin-top: 18px; font-size: .875rem; color: var(--np-muted); }

.np-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px; border: 1px solid var(--np-line); border-radius: var(--np-radius); background: #fff; overflow: hidden; }
.np-stat { padding: 22px 20px; border-right: 1px solid var(--np-line-soft); }
.np-stat:last-child { border-right: 0; }
.np-stat b { display: block; font-size: 1.375rem; color: var(--np-ink); font-weight: 700; letter-spacing: -0.02em; }
.np-stat span { display: block; margin-top: 4px; font-size: .8125rem; color: var(--np-muted); }

/* 首屏右侧「控制台预览」——纯 CSS，无截图依赖 */
.np-preview {
  border: 1px solid var(--np-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--np-shadow);
  overflow: hidden;
}
.np-preview-bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--np-line-soft); background: #fcfdff; }
.np-preview-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; display: block; }
.np-preview-bar i:first-child { background: var(--np-brand); opacity: .55; }
.np-preview-bar span { margin-left: 8px; font-size: .8125rem; color: var(--np-muted); }
.np-preview-body { padding: 20px; }
.np-preview-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)); gap: 12px; }
.np-preview-kpi { border: 1px solid var(--np-line-soft); border-radius: 10px; padding: 12px 14px; background: #fcfdff; }
.np-preview-kpi small { display: block; font-size: .75rem; color: var(--np-muted); }
.np-preview-kpi b { display: block; margin-top: 6px; font-size: 1.125rem; color: var(--np-ink); }
.np-preview-kpi b.is-brand { color: var(--np-brand); }
.np-preview-rows { margin-top: 16px; border-top: 1px solid var(--np-line-soft); padding-top: 6px; }
.np-preview-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 2px; border-bottom: 1px dashed var(--np-line-soft); font-size: .875rem; }
.np-preview-row:last-child { border-bottom: 0; }
.np-preview-row span { color: var(--np-muted); }
.np-preview-row b { color: var(--np-ink); font-weight: 600; }
.np-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.np-tag--ok { background: #ecfdf5; color: #047857; }
.np-tag--wait { background: #fff7ed; color: #b45309; }
.np-tag--brand { background: var(--np-brand-soft); color: var(--np-brand); }

/* ---------- 卡片 / 栅格 ---------- */
.np-grid { display: grid; gap: 20px; }
.np-grid--2 { grid-template-columns: repeat(2, 1fr); }
.np-grid--3 { grid-template-columns: repeat(3, 1fr); }
.np-grid--4 { grid-template-columns: repeat(4, 1fr); }

.np-card {
  border: 1px solid var(--np-line);
  border-radius: var(--np-radius);
  background: #fff;
  padding: 28px 26px;
  transition: border-color .18s ease, transform .18s ease;
}
.np-card:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.np-card h3 { font-size: 1.0625rem; margin-bottom: 10px; }
.np-card p { font-size: .9375rem; color: var(--np-muted); }
.np-card-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--np-brand-soft);
  color: var(--np-brand);
  margin-bottom: 18px;
}
.np-card-icon svg { width: 22px; height: 22px; }

/* 场景/渠道 chips */
.np-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.np-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--np-line);
  border-radius: 999px;
  background: #fff;
  font-size: .9375rem;
  color: var(--np-ink-2);
}
.np-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--np-brand); opacity: .75; }
.np-chip--soft { background: var(--np-bg-soft); }

/* 步骤 */
.np-steps { counter-reset: np-step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.np-step { position: relative; padding-top: 26px; }
.np-step::before {
  counter-increment: np-step;
  content: counter(np-step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-size: .8125rem; font-weight: 700; letter-spacing: .08em;
  color: var(--np-brand);
}
.np-step::after { content: ""; position: absolute; top: 9px; left: 40px; right: 0; height: 1px; background: var(--np-line); }
.np-step:last-child::after { display: none; }
.np-step h4 { font-size: 1rem; margin: 0 0 8px; }
.np-step p { font-size: .9375rem; color: var(--np-muted); }

/* 优势清单 */
.np-checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 36px; }
.np-check { display: flex; gap: 12px; align-items: flex-start; }
.np-check svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--np-brand); }
.np-check b { display: block; color: var(--np-ink); font-weight: 600; font-size: .9375rem; }
.np-check span { font-size: .875rem; color: var(--np-muted); }

/* CTA */
.np-cta {
  border: 1px solid var(--np-line);
  border-radius: 18px;
  padding: 56px 48px;
  background: linear-gradient(180deg, #fff 0%, var(--np-bg-soft) 100%);
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.np-cta h2 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 10px; }
.np-cta-actions { display: flex; gap: 12px; flex: none; }

/* ---------- 页脚 ---------- */
.np-footer { border-top: 1px solid var(--np-line); background: var(--np-bg-soft); padding: 64px 0 28px; }
.np-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: 32px; }
.np-footer h5 { font-size: .9375rem; color: var(--np-ink); margin-bottom: 16px; }
.np-footer li { margin-bottom: 10px; }
.np-footer li a, .np-footer p { font-size: .875rem; color: var(--np-muted); }
.np-footer li a:hover { color: var(--np-brand); }
.np-footer-qr { text-align: center; }
.np-footer-qr img { width: 112px; height: 112px; border: 1px solid var(--np-line); border-radius: 10px; background: #fff; padding: 6px; }
.np-footer-qr p { margin-top: 10px; font-size: .8125rem; }
.np-footer-bottom {
  margin-top: 48px; padding-top: 22px;
  border-top: 1px solid var(--np-line);
  display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between;
}
.np-footer-bottom p { font-size: .8125rem; color: var(--np-muted); }
.np-footer-contact { display: grid; gap: 10px; }
.np-footer-contact a { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--np-muted); }
.np-footer-contact a:hover { color: var(--np-brand); }
.np-footer-contact svg { width: 16px; height: 16px; flex: none; }

/* ---------- 内容页（功能介绍/关于我们/用户协议）保底排版 ---------- */
.np-site .api_doc { max-width: var(--np-wrap); margin: 0 auto; padding: 48px 24px 72px; }
.np-site .api_doc .api_doc_bar { display: flex; flex-wrap: wrap; gap: 10px 22px; padding-bottom: 18px; border-bottom: 1px solid var(--np-line); margin-bottom: 32px; }
.np-site .api_doc .api_doc_bar dl { margin: 0; }
.np-site .api_doc .api_doc_bar a { font-size: .9375rem; font-weight: 500; color: var(--np-ink-2); }
.np-site .api_doc .api_doc_bar a:hover { color: var(--np-brand); }
.np-site .api_block { margin-bottom: 48px; }
.np-site .api_block h3 { font-size: 1.25rem; margin-bottom: 12px; }
.np-site .api_block .intro { color: var(--np-muted); margin-bottom: 20px; }
.np-site .fund_text { border: 1px solid var(--np-line); border-radius: var(--np-radius); padding: 22px; margin-bottom: 16px; background: #fff; }
.np-site .fund_text h4 { font-size: 1rem; margin-bottom: 8px; }
.np-site .fund_text p { font-size: .9375rem; color: var(--np-muted); }
.np-site h4 { font-size: 1.0625rem; margin: 26px 0 10px; }
.np-site h2 + p, .np-site h3 + p, .np-site h4 + p { margin-top: 0; }
.np-site .header-body { padding: 32px 0 8px; }
.np-site .text-lead { font-size: 1rem; color: var(--np-muted); }
.np-site .round_div, .np-site .year_div, .np-site .contact_block, .np-site .about_info, .np-site .company_info {
  border: 1px solid var(--np-line); border-radius: var(--np-radius); padding: 22px; margin-bottom: 16px; background: #fff;
}
.np-site .history_title, .np-site .contact_text { color: var(--np-ink); font-weight: 600; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .np-hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .np-footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .np-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .np-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .np-nav, .np-header-actions { display: none; }
  .np-nav-toggle { display: flex; }
  .np-site .np-header-inner { height: 66px; }
  .np-header.is-open .np-nav,
  .np-header.is-open .np-header-actions {
    display: flex;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 24px 20px;
    background: #fff;
    border-bottom: 1px solid var(--np-line);
  }
  .np-header.is-open .np-nav a { padding: 12px 0; }
  .np-header.is-open .np-header-actions { top: auto; position: static; border-bottom: 1px solid var(--np-line); padding-top: 0; }
  .np-section { padding: 64px 0; }
  .np-hero { padding: 56px 0 64px; }
  .np-grid--3, .np-grid--2 { grid-template-columns: 1fr; }
  .np-stats { grid-template-columns: repeat(2, 1fr); }
  .np-stat:nth-child(2) { border-right: 0; }
  .np-stat { border-bottom: 1px solid var(--np-line-soft); }
  .np-checks { grid-template-columns: 1fr; }
  .np-cta { flex-direction: column; align-items: flex-start; padding: 36px 26px; }
  .np-cta-actions { width: 100%; }
  .np-cta-actions .np-btn { flex: 1; }
  .np-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .np-grid--4 { grid-template-columns: 1fr; }
  .np-steps { grid-template-columns: 1fr; }
  .np-step::after { display: none; }
  .np-footer-grid { grid-template-columns: 1fr; }
  .np-hero-cta { flex-direction: column; }
  .np-hero-cta .np-btn { width: 100%; }
}

/* 页脚备案行 */
.np-footer-beian { font-size: 12px; color: var(--np-muted); margin-top: 8px; }
.np-footer-beian a { color: var(--np-muted); }
.np-footer-beian a:hover { color: var(--np-brand); }
