/* ============================================================
   博喜体育 / assets/site.css
   框架式导航 · 赛季特刊 · 高原竞技场配色
   ============================================================ */

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

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

body,
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }

ul, ol { padding: 0; }

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

button { font: inherit; color: inherit; }

a { color: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  --sky: #1B6FD1;
  --sky-deep: #1559A8;
  --lake: #0FA3A3;
  --deep: #0A5A66;
  --gold: #F2A93B;
  --ink: #141A1F;
  --gray: #5C6B78;
  --cloud: #F5F8FB;
  --dawn: #E3EFFA;
  --red: #D9533F;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --rail-w: 88px;
  --bar-h: 44px;
  --wrap: 1120px;
  --gutter: clamp(20px, 3.5vw, 48px);
  --notch: 16px;
  --dur: 200ms;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  padding-top: var(--bar-h);
  padding-left: var(--rail-w);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cloud);
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

p { max-width: 34em; }

#main-content:focus { outline: none; }

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

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

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

::selection { background: var(--gold); color: var(--ink); }

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  transform: translateY(-190%);
  display: inline-block;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  background: var(--gold);
  color: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: transform var(--dur) var(--ease);
}

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

/* ---------- 5. 顶部赛季状态条 ---------- */
.season-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 70;
  height: var(--bar-h);
  background: var(--deep);
  color: #fff;
}

.season-bar__inner {
  height: 100%;
  padding: 0 clamp(12px, 2.6vw, 26px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.season-bar__meta {
  margin: 0;
  max-width: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
}

.season-bar__tag {
  font-weight: 700;
  color: var(--gold);
}

.season-bar__tag .mono { color: #fff; }

.season-bar__pulse {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 14%, 100% 100%, 0 86%);
}

.season-bar__state {
  color: rgba(245, 248, 251, .72);
  overflow: hidden;
  text-overflow: ellipsis;
}

.season-bar__progress {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 0;
  background: var(--gold);
}

/* ---------- 6. 左侧框架式导航 ---------- */
.rail {
  position: fixed;
  top: var(--bar-h);
  left: 0; bottom: 0;
  z-index: 65;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--sky);
  border-right: 1px solid rgba(10, 90, 102, .4);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 6px 20px;
  text-decoration: none;
  color: #fff;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 14%, 100% 100%, 0 86%);
}

.brand__text {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .14em;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .34);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle__bars {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 10px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease);
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(4px) rotate(12deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-4px) rotate(-12deg);
}

.nav-toggle__text { letter-spacing: .08em; }

.rail__nav {
  flex: 1 1 auto;
  padding: 0 6px;
  overflow-y: auto;
  overflow-x: hidden;
}

.rail__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail__list a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  color: rgba(255, 255, 255, .8);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.rail__list a::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform var(--dur) var(--ease);
}

.rail__list a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.rail__list a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, .16);
}

.rail__list a[aria-current="page"]::before { transform: scaleY(1); }

.rail__idx {
  font-size: 11px;
  letter-spacing: .16em;
  opacity: .62;
}

.rail__foot {
  margin: auto 0 0;
  padding: 14px 8px 12px;
  max-width: none;
  text-align: center;
}

.rail__foot-label {
  display: block;
  font-size: 10px;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .55);
}

.rail__foot b {
  font-size: 13px;
  color: var(--gold);
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  background: var(--dawn);
  color: var(--ink);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.btn:hover { transform: translateY(-2px); }

.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #ffbb58; }

.btn--sky { background: var(--sky); color: #fff; }
.btn--sky:hover { background: var(--sky-deep); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px rgba(20, 26, 31, .8);
}

.btn--ghost:hover { background: var(--ink); color: #fff; }

.btn--sm { padding: 8px 14px; font-size: 13px; }

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 140px);
  background: var(--deep);
  color: rgba(245, 248, 251, .82);
  font-size: 15px;
}

.footer__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 84px) var(--gutter) clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: clamp(24px, 3.5vw, 56px);
  align-items: start;
}

.footer__brand,
.footer__col { min-width: 0; }

.footer__logo {
  max-width: none;
  margin-bottom: 14px;
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 900;
  letter-spacing: -.01em;
  color: #fff;
}

.footer__logo span { color: var(--gold); }

.footer__desc {
  max-width: 30ch;
  margin-bottom: 18px;
  line-height: 1.7;
}

.footer__icp {
  max-width: none;
  font-size: 13px;
  color: rgba(245, 248, 251, .58);
}

.footer__title {
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--gold);
}

.footer__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__list a {
  text-decoration: none;
  color: rgba(245, 248, 251, .82);
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer__list a:hover {
  color: #fff;
  border-color: var(--gold);
}

.footer__list--plain li {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(245, 248, 251, .72);
}

.footer__bottom {
  border-top: 1px solid rgba(245, 248, 251, .16);
}

.footer__bottom-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 20px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  font-size: 13px;
}

.footer__copy {
  max-width: none;
  margin: 0;
  color: rgba(245, 248, 251, .58);
}

.footer__legal {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.footer__legal a {
  text-decoration: none;
  color: rgba(245, 248, 251, .74);
  transition: color var(--dur) var(--ease);
}

.footer__legal a:hover { color: var(--gold); }

.footer__contour {
  height: 22px;
  background-image: repeating-linear-gradient(
    12deg,
    rgba(242, 169, 59, .45) 0 1px,
    transparent 1px 8px
  );
  border-top: 1px solid rgba(242, 169, 59, .22);
}

/* ---------- 9. 布局容器与网格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--wide { max-width: 1320px; }

.grid {
  display: grid;
  gap: clamp(18px, 2.4vw, 32px);
}

.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, 7fr) minmax(0, 4fr);
  align-items: start;
}

.grid--split-rev {
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  align-items: start;
}

.section { margin-block: clamp(48px, 7vw, 110px); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(24px, 3vw, 44px);
}

/* ---------- 10. 文字组件 ---------- */
.display {
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -.02em;
  color: var(--ink);
}

.display--xl { font-size: clamp(40px, 6.4vw, 72px); }
.display--sm { font-size: clamp(26px, 3.4vw, 40px); }

.display--tilt {
  transform: skewX(-4deg);
  transform-origin: 0 100%;
}

.display em {
  font-style: normal;
  color: var(--sky);
}

.lede {
  font-size: 18px;
  line-height: 1.75;
  color: var(--gray);
  max-width: 34em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--gray);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 3px;
  background: var(--gold);
  transform: skewX(-12deg);
}

.eyebrow--vertical {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: .22em;
}

/* ---------- 11. 面板 ---------- */
.panel {
  position: relative;
  padding: clamp(22px, 2.6vw, 34px);
  background: #fff;
  clip-path: polygon(
    0 0,
    calc(100% - var(--notch)) 0,
    100% var(--notch),
    100% 100%,
    var(--notch) 100%,
    0 calc(100% - var(--notch))
  );
}

.panel--alt { background: var(--dawn); }
.panel--sky { background: var(--sky); color: #fff; }
.panel--lake { background: var(--lake); color: #fff; }
.panel--ink { background: var(--ink); color: #fff; }

.panel--sky .lede,
.panel--lake .lede,
.panel--ink .lede { color: rgba(255, 255, 255, .84); }

.panel--sky .eyebrow,
.panel--lake .eyebrow,
.panel--ink .eyebrow { color: rgba(255, 255, 255, .72); }

/* ---------- 12. 数据组件 ---------- */
.meter {
  position: relative;
  height: 8px;
  background: var(--dawn);
  overflow: hidden;
}

.meter__fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: var(--val, 50%);
  background: linear-gradient(90deg, var(--lake), var(--sky));
}

.meter--gold .meter__fill {
  background: linear-gradient(90deg, var(--gold), var(--red));
}

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

.stat__num {
  font-family: var(--font-mono);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700;
  line-height: 1;
  color: var(--sky);
}

.stat__label {
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--gray);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  text-align: left;
}

.rank-table th {
  padding: 0 10px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--gray);
  border-bottom: 1px solid rgba(92, 107, 120, .3);
}

.rank-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(92, 107, 120, .14);
  vertical-align: middle;
}

.rank-table td.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.rank-table tbody tr { transition: background var(--dur) var(--ease); }
.rank-table tbody tr:hover { background: var(--dawn); }

/* ---------- 13. 标签与面包屑 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  background: var(--dawn);
  color: var(--deep);
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%, 0 6px);
}

.tag--live { background: rgba(217, 83, 63, .14); color: var(--red); }
.tag--gold { background: rgba(242, 169, 59, .2); color: #8A5A00; }

.breadcrumb {
  font-size: 13px;
  color: var(--gray);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.breadcrumb li + li::before {
  content: "/";
  color: rgba(92, 107, 120, .5);
}

.breadcrumb a {
  text-decoration: none;
  border-bottom: 1px solid rgba(92, 107, 120, .32);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.breadcrumb a:hover {
  color: var(--sky);
  border-color: var(--sky);
}

/* ---------- 14. 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky) 0%, var(--lake) 100%);
  clip-path: polygon(
    0 0,
    calc(100% - 18px) 0,
    100% 18px,
    100% 100%,
    0 100%
  );
}

.media img,
.media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--3x2 { aspect-ratio: 3 / 2; }
.media--wide { aspect-ratio: 21 / 9; }

.media--terrain {
  background-image:
    repeating-linear-gradient(12deg, rgba(255, 255, 255, .1) 0 1px, transparent 1px 12px),
    linear-gradient(135deg, var(--sky) 0%, var(--lake) 100%);
}

.media__caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 5px 11px;
  font-size: 12px;
  letter-spacing: .15em;
  color: #fff;
  background: rgba(10, 90, 102, .74);
}

/* ---------- 15. 显现动效 ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}

.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

/* ---------- 16. 响应式 ---------- */
@media (max-width: 1040px) {
  .grid--split,
  .grid--split-rev { grid-template-columns: minmax(0, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__inner { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer__col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --bar-h: 40px; }

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

  .rail {
    top: auto;
    bottom: 0;
    left: 0; right: 0;
    width: auto;
    height: 64px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-right: 0;
    border-top: 2px solid var(--gold);
  }

  .brand {
    flex-direction: row;
    gap: 10px;
    padding: 0;
  }

  .brand__mark { width: 26px; height: 26px; }

  .brand__text {
    writing-mode: horizontal-tb;
    font-size: 15px;
    letter-spacing: .06em;
  }

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

  .rail__nav {
    position: fixed;
    left: 0; right: 0;
    bottom: 64px;
    max-height: 70vh;
    padding: 12px 12px 16px;
    background: var(--sky);
    border-top: 1px solid rgba(255, 255, 255, .22);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(110%);
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
  }

  .rail__nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

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

  .rail__list a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    font-size: 14px;
    background: rgba(255, 255, 255, .09);
  }

  .rail__list a::before {
    top: 0; bottom: 0;
    width: 3px;
  }

  .rail__foot { display: none; }
}

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

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

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

  .season-bar__state { display: none; }
  .season-bar__meta { gap: 9px; }

  .footer__inner { grid-template-columns: minmax(0, 1fr); }
  .footer__col:last-child { grid-column: auto; }

  .footer__bottom-inner { justify-content: flex-start; }
}

/* ---------- 17. 降低动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

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

  .btn:hover,
  .skip-link:focus { transform: none; }
}
