/* ==========================================================================
   平博注册线上 · 共享样式 /assets/site.css
   Reset · 变量 · 中文排版 · 头部与页脚 · 通用组件 · 响应式
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--paper);
  background-color: var(--sea-800);
  background-image:
    radial-gradient(1100px 620px at 88% -8%, rgba(47, 214, 232, .09), transparent 60%),
    radial-gradient(820px 480px at 2% 4%, rgba(255, 122, 26, .07), transparent 58%),
    repeating-linear-gradient(0deg, rgba(143, 163, 184, .045) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(143, 163, 184, .045) 0 1px, transparent 1px 40px);
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  overflow-x: hidden;
}

:root {
  --sea-950: #040D17;
  --sea-900: #06121F;
  --sea-800: #0B1E33;
  --sea-700: #142B47;
  --sea-600: #1D3A5C;
  --paper: #E8EEF5;
  --mist: #8FA3B8;
  --white: #FFFFFF;
  --signal: #FF7A1A;
  --lime: #35F0A0;
  --cyan: #2FD6E8;
  --red: #E4372E;
  --amber: #FFC02E;

  --line: rgba(143, 163, 184, .22);
  --line-soft: rgba(143, 163, 184, .13);
  --line-hard: rgba(47, 214, 232, .42);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shell: 1440px;
  --gutter: clamp(16px, 3.2vw, 44px);
  --rail: 220px;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Arial Narrow", "Helvetica Neue Condensed", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; }

::selection { background: rgba(255, 122, 26, .34); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

[id] { scroll-margin-top: 148px; }

/* ---------- 中文排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--white);
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5vw, 5.5rem); font-weight: 200; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.5rem); }
h4 { font-size: 1rem; letter-spacing: .1em; }

p { text-wrap: pretty; word-break: break-word; }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -.01em;
}

/* ---------- 布局基础 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: 980px; }

.section { padding: clamp(40px, 6vw, 88px) 0; }
.section--tight { padding: clamp(24px, 3.5vw, 48px) 0; }

.rail-layout {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}
.rail {
  position: sticky;
  top: 142px;
  min-width: 0;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .05em;
  line-height: 1.4;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--primary {
  background: linear-gradient(135deg, #FF8A33, var(--signal) 55%, #F05A00);
  color: var(--sea-950);
  font-weight: 700;
  box-shadow: 0 18px 34px -22px rgba(255, 122, 26, .95);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 42px -20px rgba(255, 122, 26, 1);
}
.btn--ghost {
  border-color: var(--line);
  background: rgba(20, 43, 71, .55);
  color: var(--paper);
}
.btn--ghost:hover {
  border-color: var(--line-hard);
  background: rgba(20, 43, 71, .92);
  color: var(--white);
}
.btn--sm { padding: 8px 16px; font-size: 13px; }
.nav-cta { flex: 0 0 auto; }

/* ---------- 微标签 / 分隔线 / 眉标 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: .65;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(20, 43, 71, .5);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--mist);
  white-space: nowrap;
}
.tag--live { border-color: rgba(53, 240, 160, .5); background: rgba(53, 240, 160, .08); color: var(--lime); }
.tag--warn { border-color: rgba(255, 192, 46, .5); background: rgba(255, 192, 46, .08); color: var(--amber); }
.tag--alert { border-color: rgba(228, 55, 46, .55); background: rgba(228, 55, 46, .1); color: #FF6A61; }

.rule {
  height: 1px;
  margin: clamp(26px, 4vw, 52px) 0;
  background: var(--line-soft);
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mist);
}
.breadcrumbs a { color: var(--mist); transition: color .18s ease; }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs__sep { color: rgba(143, 163, 184, .45); }
.breadcrumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 正文排版 ---------- */
.prose { max-width: 68ch; }
.prose p {
  margin: 0 0 1.1em;
  font-size: 16px;
  line-height: 1.9;
  color: rgba(232, 238, 245, .86);
}
.prose p:last-child { margin-bottom: 0; }
.prose h2, .prose h3 { margin: 1.6em 0 .6em; }
.prose strong { color: var(--white); }
.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(47, 214, 232, .45);
  text-underline-offset: 3px;
}
.prose ul, .prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
  list-style: disc;
  color: rgba(232, 238, 245, .86);
}
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .5em; }

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background-color: var(--sea-700);
  background-image:
    linear-gradient(135deg, rgba(47, 214, 232, .08), rgba(255, 122, 26, .06)),
    repeating-linear-gradient(0deg, rgba(143, 163, 184, .085) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(143, 163, 184, .085) 0 1px, transparent 1px 34px);
}
.media-frame::after {
  content: attr(data-label);
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mist);
  pointer-events: none;
}
.media-frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--map { aspect-ratio: 16 / 10; }
.media-frame--table { aspect-ratio: 4 / 3; }
.media-frame--still { aspect-ratio: 16 / 9; }
.media-frame--portrait { aspect-ratio: 3 / 4; }

/* ---------- Bento 网格与数据块 ---------- */
.grid-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}
.block {
  position: relative;
  min-width: 0;
  padding: clamp(16px, 2vw, 26px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--sea-700);
  transition: border-color .2s ease, transform .2s ease;
}
.block:hover { border-color: var(--line-hard); transform: translateY(-2px); }
.block--anchor { grid-column: span 6; }
.block--standard { grid-column: span 4; }
.block--sliver { grid-column: span 3; }

.figure-xl {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.8rem, 7.5vw, 6.4rem);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.02em;
  color: var(--white);
}
.figure-xl--signal { color: var(--signal); }
.figure-xl--lime { color: var(--lime); }

/* ---------- 章节索引 ---------- */
.section-index { display: flex; flex-direction: column; gap: 2px; }
.section-index__link {
  display: block;
  padding: 8px 12px 8px 14px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  color: var(--mist);
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.section-index__link:hover { color: var(--paper); background: rgba(47, 214, 232, .06); }
.section-index__link[aria-current="true"] {
  border-left-color: var(--signal);
  background: rgba(255, 122, 26, .08);
  color: var(--white);
}

/* ---------- 显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal[data-revealed="true"] { opacity: 1; transform: none; }

/* ==========================================================================
   头部
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(6, 18, 31, .97), rgba(6, 18, 31, .9));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  background: linear-gradient(90deg, var(--signal), var(--amber) 36%, var(--lime) 70%, var(--cyan));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

.skip-link {
  position: absolute;
  left: 14px;
  top: -72px;
  z-index: 300;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--signal);
  color: var(--sea-950);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

.header-shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.brand__mark {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(150deg, #FF8A33, var(--red) 52%, var(--lime));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 12px 26px -16px rgba(255, 122, 26, .95);
}
.brand__mark::before {
  content: "";
  position: absolute;
  inset: 10px 9px;
  border-radius: 3px;
  border: 2px solid rgba(4, 13, 23, .9);
}
.brand__mark::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 50%;
  height: 2px;
  transform: translateY(-1px);
  background: rgba(4, 13, 23, .9);
}
.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.15;
  color: var(--white);
  white-space: nowrap;
}
.brand__note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .03em;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 导航 */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  display: inline-block;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  letter-spacing: .03em;
  color: var(--mist);
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.nav-link:hover {
  color: var(--paper);
  background: rgba(47, 214, 232, .09);
}
.nav-link[aria-current="page"] {
  color: var(--white);
  background: linear-gradient(180deg, rgba(255, 122, 26, .26), rgba(255, 122, 26, .12));
  box-shadow: inset 0 0 0 1px rgba(255, 122, 26, .55);
}

/* 汉堡 */
.nav-toggle {
  display: none;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(20, 43, 71, .62);
  transition: border-color .2s ease, background-color .2s ease;
}
.nav-toggle:hover { border-color: var(--line-hard); }
.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--paper);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 筛选条 */
.header-rail {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0 11px;
  border-top: 1px solid var(--line-soft);
  overflow: hidden;
}
.header-rail__label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mist);
}
.capsule-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.capsule-row::-webkit-scrollbar { display: none; }
.capsule {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(20, 43, 71, .42);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--mist);
  transition: border-color .18s ease, color .18s ease, background-color .18s ease;
}
.capsule::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: .75;
}
.capsule:hover {
  border-color: var(--line-hard);
  background: rgba(47, 214, 232, .1);
  color: var(--paper);
}
.capsule:hover::before { background: var(--signal); opacity: 1; }

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  margin-top: clamp(56px, 8vw, 120px);
  border-top: 1px solid var(--line);
  background: var(--sea-900);
  color: var(--mist);
}
.footer-shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(44px, 6vw, 84px) var(--gutter) 28px;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.6fr);
  gap: clamp(32px, 5vw, 72px);
}
.footer-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.footer-summary {
  margin-top: 22px;
  max-width: 54ch;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--mist);
}
.footer-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  margin-top: 26px;
}
.footer-metrics li {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.footer-metrics .num {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--white);
}
.footer-metrics__label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mist);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.footer-col { min-width: 0; }
.footer-col__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}
.footer-list li + li { margin-top: 10px; }
.footer-list a {
  font-size: 14.5px;
  color: var(--mist);
  transition: color .18s ease;
  text-underline-offset: 4px;
}
.footer-list a:hover {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--signal);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 26px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--mist);
}
.footer-contact__key {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--mist);
}
.footer-legal { font-family: var(--font-mono); letter-spacing: .02em; }
.footer-note { color: rgba(143, 163, 184, .78); }

/* 返回顶部 */
.back-to-top {
  position: fixed;
  right: clamp(14px, 3vw, 34px);
  bottom: clamp(14px, 3vw, 34px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--line-hard);
  border-radius: var(--radius-pill);
  background: rgba(6, 18, 31, .92);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .12em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, border-color .2s ease, color .2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.back-to-top[data-visible="true"] { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--signal); color: var(--white); }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1180px) {
  .nav-link { padding: 9px 11px; font-size: 13.5px; }
  .primary-nav { gap: 8px; }
}

@media (max-width: 1024px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    max-height: calc(100vh - 118px);
    overflow-y: auto;
    padding: 16px var(--gutter) 24px;
    background: var(--sea-900);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 44px 70px -40px rgba(0, 0, 0, .95);
  }
  .primary-nav[data-open="true"] { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 15.5px;
  }
  .nav-cta { width: 100%; margin-top: 6px; padding: 14px 22px; }

  .header-main { min-height: 70px; }
  .brand__note { max-width: 46vw; }

  .rail-layout { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; top: auto; }
  [id] { scroll-margin-top: 118px; }

  .footer-top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  body { line-height: 1.7; }

  .header-rail { gap: 10px; padding: 9px 0 10px; }
  .header-rail__label { display: none; }

  .brand__mark { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; }
  .brand__name { font-size: 17px; letter-spacing: .07em; }
  .brand__note { font-size: 10px; max-width: 52vw; }

  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .footer-metrics { gap: 14px 24px; }
  .footer-metrics .num { font-size: 22px; }
  .footer-bottom { flex-direction: column; }

  .block--anchor,
  .block--standard,
  .block--sliver { grid-column: span 12; }

  .back-to-top { padding: 10px 15px; font-size: 11.5px; }
}

@media (max-width: 420px) {
  .footer-cols { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   降低动效
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .block:hover { transform: none; }
  .btn--primary:hover { transform: none; }
}
