/* ==========================================================================
   /assets/site.css — B体育主站 共享外壳样式
   色彩策略：夜场黑铺底，球场绿唯一能量锚点，荧光青读数，亮橙即时变动
   形状语言：切角面板 + 斜线 + 运动轨迹
   ========================================================================== */

/* ---------- 1. 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, h6,
p, figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg, video { display: block; max-width: 100%; height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; padding: 0; cursor: pointer; }

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

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

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 色彩 */
  --ink-900: #070B0A;      /* 夜场黑 */
  --ink-800: #0F1715;      /* 看台深灰 */
  --ink-700: #131E1B;      /* 抬升面板 */
  --green: #17B26A;        /* 球场绿 */
  --green-deep: #0B6B43;   /* 草皮暗绿 */
  --cyan: #35E3C8;         /* 荧光青 */
  --orange: #FF6A2B;       /* 亮橙 */
  --paper: #F3F7F4;        /* 石灰白 */
  --muted: #97A5A0;        /* 中性灰绿 */
  --warn: #FFD166;         /* 警示黄 */
  --edge: #22302C;         /* 边线灰 */

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

  /* 节奏与尺寸 */
  --header-h: 76px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1360px;
  --cut: 18px;
  --cut-sm: 10px;
  --step: 24px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--ink-900);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--paper);
}

h1 { font-size: clamp(38px, 6.4vw, 64px); }
h2 { font-size: clamp(26px, 3.6vw, 40px); }
h3 { font-size: clamp(19px, 2vw, 24px); }
h4 { font-size: 18px; }

p {
  max-width: 62ch;
  line-height: 1.75;
  color: #D8E2DD;
}

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

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

::selection {
  background: var(--green);
  color: #04120C;
}

/* ---------- 4. 焦点与可达性 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

:focus:not(:focus-visible) { outline: none; }

#main-content {
  display: block;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--green);
  color: #04120C;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)),
    calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm));
  transition: top 0.18s var(--ease);
}

.skip-link:focus {
  top: 14px;
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- 5. 页头 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.site-header[data-scrolled="true"] {
  background-color: rgba(7, 11, 10, 0.94);
  border-bottom-color: var(--edge);
}

.site-header:has([data-open="true"]) {
  background-color: rgba(7, 11, 10, 0.96);
  border-bottom-color: var(--edge);
}

@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .site-header[data-scrolled="true"] {
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
  }
}

.header-inner {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 28px);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-height: 44px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #04120C;
  background: linear-gradient(140deg, var(--green) 0%, var(--green-deep) 100%);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: filter 0.2s var(--ease);
}

.brand:hover .brand-mark { filter: brightness(1.14); }

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

.brand-name {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.brand-tag {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* 导航（桌面） */
.site-nav {
  display: flex;
  align-items: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.3vw, 18px);
}

.nav-item { position: relative; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--paper);
  white-space: nowrap;
  transition: color 0.18s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 12px;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s var(--ease);
}

.nav-link:hover { color: var(--green); }
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  color: var(--green);
}

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

/* 右侧动作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-foot { display: none; }

/* 状态胶囊 */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--cyan);
  border: 1px solid var(--edge);
  background: rgba(15, 23, 21, 0.66);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.status-chip--desk { display: none; }

.status-dot,
.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  animation: bsp-pulse 2s ease-out infinite;
}

@keyframes bsp-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(23, 178, 106, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(23, 178, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(23, 178, 106, 0); }
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--edge);
  background: rgba(15, 23, 21, 0.7);
  color: var(--paper);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: border-color 0.18s var(--ease);
}

.nav-toggle:hover { border-color: var(--green); }

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--paper);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) 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(-6px) rotate(-45deg);
}

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--paper);
  background-color: transparent;
  border: 1px solid var(--edge);
  clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)),
    calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm));
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.btn-primary {
  background-color: var(--green);
  border-color: var(--green);
  color: #04120C;
}

.btn-primary:hover {
  background-color: var(--green-deep);
  border-color: var(--green-deep);
  color: var(--paper);
}

.btn-primary:active { background-color: #095336; }

.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

.btn-block { width: 100%; }

/* ---------- 7. 布局容器 ---------- */
.shell {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 1.9vw, 28px);
}

/* 斜线分隔 */
.rule-slash {
  position: relative;
  height: 1px;
  margin: clamp(24px, 4vw, 48px) 0;
  background: linear-gradient(90deg, transparent, var(--edge) 10%, var(--edge) 90%, transparent);
}

.rule-slash::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  width: 56px;
  height: 5px;
  background: var(--green);
  transform: skewX(-32deg);
}

/* ---------- 8. 切角面板 ---------- */
.cut-panel {
  position: relative;
  padding: clamp(20px, 2.4vw, 32px);
  background-color: var(--ink-800);
  border: 1px solid var(--edge);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.cut-panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green));
  opacity: 0.45;
  transition: opacity 0.2s var(--ease);
}

.cut-panel:hover {
  border-color: var(--green);
  background-color: var(--ink-700);
  transform: translateY(-2px);
}

.cut-panel:hover::after { opacity: 1; }

/* ---------- 9. 章节标题 ---------- */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px 20px;
  padding-bottom: 14px;
  margin-bottom: clamp(20px, 3vw, 36px);
  border-bottom: 1px solid var(--edge);
}

.section-num {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2em;
  color: var(--green);
}

.section-title {
  font-size: clamp(26px, 3.6vw, 40px);
  margin: 0;
}

.section-note {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: right;
  align-self: end;
}

/* ---------- 10. 数据与标签 ---------- */
.data-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cyan);
}

.data-num--hot { color: var(--orange); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--edge);
  background: rgba(15, 23, 21, 0.7);
}

.tag--live { color: var(--green); border-color: rgba(23, 178, 106, 0.45); }
.tag--move { color: var(--orange); border-color: rgba(255, 106, 43, 0.45); }
.tag--warn { color: var(--warn); border-color: rgba(255, 209, 102, 0.45); }

/* ---------- 11. 图片容器 ---------- */
.figure {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--edge);
  background-color: var(--ink-800);
  background-image:
    linear-gradient(135deg, rgba(23, 178, 106, 0.1), transparent 55%),
    repeating-linear-gradient(135deg, rgba(53, 227, 200, 0.05) 0 1px, transparent 1px 14px);
}

.figure > img,
.figure > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.06);
}

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

.figure-cap {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ---------- 12. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

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

.crumb-sep { color: var(--green-deep); }
.crumb-current { color: var(--paper); }

/* ---------- 13. 竖排注释 ---------- */
.side-note {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--muted);
  user-select: none;
}

/* ---------- 14. 页脚 ---------- */
.site-footer {
  position: relative;
  isolation: isolate;
  margin-top: clamp(64px, 9vw, 120px);
  background-color: var(--ink-800);
  border-top: 1px solid var(--edge);
  color: var(--muted);
}

.footer-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(53, 227, 200, 0.055) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(23, 178, 106, 0.05) 0 1px, transparent 1px 96px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 58%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 58%);
}

.footer-inner {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
  padding: clamp(44px, 6vw, 84px) 0 clamp(28px, 3vw, 44px);
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(0, 2.4fr) minmax(240px, 1.3fr);
  gap: clamp(28px, 3.6vw, 56px);
}

.brand--footer { margin-bottom: 16px; }

.footer-blurb {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.75;
  color: #C3CFCA;
  margin-bottom: 12px;
}

.footer-meta {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--green);
}

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

.footer-group-title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--paper);
  text-transform: none;
}

.footer-links { display: flex; flex-direction: column; }

.footer-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--muted);
  transition: color 0.18s var(--ease);
}

.footer-link::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 100%;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible { color: var(--paper); }

.footer-link:hover::before,
.footer-link:focus-visible::before { transform: scaleX(1); }

.contact-list { display: flex; flex-direction: column; gap: 12px; }

.contact-row {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--edge);
}

.contact-key {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--green);
}

.contact-val {
  font-size: 14px;
  line-height: 1.6;
  color: #D8E2DD;
  word-break: break-word;
}

.footer-base {
  position: relative;
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
  padding: 20px 0 28px;
  border-top: 1px solid var(--edge);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.footer-copy { margin: 0; color: var(--muted); }
.footer-icp { margin: 0; color: var(--green); }
.footer-note { margin: 0 0 0 auto; color: var(--muted); }

/* ---------- 15. 显现 ---------- */
.js-on [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
}

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

/* ---------- 16. 响应式 ---------- */
@media (max-width: 1180px) {
  .header-actions .btn-ghost { display: none; }
}

@media (max-width: 1100px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; }
  .status-chip--desk { display: none; }
  .header-actions .btn { display: none; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px var(--gutter) 28px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background-color: rgba(15, 23, 21, 0.98);
    border-bottom: 1px solid var(--edge);
  }

  .site-nav[data-open="true"] { display: flex; }

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

  .nav-item { border-bottom: 1px solid var(--edge); }

  .nav-link {
    width: 100%;
    min-height: 54px;
    padding: 0 4px;
    font-size: 17px;
    white-space: normal;
  }

  .nav-link::after { display: none; }
  .nav-link[aria-current="page"] { color: var(--green); }

  .nav-foot {
    display: grid;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--edge);
  }

  .nav-foot .status-chip { justify-content: center; }

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

  .section-note { text-align: left; }

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

@media (max-width: 720px) {
  .brand-tag { display: none; }
  .footer-nav { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-note { margin-left: 0; flex-basis: 100%; }
}

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-brand,
  .footer-contact { grid-column: auto; }
  .footer-nav { grid-template-columns: minmax(0, 1fr); }
  .footer-links { border-left: 1px solid var(--edge); padding-left: 12px; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 15px; }
  .btn { padding: 0 14px; font-size: 13px; }
}

/* ---------- 17. 减弱动效 ---------- */
@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;
  }

  .status-dot,
  .pulse-dot { animation: none; box-shadow: none; }

  .cut-panel:hover { transform: none; }

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