/* ==========================================================================
   博马体育主站 · 共享层  /assets/site.css
   夜场墨绿基底 + 暖黄锚点 + 等宽索引，看台轨道导航
   ========================================================================== */

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

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

body { margin: 0; }

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

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

a { color: inherit; }

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

h1, h2, h3, h4, h5, p, figure { margin: 0; }

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

[hidden] { display: none !important; }

/* ---------- 变量 ---------- */
:root {
  --ink: #07130F;
  --stand: #0C2119;
  --panel: #123328;
  --line: #1E4A38;
  --turf: #2E7D57;
  --lamp: #FFD24A;
  --glow: #FFE9A8;
  --yellow: #F2C21B;
  --red: #E4573D;
  --chalk: #E8F2EC;
  --comment: #93A79C;
  --dim: #5F7A6C;

  --rail: 0px;
  --header-h: 64px;
  --gutter: 20px;
  --max-w: 1120px;

  --font-display: 'Source Han Sans SC', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur: 200ms;
}

@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --rail: 268px; --gutter: 40px; } }

/* ---------- 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--chalk);
  background: var(--ink);
  padding-left: var(--rail);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.prose p { max-width: 34em; }
.prose p + p { margin-top: 14px; }

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

.sep { color: var(--line); margin: 0 8px; }

:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -72px;
  z-index: 99;
  padding: 10px 16px;
  background: var(--lamp);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 0; }

/* ==========================================================================
   头部 · 看台轨道
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 19, 15, .95);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
  padding: 10px var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--chalk);
  min-width: 0;
}

.brand__mark {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #101E16;
  background: var(--lamp);
  border-radius: 6px 14px 6px 14px;
  box-shadow: 0 10px 24px -12px rgba(255, 210, 74, .65);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .01em;
}

.brand__tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--comment);
}

/* 赛季状态 */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--glow);
  background: rgba(46, 125, 87, .16);
  border: 1px solid rgba(46, 125, 87, .5);
  border-radius: 999px;
  white-space: nowrap;
}

.status-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 0 3px rgba(255, 210, 74, .18);
  animation: chip-pulse 2.4s var(--ease) infinite;
}

@keyframes chip-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 210, 74, .18); }
  50% { box-shadow: 0 0 0 6px rgba(255, 210, 74, .04); }
}

/* 移动端菜单按钮 */
.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(18, 51, 40, .75);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--chalk);
  font-size: 13px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.nav-toggle:hover {
  background: rgba(46, 125, 87, .22);
  border-color: var(--turf);
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--lamp);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 导航（移动端抽屉） */
.site-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  z-index: 55;
  max-height: calc(100vh - var(--header-h) - 8px);
  max-height: calc(100dvh - var(--header-h) - 8px);
  overflow-y: auto;
  padding: 16px var(--gutter) 28px;
  background: linear-gradient(180deg, var(--stand) 0%, var(--ink) 94%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 28px 56px -28px rgba(0, 0, 0, .95);
}

.site-nav[data-open] { display: block; }

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

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 6px 18px 6px 18px;
  color: var(--comment);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.nav-link:hover {
  color: var(--chalk);
  background: rgba(46, 125, 87, .16);
}

.nav-link__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--turf);
  transition: color var(--dur) var(--ease);
}

.nav-link__label { min-width: 0; }

.nav-link[aria-current="page"] {
  color: var(--lamp);
  background: rgba(255, 210, 74, .09);
}

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

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 0 3px 3px 0;
  background: var(--lamp);
  transform: translateY(-50%);
  transition: height var(--dur) var(--ease);
}

.nav-link[aria-current="page"]::before { height: 26px; }

/* 主入口 */
.site-header__cta { display: none; }

/* 滚动进度 */
.scroll-meter {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  height: 3px;
  background: rgba(232, 242, 236, .06);
  pointer-events: none;
}

.scroll-meter__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--turf), var(--lamp));
}

@media (max-width: 1023px) {
  .status-chip,
  .site-header__cta { display: none; }
}

/* ---------- 桌面端：左侧看台轨道 ---------- */
@media (min-width: 1024px) {
  .site-header {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--rail);
    border-bottom: 0;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #0C2119 0%, #07130F 82%);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 30px 24px 26px;
    overflow-y: auto;
  }

  .nav-toggle { display: none; }

  .status-chip {
    align-self: flex-start;
    margin-top: 22px;
    white-space: normal;
    line-height: 1.5;
  }

  .site-nav {
    display: block;
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    margin-top: 36px;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .nav-list { gap: 4px; }

  .nav-link {
    padding: 10px 12px 10px 16px;
    border-radius: 6px 20px 6px 20px;
  }

  .site-header__cta {
    display: block;
    margin-top: auto;
    padding-top: 28px;
  }

  .site-header__cta .btn { width: 100%; }
}

/* ==========================================================================
   通用组件
   ========================================================================== */
.shell {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: 56px 0; }
@media (min-width: 768px) { .section { padding: 72px 0; } }
@media (min-width: 1024px) { .section { padding: 96px 0; } }

.section__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 30px;
}

@media (min-width: 1024px) { .section__head { margin-bottom: 40px; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--comment);
}

.eyebrow--lamp { color: var(--lamp); }

.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.24;
  letter-spacing: -.02em;
}

.lede {
  color: var(--comment);
  font-size: 16.5px;
  max-width: 34em;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn--primary {
  background: var(--lamp);
  color: #101E16;
}

.btn--primary:hover {
  background: var(--glow);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--chalk);
  border-color: var(--line);
}

.btn--ghost:hover {
  color: var(--glow);
  border-color: var(--turf);
  background: rgba(46, 125, 87, .18);
}

/* 卡片与徽标 */
.card {
  position: relative;
  padding: 24px;
  background: linear-gradient(160deg, rgba(18, 51, 40, .92), rgba(12, 33, 25, .94));
  border: 1px solid var(--line);
  border-radius: 8px 34px 8px 34px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--comment);
  white-space: nowrap;
}

.badge--lamp { color: var(--lamp); border-color: rgba(255, 210, 74, .5); background: rgba(255, 210, 74, .1); }
.badge--card { color: var(--yellow); border-color: rgba(242, 194, 27, .5); background: rgba(242, 194, 27, .1); }
.badge--red { color: var(--red); border-color: rgba(228, 87, 61, .5); background: rgba(228, 87, 61, .1); }

/* 记分牌数字 */
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat__value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--lamp);
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--comment);
}

/* 图片容器（页面阶段放 <img>） */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px 34px 8px 34px;
  background: linear-gradient(150deg, var(--panel), var(--stand));
  isolation: isolate;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 19, 15, .1) 0%, rgba(7, 19, 15, .72) 100%);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.9) contrast(1.06) brightness(.74);
}

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

.media__cap {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--glow);
}

/* 标签页 */
.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  background: rgba(12, 33, 25, .85);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--comment);
  cursor: pointer;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.tab:hover { color: var(--chalk); }

.tab[aria-selected="true"] {
  background: var(--lamp);
  color: #101E16;
}

.tabpanel { margin-top: 24px; }
.tabpanel[hidden] { display: none !important; }

/* 回到顶部（由 site.js 注入） */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 70;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(18, 51, 40, .94);
  color: var(--lamp);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
              visibility var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover { border-color: var(--lamp); }

@media (min-width: 1024px) {
  .to-top { right: 26px; bottom: 28px; }
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 72px;
  padding: 56px 0 34px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #0B1E17 0%, var(--ink) 72%);
}

@media (min-width: 1024px) {
  .site-footer { margin-top: 96px; padding: 72px 0 40px; }
}

.site-footer__glow {
  position: absolute;
  right: -8%;
  bottom: -42%;
  width: min(620px, 90vw);
  height: 340px;
  pointer-events: none;
  background: radial-gradient(58% 100% at 50% 100%, rgba(46, 125, 87, .34), rgba(46, 125, 87, 0) 72%);
}

.site-footer__top {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 640px) {
  .site-footer__top { grid-template-columns: repeat(3, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .site-footer__top {
    grid-template-columns: 1.7fr repeat(3, 1fr);
    gap: 40px;
  }
  .site-footer__brand { grid-column: auto; }
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 30em;
}

.site-footer__note {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--comment);
  max-width: 40em;
}

.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--comment);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
}

.footer-col__list a {
  color: var(--chalk);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer-col__list a:hover {
  color: var(--lamp);
  border-bottom-color: var(--lamp);
}

.site-footer__meta {
  position: relative;
  display: grid;
  gap: 18px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(30, 74, 56, .75);
}

@media (min-width: 1024px) {
  .site-footer__meta {
    grid-template-columns: 1.35fr 1fr;
    gap: 36px;
    align-items: start;
  }
}

.contact-list {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--comment);
}

.contact-list li {
  display: grid;
  grid-template-columns: 5.6em 1fr;
  gap: 10px;
  align-items: baseline;
}

.contact-list__k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--turf);
}

.contact-list__v { color: var(--chalk); word-break: break-word; }

.site-footer__legal {
  position: relative;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--dim);
}

/* ---------- 无障碍 / 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .status-chip__dot { animation: none; }

  .to-top { transform: none; }
}
