/* ============================================================
   BSPORTS体育 — /assets/site.css
   共享外壳：重置 / 变量 / 排版 / 头部 / 页脚 / 通用组件
   设计语汇：高原夜空深蓝底、青绿索引、信号橙重点、纸张叠层
   ============================================================ */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal-mist); outline-offset: 3px; border-radius: 1px; }
::selection { background: rgba(22, 184, 166, 0.35); color: #ffffff; }

/* ---------- 2. Tokens ---------- */
:root {
  --night: #071A2B;
  --night-2: #0D2638;
  --teal: #16B8A6;
  --teal-mist: #9BE8DD;
  --salt: #F5F8F4;
  --signal: #FF6B2C;
  --graphite: #3A4247;
  --haze: #8CA0AD;
  --paper: #E8E2D4;
  --deep-teal: #0E5C5A;

  --font-heading: "Source Han Sans SC", "Noto Sans SC", sans-serif;
  --font-body: "Inter", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  --font-display: "Fraunces", "Newsreader", Georgia, serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", monospace;

  --shell: min(1320px, 92vw);
  --gutter: clamp(16px, 3vw, 40px);
  --header-h: 78px;
  --hairline: rgba(140, 160, 173, 0.26);
  --hairline-strong: rgba(22, 184, 166, 0.45);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --radius: 2px;
}

/* ---------- 3. Base typography ---------- */
body {
  background-color: var(--night);
  background-image:
    radial-gradient(80% 62% at 10% -12%, rgba(22, 184, 166, 0.16), transparent 62%),
    radial-gradient(66% 54% at 98% 2%, rgba(255, 107, 44, 0.08), transparent 60%),
    linear-gradient(180deg, #071A2B 0%, #061624 58%, #071A2B 100%);
  color: var(--salt);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: inherit;
}
h1 { font-size: clamp(36px, 5vw, 64px); }
h2 { font-size: clamp(28px, 3.2vw, 42px); }
h3 { font-size: clamp(20px, 2vw, 26px); }

/* ---------- 4. Layout helpers ---------- */
.shell { width: var(--shell); margin-inline: auto; }

.section {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px);
}

.section--graphite {
  background: linear-gradient(180deg, #3A4247 0%, #333A3F 100%);
  color: var(--paper);
}
.section--graphite .eyebrow { color: var(--teal-mist); }

.surface-paper {
  background: var(--paper);
  color: #20282B;
}
.surface-paper a { color: var(--deep-teal); }
.surface-paper .coord,
.surface-paper .eyebrow { color: var(--deep-teal); }

.grid { display: grid; gap: var(--gutter); }
.grid-2 { display: grid; gap: var(--gutter); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: var(--gutter); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: var(--gutter); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; gap: var(--gutter); grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; }

/* ---------- 5. Small components ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--signal);
  color: #120803;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  border-radius: var(--radius);
  transition: top 0.2s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { top: 12px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-mist);
}

.coord {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--haze);
}

.display-number {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(64px, 9vw, 132px);
  line-height: 0.86;
  letter-spacing: -0.02em;
  color: var(--salt);
  font-variant-numeric: lining-nums tabular-nums;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--hairline);
  border-radius: 1px;
  background: rgba(22, 184, 166, 0.07);
  color: var(--teal-mist);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag-signal {
  border-color: rgba(255, 107, 44, 0.5);
  background: rgba(255, 107, 44, 0.12);
  color: #FFB896;
}
.tag-paper {
  border-color: rgba(32, 40, 43, 0.24);
  background: rgba(255, 255, 255, 0.55);
  color: var(--deep-teal);
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}
.btn-signal {
  background: var(--signal);
  color: #120803;
  box-shadow: 0 12px 26px -18px rgba(255, 107, 44, 0.9);
}
.btn-signal:hover {
  background: #ff8149;
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -18px rgba(255, 107, 44, 0.95);
}
.btn-ghost {
  background: transparent;
  border-color: rgba(245, 248, 244, 0.3);
  color: var(--salt);
}
.btn-ghost:hover {
  border-color: var(--teal-mist);
  background: rgba(22, 184, 166, 0.12);
  color: var(--teal-mist);
}

/* ---------- 7. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: linear-gradient(180deg, rgba(7, 26, 43, 0.97) 0%, rgba(7, 26, 43, 0.9) 100%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}
.site-header[data-scrolled="true"] {
  border-bottom-color: var(--hairline-strong);
  box-shadow: 0 22px 44px -32px rgba(0, 0, 0, 0.95);
}

.header-rail {
  display: flex;
  align-items: center;
  gap: 16px;
  width: var(--shell);
  margin-inline: auto;
  height: 28px;
  overflow: hidden;
  border-bottom: 1px solid rgba(140, 160, 173, 0.14);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--haze);
  transition: height 0.28s var(--ease), opacity 0.2s var(--ease),
              border-color 0.28s var(--ease);
}
.site-header[data-scrolled="true"] .header-rail {
  height: 0;
  opacity: 0;
  border-bottom-color: transparent;
}
.rail-tag { color: var(--teal-mist); white-space: nowrap; }
.rail-line {
  flex: 1 1 auto;
  height: 1px;
  min-width: 24px;
  background: repeating-linear-gradient(90deg, rgba(140, 160, 173, 0.5) 0 1px, transparent 1px 8px);
}
.rail-coord { white-space: nowrap; }

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: var(--shell);
  margin-inline: auto;
  min-height: var(--header-h);
  padding-block: 10px;
  transition: min-height 0.28s var(--ease);
}
.site-header[data-scrolled="true"] .header-bar { min-height: 62px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(22, 184, 166, 0.3), rgba(22, 184, 166, 0) 66%);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.brand-mark-dot {
  width: 10px;
  height: 10px;
  background: var(--signal);
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(255, 107, 44, 0.14);
}
.brand:hover .brand-mark {
  border-color: var(--teal-mist);
  background: linear-gradient(150deg, rgba(22, 184, 166, 0.45), rgba(22, 184, 166, 0) 66%);
}
.brand-text { display: flex; flex-direction: column; gap: 4px; line-height: 1; min-width: 0; }
.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--salt);
  white-space: nowrap;
}
.brand-line {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--haze);
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
}
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 26px);
}
.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 2px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(245, 248, 244, 0.78);
  transition: color 0.2s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s var(--ease), background-color 0.2s var(--ease);
}
.nav-link:hover { color: var(--salt); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--teal-mist); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); background: var(--teal); }
.nav-cta { flex: 0 0 auto; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--salt);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-toggle:hover {
  border-color: var(--teal);
  background: rgba(22, 184, 166, 0.1);
}
.nav-toggle-bars { display: grid; gap: 4px; width: 18px; }
.nav-toggle-bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.24s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(5.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(-5.5px) rotate(-45deg); }
.nav-toggle-label { display: inline-block; }

/* ---------- 8. Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--night-2);
  border-top: 1px solid var(--hairline);
}
.footer-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 92% at 86% 0%, rgba(22, 184, 166, 0.2), transparent 62%),
    radial-gradient(52% 80% at 4% 100%, rgba(255, 107, 44, 0.1), transparent 66%);
}
.footer-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.66fr) minmax(0, 0.66fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(44px, 6vw, 80px) clamp(30px, 4vw, 48px);
}
.footer-brand { max-width: 36ch; }
.brand--footer .brand-name { font-size: 18px; }
.footer-intro {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.72;
  color: rgba(245, 248, 244, 0.74);
}
.footer-note {
  margin-top: 14px;
  padding-left: 12px;
  border-left: 2px solid var(--signal);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--haze);
}
.footer-col-title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-mist);
}
.footer-links { display: grid; gap: 10px; }
.footer-links a {
  display: inline-block;
  font-size: 14px;
  color: rgba(245, 248, 244, 0.78);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer-links a:hover { color: var(--salt); border-bottom-color: var(--teal); }

.contact-list { display: grid; gap: 14px; }
.contact-row { display: grid; gap: 4px; }
.contact-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--haze);
}
.contact-value {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 248, 244, 0.88);
  overflow-wrap: anywhere;
}

.footer-legal {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  padding-block: 20px 28px;
  border-top: 1px solid rgba(140, 160, 173, 0.18);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--haze);
}
.legal-copy { margin: 0; }
.legal-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.legal-links a {
  color: var(--haze);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.legal-links a:hover { color: var(--teal-mist); border-bottom-color: var(--teal-mist); }
.foot-top {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 1px;
  color: var(--salt);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease),
              background-color 0.2s var(--ease);
}
.foot-top:hover {
  border-color: var(--teal);
  background: rgba(22, 184, 166, 0.1);
  color: var(--teal-mist);
}

/* ---------- 9. Breadcrumb / prose ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--haze);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before {
  content: "/";
  color: rgba(140, 160, 173, 0.6);
}
.breadcrumb li[aria-current="page"] { color: var(--salt); }
.breadcrumb a {
  color: var(--haze);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.breadcrumb a:hover { color: var(--teal-mist); border-bottom-color: currentColor; }

.prose {
  max-width: 68ch;
  font-size: clamp(16px, 1.05vw, 17px);
  line-height: 1.78;
  color: rgba(245, 248, 244, 0.86);
}
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { margin-top: 2em; color: var(--salt); }
.prose a {
  color: var(--teal-mist);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.surface-paper .prose { color: #26302F; }
.surface-paper .prose h2,
.surface-paper .prose h3 { color: #16201F; }
.prose ul { list-style: disc; padding-left: 1.3em; }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote {
  margin-inline: 0;
  padding: 12px 0 12px 18px;
  border-left: 2px solid var(--teal);
  font-family: var(--font-display);
  font-size: 1.1em;
  color: var(--salt);
}

/* ---------- 10. Media containers ---------- */
.media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: linear-gradient(160deg, #0D2638 0%, #071A2B 100%);
}
.media > img,
.media > picture > img,
.media > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }
.media-frame {
  padding: 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: rgba(13, 38, 56, 0.5);
}
.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--haze);
}

/* ---------- 11. Legend ---------- */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--haze);
}
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 1px;
  background: var(--teal);
  flex: 0 0 auto;
}
.legend-swatch--signal { background: var(--signal); }
.legend-swatch--paper { background: var(--paper); }

/* ---------- 12. Reveal & progress ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: calc(var(--reveal-delay, 0) * 70ms);
}
html.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 320;
  pointer-events: none;
}
.scroll-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--teal) 0%, var(--signal) 100%);
}

/* ---------- 13. Responsive ---------- */
@media (max-width: 1200px) {
  .nav-link { font-size: 13px; }
  .primary-nav { gap: 16px; }
  .nav-list { gap: 14px; }
}

@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }

  .primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 var(--gutter);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    background: linear-gradient(180deg, #0B2434 0%, #071A2B 72%);
    border-bottom: 1px solid var(--hairline-strong);
    box-shadow: 0 34px 60px -34px rgba(0, 0, 0, 0.95);
    transition: max-height 0.34s var(--ease), opacity 0.22s var(--ease),
                padding 0.34s var(--ease), visibility 0.22s linear;
  }
  .primary-nav[data-open="true"] {
    max-height: 82vh;
    opacity: 1;
    visibility: visible;
    padding: 8px var(--gutter) 20px;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .nav-list li + li { border-top: 1px solid rgba(140, 160, 173, 0.14); }
  .nav-link {
    display: block;
    padding: 14px 4px;
    font-size: 16px;
  }
  .nav-link::after {
    left: 4px;
    right: auto;
    width: 26px;
    bottom: 6px;
  }
  .nav-link[aria-current="page"] {
    color: var(--teal-mist);
    background: rgba(22, 184, 166, 0.08);
  }
  .nav-cta {
    margin-top: 18px;
    width: 100%;
  }

  .split { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { max-width: none; }
}

@media (max-width: 720px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .header-rail { display: none; }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 14px; }
  .foot-top { margin-left: 0; }
}

@media (max-width: 560px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .brand-name { font-size: 17px; }
  .brand-line { font-size: 9px; letter-spacing: 0.12em; }
  .nav-toggle-label { display: none; }
  .nav-toggle { padding: 11px 12px; }
}

/* ---------- 14. Motion preferences ---------- */
@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;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
  .site-header[data-scrolled="true"] .header-rail { height: 0; opacity: 0; }
  .btn-signal:hover { transform: none; }
}
