/* ============================================================
   买球网中心 · 共享外壳样式 /assets/site.css
   戈壁砂底 · 墨蓝框架 · 信号绿状态 · 粗野主义档案感
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
button { font: inherit; }
table { border-collapse: collapse; }
img, svg { max-width: 100%; }

/* ---------- 设计变量 ---------- */
:root {
  --sand: #E8DCC8;
  --sand-deep: #D4C4A8;
  --paper: #F7F3EA;
  --ink-blue: #16233A;
  --ink: #111111;
  --signal: #2FBF71;
  --signal-dark: #1E8A50;
  --amber: #D98E2B;
  --muted: #6B6B5E;
  --line: #2B2B2B;

  --font-title: 'Oswald', 'Bebas Neue', 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', sans-serif;
  --font-body: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', 'Courier New', monospace;

  --shell-max: 1280px;
  --gutter: clamp(16px, 4vw, 44px);
  --shadow-hard: 6px 6px 0 rgba(43, 43, 43, .14);
  --shadow-hard-lg: 9px 9px 0 rgba(43, 43, 43, .2);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 基础排版 ---------- */
body {
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: .015em;
  margin: 0 0 .55em;
}
h1 { font-size: clamp(42px, 8vw, 88px); font-weight: 500; letter-spacing: .01em; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 500; }
h3 { font-size: clamp(20px, 2.4vw, 26px); }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 700; }
code, kbd, samp { font-family: var(--font-mono); font-size: .92em; }
hr { border: 0; border-top: 1px solid rgba(43, 43, 43, .28); margin: 40px 0; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 18px;
  background: var(--signal);
  color: var(--ink-blue);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .08em;
  border: 2px solid var(--ink);
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- 内容容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ============================================================
   页头：框架式导航，成为页面视觉上边框
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--ink-blue);
  color: var(--paper);
  border-bottom: 3px solid var(--line);
}
.header-frame {
  display: flex;
  align-items: stretch;
  border-left: 1px solid rgba(247, 243, 234, .16);
  border-right: 1px solid rgba(247, 243, 234, .16);
}
.site-header a:focus-visible,
.site-header button:focus-visible {
  outline-color: var(--signal);
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 18px 22px 18px 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  background: var(--signal);
  color: var(--ink-blue);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .5);
  transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}
.brand:hover .brand-mark {
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .5);
  transform: translate(-1px, -1px);
}
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.28;
}
.brand-name {
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .12em;
  white-space: nowrap;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: rgba(247, 243, 234, .55);
  white-space: nowrap;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 18px 18px;
  background: transparent;
  color: var(--paper);
  border: 0;
  border-left: 1px solid rgba(247, 243, 234, .14);
  cursor: pointer;
  transition: background-color .18s var(--ease);
}
.nav-toggle:hover { background: rgba(247, 243, 234, .07); }
.nav-toggle-bar {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: var(--paper);
  transition: background-color .2s var(--ease);
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--paper);
  transition: transform .2s var(--ease);
}
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
}

/* 导航 */
.site-nav {
  display: flex;
  align-items: stretch;
  margin-left: auto;
}
.nav-list {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-item { display: flex; }
.nav-link {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  padding: 22px 16px;
  font-size: 15px;
  letter-spacing: .08em;
  color: rgba(247, 243, 234, .74);
  border-left: 1px solid rgba(247, 243, 234, .14);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.nav-link:hover {
  color: var(--paper);
  background: rgba(247, 243, 234, .07);
}
.nav-link[aria-current="page"] {
  color: var(--paper);
  background: rgba(47, 191, 113, .16);
}
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--signal);
}

/* 状态位 */
.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding-left: 20px;
  border-left: 1px solid rgba(247, 243, 234, .14);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: rgba(247, 243, 234, .6);
}
.status-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(47, 191, 113, .18);
  animation: status-pulse 2.6s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.status-text {
  max-width: 22ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 阅读进度 */
.readout {
  position: relative;
  height: 3px;
  background: rgba(247, 243, 234, .12);
}
.readout-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--signal);
  transition: width .1s linear;
}

/* ============================================================
   页脚：档案索引
   ============================================================ */
.site-footer {
  background: var(--sand-deep);
  color: var(--ink);
  border-top: 4px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.3fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  padding-block: clamp(40px, 6vw, 72px);
}
.footer-brand { border-top: 3px solid var(--signal); padding-top: 18px; }
.footer-nav,
.footer-contact,
.footer-meta {
  border-top: 1px solid rgba(43, 43, 43, .28);
  padding-top: 18px;
  min-width: 0;
}
.footer-mark {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: .1em;
  margin: 0 0 10px;
}
.footer-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.9;
  color: var(--muted);
  margin: 0 0 6px;
}
.footer-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--muted);
  margin: 0 0 14px;
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 14px;
  line-height: 1.6;
}
.footer-list a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer-list a:hover {
  color: var(--signal-dark);
  border-bottom-color: var(--signal-dark);
}
.footer-list span { color: var(--muted); }
.footer-base {
  background: rgba(247, 243, 234, .38);
  border-top: 1px solid rgba(43, 43, 43, .28);
}
.footer-base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
}
.footer-copy,
.footer-icp { margin: 0; }

/* ============================================================
   通用组件
   ============================================================ */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .12em;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--line);
  box-shadow: 4px 4px 0 var(--line);
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--line);
}
.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--line);
}
.btn--primary { background: var(--signal); color: var(--ink-blue); }
.btn--primary:hover { background: #35cd7b; }
.btn--ghost {
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}
.btn--ghost:hover {
  background: rgba(43, 43, 43, .07);
  transform: none;
  box-shadow: none;
}

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
}
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: rgba(107, 107, 94, .55); }
.crumbs a { color: var(--muted); transition: color .18s var(--ease); }
.crumbs a:hover { color: var(--signal-dark); }
.crumbs [aria-current="page"] { color: var(--ink); }

/* 长文 */
.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.8;
  color: #1b1b1b;
}
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: clamp(24px, 3vw, 32px); margin: 1.6em 0 .6em; }
.prose h3 { font-size: clamp(19px, 2.2vw, 22px); margin: 1.4em 0 .5em; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose a {
  color: var(--signal-dark);
  border-bottom: 2px solid rgba(47, 191, 113, .45);
  transition: border-color .18s var(--ease);
}
.prose a:hover { border-bottom-color: var(--signal-dark); }
.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  background: var(--paper);
  border-left: 4px solid var(--amber);
  color: var(--muted);
  font-size: 16px;
}
.prose code {
  padding: 2px 6px;
  background: rgba(43, 43, 43, .08);
  border: 1px solid rgba(43, 43, 43, .16);
}

/* 章节 */
.section { padding-block: clamp(48px, 7vw, 96px); }
.section--deep { background: var(--sand-deep); }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink-blue); color: var(--paper); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--signal-dark);
  margin: 0 0 16px;
}
.section--ink .eyebrow { color: var(--signal); }
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--signal);
}
.section-title {
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 500;
  letter-spacing: .02em;
  margin: 0 0 14px;
}
.section-note {
  max-width: 62ch;
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}
.section--ink .section-note { color: rgba(247, 243, 234, .68); }

/* 网格 */
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
  align-items: start;
}

/* 信息块 */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--paper);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-hard);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.tile:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard-lg);
}
.tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tile-title {
  font-family: var(--font-title);
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 600;
  margin: 0;
}
.tile-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}
.tile--dark {
  background: var(--ink-blue);
  color: var(--paper);
  border-color: var(--line);
}
.tile--dark .tile-body { color: rgba(247, 243, 234, .68); }

/* 标签与批次号 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  background: var(--sand);
  color: var(--ink);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.tag--signal { background: var(--signal); color: var(--ink-blue); }
.tag--amber { background: var(--amber); color: var(--ink); }
.tag--blue { background: var(--ink-blue); color: var(--paper); }
.batch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .14em;
  color: var(--amber);
}
.batch::before { content: "#"; opacity: .7; }

/* 图片容器 */
.figure {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  background-color: var(--sand-deep);
  background-image:
    linear-gradient(rgba(43, 43, 43, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 43, 43, .09) 1px, transparent 1px);
  background-size: 28px 28px;
  border: 2px solid var(--line);
  box-shadow: var(--shadow-hard);
}
.figure img, .figure svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure--wide { aspect-ratio: 16 / 9; }
.figure--tall { aspect-ratio: 3 / 4; }
.figure--square { aspect-ratio: 1 / 1; }
.figure--band { aspect-ratio: 21 / 9; }
.figure-cap {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
}

/* 显现动效 */
html.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}
html.js-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .header-frame { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; align-self: stretch; }
  .header-status { display: none; }
  .site-nav {
    display: none;
    flex-basis: 100%;
    order: 3;
    margin-left: 0;
    border-top: 1px solid rgba(247, 243, 234, .16);
  }
  .site-nav[data-open] { display: block; }
  .nav-list { flex-direction: column; }
  .nav-item { display: block; }
  .nav-link {
    padding: 15px 6px;
    font-size: 16px;
    border-left: 0;
    border-bottom: 1px solid rgba(247, 243, 234, .12);
  }
  .nav-link[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 4px;
    height: auto;
  }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-sub { display: none; }
  .brand { padding-right: 14px; }
  .brand-mark { width: 36px; height: 36px; font-size: 12px; }
  .brand-name { font-size: 17px; letter-spacing: .08em; }
  .nav-toggle-label { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base-inner { justify-content: flex-start; }
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   可访问性与动效偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .readout-bar { transition: none; }
  .tile:hover,
  .btn:hover,
  .brand:hover .brand-mark {
    transform: none;
  }
}

@media print {
  .site-header, .readout { position: static; }
  .nav-toggle { display: none; }
}
