/* =========================================================
   巴沙体育 · 共享外壳样式  /assets/site.css
   墨场黑底 + 侧边轨道 + 记分牌式数据语言
   ========================================================= */

/* ---------- 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, ul, ol, li, figure, figcaption, blockquote, dl, dd, table, th, td {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

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

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

button { background: none; border: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }

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

hr { border: 0; border-top: 1px solid var(--ink-line); }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --ink: #0A0C0B;
  --ink-soft: #121714;
  --ink-line: #24302B;
  --score: #F5F7F4;
  --pitch: #0F7A4C;
  --canal: #103A5C;
  --whistle: #F2C230;
  --red: #DC3A2B;
  --mint: #86D6AE;
  --glass: #24302B;
  --smoke: #9AA5A0;

  /* 尺寸 */
  --rail-w: 88px;
  --maxw: 1320px;
  --gutter: clamp(18px, 4vw, 64px);

  /* 字体 */
  --f-head: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --f-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --f-num: "DIN Condensed", "Roboto Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* 动效 */
  --ease: cubic-bezier(.22, .7, .28, 1);
  --dur-1: 120ms;
  --dur-2: 220ms;
  --dur-3: 280ms;
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(to bottom, rgba(245, 247, 244, .016) 0 14px, transparent 14px 28px);
  color: var(--score);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body[data-nav-locked] { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-head);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.02em;
}

h1 { font-size: clamp(30px, 4.6vw, 56px); }
h2 { font-size: clamp(24px, 3.2vw, 38px); }
h3 { font-size: clamp(18px, 2.1vw, 24px); }

p { max-width: 72ch; }

strong, b { font-weight: 800; }

small { font-size: 12px; letter-spacing: .08em; color: var(--smoke); }

code, kbd, samp { font-family: var(--f-num); font-variant-numeric: tabular-nums; }

::selection { background: var(--pitch); color: #fff; }

/* 等宽数字族 */
.num,
.score-num,
.stat-num,
[data-num] {
  font-family: var(--f-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0;
}

/* 标签族 */
.label,
.eyebrow {
  display: inline-block;
  font-family: var(--f-body);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--smoke);
}

.eyebrow {
  color: var(--whistle);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--pitch);
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 220;
  padding: 10px 18px;
  background: var(--whistle);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  transform: translateY(-180%);
  transition: transform var(--dur-2) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  outline-color: var(--ink);
}

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

.wrap--narrow { max-width: 860px; }

.grid { display: grid; gap: clamp(16px, 2.2vw, 32px); }

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

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--ink-line);
  background: transparent;
  color: var(--score);
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .08em;
  text-align: center;
  transition:
    background-color var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease),
    color var(--dur-2) var(--ease);
}

.btn-primary {
  background: var(--pitch);
  border-color: var(--pitch);
  color: #fff;
}

.btn-primary:hover {
  background: var(--whistle);
  border-color: var(--whistle);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--pitch);
  background: rgba(15, 122, 76, .14);
  color: var(--mint);
}

.btn:active { border-color: var(--red); color: var(--red); }

/* ---------- 7. 页头 · 侧边轨道 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 80;
  width: var(--rail-w);
  background: linear-gradient(180deg, #0A0C0B 0%, #0D1A16 52%, #0A0C0B 100%);
  border-right: 1px solid var(--ink-line);
}

.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  padding: 14px 6px 16px;
  gap: 8px;
}

.rail::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(245, 247, 244, .03) 0 10px,
    transparent 10px 20px
  );
}

/* 品牌 */
.brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 2px 14px;
  border-bottom: 1px solid var(--ink-line);
}

.brand-mark {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--pitch) 0 50%, var(--canal) 50% 100%);
  transition: transform var(--dur-2) var(--ease);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid var(--score);
  border-radius: 50%;
}

.brand:hover .brand-mark { transform: rotate(12deg); }

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.brand-name {
  font-family: var(--f-head);
  font-weight: 900;
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: .02em;
  color: var(--score);
}

.brand-tag {
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: .04em;
  color: var(--smoke);
}

/* 抽屉按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--ink-line);
  color: var(--score);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  transition: border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}

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

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bars i {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) linear;
}

.nav-toggle-text { line-height: 1; }

/* 主导航 */
.site-nav {
  position: relative;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-list { display: flex; flex-direction: column; gap: 3px; }

.nav-list a {
  position: relative;
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "tick num"
    "tick lab";
  column-gap: 7px;
  padding: 7px 6px 8px;
  border-left: 2px solid transparent;
  color: var(--smoke);
  transition:
    color var(--dur-1) linear,
    background-color var(--dur-1) linear,
    border-color var(--dur-1) linear;
}

.nav-tick {
  grid-area: tick;
  align-self: center;
  width: 6px;
  height: 6px;
  background: var(--ink-line);
  transition: background-color var(--dur-1) linear;
}

.nav-num {
  grid-area: num;
  font-family: var(--f-num);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .08em;
  color: #4A5651;
  transition: color var(--dur-1) linear;
}

.nav-label {
  grid-area: lab;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}

.nav-list a:hover {
  color: var(--score);
  border-left-color: var(--pitch);
  background: rgba(15, 122, 76, .12);
}

.nav-list a:hover .nav-tick { background: var(--pitch); }

.nav-list a[aria-current="page"] {
  color: var(--score);
  border-left-color: var(--whistle);
  background: linear-gradient(90deg, rgba(242, 194, 48, .16), transparent 86%);
}

.nav-list a[aria-current="page"] .nav-tick { background: var(--whistle); }
.nav-list a[aria-current="page"] .nav-num { color: var(--whistle); }

.nav-list a:active { border-left-color: var(--red); }

/* 轨道底部 · 赛季刻度 */
.rail-meta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--ink-line);
}

.rail-meta-label {
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--smoke);
}

.rail-meta-num {
  font-family: var(--f-num);
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  line-height: 1;
  color: var(--whistle);
}

.rail-progress {
  position: relative;
  width: 8px;
  height: 88px;
  margin: 5px 0 2px;
  border: 1px solid var(--ink-line);
  background-color: rgba(36, 48, 43, .9);
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(245, 247, 244, .22) 0 1px,
    transparent 1px 9px
  );
}

.rail-progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80%;
  background: linear-gradient(to top, var(--pitch), var(--whistle));
}

.rail-round {
  font-family: var(--f-num);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--smoke);
}

.rail-action {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 2px;
  background: var(--pitch);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-align: center;
  transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}

.rail-action:hover { background: var(--whistle); color: var(--ink); }
.rail-action:active { background: var(--red); color: #fff; }

/* 遮罩 */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(10, 12, 11, .76);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2) linear;
}

.site-header[data-open] .nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

.site-nav { z-index: 2; }

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 140px);
  padding: clamp(34px, 5vw, 72px) var(--gutter) 26px;
  background-color: var(--ink);
  background-image: linear-gradient(180deg, #0A0C0B 0%, #0C1614 62%, #103A5C 190%);
  border-top: 1px solid var(--ink-line);
  overflow: hidden;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(245, 247, 244, .02) 0 12px,
    transparent 12px 24px
  );
}

.footer-stripe {
  position: relative;
  z-index: 1;
  height: 6px;
  margin-bottom: clamp(28px, 4.4vw, 60px);
  background: linear-gradient(
    90deg,
    var(--pitch) 0 40%,
    var(--canal) 40% 74%,
    var(--whistle) 74% 100%
  );
}

.footer-grid {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, .68fr));
  gap: clamp(24px, 3.4vw, 56px);
  align-items: start;
}

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; }

.footer-wordmark {
  font-family: var(--f-head);
  font-weight: 900;
  font-size: clamp(34px, 5.4vw, 68px);
  line-height: .94;
  letter-spacing: -.03em;
  color: var(--score);
}

.footer-tag {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--whistle);
}

.footer-lead {
  margin-top: 14px;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--smoke);
}

.footer-actions { margin-top: 20px; }

.footer-col-title {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--score);
}

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

.footer-links a {
  position: relative;
  display: inline-block;
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--smoke);
  transition: color var(--dur-1) linear;
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 1px;
  background: var(--pitch);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-2) var(--ease);
}

.footer-links a:hover { color: var(--score); }
.footer-links a:hover::after { transform: scaleX(1); }
.footer-links a:active { color: var(--red); }

.footer-contact {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: clamp(30px, 4vw, 56px) auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 34px;
  padding: 18px 0;
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  font-size: 13px;
  color: var(--score);
}

.footer-contact-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.footer-contact-label {
  padding: 2px 6px;
  border: 1px solid var(--ink-line);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--smoke);
}

.footer-legal {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--smoke);
}

.footer-legal-icp { font-family: var(--f-body); }

/* ---------- 9. 通用组件 ---------- */
.breadcrumbs {
  padding-block: 16px;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--smoke);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.breadcrumbs li + li::before {
  content: "/";
  color: var(--glass);
}

.breadcrumbs a { transition: color var(--dur-1) linear; }
.breadcrumbs a:hover { color: var(--mint); }
.breadcrumbs [aria-current="page"] { color: var(--score); }

/* 图片容器基础规则 —— 页面阶段在此放 img / svg / .media-fill */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--ink-line);
  background-color: var(--ink-soft);
  background-image:
    repeating-linear-gradient(105deg, rgba(15, 122, 76, .22) 0 14px, rgba(10, 12, 11, .55) 14px 28px),
    linear-gradient(160deg, #0A0C0B, #103A5C);
}

.media-frame::before {
  content: "";
  display: block;
  padding-top: var(--ratio, 62%);
}

.media-frame > img,
.media-frame > svg,
.media-frame > .media-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-fill {
  background-image:
    repeating-linear-gradient(0deg, rgba(245, 247, 244, .05) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 20% 8%, rgba(242, 194, 48, .18), transparent 62%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(245, 247, 244, .05) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  opacity: .7;
}

.media-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 9px 2px 0;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--smoke);
}

/* 滚动进度条（由 JS 注入） */
.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  z-index: 95;
  height: 3px;
  pointer-events: none;
  background: rgba(36, 48, 43, .6);
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--pitch), var(--whistle));
  transition: width 90ms linear;
}

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-lead { max-width: 46ch; }
}

@media (max-width: 960px) {
  :root { --rail-w: 0px; }

  body {
    padding-left: 0;
    padding-top: 64px;
  }

  .site-header {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 64px;
    border-right: 0;
    border-bottom: 1px solid var(--ink-line);
    background: rgba(10, 12, 11, .94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .rail {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 14px;
    gap: 12px;
  }

  .rail::before { display: none; }

  .brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0;
    border-bottom: 0;
  }

  .brand-mark { width: 28px; height: 28px; }
  .brand-mark::after { inset: 7px; border-width: 2px; }

  .brand-text { align-items: flex-start; text-align: left; gap: 1px; }
  .brand-name { font-size: 15px; }
  .brand-tag { font-size: 10px; letter-spacing: .08em; }

  .nav-toggle { display: inline-flex; }

  .rail-meta { display: none; }

  .site-nav {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 2;
    width: min(84vw, 340px);
    padding: 22px 16px 44px;
    background: linear-gradient(180deg, #0A0C0B, #0D1A16);
    border-left: 1px solid var(--ink-line);
    box-shadow: -28px 0 64px rgba(0, 0, 0, .62);
    transform: translateX(103%);
    transition: transform var(--dur-3) var(--ease);
    overflow-y: auto;
  }

  .site-header[data-open] .site-nav { transform: translateX(0); }

  .nav-list { gap: 2px; }

  .nav-list a {
    grid-template-columns: 6px 30px minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "tick num lab";
    align-items: center;
    column-gap: 10px;
    padding: 14px 12px;
    border-left-width: 3px;
  }

  .nav-tick { align-self: center; margin-top: 0; }
  .nav-num { font-size: 11px; }
  .nav-label { font-size: 15px; line-height: 1.45; }

  .scroll-progress { left: 0; }

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

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-brand { grid-column: auto; }
  .footer-wordmark { font-size: clamp(32px, 12vw, 52px); }

  .footer-contact { flex-direction: column; gap: 10px; }

  .footer-legal {
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
  }

  .btn { width: auto; max-width: 100%; }
}

/* ---------- 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;
    scroll-behavior: auto !important;
  }

  .scroll-progress span { transition: none; }
}
