/* ===========================================================
   百老汇牛牛 · 坐标导航  ——  /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 基础组件
   =========================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

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; }

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 设计变量 ---------- */
:root {
  color-scheme: light;

  --blue: #1D4E89;
  --deep: #0C1F33;
  --paper: #F7F3EA;
  --glaze: #FFFFFF;
  --brass: #C08A2E;
  --brass-soft: #E7D3A3;
  --neon: #7A4DDB;
  --gray: #64748B;
  --pale: #D8E4F2;
  --ink: #111820;

  --rail-w: 266px;
  --bar-h: 52px;
  --shell-max: 1180px;

  --font-serif: Noto Serif SC, Source Han Serif SC, Songti SC, SimSun, serif;
  --font-sans: Source Han Sans SC, Noto Sans SC, PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif;
  --font-mono: JetBrains Mono, IBM Plex Mono, SFMono-Regular, Consolas, Menlo, monospace;

  --ease: cubic-bezier(.33, .02, .2, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    linear-gradient(180deg, rgba(216, 228, 242, .55) 0, rgba(247, 243, 234, 0) 340px),
    repeating-linear-gradient(90deg, rgba(29, 78, 137, .045) 0 1px, transparent 1px 128px);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, blockquote {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.25;
}

h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.15; }
h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.2; }
h3 { font-size: clamp(21px, 2.4vw, 28px); line-height: 1.3; }

h4, h5 {
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: .04em;
  font-size: 20px;
  line-height: 1.5;
}

p { text-wrap: pretty; }

strong { font-weight: 900; }

.mono {
  font-family: var(--font-mono);
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

.site-header a:focus-visible,
.site-footer a:focus-visible,
.rail button:focus-visible {
  outline-color: var(--brass-soft);
}

#main-content { display: block; }

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 300;
  padding: 12px 20px;
  background: var(--brass);
  color: var(--deep);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  text-decoration: none;
  border-radius: 2px;
  transition: top .22s var(--ease);
}

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

/* ---------- 4. 头部：顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
}

.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--bar-h);
  padding: 8px 16px;
  background: var(--deep);
  color: #EAF1F8;
  border-bottom: 1px solid rgba(192, 138, 46, .42);
}

.bar__ver,
.bar__geo,
.bar__pos {
  font-size: 13px;
  white-space: nowrap;
}

.bar__ver { color: var(--brass-soft); flex: none; }

.bar__geo { color: rgba(234, 241, 248, .68); flex: none; }

.bar__pos {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  color: #FFFFFF;
  letter-spacing: .14em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar__pos::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  vertical-align: middle;
}

.bar__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 34px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(192, 138, 46, .5);
  border-radius: 2px;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}

.bar__toggle:hover { background: rgba(192, 138, 46, .24); border-color: var(--brass); }

.bar__bars { position: relative; display: block; width: 14px; height: 10px; }

.bar__bars::before,
.bar__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transition: transform .26s var(--ease), top .26s var(--ease), bottom .26s var(--ease);
}

.bar__bars::before { top: 0; }
.bar__bars::after { bottom: 0; }

.site-header[data-open="true"] .bar__bars::before { top: 4px; transform: rotate(45deg); }
.site-header[data-open="true"] .bar__bars::after { bottom: 4.5px; transform: rotate(-45deg); }

/* ---------- 5. 头部：轨道导航（移动端默认 = 抽屉） ---------- */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  width: min(84vw, 318px);
  padding: 18px 0 42px;
  background: var(--blue);
  color: #FFFFFF;
  transform: translateX(-102%);
  transition: transform .3s var(--ease);
  overflow-y: auto;
  box-shadow: 18px 0 44px rgba(12, 31, 51, .42);
}

.site-header[data-open="true"] .rail { transform: translateX(0); }

.site-header[data-open="true"]::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(12, 31, 51, .55);
}

.rail__head {
  position: relative;
  padding: 4px 22px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.rail__brand {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.45;
  color: #FFFFFF;
}

.rail__brand-dot {
  font-style: normal;
  color: var(--brass);
  margin: 0 3px;
}

.rail__meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--brass-soft);
}

.rail__close {
  position: absolute;
  top: 2px;
  right: 14px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 2px;
  color: #FFFFFF;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.rail__close:hover { border-color: var(--brass); background: rgba(192, 138, 46, .22); }

.rail__nav { padding: 14px 0; }

.rail__list { display: flex; flex-direction: column; }

.rail__item { position: relative; }

.rail__link {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 13px 22px;
  border-left: 3px solid transparent;
  color: rgba(255, 255, 255, .8);
  font-size: 16px;
  text-decoration: none;
  transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}

.rail__link:hover,
.rail__link:focus-visible {
  color: #FFFFFF;
  background: rgba(255, 255, 255, .09);
  border-left-color: var(--brass-soft);
}

.rail__link[aria-current="page"] {
  color: #FFFFFF;
  background: rgba(12, 31, 51, .45);
  border-left-color: var(--brass);
}

.rail__num {
  flex: none;
  min-width: 20px;
  font-size: 12px;
  color: var(--brass-soft);
}

.rail__link[aria-current="page"] .rail__num { color: var(--brass); }

.rail__label { text-wrap: pretty; }

.rail__quick {
  margin-top: auto;
  padding: 18px 22px 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.rail__quick-title {
  font-size: 12px;
  color: var(--brass-soft);
  letter-spacing: .16em;
}

.rail__quick-list { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }

.rail__quick-link {
  display: block;
  padding: 7px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.rail__quick-link:hover { color: var(--brass-soft); border-bottom-color: rgba(192, 138, 46, .6); }

.rail__gauge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(231, 211, 163, .22);
}

.rail__gauge-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--brass), var(--neon));
  transition: width .12s linear;
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  margin-top: 0;
  background: var(--deep);
  color: rgba(234, 241, 248, .8);
  font-size: 15px;
  line-height: 1.85;
  border-top: 3px solid var(--brass);
}

.footer__inner {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 54px 20px 30px;
}

.footer__top { display: grid; gap: 32px; }

.footer__brand {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.4;
  color: #FFFFFF;
  letter-spacing: .02em;
}

.footer__pitch { margin-top: 12px; max-width: 36ch; color: rgba(234, 241, 248, .7); }

.footer__stamp { margin-top: 14px; font-size: 12px; color: var(--brass-soft); }

.footer__col-title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  color: var(--brass-soft);
}

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

.footer__link {
  color: rgba(234, 241, 248, .82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.footer__link:hover { color: #FFFFFF; border-bottom-color: var(--brass); }

.footer__contact {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.footer__contact-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  color: var(--brass-soft);
}

.footer__contact-grid { margin-top: 18px; display: grid; gap: 14px 28px; }

.footer__contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.footer__contact-key {
  flex: none;
  padding: 1px 8px;
  border: 1px solid rgba(231, 211, 163, .38);
  border-radius: 2px;
  font-size: 12px;
  color: var(--brass-soft);
}

.footer__contact-val { color: #FFFFFF; word-break: break-all; }

.footer__copy-btn {
  padding: 2px 10px;
  background: transparent;
  border: 1px solid rgba(192, 138, 46, .55);
  border-radius: 2px;
  color: var(--brass-soft);
  font-size: 12px;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}

.footer__copy-btn:hover { background: rgba(192, 138, 46, .22); color: #FFFFFF; }

.footer__copy-btn[data-copied="true"] {
  background: rgba(122, 77, 219, .38);
  border-color: var(--neon);
  color: #FFFFFF;
}

.footer__contact-note {
  margin-top: 16px;
  max-width: 72ch;
  font-size: 13px;
  color: rgba(234, 241, 248, .58);
}

.footer__legal {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  font-size: 13px;
}

.footer__policy { display: flex; flex-wrap: wrap; gap: 18px; }

.footer__icp { font-size: 12px; color: var(--brass-soft); }

.footer__region { color: rgba(234, 241, 248, .58); }

.footer__copy-line { margin-left: auto; font-size: 12px; color: rgba(234, 241, 248, .55); }

/* ---------- 7. 容器与网格 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 20px;
}

.shell--wide { max-width: 1360px; }
.shell--narrow { max-width: 780px; }

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

.col-main { grid-column: span 12; }
.col-side { grid-column: span 12; }
.col-full { grid-column: 1 / -1; }

/* ---------- 8. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}

.btn--solid { background: var(--blue); border-color: var(--blue); color: #FFFFFF; }
.btn--solid:hover { background: var(--deep); border-color: var(--deep); }

.btn--brass { background: var(--brass); border-color: var(--brass); color: var(--deep); }
.btn--brass:hover { background: var(--brass-soft); border-color: var(--brass-soft); }

.btn--ghost { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn--ghost:hover { background: var(--blue); color: #FFFFFF; }

.btn--ghost-light { background: transparent; border-color: rgba(255, 255, 255, .5); color: #FFFFFF; }
.btn--ghost-light:hover { border-color: var(--brass); color: var(--brass-soft); }

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--brass);
}

.rule-scale {
  position: relative;
  height: 9px;
  margin: 18px 0 28px;
  background-image: repeating-linear-gradient(90deg, var(--brass) 0 1px, transparent 1px 14px);
  opacity: .85;
}

.rule-scale::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--brass), rgba(192, 138, 46, 0));
}

.note {
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--brass-soft);
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--brass-soft);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--brass);
}

.tag--on-dark { border-color: rgba(231, 211, 163, .48); color: var(--brass-soft); }

.panel {
  padding: 24px;
  background: var(--glaze);
  border: 1px solid var(--pale);
  border-radius: 2px;
}

.panel--glass {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #FFFFFF;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.panel--glass .note { color: rgba(255, 255, 255, .78); }

.prose { max-width: 72ch; }
.prose p + p { margin-top: 18px; }
.prose h2 { margin-top: 46px; }
.prose h3 { margin-top: 32px; }
.prose h4 { margin-top: 26px; }
.prose ul,
.prose ol { margin-top: 16px; padding-left: 1.4em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 8px; }
.prose a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid var(--brass-soft);
  transition: border-color .2s var(--ease);
}
.prose a:hover { border-bottom-color: var(--brass); }

.breadcrumb { padding: 18px 0 0; font-size: 13px; }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  letter-spacing: .06em;
  color: var(--gray);
}

.breadcrumb__list li { display: flex; align-items: center; gap: 8px; }

.breadcrumb__list li::after {
  content: "/";
  color: var(--pale);
}

.breadcrumb__list li:last-child::after { content: ""; }

.breadcrumb__link {
  color: var(--gray);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.breadcrumb__link:hover { color: var(--blue); border-bottom-color: var(--brass); }

.breadcrumb__current { color: var(--ink); }

/* ---------- 9. 图片容器基础规则 ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--pale), #EFF4FA);
  border: 1px solid var(--pale);
  border-radius: 2px;
}

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

.media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media__frame {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  color: var(--gray);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  line-height: 1.7;
}

.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #FFFFFF;
  background: linear-gradient(to top, rgba(12, 31, 51, .9), rgba(12, 31, 51, 0));
}

.media-grid { display: grid; gap: 18px; }

/* ---------- 10. 响应式 ---------- */
@media (min-width: 700px) {
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .footer__top { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
  .footer__contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .col-main { grid-column: span 7; }
  .col-side { grid-column: 10 / span 3; }
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }

  .bar { padding: 0 24px; }

  .rail {
    top: 0;
    bottom: 0;
    width: var(--rail-w);
    padding: 24px 0 40px;
    transform: none;
    border-right: 1px solid rgba(192, 138, 46, .45);
    box-shadow: none;
    z-index: 70;
  }

  .rail__brand { font-size: 20px; }

  .rail__close { display: none; }

  .bar__toggle { display: none; }

  .site-header[data-open="true"]::after { display: none; }

  .footer__inner { padding: 62px 24px 34px; }
}

@media (max-width: 1023px) {
  .bar__geo { display: none; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .shell { padding: 0 16px; }
  .footer__inner { padding: 44px 16px 26px; }
  .footer__copy-line { margin-left: 0; }
}

/* ---------- 11. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }
}
