/* ==========================================================================
   北京松果智数科技有限公司 · 官网样式
   纯静态 / 零依赖 / 深色科技风
   ========================================================================== */

:root {
  /* 底色层次 */
  --ink-0: #070a12;
  --ink-1: #0b1019;
  --ink-2: #101725;
  --ink-3: #16203250;
  --panel: #0f1626;
  --panel-2: #131c2e;

  /* 线与字 */
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.26);
  --text: #e7eef8;
  --text-2: #b6c2d4;
  --muted: #8695ac;

  /* 品牌色 */
  --brand: #2ed3a7;
  --brand-soft: rgba(46, 211, 167, 0.12);
  --brand-line: rgba(46, 211, 167, 0.32);
  --blue: #5b90ff;
  --blue-soft: rgba(91, 144, 255, 0.12);
  --amber: #f5b342;

  /* 尺寸 */
  --maxw: 1200px;
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 68px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;

  /* 固定深色主题：声明后浏览器原生 UI（滚动条 / 表单控件 / details 箭头）
     按深色渲染，并减少首帧白闪 */
  color-scheme: dark;
  accent-color: var(--brand);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* 跨页浏览过渡：站内导航平滑淡入淡出（渐进增强，Firefox 暂不支持则瞬时切换） */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

body {
  margin: 0;
  background: var(--ink-0);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.75;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 背景网格光晕 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(46, 211, 167, 0.10), transparent 62%),
    radial-gradient(760px 460px at 8% 4%, rgba(91, 144, 255, 0.10), transparent 60%);
}

img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* 键盘焦点环：仅键盘操作时显示（鼠标点击不出现），颜色对深色底保持 3:1 对比 */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1rem; text-wrap: pretty; }
ul { margin: 0; padding-left: 1.1rem; }

.mono { font-family: var(--mono); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex; align-items: center; gap: 9px;
  font-size: .84rem; color: var(--muted); margin-bottom: 24px;
}
.breadcrumb a { color: var(--muted); transition: color .2s; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb [aria-hidden="true"] { color: var(--line-strong); }
.breadcrumb span:last-child { color: var(--text-2); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); margin-bottom: 12px;
  transition: border-color .2s;
}
.faq details[open] { border-color: var(--brand-line); }
.faq summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: .96rem;
  color: var(--text); list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--mono); color: var(--brand);
  font-size: 1.15rem; line-height: 1; flex-shrink: 0; transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 16px; margin: 0; color: var(--text-2); font-size: .93rem; }

/* ---------- 布局 ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { position: relative; z-index: 1; padding: 92px 0; }
.section--tight { padding: 64px 0; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(16, 23, 37, 0.7) 12%, rgba(16, 23, 37, 0.7) 88%, transparent); }

.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(7, 10, 18, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.header.is-scrolled { border-bottom-color: var(--line); background: rgba(7, 10, 18, 0.92); }
/* 支持 CSS 滚动驱动动画的浏览器走合成器线程；main.js 仅在不支持时绑定 scroll 监听作回退 */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  @keyframes header-scroll-state {
    to { border-bottom-color: var(--line); background: rgba(7, 10, 18, 0.92); }
  }
  .header {
    animation: header-scroll-state auto linear both;
    animation-timeline: scroll(block root);
    animation-range: 0 12px;
  }
}
.header__inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand__mark { width: 34px; height: 34px; display: block; }
.brand__name { font-weight: 700; font-size: 1.02rem; letter-spacing: .02em; }
.brand__sub { display: block; font-size: .68rem; color: var(--muted); letter-spacing: .18em; font-weight: 500; }

.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
/* :not(.btn)：导航里的「联系我们」是 <a class="btn">，链接通用样式不得覆盖按钮体系 */
.nav a:not(.btn) { font-size: .93rem; color: var(--text-2); padding: 6px 0; position: relative; transition: color .2s; }
.nav a:not(.btn):hover { color: var(--text); }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px;
  background: var(--brand); transition: right .25s ease;
}
.nav a:not(.btn):hover::after, .nav a:not(.btn)[aria-current="page"]::after { right: 0; }
.nav a:not(.btn)[aria-current="page"] { color: var(--brand); }

.nav-toggle {
  margin-left: auto; display: none; width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--line); border-radius: 9px;
  color: var(--text); font-size: 1.1rem; cursor: pointer;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; font-size: .93rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn--primary { background: var(--brand); color: #04140e; }
.btn--primary:hover { background: #4ee0b8; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(46, 211, 167, .22); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: rgba(255,255,255,.02); }
.btn--ghost:hover { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }
.btn--sm { padding: 8px 16px; font-size: .85rem; }
/* 按压反馈：按下时轻微缩小，与 hover 上浮形成区分 */
.btn:active { transform: translateY(0) scale(.98); transition-duration: .1s; }

/* ---------- 通用元素 ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--brand); }

.lead { font-size: 1.06rem; color: var(--text-2); max-width: 62ch; }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head p { color: var(--text-2); margin-top: 14px; }

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color .25s, transform .25s, background .25s;
}
.card:hover { border-color: var(--brand-line); transform: translateY(-3px); }
.card h3 { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.card p { color: var(--text-2); font-size: .93rem; margin: 0; }
.card p + p { margin-top: 10px; }

.card__icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-soft); border: 1px solid var(--brand-line);
  color: var(--brand); font-weight: 700; font-size: .82rem; font-family: var(--mono);
}
.card--blue .card__icon { background: var(--blue-soft); border-color: rgba(91,144,255,.32); color: var(--blue); }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .74rem; letter-spacing: .04em;
  background: rgba(148,163,184,.1); border: 1px solid var(--line); color: var(--text-2);
}
.tag--brand { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.tag--blue { background: var(--blue-soft); border-color: rgba(91,144,255,.3); color: var(--blue); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li { position: relative; padding-left: 24px; margin-bottom: 10px; color: var(--text-2); font-size: .93rem; }
.list-check li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 9px; height: 5px; border-left: 1.6px solid var(--brand); border-bottom: 1.6px solid var(--brand);
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; padding: 92px 0 76px; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero h1 .hl { color: var(--brand); }
.hero .lead { font-size: 1.1rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--ink-1); padding: 22px 18px; text-align: center; }
.stat__num { font-family: var(--mono); font-size: 1.7rem; font-weight: 700; color: var(--brand); line-height: 1.2; }
.stat__label { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* ---------- 代码块 ---------- */
.code {
  position: relative; background: #060a12; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 18px 20px; overflow-x: auto; margin: 0;
}
.code pre { margin: 0; font-family: var(--mono); font-size: .84rem; line-height: 1.85; color: #cfe3f5; }
.code .c { color: #5c7288; }
.code .k { color: var(--brand); }
.code .s { color: var(--blue); }
.code__bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02);
}
.code__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); display: block; }
.code__bar span { margin-left: 6px; font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.copy-btn {
  margin-left: auto; background: transparent; border: 1px solid var(--line);
  color: var(--muted); font-size: .72rem; padding: 3px 10px; border-radius: 6px; cursor: pointer;
}
.copy-btn:hover { color: var(--brand); border-color: var(--brand-line); }
/* 复制结果播报（role="status"）：仅给屏幕阅读器，视觉隐藏 */
.copy-tip { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 表格 ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: rgba(255,255,255,.03); color: var(--text); font-weight: 600; font-size: .84rem; letter-spacing: .04em; }
td { color: var(--text-2); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,.02); }
td .mono { color: var(--brand); }

/* ---------- 步骤 / 时间线 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; padding: 24px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.step::before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: rgba(46,211,167,.28);
  display: block; margin-bottom: 8px;
}
.step h4 { font-size: .98rem; margin-bottom: 6px; }
.step p { font-size: .87rem; color: var(--muted); margin: 0; }

/* ---------- 案例 ---------- */
.case-hero {
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, rgba(46,211,167,.08), rgba(91,144,255,.05) 55%, transparent);
}
.case-hero__body { padding: 40px; }
.case-hero__meta { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); }
.case-hero__meta div span { display: block; font-size: .76rem; color: var(--muted); letter-spacing: .06em; }
.case-hero__meta div strong { font-size: 1.02rem; color: var(--text); font-weight: 600; }

/* ---------- CTA ---------- */
.cta-band {
  border: 1px solid var(--brand-line); border-radius: 18px; padding: 48px 40px;
  background: linear-gradient(120deg, rgba(46,211,167,.1), rgba(91,144,255,.07));
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.cta-band p { color: var(--text-2); margin: 10px 0 0; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: var(--ink-1); padding: 56px 0 28px; margin-top: 20px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer h4 { font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; font-weight: 600; }
.footer ul { list-style: none; padding: 0; }
.footer li { margin-bottom: 9px; font-size: .9rem; color: var(--text-2); }
.footer li:hover { color: var(--brand); }
.footer__note { color: var(--muted); font-size: .86rem; margin-top: 14px; }
.footer__bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .82rem; color: var(--muted);
}
/* 页脚备案号链接：默认与版权文字同色，hover 才亮起 */
.footer__bottom a { color: inherit; text-decoration: none; }
.footer__bottom a:hover { color: var(--brand); }

/* ---------- 占位提示（上线前替换） ---------- */
.placeholder { border-bottom: 1px dashed var(--amber); color: var(--amber); }

/* ---------- 动效 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--ink-1); border-bottom: 1px solid var(--line);
    padding: 8px 24px 18px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 16px; }
  .nav-toggle { display: block; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 68px 0; }
  .case-hero__body { padding: 28px 22px; }
}
@media (max-width: 560px) {
  .g-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 22px; }
}
