/* ============================================================
   B体育 · 夜间赛场指挥中心 Site Kit
   01 reset · 02 tokens · 03 typography · 04 layout
   05 buttons/tags · 06 header · 07 rail · 08 footer
   09 base components · 10 responsive · 11 a11y
   ============================================================ */

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

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

body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
table { border-collapse: collapse; }

/* ---------- 02 tokens ---------- */
:root {
  --ink: #06110E;
  --panel: #0C1F19;
  --raise: #123329;
  --lime: #C6FF3D;
  --orange: #FF6A2B;
  --ash: #8FA39C;
  --mist: #F2F7F4;
  --white: #FFFFFF;
  --on-lime: #0A1512;
  --line: rgba(242, 247, 244, 0.14);
  --line-soft: rgba(242, 247, 244, 0.08);
  --line-strong: rgba(242, 247, 244, 0.30);

  --rail-w: 88px;
  --head-h: 76px;
  --wrap: 1280px;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;

  --t-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --t-mid: 0.32s cubic-bezier(0.2, 0.7, 0.3, 1);

  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono",
    "IBM Plex Mono", Menlo, Consolas, "Courier New", monospace;
}

/* ---------- 03 typography ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(0deg, rgba(242, 247, 244, 0.024) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, rgba(242, 247, 244, 0.024) 0 1px, transparent 1px 96px);
  background-attachment: fixed;
  color: var(--mist);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: var(--white);
}

h1 { font-size: clamp(34px, 5.4vw, 72px); font-weight: 900; }
h2 { font-size: clamp(26px, 3.4vw, 44px); }
h3 { font-size: clamp(20px, 2.2vw, 28px); }
h4 { font-size: 19px; font-weight: 700; }

p { text-wrap: pretty; }

::selection { background: var(--lime); color: var(--on-lime); }

.prose p { max-width: 68ch; }
.prose p + p { margin-top: 1em; }

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

.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.7;
  color: var(--mist);
}

.muted { color: var(--ash); }

/* ---------- 04 layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 48px);
}

.section {
  --gap: clamp(56px, 8vw, 112px);
  padding-block: var(--gap);
}

.site-main { display: block; }

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

.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.divider-slash {
  display: block;
  height: 2px;
  border: 0;
  background: linear-gradient(90deg, var(--lime), rgba(198, 255, 61, 0) 62%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  opacity: 0.7;
}

/* ---------- 05 buttons / tags ---------- */
.cta-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--lime);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--on-lime);
  background-color: var(--lime);
  background-image: linear-gradient(var(--raise), var(--raise));
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  text-decoration: none;
  white-space: nowrap;
  transition: background-size var(--t-mid), color var(--t-fast), border-color var(--t-fast);
}

.cta-pill:hover,
.cta-pill:focus-visible {
  background-size: 100% 100%;
  color: var(--lime);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--mist);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--t-fast), color var(--t-fast), background-color var(--t-fast);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--lime);
  color: var(--lime);
  background-color: rgba(198, 255, 61, 0.06);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  color: var(--ash);
  white-space: nowrap;
}

.tag--lime {
  color: var(--on-lime);
  background: var(--lime);
  border-color: var(--lime);
}

.tag--warn {
  color: var(--orange);
  background: rgba(255, 106, 43, 0.10);
  border-color: rgba(255, 106, 43, 0.48);
}

/* ---------- 06 header ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  background: var(--lime);
  color: var(--on-lime);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform var(--t-fast);
}

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

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(6, 17, 14, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.head-frame {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
  width: 100%;
  max-width: var(--wrap);
  height: var(--head-h);
  margin-inline: auto;
  padding-inline: clamp(14px, 4vw, 48px);
  transition: height var(--t-mid);
}

.site-head.is-condensed .head-frame { height: 58px; }

/* brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--mist);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--lime);
  color: var(--on-lime);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
  transition: transform var(--t-fast);
}

.brand:hover .brand-mark { transform: translateX(2px); }

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-tag {
  padding: 4px 7px;
  border: 1px solid var(--lime);
  border-radius: 3px;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  white-space: nowrap;
}

/* nav */
.site-nav { margin-left: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: block;
  padding: 9px 13px;
  border-radius: var(--r-sm);
  color: var(--ash);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t-fast), background-color var(--t-fast);
}

.nav-link:hover { color: var(--mist); background: var(--raise); }

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

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
}

.head-cta { flex: 0 0 auto; }

/* toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mist);
  font-size: 13px;
  font-weight: 600;
  transition: border-color var(--t-fast), color var(--t-fast);
}

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

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

.nav-toggle-box span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

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

.nav-toggle-text { letter-spacing: 0.04em; }

/* progress */
.head-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(242, 247, 244, 0.07);
}

.head-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--lime);
}

/* ---------- 07 rail ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: var(--rail-w);
  padding: calc(var(--head-h) + 20px) 0 40px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 31, 25, 0.92), rgba(6, 17, 14, 0.92));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rail-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}

.rail-line {
  width: 1px;
  height: 64px;
  background: linear-gradient(180deg, var(--lime), rgba(198, 255, 61, 0.05));
}

.rail-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  line-height: 1.2;
  color: var(--ash);
  writing-mode: vertical-rl;
  text-orientation: upright;
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
}

/* ---------- 08 footer ---------- */
.site-foot {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(198, 255, 61, 0.07), transparent 58%),
    var(--panel);
  border-top: 1px solid var(--line);
  color: var(--ash);
  font-size: 14.5px;
}

.foot-slash {
  height: 46px;
  background: linear-gradient(90deg, rgba(198, 255, 61, 0.55), rgba(198, 255, 61, 0.04) 58%, transparent 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 6%);
  opacity: 0.8;
}

.foot-board {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(34px, 5vw, 60px) clamp(18px, 4vw, 48px) clamp(30px, 4vw, 48px);
}

.foot-brand { display: grid; gap: 16px; align-content: start; }
.foot-brand .brand-name { font-size: 19px; }

.foot-note {
  max-width: 32ch;
  color: var(--ash);
  font-size: 14px;
  line-height: 1.72;
}

.foot-col { min-width: 0; }

.foot-title {
  margin: 0 0 16px;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.foot-list { display: grid; gap: 10px; }

.foot-list a {
  display: inline-block;
  color: var(--ash);
  font-size: 14.5px;
  line-height: 1.5;
  text-decoration: none;
  transition: color var(--t-fast), transform var(--t-fast);
}

.foot-list a:hover {
  color: var(--lime);
  transform: translateX(3px);
}

.foot-list--plain .foot-meta {
  color: var(--ash);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 18px clamp(18px, 4vw, 48px) 22px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ash);
}

.foot-icp { color: var(--ash); }

.foot-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-left: auto;
}

.foot-legal a {
  color: var(--ash);
  text-decoration: none;
  transition: color var(--t-fast);
}

.foot-legal a:hover { color: var(--lime); }

.foot-slogan {
  padding: 18px clamp(18px, 4vw, 48px) 30px;
  border-top: 1px solid rgba(198, 255, 61, 0.28);
  background: linear-gradient(180deg, rgba(198, 255, 61, 0.05), transparent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  line-height: 1.6;
  color: var(--lime);
}

.foot-slogan span { color: rgba(198, 255, 61, 0.6); }

/* ---------- 09 base components ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--ash);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: 0.45; }

.crumbs a {
  color: var(--ash);
  text-decoration: none;
  transition: color var(--t-fast);
}

.crumbs a:hover { color: var(--lime); }
.crumbs [aria-current="page"] { color: var(--mist); }

.chapter {
  display: flex;
  align-items: flex-start;
  gap: clamp(12px, 2vw, 20px);
  margin-bottom: clamp(22px, 3vw, 34px);
}

.chapter-num {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}

.chapter-kicker {
  margin: 0 0 6px;
  color: var(--ash);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.4;
}

.chapter-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.24;
  color: var(--white);
}

.card {
  position: relative;
  padding: clamp(20px, 2.6vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  transition: border-color var(--t-fast), background-color var(--t-fast);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-top-left-radius: var(--r-md);
}

.card:hover { border-color: var(--line-strong); background: var(--raise); }

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--white);
}

.figure {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(198, 255, 61, 0.14), transparent 62%),
    linear-gradient(158deg, #0C1F19, #06110E 72%);
}

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

.figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(242, 247, 244, 0.06) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(242, 247, 244, 0.06) 0 1px, transparent 1px 26px);
  opacity: 0.55;
}

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

/* ---------- 10 responsive ---------- */
@media (max-width: 1199px) {
  .foot-board {
    grid-template-columns: 1fr 1fr;
    gap: 34px;
  }
}

@media (max-width: 1023px) {
  .rail { display: none; }

  .site-head .head-frame { gap: 10px; }

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

  .head-cta { margin-left: auto; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    margin-left: 0;
    padding: 14px clamp(14px, 4vw, 48px) 24px;
    background: #08150F;
    border-bottom: 1px solid var(--line);
    max-height: calc(100vh - var(--head-h));
    overflow-y: auto;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }

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

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

  .nav-link {
    padding: 14px 12px;
    font-size: 16px;
  }

  .nav-link[aria-current="page"]::after {
    left: 12px;
    right: auto;
    width: 20px;
    bottom: 9px;
  }
}

@media (max-width: 900px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  body { font-size: 16px; }
}

@media (max-width: 720px) {
  .head-frame {
    height: 62px;
  }

  .site-head.is-condensed .head-frame { height: 56px; }

  .brand-mark { width: 30px; height: 30px; font-size: 16px; }
  .brand-name { font-size: 18px; }
  .brand-tag { font-size: 10px; padding: 3px 6px; }

  .head-cta { padding: 9px 15px; font-size: 13px; }

  .foot-board {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 38px;
  }

  .foot-base {
    font-size: 11.5px;
    gap: 8px 16px;
  }

  .foot-legal { margin-left: 0; }
}

@media (max-width: 520px) {
  .brand-tag { display: none; }
  .nav-toggle-text { display: none; }
  .nav-toggle { padding: 9px 11px; }
}

@media (max-width: 380px) {
  .head-cta { display: none; }
}

/* ---------- 11 a11y ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

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

  .head-frame { transition: none; }
  .foot-list a:hover { transform: none; }
  .brand:hover .brand-mark { transform: none; }
}
