/* ==========================================================================
   site.css — 共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 基础组件
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; }

:root {
  /* 色彩 */
  --ink-900: #0B1626;
  --ink-800: #10203A;
  --ink-700: #172C4A;
  --steel-500: #2E4A6B;
  --mist-300: #8FA6B8;
  --fog-100: #E8EEF5;
  --copper-500: #C9852F;
  --copper-300: #E3B36A;
  --metal-hi: #F0D9A8;
  --paper-050: #F4F1EA;
  --paper-ink: #1A2433;
  --verify-400: #4E8F7A;

  --line: rgba(200, 220, 240, 0.14);
  --line-strong: rgba(200, 220, 240, 0.26);
  --tint-copper: rgba(201, 133, 47, 0.12);

  /* 字体 */
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo,
    Consolas, "Courier New", monospace;

  /* 阶梯 */
  --fs-display: 88px;
  --fs-h1: 56px;
  --fs-h2: 36px;
  --fs-h3: 24px;
  --fs-body: 17px;
  --fs-small: 13px;

  /* 节奏 */
  --gap: 24px;
  --pad-panel: 32px;
  --shell-max: 1280px;
  --shell-pad: 32px;

  /* 动效 */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 180ms;
  --dur-slow: 320ms;
}

/* ---------- 基础排版 ---------- */

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--fog-100);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1100px 560px at 12% -12%, rgba(46, 74, 107, 0.55), rgba(11, 22, 38, 0) 62%),
    linear-gradient(rgba(143, 166, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 166, 184, 0.05) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--fog-100);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.3; }

p { max-width: 42ch; }
p + p { margin-top: 16px; }

b, strong { font-weight: 700; color: var(--fog-100); }

::selection {
  background: var(--copper-500);
  color: #141C29;
}

:focus-visible {
  outline: 2px solid var(--copper-500);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 通用工具 ---------- */

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.92em;
  letter-spacing: 0.04em;
  color: var(--copper-300);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--mist-300);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--copper-500);
}

.panel {
  position: relative;
  padding: var(--pad-panel);
  background: linear-gradient(180deg, rgba(23, 44, 74, 0.72), rgba(16, 32, 58, 0.92));
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 24px 48px -36px rgba(0, 0, 0, 0.95);
}

.grid {
  display: grid;
  gap: var(--gap);
  align-items: start;
}

.grid--7-5 { grid-template-columns: 7fr 5fr; }
.grid--8-4 { grid-template-columns: 8fr 4fr; }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--steel-500);
  border-radius: 2px;
  transition: background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}

.btn--ghost {
  color: var(--fog-100);
  background: rgba(23, 44, 74, 0.5);
  border-color: var(--steel-500);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--copper-500);
  color: var(--metal-hi);
  background: rgba(46, 74, 107, 0.7);
}

.btn--copper {
  color: #141C29;
  background: var(--copper-500);
  border-color: var(--copper-500);
  box-shadow: inset 0 1px 0 rgba(240, 217, 168, 0.45);
}

.btn--copper:hover,
.btn--copper:focus-visible {
  background: var(--copper-300);
  border-color: var(--copper-300);
  color: #141C29;
}

/* ---------- 面包屑 ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mist-300);
}

.breadcrumb a {
  text-decoration: none;
  color: var(--mist-300);
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--copper-300);
  border-bottom-color: var(--copper-500);
}

.breadcrumb__sep { color: var(--steel-500); }
.breadcrumb [aria-current="page"] { color: var(--fog-100); }

/* ---------- 图片容器基础 ---------- */

.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(46, 74, 107, 0.55), rgba(11, 22, 38, 0.95));
}

.media > img,
.media > picture > img,
.media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--21x9 { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(200, 220, 240, 0.06);
}

.media__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--metal-hi);
  background: linear-gradient(180deg, rgba(11, 22, 38, 0), rgba(11, 22, 38, 0.94));
}

/* ---------- 显现 ---------- */

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}

.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   头部
   ========================================================================== */

.skip-link {
  position: absolute;
  left: 16px;
  top: -96px;
  z-index: 200;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: #141C29;
  background: var(--copper-500);
  border-radius: 2px;
  transition: top var(--dur-fast) var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background-color: var(--ink-900);
  background-image: linear-gradient(180deg, rgba(16, 32, 58, 0.98), rgba(11, 22, 38, 0.99));
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.95);
}

/* 上层：品牌说明带 */
.header-belt {
  overflow: hidden;
  max-height: 64px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(23, 44, 74, 0.85), rgba(16, 32, 58, 0.45));
  opacity: 1;
  transition: max-height var(--dur-slow) var(--ease), opacity 200ms linear;
}

.site-header.is-condensed .header-belt {
  max-height: 0;
  opacity: 0;
  border-bottom-color: transparent;
}

.header-belt__rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 52px;
}

.header-belt__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--copper-300);
  white-space: nowrap;
}

.header-belt__brand::before {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--copper-500);
  box-shadow: 6px 0 0 rgba(201, 133, 47, 0.45);
}

.header-belt__desc {
  max-width: none;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--mist-300);
  white-space: nowrap;
}

.header-belt__meta {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mist-300);
  white-space: nowrap;
}

.header-belt__window b {
  font-weight: 500;
  color: var(--fog-100);
}

.header-belt__icp {
  padding-left: 18px;
  border-left: 1px solid var(--line);
  color: rgba(143, 166, 184, 0.8);
}

/* 下层：栏目导航 */
.header-nav { position: relative; }

.header-nav__rail {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}

.nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #B9C9D8;
  text-decoration: none;
  border-radius: 2px;
  transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  background: var(--copper-500);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur-fast) var(--ease);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--fog-100);
  background: rgba(46, 74, 107, 0.35);
}

.nav__link:hover::after,
.nav__link:focus-visible::after {
  transform: scaleX(1);
}

.nav__link[aria-current="page"] {
  color: var(--fog-100);
  background: var(--tint-copper);
}

.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--copper-500);
}

.nav__link[aria-current="page"] .nav__num { color: var(--copper-300); }

.nav__label { white-space: nowrap; }

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--fog-100);
  border: 1px solid var(--steel-500);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--copper-500);
  background: rgba(46, 74, 107, 0.4);
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 1px;
  background: var(--copper-300);
  transition: transform 240ms var(--ease), opacity var(--dur-fast) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(2.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
  transform: translateY(-2.5px) rotate(-45deg);
}

/* 滚动进度刻度 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: calc(var(--progress, 0) * 100%);
  background: linear-gradient(90deg, var(--copper-500), var(--copper-300));
  transition: width 100ms linear;
  pointer-events: none;
}

/* ==========================================================================
   页脚
   ========================================================================== */

.site-footer {
  position: relative;
  margin-top: 96px;
  padding-top: 64px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-800), var(--ink-900) 72%);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201, 133, 47, 0.7), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 40px;
  padding-bottom: 56px;
}

.footer-col { min-width: 0; }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: none;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: var(--copper-300);
}

.footer-brand::before {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--copper-500);
}

.footer-note {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--mist-300);
}

.footer-title {
  position: relative;
  margin-bottom: 16px;
  padding-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--mist-300);
  border-bottom: 1px solid var(--line);
}

.footer-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 28px;
  height: 1px;
  background: var(--copper-500);
}

.footer-list li + li { margin-top: 10px; }

.footer-list a {
  font-size: 14px;
  color: #B9C9D8;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--copper-300);
  border-bottom-color: var(--copper-500);
}

.footer-list--meta li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--mist-300);
  overflow-wrap: anywhere;
}

.footer-list--meta .mono { color: var(--fog-100); }

.footer-base {
  border-top: 1px solid var(--line);
  background: rgba(11, 22, 38, 0.6);
}

.footer-base__rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
  padding-block: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mist-300);
  text-align: center;
}

.footer-base__copy { max-width: none; }

.footer-base__links {
  display: flex;
  gap: 22px;
  max-width: none;
}

.footer-base__links a {
  text-decoration: none;
  color: var(--mist-300);
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.footer-base__links a:hover,
.footer-base__links a:focus-visible {
  color: var(--copper-300);
  border-bottom-color: var(--copper-500);
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1100px) {
  .header-belt__desc { display: none; }
  .nav__link { padding: 10px 9px; font-size: 13.5px; }
  .header-nav__rail { gap: 14px; }
}

@media (max-width: 960px) {
  :root {
    --shell-pad: 20px;
    --pad-panel: 20px;
    --fs-h1: 40px;
    --fs-h2: 32px;
    --fs-h3: 24px;
    --fs-body: 16px;
  }

  body { background-attachment: scroll; }

  .header-belt__rail { min-height: 44px; gap: 12px; }
  .header-belt__brand { font-size: 12px; letter-spacing: 0.16em; }
  .header-belt__meta { font-size: 11px; gap: 10px; }
  .header-belt__icp { display: none; }
  .header-belt { max-height: 52px; }

  .header-nav__rail {
    flex-wrap: wrap;
    gap: 10px;
    min-height: 60px;
    padding-block: 10px;
  }

  .header-actions { order: 1; gap: 8px; }
  .header-actions .btn {
    padding: 8px 10px;
    font-size: 12px;
    letter-spacing: 0;
  }

  .nav-toggle {
    display: inline-flex;
    order: 2;
    margin-left: auto;
  }

  .nav {
    order: 3;
    flex: 1 0 100%;
    display: none;
  }

  .nav[data-open="true"] {
    display: block;
    animation: navDrop 240ms var(--ease);
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }

  .nav__link {
    justify-content: flex-start;
    padding: 14px 6px;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .nav__link::after { display: none; }

  .nav__link[aria-current="page"] {
    background: var(--tint-copper);
    color: var(--metal-hi);
  }

  .grid--7-5,
  .grid--8-4 { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    padding-bottom: 40px;
  }

  .footer-col--brand { grid-column: 1 / -1; }

  .site-footer { margin-top: 64px; padding-top: 48px; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base__rail { justify-content: flex-start; text-align: left; }
  .footer-note { max-width: 100%; }
  h1 { font-size: 34px; }
}

@keyframes navDrop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   动效降级
   ========================================================================== */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .nav[data-open="true"] { animation: none; }
  .scroll-progress { transition: none; }
}
