/* ==========================================================================
   boyu-go.com.cn — 共享样式表 /assets/site.css
   深海追踪档案：近单色深海蓝 + 鱼鳞银 + 荧光青绿高亮
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, p,
ul, ol, dl, dd, figure, blockquote, hr {
  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;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --c-deep: #071A2F;
  --c-mid: #0E2A45;
  --c-ink: #04101C;
  --c-silver: #C9D6DF;
  --c-mist: #7C8FA1;
  --c-cyan: #3DE0C2;
  --c-teal: #0F7A6B;
  --c-amber: #F2A03D;
  --c-amber-deep: #8A4B12;
  --c-glass: #EAF3F7;

  --line-soft: rgba(201, 214, 223, 0.12);
  --line: rgba(201, 214, 223, 0.18);
  --line-strong: rgba(201, 214, 223, 0.30);
  --cyan-line: rgba(61, 224, 194, 0.45);
  --amber-line: rgba(242, 160, 61, 0.45);

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

  /* 尺度 */
  --header-h: 72px;
  --gutter: clamp(18px, 4vw, 56px);
  --maxw: 1440px;
  --grid-gap: clamp(16px, 2vw, 28px);
  --section-gap: clamp(56px, 9vw, 132px);
}

/* ---------- 3. 基础与中文排版 ---------- */
body {
  min-height: 100vh;
  padding-top: var(--header-h);
  background-color: var(--c-deep);
  background-image:
    radial-gradient(1100px 560px at 12% -12%, rgba(15, 122, 107, 0.20), transparent 62%),
    radial-gradient(900px 520px at 102% 6%, rgba(14, 42, 69, 0.90), transparent 66%);
  background-attachment: fixed;
  color: var(--c-silver);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.004em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--c-glass);
}

h1 { font-size: clamp(38px, 6.4vw, 88px); line-height: 0.98; }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: clamp(20px, 2.3vw, 24px); line-height: 1.14; }
h4 { font-size: 18px; line-height: 1.24; }

main { position: relative; z-index: 1; display: block; }
main:focus { outline: none; }

strong { color: var(--c-glass); font-weight: 600; }

::selection { background: rgba(61, 224, 194, 0.28); color: var(--c-glass); }

/* 页面左右竖向导轨（装饰性边框） */
@media (min-width: 1240px) {
  body::before,
  body::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--line-soft);
    z-index: 0;
    pointer-events: none;
  }
  body::before { left: var(--gutter); }
  body::after { right: var(--gutter); }
}

/* ---------- 4. 无障碍 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 14px;
  z-index: 200;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--c-ink);
  background: var(--c-cyan);
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 2px;
}

/* ---------- 5. 布局 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: 92ch; }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.divider {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: clamp(28px, 4vw, 56px) 0;
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 1;
  border: 1px solid var(--line-strong);
  color: var(--c-silver);
  background: transparent;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  color: var(--c-ink);
  background: var(--c-cyan);
  border-color: var(--c-cyan);
  font-weight: 600;
}

.btn--primary:hover { background: var(--c-glass); border-color: var(--c-glass); }

.btn--ghost:hover {
  color: var(--c-cyan);
  border-color: var(--cyan-line);
  background: rgba(61, 224, 194, 0.08);
}

/* ---------- 7. 页头 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(4, 16, 28, 0.97), rgba(7, 26, 47, 0.88));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  pointer-events: none;
  opacity: 0.5;
  background-image: repeating-linear-gradient(90deg,
    rgba(201, 214, 223, 0.30) 0 1px, transparent 1px 26px);
}

.site-header[data-scrolled] { box-shadow: 0 12px 34px rgba(4, 16, 28, 0.6); }

.progress-rail {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(201, 214, 223, 0.14);
}

.progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--c-teal), var(--c-cyan));
  transition: width 0.12s linear;
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 26px);
  transition: min-height 0.28s ease;
}

.site-header[data-scrolled] .header-inner { min-height: 56px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--c-cyan);
  border: 1px solid var(--cyan-line);
  background: rgba(61, 224, 194, 0.08);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.16; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--c-glass);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--c-mist);
  transition: opacity 0.25s ease;
}

.site-header[data-scrolled] .brand-tag { opacity: 0; }

.nav-frame {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  padding: 3px;
  border: 1px solid var(--line);
}

.nav-frame::before,
.nav-frame::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid var(--c-cyan);
  opacity: 0.65;
  pointer-events: none;
}

.nav-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.nav-frame::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  width: 100%;
}

.nav-link {
  display: block;
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--c-silver);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  color: var(--c-glass);
  background: rgba(201, 214, 223, 0.08);
}

.nav-link[aria-current="page"] {
  color: var(--c-cyan);
  background: rgba(61, 224, 194, 0.08);
  border-bottom-color: var(--c-cyan);
}

.nav-status {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  padding-left: clamp(10px, 1.6vw, 22px);
  border-left: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--c-mist);
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-cyan);
  box-shadow: 0 0 0 3px rgba(61, 224, 194, 0.18);
}

.status-value { color: var(--c-cyan); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--c-silver);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover { color: var(--c-cyan); border-color: var(--cyan-line); }

.nav-toggle-bars { display: grid; gap: 4px; }

.nav-toggle-bars span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
}

.site-header[data-open] .nav-toggle {
  color: var(--c-cyan);
  border-color: var(--cyan-line);
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(64px, 10vw, 140px);
  padding-top: clamp(44px, 6vw, 84px);
  background: linear-gradient(180deg, rgba(4, 16, 28, 0.86), var(--c-ink));
  border-top: 1px solid var(--line-strong);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  pointer-events: none;
  opacity: 0.45;
  background-image: repeating-linear-gradient(90deg,
    rgba(201, 214, 223, 0.30) 0 1px, transparent 1px 26px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: clamp(26px, 3vw, 52px);
}

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

.footer-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--c-glass);
}

.footer-tag {
  margin-top: 12px;
  max-width: 36ch;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--c-mist);
}

.footer-overline {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--c-cyan);
  opacity: 0.85;
}

.footer-col .btn { margin-top: 20px; }

.footer-title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--c-mist);
}

.footer-list {
  display: grid;
  gap: 10px;
  font-size: 14.5px;
}

.footer-list--contact { gap: 14px; }

.footer-link {
  color: var(--c-silver);
  transition: color 0.2s ease;
}

.footer-link:hover { color: var(--c-cyan); }

.footer-key {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--c-mist);
}

.footer-value {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--c-silver);
  overflow-wrap: anywhere;
}

.footer-bottom {
  margin-top: clamp(32px, 5vw, 64px);
  padding-block: 20px 30px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 26px;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  line-height: 1.8;
  color: var(--c-mist);
  max-width: 68ch;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--c-mist);
}

.to-top {
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--c-silver);
  border: 1px solid var(--line-strong);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.to-top:hover { color: var(--c-cyan); border-color: var(--cyan-line); }

/* ---------- 9. 通用内容组件 ---------- */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: clamp(24px, 4vw, 48px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--c-cyan);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--c-glass);
}

.section-lead {
  max-width: 64ch;
  color: var(--c-silver);
}

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--c-glass);
}

.glass-card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: rgba(234, 243, 247, 0.05);
  border: 1px solid rgba(201, 214, 223, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.data-card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: linear-gradient(180deg, var(--c-mid), rgba(14, 42, 69, 0.62));
  border: 1px solid var(--line-soft);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--c-silver);
  border: 1px solid rgba(201, 214, 223, 0.22);
}

.tag--live { color: var(--c-cyan); border-color: var(--cyan-line); }
.tag--window { color: var(--c-amber); border-color: var(--amber-line); }

.stat { display: flex; flex-direction: column; gap: 8px; }

.stat-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--c-glass);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--c-mist);
}

.prose {
  max-width: 72ch;
  font-size: 17px;
  line-height: 1.85;
  color: var(--c-silver);
}

.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.9em; font-size: clamp(24px, 3vw, 32px); }
.prose h3 { margin-top: 1.6em; }
.prose h2:first-child,
.prose h3:first-child { margin-top: 0; }

.prose ul { display: grid; gap: 0.55em; }

.prose ul li {
  position: relative;
  padding-left: 22px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 1px;
  background: var(--c-cyan);
  opacity: 0.75;
}

.prose blockquote {
  padding: 16px 20px;
  border-left: 2px solid var(--c-cyan);
  background: rgba(234, 243, 247, 0.045);
  color: var(--c-silver);
}

.table {
  width: 100%;
  font-size: 14.5px;
  line-height: 1.6;
}

.table th {
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-align: left;
  color: var(--c-mist);
  border-bottom: 1px solid var(--line-strong);
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  font-variant-numeric: tabular-nums;
}

.table tbody tr:hover { background: rgba(201, 214, 223, 0.06); }

.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--c-mid);
}

.figure-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--c-mid);
  background-image:
    linear-gradient(145deg, rgba(15, 122, 107, 0.38), rgba(7, 26, 47, 0.92) 62%),
    repeating-linear-gradient(0deg, rgba(201, 214, 223, 0.07) 0 1px, transparent 1px 44px);
  background-size: cover;
  background-position: center;
}

.figure-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(4, 16, 28, 0.58));
}

.figure-media--wide { aspect-ratio: 21 / 9; }
.figure-media--tall { aspect-ratio: 3 / 4; }
.figure-media--square { aspect-ratio: 1 / 1; }

.figure-caption {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--c-mist);
  border-top: 1px solid var(--line-soft);
  background: rgba(4, 16, 28, 0.5);
}

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

.breadcrumb a { transition: color 0.2s ease; }
.breadcrumb a:hover { color: var(--c-cyan); }
.breadcrumb [aria-current="page"] { color: var(--c-silver); }

.breadcrumb-sep { color: rgba(201, 214, 223, 0.34); }

/* ---------- 10. 交互状态钩子 ---------- */
.track-node {
  color: var(--c-mist);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.track-node.is-active {
  color: var(--c-cyan);
  border-color: var(--cyan-line);
}

[data-section].is-current { }

.reveal {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.reveal.is-visible { opacity: 1; }

.data-line {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, var(--c-teal), var(--c-cyan));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.6s ease;
}

.reveal.is-visible .data-line,
.data-line.is-visible { transform: scaleX(1); }

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1200px) {
  .nav-link { padding: 9px 11px; font-size: 12px; letter-spacing: 0.06em; }
}

@media (max-width: 1024px) {
  :root { --header-h: 62px; }

  .nav-toggle { display: inline-flex; order: 3; margin-left: 10px; }

  .nav-status {
    order: 2;
    margin-left: auto;
    align-self: center;
    padding-left: 0;
    border-left: 0;
    font-size: 11px;
  }

  .status-label { display: none; }
  .brand-tag { display: none; }

  .nav-frame {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 10px var(--gutter) 22px;
    border: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line-strong);
    background: rgba(4, 16, 28, 0.98);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .nav-frame::before,
  .nav-frame::after { display: none; }

  .site-header[data-open] .nav-frame { display: flex; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }

  .nav-link {
    padding: 15px 4px;
    font-size: 14px;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-link[aria-current="page"] { border-bottom-color: var(--c-cyan); }

  .site-header[data-scrolled] .header-inner { min-height: var(--header-h); }
}

@media (max-width: 900px) {
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-3, .col-4, .col-5, .col-6,
  .col-7, .col-8, .col-9, .col-12 { grid-column: span 6; }

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

@media (max-width: 560px) {
  body { font-size: 16px; }

  .grid-12 { grid-template-columns: minmax(0, 1fr); }
  .col-3, .col-4, .col-5, .col-6,
  .col-7, .col-8, .col-9, .col-12 { grid-column: span 1; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }
  .footer-bottom .to-top { width: auto; }
}

/* ---------- 12. 减少动态效果 ---------- */
@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;
  }

  .reveal { opacity: 1; }
  .data-line { transform: scaleX(1); }
}
