/* ==========================================================
   IP百科 · 知识产权开放式知识平台
   设计语言：深色科技风 / 玻璃拟态 / 网格空间感
   ========================================================== */

:root {
  --bg: #05080f;
  --bg-2: #0a1120;
  --panel: rgba(148, 163, 184, 0.05);
  --panel-2: rgba(148, 163, 184, 0.09);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(34, 211, 238, 0.4);
  --text: #e8eef8;
  --muted: #8fa1b8;
  --faint: #5b6b84;
  --accent: #22d3ee;
  --accent-2: #6366f1;
  --accent-3: #a5b4fc;
  --grad: linear-gradient(120deg, #22d3ee 0%, #6366f1 100%);
  --radius: 16px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(34, 211, 238, 0.28); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1b2740; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #27375c; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

.mono { font-family: var(--mono); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 背景装饰 ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 55% 40% at 15% 0%, rgba(99, 102, 241, 0.14), transparent 70%),
    radial-gradient(ellipse 50% 38% at 85% 8%, rgba(34, 211, 238, 0.1), transparent 70%),
    var(--bg);
}

/* ---------- 布局 ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.section { padding: 76px 0; }
.section-sm { padding: 48px 0; }

.section-head { margin-bottom: 44px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}
.section-title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; letter-spacing: 0.01em; }
.section-desc { color: var(--muted); margin-top: 10px; max-width: 640px; }

/* ---------- 导航 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(5, 8, 15, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--grad);
  position: relative;
  flex: none;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px solid rgba(5, 8, 15, 0.85);
  border-radius: 4px;
}
.logo em { font-style: normal; color: var(--muted); font-weight: 500; font-size: 13px; margin-left: 2px; }

.main-nav { display: flex; gap: 6px; }
.main-nav a {
  padding: 7px 14px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 8px;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease;
}
.main-nav a:hover { color: var(--text); background: var(--panel-2); }
.main-nav a.active { color: var(--text); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  font-size: 18px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 172px 0 90px;
  overflow: hidden;
}
#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.06);
  padding: 7px 18px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
}
.hero-sub {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  margin: 22px auto 0;
  max-width: 620px;
}
.hero-actions { margin-top: 38px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  position: relative;
  z-index: 1;
  margin-top: 74px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--grad);
  color: #04070d;
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(34, 211, 238, 0.38); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--panel); }
.btn-ghost:hover { border-color: var(--border-strong); transform: translateY(-2px); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 16px 44px rgba(2, 6, 18, 0.6), 0 0 0 1px rgba(34, 211, 238, 0.08);
  background: var(--panel-2);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}
.card .card-link span { transition: transform 0.2s ease; }
.card:hover .card-link span { transform: translateX(4px); }

/* 科技风角标卡片 */
.type-card { overflow: hidden; }
.type-card::before, .type-card::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  transition: border-color 0.25s ease;
  pointer-events: none;
}
.type-card::before { top: 10px; left: 10px; border-top: 1.5px solid var(--faint); border-left: 1.5px solid var(--faint); }
.type-card::after { bottom: 10px; right: 10px; border-bottom: 1.5px solid var(--faint); border-right: 1.5px solid var(--faint); }
.type-card:hover::before, .type-card:hover::after { border-color: var(--accent); }

.type-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 14px;
}
.type-meta { margin-top: 18px; display: grid; gap: 10px; }
.type-meta .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.5px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 9px;
}
.type-meta .row:last-child { border-bottom: none; padding-bottom: 0; }
.type-meta .k { color: var(--faint); flex: none; }
.type-meta .v { color: var(--text); text-align: right; font-weight: 600; }
.type-meta .v.hl { color: var(--accent); font-family: var(--mono); }

/* ---------- 统计数字 ---------- */
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.stat:hover { border-color: rgba(34, 211, 238, 0.3); transform: translateY(-3px); }
.stat-num {
  font-family: var(--mono);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
  white-space: nowrap;
}
.stat-num small { font-size: 0.5em; margin-left: 2px; }
.stat-label { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

/* ---------- 网格工具 ---------- */
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 页面头（子页） ---------- */
.page-hero { padding: 150px 0 56px; position: relative; }
.page-hero h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; }
.page-hero .section-desc { margin-top: 14px; }
.breadcrumb {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--faint);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 8px; }

/* ---------- 列表 ---------- */
.styled-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 10px;
}
.styled-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--grad);
  transform: translateY(-50%) rotate(45deg);
}
.styled-list li strong { color: var(--text); }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), rgba(99, 102, 241, 0.15));
}
.tl-item { position: relative; padding-bottom: 30px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}
.tl-year { font-family: var(--mono); color: var(--accent); font-size: 13px; letter-spacing: 0.1em; }
.tl-item h4 { font-size: 16px; margin: 4px 0 4px; }
.tl-item p { color: var(--muted); font-size: 14px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
th, td { padding: 14px 18px; text-align: left; }
thead th {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.05);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.2s ease; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(148, 163, 184, 0.05); }
td.hl, .num { font-family: var(--mono); color: var(--accent); white-space: nowrap; }
td.dim { color: var(--muted); }

/* ---------- 注释 / 提示框 ---------- */
.note {
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-left: 3px solid var(--accent);
  background: rgba(34, 211, 238, 0.05);
  border-radius: 10px;
  padding: 16px 20px;
  color: var(--muted);
  font-size: 14px;
}
.note strong { color: var(--text); }

/* ---------- 图表 ---------- */
.chart-card { padding: 30px; }
.chart-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.chart-sub { color: var(--faint); font-size: 13px; margin-bottom: 24px; font-family: var(--mono); }

.bar-chart { display: flex; align-items: flex-end; gap: 18px; height: 240px; padding-top: 26px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar-val {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent-3);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  white-space: nowrap;
}
.bar {
  width: 100%;
  max-width: 54px;
  height: var(--h);
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(to top, rgba(99, 102, 241, 0.55), rgba(34, 211, 238, 0.85));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.25s ease;
  position: relative;
}
.bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top, transparent 55%, rgba(255, 255, 255, 0.22));
}
.bar-col:hover .bar { filter: brightness(1.25); }
.bar-label { margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.bar-chart.on .bar { transform: scaleY(1); }
.bar-chart.on .bar-val { opacity: 1; transform: translateY(0); }

/* 横向条形 */
.hbar-row { margin-bottom: 18px; }
.hbar-row:last-child { margin-bottom: 0; }
.hbar-head { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 7px; }
.hbar-head .lb { color: var(--muted); }
.hbar-head .vl { font-family: var(--mono); color: var(--accent); }
.hbar-track { height: 8px; border-radius: 999px; background: rgba(148, 163, 184, 0.1); overflow: hidden; }
.hbar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.4);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}
.hbar-row.visible .hbar-fill { width: var(--w); }

/* ---------- 流程步骤 ---------- */
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--border);
}
.step:last-child { border-bottom: none; }
.step-no {
  counter-increment: step;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.07);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-no::before { content: counter(step, decimal-leading-zero); }
.step h4 { font-size: 15.5px; margin-bottom: 3px; }
.step p { color: var(--muted); font-size: 13.5px; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  color: var(--accent-3);
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0 6px 8px 0;
}

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 600;
  padding: 20px 4px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q .ic {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--accent);
  transition: transform 0.25s ease;
}
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a-inner { padding: 0 4px 22px; color: var(--muted); font-size: 14.5px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 60px; background: rgba(8, 12, 22, 0.6); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 40px;
  padding: 56px 24px 40px;
}
.footer-grid h5 { font-size: 13px; font-family: var(--mono); letter-spacing: 0.16em; color: var(--faint); margin-bottom: 16px; text-transform: uppercase; }
.footer-grid p { color: var(--muted); font-size: 13.5px; margin-top: 14px; max-width: 340px; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { color: var(--muted); font-size: 14px; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  padding-bottom: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 12.5px;
}

/* ---------- 滚动显现 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: var(--d, 0s); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .section { padding: 56px 0; }
  .cols-3, .cols-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .main-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(5, 8, 15, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    gap: 2px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 12px 14px; }
  .main-nav a.active::after { display: none; }
  .nav-toggle { display: block; }
  .bar-chart { gap: 8px; }
  .hero { padding: 140px 0 70px; }
}
