/* =========================================================
   AB赛事主站 — /assets/site.css
   共享外壳：侧轨导航 · 顶部进度 · 分层页脚 · 通用组件
   ========================================================= */

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

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

body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #071C17;
  --carbon: #0B0F10;
  --lime: #C6FF3D;
  --orange: #FF6A2A;
  --slate: #8FA6B2;
  --fog: #E8F0EA;
  --moss: #12352B;
  --ice: #7FE7D4;
  --amber: #FFC24B;

  --fog-80: rgba(232, 240, 234, .84);
  --fog-70: rgba(232, 240, 234, .72);
  --fog-50: rgba(232, 240, 234, .5);
  --line: rgba(232, 240, 234, .12);
  --line-strong: rgba(232, 240, 234, .26);
  --lime-soft: rgba(198, 255, 61, .12);

  --rail-w: 276px;
  --topbar-h: 64px;
  --pad-x: clamp(18px, 5vw, 56px);
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 26px;

  --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", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

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

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  color: var(--fog);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

::selection { background: var(--lime); color: #06170F; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.015em;
}

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

#main-content { scroll-margin-top: 88px; outline: none; }

/* ---------- 4. 跳转链 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 11px 18px;
  border-radius: 8px;
  background: var(--lime);
  color: #06170F;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .22s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 顶栏 / 品牌 / 目录按钮 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background-color: var(--carbon);
  border-bottom: 1px solid var(--line);
}

.topbar {
  position: relative;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--topbar-h);
  padding: 10px clamp(16px, 4vw, 28px);
  background-color: var(--carbon);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: var(--fog);
}

.brand-mark {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(198, 255, 61, .5);
  border-radius: 9px;
  background: radial-gradient(circle at 28% 22%, rgba(198, 255, 61, .24), rgba(198, 255, 61, 0) 70%);
}

.brand-bar {
  display: block;
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--lime);
  transform: rotate(-38deg);
}

.brand-dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.brand-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .04em;
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.2;
  letter-spacing: .16em;
  color: var(--slate);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-toggle {
  position: relative;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--fog);
  transition: border-color .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease);
}

.nav-toggle:hover { border-color: var(--lime); color: var(--lime); background-color: rgba(198, 255, 61, .06); }

.nav-toggle-bars { display: grid; gap: 4px; width: 16px; }

.nav-toggle-bars span {
  display: block;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}

.nav-toggle-text {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .18em;
}

.site-header[data-open] .nav-toggle-bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- 6. 阅读进度 ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 100;
  background-color: rgba(232, 240, 234, .08);
  pointer-events: none;
}

.progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--lime) 0%, var(--ice) 58%, var(--orange) 100%);
  box-shadow: 0 0 14px rgba(198, 255, 61, .4);
}

/* ---------- 7. 侧轨导航（移动 = 抽屉） ---------- */
.rail {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(86vw, 336px);
  padding: 22px 20px 26px;
  overflow-y: auto;
  background: linear-gradient(165deg, #0B0F10 0%, #0C2A22 62%, #071C17 100%);
  border-right: 1px solid var(--line-strong);
  box-shadow: 26px 0 64px rgba(0, 0, 0, .55);
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform .36s var(--ease), visibility .36s linear;
}

.site-header[data-open] .rail { transform: translateX(0); visibility: visible; }

.rail-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--slate);
}

.rail-list { display: grid; gap: 4px; }

.rail-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 11px 10px;
  border-radius: var(--r-sm);
  color: var(--fog-70);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}

.rail-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--slate);
  transition: color .2s var(--ease);
}

.rail-label { min-width: 0; }

.rail-link:hover { color: var(--fog); background-color: rgba(198, 255, 61, .07); }
.rail-link:hover .rail-num { color: var(--lime); }

.rail-link[aria-current="page"] {
  color: var(--lime);
  font-weight: 700;
  background: linear-gradient(90deg, rgba(198, 255, 61, .16), rgba(198, 255, 61, 0) 92%);
  box-shadow: inset 2px 0 0 var(--lime);
}

.rail-link[aria-current="page"] .rail-num { color: var(--lime); }

.rail-status {
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.rail-status-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--slate);
}

.rail-status-value {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--lime);
}

.rail-status-value::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(198, 255, 61, .16);
  animation: rail-pulse 2.6s ease-in-out infinite;
}

@keyframes rail-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.82); }
}

.rail-status-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--slate);
}

.rail-status-meta [data-progress-value] { color: var(--ice); }

.rail-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background-color: rgba(3, 10, 8, .7);
  backdrop-filter: blur(2px);
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: clamp(46px, 6vw, 88px) clamp(18px, 4vw, 44px) clamp(24px, 3vw, 38px);
  background: linear-gradient(180deg, #071C17 0%, #0B0F10 58%, #0B0F10 100%);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -32%;
  right: -10%;
  width: min(560px, 74vw);
  height: min(560px, 74vw);
  background: radial-gradient(circle at 58% 58%, rgba(198, 255, 61, .16), rgba(198, 255, 61, 0) 64%);
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--lime), rgba(127, 231, 212, .5) 42%, rgba(255, 106, 42, .7) 100%);
  opacity: .7;
}

.footer-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(28px, 4vw, 46px);
  width: min(1120px, 100%);
  margin-inline: auto;
}

.footer-lead { display: grid; justify-items: start; gap: 14px; }

.footer-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--lime);
}

.footer-kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--orange);
}

.footer-headline {
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.6vw, 54px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--fog);
}

.footer-desc {
  max-width: 36ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--fog-70);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 3vw, 38px);
  padding-top: clamp(22px, 3vw, 34px);
  border-top: 1px solid var(--line);
}

.footer-col { min-width: 0; }

.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--slate);
}

.footer-col-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border-radius: 1px;
  background: var(--orange);
  transform: translateY(-2px);
}

.footer-list { display: grid; gap: 10px; }

.footer-list a {
  display: inline-block;
  font-size: 15px;
  color: var(--fog-80);
  text-decoration: none;
  transition: color .2s var(--ease), transform .2s var(--ease);
}

.footer-list a:hover { color: var(--lime); transform: translateX(2px); }

.footer-list--contact { gap: 14px; }

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

.footer-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--slate);
}

.footer-value {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--fog);
  overflow-wrap: anywhere;
}

.footer-value--mail { color: var(--ice); }

.footer-base {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding-top: clamp(18px, 2.4vw, 26px);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--slate);
}

.footer-brand { color: var(--fog); font-weight: 700; letter-spacing: .1em; }

.footer-icp { color: var(--slate); }

.footer-copy { color: var(--slate); }

.footer-note {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
  color: rgba(143, 166, 178, .9);
}

.footer-note::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--amber);
  transform: translateY(-2px);
}

/* ---------- 9. 通用按钮 ---------- */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}

.cta::after { content: "→"; font-family: var(--font-mono); font-size: 13px; opacity: .8; }

.cta--lime { background-color: var(--lime); color: #06170F; }
.cta--lime:hover { background-color: var(--ice); transform: translateY(-1px); }

.cta--orange { background-color: var(--orange); color: #1A0700; }
.cta--orange:hover { background-color: var(--amber); transform: translateY(-1px); }

.cta--ghost {
  border-color: var(--line-strong);
  background-color: rgba(232, 240, 234, .04);
  color: var(--fog);
}
.cta--ghost:hover { border-color: var(--lime); color: var(--lime); transform: translateY(-1px); }

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

/* ---------- 10. 版心与区块 ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 44px);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--lime);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--orange);
}

.display {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.4vw, 92px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.025em;
  color: var(--fog);
}

.lede {
  max-width: 56ch;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.8;
  color: var(--fog-70);
}

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

.divider {
  height: 1px;
  margin-block: clamp(28px, 4vw, 56px);
  border: 0;
  background: var(--line);
}

/* ---------- 11. 栅格 / 面板 / 标签 ---------- */
.grid { display: grid; gap: clamp(18px, 2.6vw, 32px); }
.grid--2 { grid-template-columns: minmax(0, 1fr); }
.grid--3 { grid-template-columns: minmax(0, 1fr); }

.panel {
  padding: clamp(18px, 2.6vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(18, 53, 43, .88), rgba(18, 53, 43, .38));
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(198, 255, 61, .42);
  border-radius: 999px;
  background-color: rgba(198, 255, 61, .08);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
}

.tag--orange {
  border-color: rgba(255, 106, 42, .45);
  background-color: rgba(255, 106, 42, .1);
  color: var(--orange);
}

/* ---------- 12. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--slate);
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "/"; color: rgba(143, 166, 178, .45); }

.breadcrumb a { color: var(--fog-70); text-decoration: none; transition: color .2s var(--ease); }
.breadcrumb a:hover { color: var(--lime); }
.breadcrumb [aria-current="page"] { color: var(--fog); }

/* ---------- 13. 图片容器基础 ---------- */
.media-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(150deg, rgba(18, 53, 43, .95), rgba(7, 28, 23, .95)),
    repeating-linear-gradient(90deg, rgba(232, 240, 234, .05) 0 1px, transparent 1px 34px);
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 28, 23, 0) 52%, rgba(7, 28, 23, .55) 100%);
  pointer-events: none;
}

.media-frame--tall { aspect-ratio: 3 / 4; }

.media-frame--slant {
  border-radius: 0;
  clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
}
.media-frame--slant::after { background: linear-gradient(200deg, rgba(198, 255, 61, .12), rgba(7, 28, 23, .62)); }

.media-cap {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--slate);
}

/* ---------- 14. 平板 ---------- */
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-base { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
  .footer-note { grid-column: 1 / -1; }
}

@media (min-width: 760px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 15. 桌面：固定侧轨 ---------- */
@media (min-width: 1024px) {
  :root { --rail-w: 284px; }

  body { padding-left: var(--rail-w); }

  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: var(--rail-w);
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: linear-gradient(180deg, #0B0F10 0%, #0A241D 46%, #071C17 100%);
  }

  .topbar {
    justify-content: flex-start;
    min-height: 0;
    padding: 26px 22px 20px;
    background-color: transparent;
  }

  .nav-toggle { display: none; }

  .rail {
    position: static;
    inset: auto;
    top: auto;
    flex: 1 1 auto;
    width: auto;
    min-height: 0;
    padding: 18px 14px 22px;
    overflow-y: auto;
    border-right: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    visibility: visible;
    transition: none;
  }

  .rail-kicker { padding-left: 10px; }

  .rail-scrim { display: none !important; }

  .progress { left: var(--rail-w); }

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

  .footer-grid { grid-template-columns: 1.05fr .85fr 1.2fr; }

  .footer-base { grid-template-columns: auto auto 1fr; gap: 10px 26px; }
  .footer-note { grid-column: 1 / -1; }
}

@media (min-width: 1440px) {
  :root { --rail-w: 304px; }
}

/* ---------- 16. 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .rail { transition: none; }
  .rail-status-value::before { animation: none; }
  .footer-list a:hover { transform: none; }
  .cta:hover { transform: none; }
}
