/* ==========================================================================
   九体育 · 共享样式表 /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 { margin: 0; }

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; padding: 0; }

ul, ol { list-style: none; }

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid #5CF2B4;
  outline-offset: 3px;
}

/* ---------- 2. 变量 ---------- */
:root {
  --ink-900: #07120F;
  --ink-800: #0B1F1A;
  --ink-700: #122B24;
  --paper: #F4EEDF;
  --mint: #5CF2B4;
  --cinnabar: #C8402B;
  --mist: #A9D8C8;
  --graphite: #8FA39B;
  --amber: #D9A24A;
  --white: #FFFFFF;

  --line: rgba(169, 216, 200, .18);
  --line-strong: rgba(169, 216, 200, .34);

  --r-xl: 28px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;

  --fs-caption: 13px;
  --fs-small: 15px;
  --fs-body: 18px;
  --fs-h3: 24px;
  --fs-h2: 34px;
  --fs-h1: 52px;
  --fs-display: 96px;

  --font-head: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Roboto Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --rail-w: 248px;
  --topbar-h: 68px;
  --gutter: clamp(16px, 4vw, 48px);
  --shell-max: 1240px;
  --shadow-1: 0 30px 70px -46px rgba(0, 0, 0, .95);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background:
    radial-gradient(1100px 560px at 88% -8%, rgba(92, 242, 180, .10), transparent 62%),
    radial-gradient(900px 520px at -4% 6%, rgba(200, 64, 43, .09), transparent 58%),
    var(--ink-800);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--topbar-h);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.14;
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 5vw, var(--fs-h1)); }
h2 { font-size: clamp(24px, 3.4vw, var(--fs-h2)); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-small); letter-spacing: .08em; }

p { text-wrap: pretty; }

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

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

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

.section {
  padding-block: clamp(36px, 6vw, 84px);
}

.prose {
  max-width: 68ch;
}

.prose p { margin-bottom: 1.05em; }
.prose p:last-child { margin-bottom: 0; }

.prose a,
.prose strong { color: var(--mint); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mist);
}

.lede {
  font-size: clamp(18px, 2.2vw, var(--fs-h3));
  line-height: 1.6;
  color: var(--paper);
  max-width: 46ch;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -.01em;
}

.num--score {
  display: block;
  font-size: clamp(48px, 9vw, var(--fs-display));
  line-height: .9;
  color: var(--mint);
}

/* ---------- 5. 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.grid--split,
.grid--halves {
  grid-template-columns: 1fr;
}

/* ---------- 6. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--ink-900);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .02em;
  transform: translateY(-180%);
  transition: transform .18s ease;
}

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

/* ---------- 7. 头部：移动端顶栏 ---------- */
.site-header {
  position: fixed;
  z-index: 120;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--topbar-h);
  padding: 10px var(--gutter);
  background: linear-gradient(180deg, rgba(11, 31, 26, .985), rgba(7, 18, 15, .965));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand-rail {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--ink-700), var(--ink-900));
  border: 1px solid var(--line-strong);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: var(--fs-h3);
  line-height: 1;
  color: var(--paper);
}

.brand__mark::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cinnabar);
  box-shadow: 0 0 0 3px var(--ink-800);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: var(--fs-body);
  line-height: 1.15;
  letter-spacing: .02em;
  color: var(--paper);
}

.brand__sub {
  font-size: var(--fs-caption);
  line-height: 1.2;
  letter-spacing: .06em;
  color: var(--graphite);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail__ticker {
  display: none;
  font-size: var(--fs-caption);
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--graphite);
}

.rail__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--mint);
  vertical-align: middle;
  animation: dot-pulse 2.6s ease-out infinite;
}

@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(92, 242, 180, .55); }
  70% { box-shadow: 0 0 0 10px rgba(92, 242, 180, 0); }
  100% { box-shadow: 0 0 0 0 rgba(92, 242, 180, 0); }
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.nav-bar__label { display: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(18, 43, 36, .92);
  color: var(--paper);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .04em;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

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

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 18px;
}

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

.site-header[data-open] .nav-toggle__bars span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.site-header[data-open] .nav-toggle__bars span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.nav-toggle__text {
  line-height: 1;
}

/* ---------- 8. 头部：导航本体（移动端为底部胶囊） ---------- */
.site-nav {
  position: fixed;
  z-index: 3;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  max-height: calc(100dvh - 110px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 26px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--ink-700), var(--ink-900));
  box-shadow: 0 36px 70px -30px rgba(0, 0, 0, .95);
  transform: translateY(calc(100% + 28px));
  opacity: 0;
  visibility: hidden;
  transition: transform .28s cubic-bezier(.2, .8, .25, 1), opacity .2s ease, visibility .2s;
}

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

.site-nav__list {
  display: grid;
  gap: 2px;
}

.site-nav__item {
  list-style: none;
}

.site-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--paper);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.site-nav__link:hover {
  background: rgba(92, 242, 180, .08);
  color: var(--mint);
}

.site-nav__link[aria-current="page"] {
  background: rgba(92, 242, 180, .13);
  border-color: rgba(92, 242, 180, .42);
  color: var(--mint);
}

.site-nav__idx {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--graphite);
}

.site-nav__link[aria-current="page"] .site-nav__idx {
  color: var(--mint);
}

.site-nav__cta {
  width: 100%;
}

/* ---------- 9. 滚动进度 ---------- */
.rail-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(169, 216, 200, .12);
  overflow: hidden;
}

.rail-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--mint), var(--amber));
  transition: transform .12s linear;
}

/* ---------- 10. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.3;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

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

.btn--mint {
  background: var(--mint);
  color: var(--ink-900);
}

.btn--mint:hover { background: #7CF7C8; }

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

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

.btn--paper {
  background: var(--paper);
  color: var(--ink-900);
}

.btn--paper:hover { background: #FFFFFF; }

.btn--stamp {
  background: var(--cinnabar);
  color: var(--paper);
}

.btn--stamp:hover { background: #DE5138; }

/* ---------- 11. 堆叠画板 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3.4vw, 40px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 43, 36, .96), rgba(11, 31, 26, .96));
  box-shadow: var(--shadow-1);
}

.panel--paper {
  background: var(--paper);
  border-color: rgba(11, 31, 26, .14);
  color: var(--ink-900);
}

.panel--paper .panel__title { color: var(--ink-900); }
.panel--paper .panel__index {
  border-color: rgba(200, 64, 43, .5);
  color: var(--cinnabar);
}

.panel--lift { transform: translateY(-8px); }

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 18px;
}

.panel__index {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(92, 242, 180, .45);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: .16em;
  color: var(--mint);
}

.panel__title {
  font-size: clamp(24px, 3.2vw, var(--fs-h2));
}

.panel__body {
  display: grid;
  gap: 16px;
}

/* ---------- 12. 印章 ---------- */
.seal {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 4px;
  border-radius: 14px;
  border: 2px solid rgba(200, 64, 43, .8);
  color: var(--cinnabar);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: var(--fs-small);
  line-height: 1.1;
  letter-spacing: .08em;
  text-align: center;
  transform: rotate(-6deg);
}

/* ---------- 13. 胶囊筛选 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(18, 43, 36, .8);
  color: var(--paper);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: .02em;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.chip:hover {
  border-color: var(--mint);
  color: var(--mint);
}

.chip.is-active,
.chip[aria-pressed="true"] {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--ink-900);
}

/* ---------- 14. 分段切换 ---------- */
.tabs {
  display: block;
}

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(7, 18, 15, .72);
}

.tab {
  padding: 9px 20px;
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--graphite);
  transition: background .2s ease, color .2s ease;
}

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

.tab.is-active,
.tab[aria-selected="true"] {
  background: var(--mint);
  color: var(--ink-900);
}

.tabpanel {
  padding-top: 20px;
  animation: tab-in .2s ease both;
}

.tabpanel[hidden] { display: none; }

@keyframes tab-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 15. 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-caption);
  letter-spacing: .04em;
  color: var(--graphite);
}

.crumbs__link {
  color: var(--graphite);
  transition: color .18s ease;
}

.crumbs__link:hover { color: var(--mint); }

.crumbs__sep { color: rgba(169, 216, 200, .5); }

.crumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 16. 图片容器 ---------- */
.figure {
  display: grid;
  gap: 10px;
  margin: 0;
}

.figure__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, #123028 0%, #0A1A16 58%, #16352B 100%);
}

.figure__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__media--portrait { aspect-ratio: 3 / 4; }
.figure__media--square { aspect-ratio: 1 / 1; }

.figure__caption {
  font-size: var(--fs-caption);
  letter-spacing: .04em;
  color: var(--graphite);
}

/* ---------- 17. 入场显现 ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
}

.has-js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity .4s ease, transform .4s cubic-bezier(.2, .8, .25, 1);
}

/* ---------- 18. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  padding-block: clamp(36px, 6vw, 72px) 28px;
  border-top: 1px solid var(--line);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: linear-gradient(180deg, var(--ink-900), #050C0A);
}

.site-footer__inner {
  display: grid;
  gap: clamp(26px, 4vw, 44px);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3.4vw, 40px);
}

.footer__brand { max-width: 42ch; }

.footer__wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: var(--fs-h3);
  letter-spacing: -.01em;
  color: var(--paper);
}

.footer__glyph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(92, 242, 180, .4);
  background: rgba(92, 242, 180, .12);
  color: var(--mint);
  font-size: var(--fs-body);
}

.footer__tagline {
  margin-top: 10px;
  font-size: var(--fs-small);
  letter-spacing: .04em;
  color: var(--paper);
}

.footer__note {
  margin-top: 10px;
  font-size: var(--fs-caption);
  line-height: 1.7;
  color: var(--graphite);
}

.footer__col-title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--mist);
}

.footer__list {
  display: grid;
  gap: 9px;
}

.footer__link {
  font-size: var(--fs-small);
  color: var(--graphite);
  transition: color .18s ease;
}

.footer__link:hover { color: var(--mint); }

.footer__contact {
  padding-top: clamp(20px, 3vw, 30px);
  border-top: 1px solid var(--line);
}

.footer__list--contact {
  grid-template-columns: 1fr;
  gap: 8px;
}

.footer__contact-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--graphite);
}

.footer__contact-line::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: .72em;
  border-radius: 50%;
  background: var(--cinnabar);
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-caption);
  letter-spacing: .04em;
  color: var(--graphite);
}

.footer__icp {
  font-family: var(--font-mono);
  letter-spacing: .06em;
}

.footer__copy {
  font-family: var(--font-mono);
  letter-spacing: .06em;
}

.footer__seal {
  position: absolute;
  top: -30px;
  right: var(--gutter);
  background: var(--ink-900);
}

/* ---------- 19. 平板 ---------- */
@media (min-width: 720px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

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

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

/* ---------- 20. 桌面：框架式侧栏 ---------- */
@media (min-width: 900px) {
  body {
    padding-top: 0;
    padding-left: var(--rail-w);
  }

  #main-content { scroll-margin-top: 16px; }

  .site-header {
    inset: 0 auto 0 0;
    width: var(--rail-w);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 22px;
    min-height: 0;
    padding: 26px 20px 22px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }

  .brand-rail {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .brand__sub { white-space: normal; }

  .rail__ticker {
    display: block;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .nav-bar {
    display: block;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }

  .nav-bar__label {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--fs-caption);
    letter-spacing: .2em;
    color: var(--graphite);
  }

  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    z-index: auto;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 1 1 auto;
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: none;
  }

  .site-nav__link {
    padding: 9px 10px;
    border-radius: 12px;
    font-size: var(--fs-small);
  }

  .site-nav__cta {
    margin-top: 14px;
  }

  .grid--split { grid-template-columns: 7fr 5fr; }
  .grid--halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .footer__grid {
    grid-template-columns: 1.5fr .7fr .7fr .7fr;
  }

  .footer__brand {
    grid-column: auto;
  }
}

/* ---------- 21. 窄屏微调 ---------- */
@media (max-width: 379px) {
  .brand__sub { display: none; }
  .footer__seal { width: 52px; height: 52px; top: 16px; right: 16px; }
}

/* ---------- 22. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .rail__dot { animation: none; }
}
