/* ============================================================
   天行体育 /assets/site.css
   共享层：reset、变量、中文排版、头部、页脚、通用组件
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, figcaption, blockquote,
dl, dt, dd, table, th, td {
  margin: 0;
}

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

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

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

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

table { border-collapse: collapse; width: 100%; }

h1, h2, h3, h4, h5, h6 { line-height: 1.18; font-weight: 800; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --ink: #050B16;
  --night: #0B1B33;
  --slate: #132A4A;
  --sand: #F5F1E8;
  --paper: #C9C4B8;
  --orange: #FF5A1F;
  --gold: #E8B44A;
  --cyan: #18D7C4;
  --amber: #FFC24B;
  --coral: #E4572E;

  --line: rgba(201, 196, 184, 0.22);
  --line-soft: rgba(201, 196, 184, 0.12);
  --gridline: rgba(201, 196, 184, 0.055);

  /* 字体 */
  --font-display: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas",
    "DejaVu Sans Mono", "Courier New", monospace;

  /* 尺寸与节奏 */
  --maxw: 1280px;
  --gutter: clamp(16px, 3.6vw, 44px);
  --t: 200ms;
}

/* ---------- 3. 基础排版 ---------- */
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--sand);
  background-color: var(--night);
  background-image:
    radial-gradient(900px 420px at 88% 0%, rgba(255, 90, 31, 0.10), transparent 70%),
    radial-gradient(700px 420px at 2% 100%, rgba(24, 215, 196, 0.07), transparent 70%),
    linear-gradient(var(--gridline) 1px, transparent 1px),
    linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
  background-attachment: fixed, fixed, fixed, fixed;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. 通用容器与章节 ---------- */
.container {
  width: min(100% - var(--gutter) * 2, var(--maxw));
  margin-inline: auto;
}

.section { padding: clamp(40px, 6vw, 84px) 0; position: relative; }

.section__head {
  display: grid;
  gap: 6px;
  margin-bottom: clamp(18px, 2.6vw, 32px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: 0.01em;
  color: var(--sand);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.rule { height: 1px; border: 0; background: var(--line); margin: 0; }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t) ease, color var(--t) ease,
    border-color var(--t) ease, transform var(--t) ease;
}

.btn--primary { background: var(--orange); color: var(--ink); }
.btn--primary:hover { background: var(--amber); }

.btn--ghost {
  background: transparent;
  border-color: rgba(201, 196, 184, 0.4);
  color: var(--sand);
}
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--cyan);
  padding-inline: 4px;
}
.btn--quiet:hover { color: var(--amber); }

/* ---------- 6. 头部：命令栏 ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 20px 44px -32px rgba(0, 0, 0, 0.95);
}

.hdr__strip {
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--orange) 0 18%,
    transparent 18% 21%,
    var(--gold) 21% 29%,
    transparent 29% 32%,
    var(--cyan) 32% 38%,
    transparent 38% 100%
  );
}

.hdr__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(10px, 1.6vw, 26px);
  width: min(100% - var(--gutter) * 2, var(--maxw));
  margin-inline: auto;
  padding: 10px 0;
}

.hdr__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

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

.brand__mark {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: var(--ink);
  font-weight: 900;
  font-size: 17px;
  transform: skewX(-9deg);
}

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

.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: 0.08em;
  color: var(--sand);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
}

.version-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--cyan);
  border: 1px solid rgba(24, 215, 196, 0.45);
  padding: 3px 7px;
  white-space: nowrap;
}

/* 导航 */
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.nav__item { display: flex; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 11px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: rgba(245, 241, 232, 0.82);
  transition: color var(--t) ease, background-color var(--t) ease,
    border-color var(--t) ease;
}

.nav__idx {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}

.nav__label { white-space: nowrap; }

.nav__link:hover,
.nav__link:focus-visible {
  background: var(--slate);
  border-color: var(--line);
  color: var(--sand);
}

.nav__link[aria-current="page"] {
  color: var(--orange);
  background: rgba(255, 90, 31, 0.1);
  border-color: rgba(255, 90, 31, 0.5);
}

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

.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: -1px; right: -1px; bottom: -1px;
  height: 2px;
  background: var(--orange);
}

.nav__cta { display: none; }

/* 工具区 */
.hdr__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--paper);
  white-space: nowrap;
}

.sync__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  animation: ping 2.4s ease-out infinite;
}

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(24, 215, 196, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(24, 215, 196, 0); }
  100% { box-shadow: 0 0 0 0 rgba(24, 215, 196, 0); }
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid rgba(201, 196, 184, 0.4);
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.nav-toggle__bars { display: grid; gap: 4px; width: 18px; }
.nav-toggle__bars i { display: block; height: 2px; background: currentColor; }
.nav-toggle__text { text-transform: uppercase; }

/* 滚动进度 */
.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 2px;
  width: 0;
  z-index: 90;
  pointer-events: none;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  transition: width 90ms linear;
}

/* 跳转链接 */
.skip-link {
  position: absolute;
  left: 10px;
  top: -70px;
  z-index: 120;
  padding: 10px 16px;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: top 140ms ease;
}
.skip-link:focus { top: 10px; }

/* ---------- 7. 页脚 ---------- */
.ftr {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  background: var(--ink);
  border-top: 1px solid var(--line);
  color: var(--paper);
  font-size: 14px;
}

.ftr__edge {
  height: 6px;
  background: var(--orange);
  clip-path: polygon(0 0, 100% 0, 100% 38%, 0 100%);
}

.ftr__inner {
  width: min(100% - var(--gutter) * 2, var(--maxw));
  margin-inline: auto;
  padding: clamp(34px, 5vw, 58px) 0 clamp(20px, 3vw, 30px);
}

.ftr__top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.6fr);
  gap: clamp(26px, 4vw, 56px);
}

.ftr__logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.12em;
  color: var(--sand);
}

.ftr__tag {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.ftr__desc {
  margin-top: 14px;
  max-width: 40ch;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(201, 196, 184, 0.86);
}

.ftr__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 20px;
}

.ftr__stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
}

.ftr__stat span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--paper);
}

.ftr__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 36px);
}

.ftr__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sand);
}

.ftr__num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--orange);
}

.ftr__list li + li { margin-top: 9px; }

.ftr__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: rgba(201, 196, 184, 0.86);
  transition: color var(--t) ease;
}

.ftr__link::before {
  content: "›";
  font-family: var(--font-mono);
  color: var(--orange);
}

.ftr__link:hover { color: var(--sand); }

.ftr__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 36px;
  margin-top: clamp(28px, 4vw, 42px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.ftr__meta-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(201, 196, 184, 0.9);
}

.ftr__meta-line--wide { flex-basis: 100%; }

.ftr__meta-key {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--gold);
  white-space: nowrap;
}

.ftr__note {
  flex-basis: 100%;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: rgba(201, 196, 184, 0.6);
}

.ftr__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(201, 196, 184, 0.7);
}

/* ---------- 8. 通用组件 ---------- */
/* 网格 */
.grid { display: grid; gap: clamp(12px, 1.8vw, 22px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--bento { grid-template-columns: repeat(12, minmax(0, 1fr)); }

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

/* 面板 */
.panel {
  padding: clamp(16px, 2.4vw, 26px);
  background: var(--slate);
  border: 1px solid var(--line);
}

.panel--flat { background: rgba(19, 42, 74, 0.55); }

.panel--focus {
  border-color: rgba(255, 90, 31, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 90, 31, 0.16);
}

/* 数据 */
.stat { display: grid; gap: 4px; }

.stat__num {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--amber);
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tag--gold { color: var(--gold); }
.tag--cyan { color: var(--cyan); }
.tag--orange { color: var(--orange); }
.tag--paper { color: var(--paper); }

/* 面包屑 */
.breadcrumb {
  padding: 14px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--paper);
}

.breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: rgba(201, 196, 184, 0.5);
}
.breadcrumb a { color: var(--paper); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--sand); }

/* 正文 */
.prose {
  max-width: 66ch;
  color: rgba(245, 241, 232, 0.88);
}

.prose p { margin: 0 0 1.05em; }
.prose p:last-child { margin-bottom: 0; }
.prose h2, .prose h3 {
  margin: 1.6em 0 0.6em;
  color: var(--sand);
  font-size: clamp(18px, 2.2vw, 24px);
}
.prose strong { color: var(--sand); font-weight: 700; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 1.05em; padding-left: 1.25em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--gold); }

/* 筛选条 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-chip {
  padding: 7px 12px;
  background: transparent;
  border: 1px solid rgba(201, 196, 184, 0.3);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--t) ease, background-color var(--t) ease,
    border-color var(--t) ease;
}

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

.filter-chip[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
  font-weight: 700;
}

/* 图像容器（供页面阶段放置图片） */
.frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--ink);
  background-image:
    linear-gradient(135deg, rgba(255, 90, 31, 0.14), rgba(11, 27, 51, 0.9) 46%),
    repeating-linear-gradient(
      135deg,
      rgba(201, 196, 184, 0.06) 0 1px,
      transparent 1px 10px
    );
}

.frame > img,
.frame > picture > img,
.frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame--wide { aspect-ratio: 16 / 7; }
.frame--card { aspect-ratio: 4 / 3; }
.frame--tall { aspect-ratio: 3 / 4; }
.frame--square { aspect-ratio: 1 / 1; }

.frame__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 5px 9px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

/* ---------- 9. 响应式 ---------- */
@media (max-width: 1100px) {
  .hdr__bar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .hdr__cta { display: none; }

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

  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 10px var(--gutter) 22px;
    background: var(--ink);
    border-bottom: 2px solid var(--orange);
    box-shadow: 0 30px 50px -22px rgba(0, 0, 0, 0.9);
  }

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

  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }

  .nav__link {
    justify-content: flex-start;
    gap: 10px;
    padding: 15px 6px;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 15.5px;
  }

  .nav__idx { font-size: 11px; }

  .nav__link[aria-current="page"] { background: rgba(255, 90, 31, 0.08); }
  .nav__link[aria-current="page"]::after { display: none; }

  .nav__cta {
    display: inline-flex;
    justify-content: center;
    margin-top: 18px;
  }
}

@media (max-width: 960px) {
  .ftr__top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .grid--bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: 1 / -1; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .brand__sub { display: none; }
  .version-chip { display: none; }
  .sync__text { display: none; }
  .sync { gap: 0; }

  .ftr__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ftr__legal { flex-direction: column; gap: 6px; }
}

@media (max-width: 600px) {
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }

  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-chip { flex: 0 0 auto; }

  .ftr__cols { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 10. 减少动效 ---------- */
@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-progress { transition: none; }
}
