/* ==========================================================================
   天博体育 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 侧边轨道头部 / 页脚 / 通用组件
   ========================================================================== */

/* --- 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, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }

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

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

a { color: inherit; }

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

/* --- 2. 设计变量 --------------------------------------------------------- */
:root {
  color-scheme: light;

  /* 色彩体系 */
  --ink: #0B1220;
  --ink-2: #131C2E;
  --paper: #F4EFE6;
  --paper-2: #E7DFD2;
  --text: #221A14;
  --lime: #C6F24E;
  --ember: #FF5A36;
  --amber: #E8B44A;
  --mist: #8A97AC;
  --teal: #1F6F6B;

  /* 线条 */
  --line-dark: rgba(138, 151, 172, 0.22);
  --line-paper: rgba(34, 26, 20, 0.14);

  /* 量度 */
  --rail-w: 120px;
  --shell: 1240px;
  --edge: clamp(20px, 3.4vw, 64px);

  /* 字体 */
  --font-sans: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 180ms;
  --t-mid: 280ms;
  --t-slow: 420ms;
}

/* --- 3. 基础排版 --------------------------------------------------------- */
body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

@media (max-width: 1023px) {
  body { padding-top: 56px; }
}

#main-content { display: block; scroll-margin-top: 72px; }

.display {
  font-size: clamp(48px, 8.4vw, 112px);
  font-weight: 200;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
}

.headline {
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: 0.08em;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
}

.data {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.lede {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.8;
  color: #3E3A33;
  max-width: 38ch;
}

.band .lede,
.band--soft .lede { color: #CFD6E2; }

/* --- 4. 布局壳 ----------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(28px, 4vw, 52px); }

.sheet { background: var(--paper); }

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

.band--soft {
  background: var(--ink-2);
  color: var(--paper);
}

.band a, .band--soft a { color: var(--paper); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.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; }

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

/* --- 5. 装饰与内容组件 --------------------------------------------------- */
.rule {
  height: 1px;
  border: 0;
  background: var(--line-paper);
  margin-block: clamp(28px, 4vw, 52px);
}

.rule--ink { background: var(--line-dark); }

.scale {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 18px;
  margin-block: clamp(20px, 3vw, 36px);
}

.scale span {
  flex: 1 1 0;
  height: 5px;
  background: var(--line-paper);
}

.scale span:nth-child(4n + 1) { height: 14px; background: var(--amber); }

.band .scale span { background: var(--line-dark); }
.band .scale span:nth-child(4n + 1) { background: var(--amber); }

.frame {
  position: relative;
  border: 1px solid var(--line-paper);
  padding: clamp(18px, 2.6vw, 34px);
}

.frame::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 34px;
  height: 3px;
  background: var(--ember);
}

.frame--ink { border-color: var(--line-dark); }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.6;
  padding: 3px 9px;
  background: var(--paper-2);
  color: var(--text);
  border-radius: 2px;
}

.tag--lime { background: var(--lime); color: var(--ink); }
.tag--ember { background: var(--ember); color: var(--ink); }
.tag--amber { background: var(--amber); color: var(--ink); }

.card {
  background: var(--paper);
  border: 1px solid var(--line-paper);
  border-radius: 2px;
  padding: clamp(18px, 2.4vw, 28px);
}

.card--ink {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--line-dark);
}

.card--flat {
  background: var(--paper-2);
  border-color: transparent;
}

/* 表格 */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.table th,
.table td {
  padding: 11px 14px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line-paper);
}

.table thead th {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  border-bottom: 0;
}

.table tbody tr:nth-child(even) { background: var(--paper-2); }
.table td.num { font-family: var(--font-mono); text-align: right; color: var(--teal); }

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: inherit;
}

.crumbs a {
  color: inherit;
  opacity: 0.72;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: opacity var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}

.crumbs a:hover {
  opacity: 1;
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.crumbs__sep { color: var(--amber); }

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

/* 图片容器基础规则（页面阶段放入真实图片即可） */
.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  background: var(--ink-2);
}

.figure img,
.figure video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.figure__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--mist);
}

.figure__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 3px 10px;
  background: var(--ember);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.figure__cap {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

/* --- 6. 按钮 ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.62em 1.1em;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 14px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition: background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #D8FF72; }

.btn--ghost {
  color: var(--paper);
  border-color: var(--line-dark);
}
.btn--ghost:hover { color: var(--lime); border-color: var(--lime); }

.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #1B2740; }

.btn--line {
  color: var(--text);
  border-color: var(--line-paper);
}
.btn--line:hover { color: var(--ember); border-color: var(--ember); }

.btn--block { width: 100%; }

/* --- 7. 跳转链接与阅读进度 ----------------------------------------------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 0.6em 1em;
  background: var(--lime);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform var(--t-mid) var(--ease);
}

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

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 100;
  background: rgba(138, 151, 172, 0.16);
  pointer-events: none;
}

.progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--lime);
  transition: width 120ms linear;
}

/* --- 8. 侧边轨道头部 ----------------------------------------------------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  border-right: 1px solid var(--line-dark);
}

.rail__bar { display: none; }

.rail__mark {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--paper);
  text-decoration: none;
}

.rail__panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  padding: 26px 14px 20px;
  overflow-y: auto;
}

.rail__brand {
  display: block;
  padding: 0 4px 18px;
  text-decoration: none;
  border-bottom: 1px solid var(--line-dark);
}

.rail__brand-cn {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: var(--paper);
}

.rail__brand-en {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--mist);
}

.rail__brand-tag {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.rail__nav { min-height: 0; }

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail__link {
  display: block;
  padding: 9px 8px 9px 10px;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0.03em;
  color: #C9D2E0;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}

.rail__link:hover {
  color: var(--paper);
  background: rgba(198, 242, 78, 0.08);
}

.rail__idx {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--mist);
  transition: color var(--t-fast) var(--ease);
}

.rail__link[aria-current="page"] {
  color: var(--lime);
  border-left-color: var(--lime);
  background: rgba(198, 242, 78, 0.07);
}

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

.rail__actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 4px 0;
  border-top: 1px solid var(--line-dark);
}

.rail__actions .btn {
  padding: 10px 6px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-align: center;
}

.rail__readout {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.rail__readout-label {
  display: block;
  width: 100%;
  margin-bottom: 2px;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.rail__readout-num {
  font-size: 17px;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}

.rail__scrim { display: none; }

/* 移动端导航按钮 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

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

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}

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

/* 移动端：抽屉形态 */
@media (max-width: 1023px) {
  .rail {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
    z-index: 95;
  }

  .rail__bar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 56px;
    padding-inline: 16px;
  }

  .rail__scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(11, 18, 32, 0.66);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-mid) var(--ease);
  }

  .rail[data-open="true"] .rail__scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .rail__panel {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    z-index: 2;
    width: min(84vw, 340px);
    height: auto;
    padding: 24px 20px 32px;
    background: var(--ink);
    border-right: 1px solid var(--line-dark);
    overflow-y: auto;
    transform: translateX(-100%);
    pointer-events: none;
    transition: transform var(--t-slow) var(--ease);
  }

  .rail[data-open="true"] .rail__panel {
    transform: translateX(0);
    pointer-events: auto;
  }

  .rail__brand-cn { font-size: 24px; }
  .rail__brand-en { font-size: 11px; }
  .rail__brand-tag { font-size: 12px; }

  .rail__link { font-size: 15px; padding: 11px 10px 11px 12px; }
  .rail__idx { font-size: 11px; }
  .rail__actions .btn { font-size: 14px; padding: 0.68em 0.8em; }
  .rail__readout-num { font-size: 20px; }
}

/* --- 9. 页脚 ------------------------------------------------------------- */
.foot {
  background: var(--ink);
  color: var(--paper);
}

.foot__inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 80px) var(--edge) 26px;
}

.foot__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(24px, 3.6vw, 52px);
}

.foot__mark {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--paper);
}

.foot__tag {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.foot__meta {
  margin-top: 16px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.foot__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--amber);
}

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

.foot__links a {
  font-size: 15px;
  color: #D6DCE8;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.foot__links a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.foot__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
}

.foot__legal-item {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: var(--mist);
}

.foot__note {
  margin-top: 14px;
  max-width: 78ch;
  font-size: 13px;
  line-height: 1.75;
  color: var(--mist);
}

.foot__copy {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

@media (max-width: 960px) {
  .foot__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .foot__grid { grid-template-columns: 1fr; }
}

/* --- 10. 显现动效 -------------------------------------------------------- */
html[data-reveal="on"] [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

html[data-reveal="on"] [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* --- 11. 焦点与降级 ------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link:focus-visible {
  outline-color: var(--ink);
}

@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;
  }

  html[data-reveal="on"] [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .progress__bar { transition: none; }
}
