/* ==========================================================================
   博马体育 · 共享站点样式  /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; }

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

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

a { color: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 品牌色 */
  --ink: #0A1A2F;
  --ink-deep: #05101E;
  --graphite: #16233A;
  --signal: #C8FF4D;
  --signal-soft: #E9FFB8;
  --amber: #FF9F2E;
  --ice: #5FD4FF;
  --paper: #F5F8FC;
  --slate: #56657D;
  --mint: #DCE6F2;

  /* 字体 */
  --font-head: "Archivo Black", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 形状 */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* 版式 */
  --shell: 1240px;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 78px;

  /* 动效 */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --shadow-card: 0 18px 48px -24px rgba(5, 16, 30, .55);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

strong, b { font-weight: 700; }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--ice);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 4. 布局工具 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 300;
  padding: 11px 22px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--signal);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transform: translate(-50%, -160%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ---------- 6. 页头 / 命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(10, 26, 47, .94);
  color: var(--paper);
  border-bottom: 1px solid rgba(200, 255, 77, .16);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  min-height: var(--header-h);
  padding-block: 12px;
  transition: min-height 240ms var(--ease), padding 240ms var(--ease);
}

.site-header.is-condensed .site-header__inner {
  min-height: 60px;
  padding-block: 7px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
}

.brand__mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(150deg, var(--signal) 0%, #9BE01F 100%);
  box-shadow: 0 0 0 1px rgba(200, 255, 77, .45), 0 10px 22px -12px rgba(200, 255, 77, .95);
}

.brand__mark::before {
  content: "";
  width: 17px;
  height: 17px;
  border: 3px solid var(--ink);
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-38deg);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.01em;
  color: var(--paper);
}

.brand__tagline {
  max-height: 20px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(245, 248, 252, .55);
  transition: opacity 200ms var(--ease), max-height 200ms var(--ease);
}

.site-header.is-condensed .brand__tagline {
  opacity: 0;
  max-height: 0;
}

/* 主导航 */
.site-nav { min-width: 0; }

.site-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 2px;
  min-width: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 9px 13px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: rgba(245, 248, 252, .7);
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}

.site-nav__link:hover {
  color: var(--paper);
  background: rgba(200, 255, 77, .12);
}

.site-nav__link[aria-current="page"] {
  color: var(--ink);
  background: var(--signal);
  font-weight: 800;
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--signal);
  transform: translateX(-50%);
}

/* 右侧动作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(245, 248, 252, .07);
  border: 1px solid rgba(245, 248, 252, .14);
}

.device-switch__item {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-decoration: none;
  color: rgba(245, 248, 252, .66);
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

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

.device-switch__item.is-active {
  background: var(--ice);
  color: var(--ink);
  font-weight: 700;
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(245, 248, 252, .22);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}

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

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

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 200ms var(--ease);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { bottom: 0; }

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

.nav-toggle__label { letter-spacing: .02em; }

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ice) 0%, var(--signal) 100%);
  transition: width 90ms linear;
  pointer-events: none;
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease),
              color 160ms var(--ease), border-color 160ms var(--ease);
}

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

.btn--signal {
  background: var(--signal);
  color: var(--ink);
  box-shadow: 0 12px 28px -16px rgba(200, 255, 77, .95);
}

.btn--signal:hover { background: var(--signal-soft); }

.btn--ghost {
  background: transparent;
  border-color: rgba(245, 248, 252, .3);
  color: var(--paper);
}

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

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

.btn--dark:hover { background: var(--graphite); }

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink-deep);
  color: rgba(245, 248, 252, .68);
  border-top: 1px solid rgba(95, 212, 255, .18);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(95, 212, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 212, 255, .06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .95), transparent 78%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .95), transparent 78%);
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(44px, 6.5vw, 76px) 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.45fr);
  gap: clamp(28px, 4vw, 48px);
}

.brand--footer { color: var(--paper); }

.brand--footer .brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.brand--footer .brand__mark::before {
  width: 15px;
  height: 15px;
  border-width: 2.5px;
}

.footer-brand__note {
  max-width: 34ch;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(245, 248, 252, .55);
}

.footer-col__title {
  margin-bottom: 15px;
  padding-left: 10px;
  border-left: 2px solid var(--signal);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--signal);
}

.footer-col__list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col__list a {
  display: inline-block;
  font-size: 14.5px;
  color: rgba(245, 248, 252, .68);
  text-decoration: none;
  transition: color 140ms var(--ease), transform 140ms var(--ease);
}

.footer-col__list a:hover {
  color: var(--signal);
  transform: translateX(3px);
}

.footer-contact {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-contact li { display: grid; gap: 2px; }

.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(245, 248, 252, .4);
}

.footer-contact__value {
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-contact__note {
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(245, 248, 252, .45);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(34px, 5vw, 56px);
  padding-top: 20px;
  border-top: 1px solid rgba(245, 248, 252, .12);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: rgba(245, 248, 252, .42);
}

.footer-bottom__copy { color: rgba(245, 248, 252, .58); }

/* 返回顶部 */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 130;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--signal);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  box-shadow: 0 16px 32px -16px rgba(200, 255, 77, .95);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 200ms;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover { background: var(--signal-soft); }

/* ---------- 9. 章节与标题 ---------- */
.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(30px, 4vw, 56px); }

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-style: normal;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--slate);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--signal);
}

.section--ink .eyebrow { color: rgba(245, 248, 252, .6); }

.display-title {
  margin-top: 12px;
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1.06;
  letter-spacing: -.03em;
}

.lede {
  max-width: 62ch;
  margin-top: 16px;
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.85;
  color: var(--slate);
}

.section--ink .lede { color: rgba(245, 248, 252, .66); }

.divider {
  height: 1px;
  margin-block: clamp(26px, 4vw, 46px);
  border: 0;
  background: var(--mint);
}

.section--ink .divider { background: rgba(245, 248, 252, .14); }

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(86, 101, 125, .9);
}

.breadcrumb a {
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(10, 26, 47, .22);
  color: var(--ink);
  text-decoration: none;
  transition: color 140ms var(--ease), border-color 140ms var(--ease);
}

.breadcrumb a:hover {
  color: #0B6C8C;
  border-color: var(--ice);
}

.breadcrumb__sep { color: rgba(86, 101, 125, .45); }

.section--ink .breadcrumb { color: rgba(245, 248, 252, .5); }
.section--ink .breadcrumb a {
  color: rgba(245, 248, 252, .85);
  border-color: rgba(245, 248, 252, .3);
}
.section--ink .breadcrumb a:hover {
  color: var(--signal);
  border-color: var(--signal);
}
.section--ink .breadcrumb__sep { color: rgba(245, 248, 252, .3); }

/* ---------- 11. 分屏网格 ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 56px);
}

/* ---------- 12. 卡片 ---------- */
.card {
  position: relative;
  padding: clamp(20px, 2.6vw, 32px);
  border: 1px solid var(--mint);
  border-radius: var(--radius-lg);
  background: #FFFFFF;
  box-shadow: var(--shadow-card);
}

.card--ink {
  background: var(--graphite);
  border-color: rgba(220, 230, 242, .16);
  color: var(--paper);
}

.card--flat { box-shadow: none; }

.card__title {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.28;
}

.card__body {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--slate);
}

.card--ink .card__body { color: rgba(245, 248, 252, .64); }

/* ---------- 13. 胶囊与标签 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--signal-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--mint);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--slate);
}

.tag--signal {
  border-color: rgba(122, 178, 0, .5);
  background: rgba(200, 255, 77, .22);
  color: #47670A;
}

.tag--amber {
  border-color: rgba(255, 159, 46, .5);
  background: rgba(255, 159, 46, .14);
  color: #A9600F;
}

.tag--ice {
  border-color: rgba(95, 212, 255, .55);
  background: rgba(95, 212, 255, .16);
  color: #0B6C8C;
}

/* ---------- 14. 图片容器 ---------- */
.media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--mint);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(140deg, rgba(95, 212, 255, .2), rgba(200, 255, 77, .12)),
    var(--graphite);
}

.media__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.06) saturate(1.05);
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x2 { aspect-ratio: 3 / 2; }
.media--1x1 { aspect-ratio: 1 / 1; }

.media__caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--paper);
  text-shadow: 0 1px 12px rgba(5, 16, 30, .9);
}

/* ---------- 15. 数据锚点 ---------- */
.stat {
  display: grid;
  gap: 5px;
}

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--slate);
}

.section--ink .stat__value { color: var(--signal); }
.section--ink .stat__label { color: rgba(245, 248, 252, .55); }

/* ---------- 16. 长文 ---------- */
.prose {
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.85;
}

.prose p + p { margin-top: 1.1em; }

.prose h2 {
  margin-top: 1.9em;
  font-size: clamp(24px, 2.4vw, 32px);
}

.prose h3 {
  margin-top: 1.5em;
  font-size: clamp(18px, 1.6vw, 22px);
}

.prose ul,
.prose ol {
  display: grid;
  gap: .4em;
  margin-top: .9em;
  padding-left: 1.3em;
}

.prose a {
  color: #0B6C8C;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ---------- 17. 显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* 章节目录当前项（由页面阶段渲染的目录链接） */
[data-toc-link][aria-current="true"] {
  color: var(--ink);
  font-weight: 800;
}

/* ---------- 18. 响应式 ---------- */
@media (max-width: 1180px) {
  .device-switch { display: none; }
}

@media (max-width: 960px) {
  .site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    min-height: 64px;
  }

  .brand { order: 1; }
  .nav-toggle { order: 2; display: inline-flex; margin-left: auto; }
  .header-actions { order: 3; }

  .site-nav {
    order: 4;
    flex: 1 0 100%;
    display: none;
  }

  .site-header[data-open] .site-nav {
    display: block;
    animation: nav-drop 200ms var(--ease) both;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 0 14px;
    border-top: 1px solid rgba(245, 248, 252, .12);
  }

  .site-nav__link {
    width: 100%;
    padding: 13px 16px;
    font-size: 16px;
  }

  .site-nav__link[aria-current="page"]::after { display: none; }

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

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 28px;
  }

  .footer-brand { grid-column: 1 / -1; }

  .footer-brand__note { max-width: none; }
}

@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .header-actions { display: none; }
  .brand__tagline { font-size: 10px; }
  .display-title { letter-spacing: -.025em; }
  .footer-bottom { font-size: 11px; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .to-top { width: 44px; height: 44px; font-size: 16px; }
}

/* ---------- 19. 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

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

  .btn:hover,
  .footer-col__list a:hover { transform: none; }
}
