/* ==========================================================================
   多米赛场 · 共享样式表  /assets/site.css
   赛场夜灯下的数据实验室：侧边品牌轨道 + 玻璃导航梁构成框架式边界，
   暮色紫与深墨为底，赭石作骨，电光青与荧光橙只落在数据与行动点上。
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --c-purple: #2E1F3E;
  --c-ochre: #A94F2B;
  --c-cyan: #00C2B8;
  --c-orange: #FF6A2A;
  --c-ink: #111217;
  --c-stand: #F3E7D7;
  --c-grey: #6E737B;
  --c-silver: #C8CDD4;
  --c-gold: #F2C14E;
  --c-pitch: #1F7A5C;
  --c-mist: #F8FAFB;
  --c-surface: #181A21;
  --c-surface-2: #20222B;
  --c-ink-text: #1A1013;

  --line: rgba(200, 205, 212, .16);
  --line-strong: rgba(200, 205, 212, .32);

  --rail-w: 76px;
  --head-h: 68px;
  --wrap: 1240px;

  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 14px;

  --font-display: "Archivo Black", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", "Sarasa Mono SC", "SFMono-Regular", Consolas, monospace;
  --font-body: "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.22, .8, .28, 1);
}

/* ---------- 2. 重置与中文排版 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  padding-top: var(--head-h);
  padding-left: var(--rail-w);
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-mist);
  background: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.012em;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

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

button { font: inherit; color: inherit; background: none; border: 0; }

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

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

::selection { background: var(--c-ochre); color: var(--c-stand); }

/* ---------- 3. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: calc(var(--rail-w) + 10px);
  z-index: 200;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  color: #1B0C03;
  background: var(--c-orange);
  border-radius: var(--r-sm);
  transform: translateY(-160%);
  transition: transform .22s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- 4. 左侧品牌轨道（框架构成） ---------- */
.site-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 85;
  width: var(--rail-w);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 22px;
  background: linear-gradient(180deg, #352345 0%, #241733 42%, #111217 100%);
  border-right: 1px solid var(--line);
}
.site-rail__tag {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .34em;
  color: rgba(243, 231, 215, .68);
}
.site-rail__ticks {
  flex: 1 1 auto;
  width: 1px;
  margin: 16px 0;
  background: repeating-linear-gradient(180deg,
    rgba(200, 205, 212, .55) 0 7px,
    rgba(200, 205, 212, 0) 7px 17px);
}
.site-rail__idx {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .28em;
  color: var(--c-cyan);
}
@media (min-width: 1024px) { .site-rail { display: flex; } }

/* ---------- 5. 顶部导航梁 ---------- */
.site-head {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  z-index: 80;
  height: var(--head-h);
  background: rgba(14, 15, 20, .95);
  border-bottom: 1px solid var(--line);
}

.head-frame {
  height: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 34px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}
.brand__glyph {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: .04em;
  color: var(--c-stand);
  background: var(--c-ochre);
  border-radius: 3px 3px 12px 3px;
  box-shadow: inset 0 0 0 1px rgba(243, 231, 215, .2);
}
.brand__meta { display: flex; flex-direction: column; line-height: 1.18; }
.brand__name {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .07em;
  color: var(--c-mist);
}
.brand__sub {
  font-size: 11px;
  letter-spacing: .15em;
  color: rgba(200, 205, 212, .7);
}

/* 主导航 */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  display: block;
  padding: 9px 13px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  color: rgba(243, 231, 215, .8);
  border-bottom: 2px solid transparent;
  border-radius: var(--r-sm);
  transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.nav-link:hover {
  color: var(--c-mist);
  background: rgba(255, 255, 255, .07);
}
.nav-link[aria-current="page"] {
  color: var(--c-cyan);
  background: rgba(0, 194, 184, .12);
  border-bottom-color: var(--c-cyan);
}

/* 头部行动点 */
.head-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: transform .18s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--c-orange); color: #1B0C03; }
.btn--solid:hover { background: #FF8149; }
.btn--ghost {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(243, 231, 215, .3);
  color: var(--c-stand);
}
.btn--ghost:hover { border-color: var(--c-cyan); color: var(--c-cyan); }
.btn--cyan { background: var(--c-cyan); color: #04211F; }

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-stand);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(243, 231, 215, .28);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 4px; width: 18px; }
.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) 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(-6px) rotate(-45deg); }

/* 滚动进度 */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--c-cyan) 0%, var(--c-orange) 58%, var(--c-gold) 100%);
  pointer-events: none;
}

/* ---------- 6. 平板与手机的导航形态 ---------- */
@media (min-width: 1024px) and (max-width: 1280px) {
  .nav-link { padding: 9px 9px; font-size: 12.5px; letter-spacing: 0; }
  .brand__sub { display: none; }
  .btn--ghost { display: none; }
}

@media (max-width: 1023px) {
  :root { --rail-w: 0px; --head-h: 60px; }

  .site-rail { display: none; }

  .head-frame { padding: 0 14px; gap: 10px; }
  .brand__sub { display: none; }
  .brand__glyph { width: 34px; height: 34px; font-size: 12.5px; }
  .brand__name { font-size: 16px; }
  .btn--ghost { display: none; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    top: var(--head-h);
    right: 0;
    bottom: 0;
    z-index: 75;
    width: min(86vw, 360px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px 18px 40px;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(46, 31, 62, .97) 0%, rgba(17, 18, 23, .99) 65%);
    border-left: 1px solid var(--line);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform .3s var(--ease), visibility .3s var(--ease);
  }
  .site-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-link {
    padding: 15px 8px;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
    border-left: 3px solid transparent;
    border-radius: 0;
  }
  .nav-link[aria-current="page"] {
    padding-left: 16px;
    border-bottom-color: var(--line);
    border-left-color: var(--c-cyan);
  }

  .skip-link { left: 10px; }
}

@media (max-width: 560px) {
  .nav-toggle__label { display: none; }
  .nav-toggle { padding: 10px 11px; }
}

/* ---------- 7. 页脚 ---------- */
.site-foot {
  position: relative;
  margin-top: clamp(40px, 6vw, 80px);
  padding: clamp(46px, 7vw, 82px) 0 0;
  color: var(--c-silver);
  background: linear-gradient(180deg, #17131F 0%, #0B0C10 62%);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.site-foot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--c-ochre) 0 22px,
    rgba(169, 79, 43, 0) 22px 34px);
  opacity: .6;
}
.site-foot::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 31, 62, .95), rgba(46, 31, 62, 0) 68%);
  pointer-events: none;
}

.foot-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) clamp(36px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: clamp(26px, 3vw, 46px);
}

.foot-brand__glyph {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--c-stand);
  background: var(--c-ochre);
  border-radius: 3px 3px 14px 3px;
}
.foot-brand__name {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: .07em;
  color: var(--c-mist);
}
.foot-brand__tag {
  margin: 0;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(243, 231, 215, .72);
}

.foot-col__title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--c-cyan);
}
.foot-col ul { display: grid; gap: 10px; }
.foot-col a {
  font-size: 14px;
  color: rgba(243, 231, 215, .78);
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.foot-col a:hover { color: var(--c-orange); border-bottom-color: var(--c-orange); }

.foot-contact { display: grid; gap: 13px; }
.foot-contact__item { display: grid; gap: 3px; }
.foot-contact__k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--c-grey);
}
.foot-contact__v {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(243, 231, 215, .86);
}

.foot-base {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 40px) 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  border-top: 1px solid var(--line);
}
.foot-base__copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--c-grey);
}
.foot-base__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
}
.foot-base__links a { color: var(--c-silver); transition: color .2s var(--ease); }
.foot-base__links a:hover { color: var(--c-cyan); }

@media (max-width: 960px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .foot-grid { grid-template-columns: 1fr; }
  .foot-base { justify-content: flex-start; }
}

/* ---------- 8. 布局容器与章节 ---------- */
#main-content { display: block; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}
.wrap--narrow { max-width: 880px; }

.section { padding: clamp(56px, 8vw, 108px) 0; }
.section--tight { padding: clamp(34px, 5vw, 62px) 0; }

.lume {
  background: var(--c-stand);
  color: var(--c-ink-text);
}
.lume h1, .lume h2, .lume h3, .lume h4 { color: var(--c-ink-text); }
.lume .lead { color: #4A3B33; }

.lead {
  max-width: 66ch;
  font-size: clamp(.98rem, 1.4vw, 1.1rem);
  line-height: 1.85;
  color: rgba(243, 231, 215, .78);
}

/* ---------- 9. 基础组件 ---------- */
.glass {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
}

.card {
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--c-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.card--solid { background: var(--c-stand); color: var(--c-ink-text); }
.card--purple { background: linear-gradient(160deg, #2E1F3E, #1A1224); }

.card--link {
  display: block;
  transition: transform .22s var(--ease), border-color .22s var(--ease), background .22s var(--ease);
}
.card--link:hover {
  transform: translate(-2px, -4px);
  border-color: var(--c-cyan);
  background: var(--c-surface-2);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--c-cyan);
}

.tag {
  display: inline-block;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  line-height: 1.5;
  color: currentColor;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.tag--gold { color: var(--c-gold); }
.tag--pitch { color: var(--c-pitch); }
.tag--orange { color: var(--c-orange); }

.stat {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--c-mist);
}
.stat--xl { font-size: clamp(2.4rem, 6vw, 4.6rem); }
.stat--lg { font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
.stat--sm { font-size: 1.05rem; }
.stat--cyan { color: var(--c-cyan); }
.stat--orange { color: var(--c-orange); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--c-silver);
}
.crumbs li { display: flex; align-items: center; }
.crumbs li::after {
  content: "/";
  margin-left: 8px;
  color: var(--c-grey);
}
.crumbs li:last-child::after { content: ""; margin: 0; }

/* ---------- 10. 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(14px, 2vw, 24px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

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

/* ---------- 11. 图片容器基础规则 ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--c-surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }

.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--c-mist);
  background: linear-gradient(rgba(10, 10, 14, 0), rgba(10, 10, 14, .88));
}

/* ---------- 12. 数据条 ---------- */
.bar {
  position: relative;
  height: 8px;
  overflow: hidden;
  background: rgba(200, 205, 212, .14);
  border-radius: 99px;
}
.bar__fill {
  height: 100%;
  width: var(--val, 0%);
  background: linear-gradient(90deg, var(--c-cyan), var(--c-orange));
  border-radius: 99px;
  transition: width .8s var(--ease);
}
.bar--alt .bar__fill { background: linear-gradient(90deg, var(--c-pitch), var(--c-cyan)); }

/* ---------- 13. 返回顶部（由脚本注入） ---------- */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--c-cyan);
  background: rgba(0, 194, 184, .16);
  border: 1px solid var(--c-cyan);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity .26s var(--ease), transform .26s var(--ease), visibility .26s var(--ease), background .2s var(--ease);
}
.to-top[data-show] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.to-top:hover { background: rgba(0, 194, 184, .3); }

/* ---------- 14. 进入视口显现（由脚本驱动） ---------- */
.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal-pending.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 15. 无障碍与动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal-pending { opacity: 1; transform: none; }
  .bar__fill { transition: none; }
}
