/* ============================================================
   CMD赛场 · /assets/site.css
   夜间赛场指挥中心 / 数据流仪表盘 —— 共享外壳样式
   ============================================================ */

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

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

html, body { margin: 0; padding: 0; }

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

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

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

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

h1, h2, h3, h4, h5, p, figure { margin: 0; }

[hidden] { display: none !important; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  --ink: #0A0F0E;
  --ink-2: #0E2A22;
  --ink-3: #164034;
  --line: #24564A;
  --lime: #C9FF3D;
  --orange: #FF6A2B;
  --teal: #4FE0C0;
  --silver: #9BB0AA;
  --fog: #E9F3EF;
  --panel: #1C2226;

  --font-display: 'Oswald', 'Barlow Condensed', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'Roboto Mono', ui-monospace, monospace;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-pill: 999px;
  --shadow-island: 0 14px 34px rgba(0, 0, 0, .42);
  --header-h: clamp(104px, 14vw, 132px);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--ink);
  color: var(--fog);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--lime); color: var(--ink); }

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

.t-display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 7vw, 96px);
  line-height: .94;
  letter-spacing: -.01em;
}

.t-2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -.01em;
}

.t-3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.35;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lime);
}

.lead {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.75;
  color: var(--silver);
}

.mono {
  font-family: var(--font-mono);
  font-size: .92em;
  letter-spacing: .01em;
}

/* ---------- 4. 布局骨架 ---------- */
.shell {
  width: min(1320px, 100% - 40px);
  margin-inline: auto;
}

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

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(22px, 3vw, 36px);
}

.site-main {
  display: block;
  padding-top: var(--header-h);
  min-height: 60vh;
}

.site-main:focus { outline: none; }

.slash-divider {
  height: 2px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
  transform: skewY(-1.2deg);
  margin: clamp(28px, 4vw, 56px) 0;
}

.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.btn-lime { background-color: var(--lime); color: var(--ink); }
.btn-lime:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(201, 255, 61, .24); }

.btn-ghost { background-color: transparent; color: var(--fog); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }

.btn-orange { background-color: var(--orange); color: #140702; }
.btn-orange:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(255, 106, 43, .26); }

/* ---------- 6. 头部：双浮岛 + 胶囊导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  padding: 14px 0 10px;
  border-bottom: 1px solid transparent;
  transition: padding .28s ease, background-color .28s ease, border-color .28s ease;
}

.site-header[data-collapsed],
.site-header[data-nav-open] {
  padding: 8px 0;
  background-color: rgba(10, 15, 14, .88);
  border-bottom-color: var(--line);
}

.header-rail {
  width: min(1400px, 100% - 32px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background-color: var(--lime);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  transform: translateY(-180%);
  transition: transform .2s ease;
}

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

.brand-island {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 18px 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: linear-gradient(120deg, rgba(22, 64, 52, .96), rgba(28, 34, 38, .92));
  box-shadow: var(--shadow-island);
  transition: border-color .2s ease, transform .2s ease;
}

.brand-island:hover { border-color: var(--lime); transform: translateY(-1px); }

.brand-mark {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 8px;
  background-color: var(--lime);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .06em;
  transform: skewX(-8deg);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }

.brand-name { font-weight: 700; font-size: 15px; color: var(--fog); }

.brand-tagline { font-size: 12px; color: var(--silver); }

.brand-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--lime);
  animation: cmd-pulse 2.4s ease-out infinite;
}

@keyframes cmd-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 255, 61, .5); }
  70% { box-shadow: 0 0 0 10px rgba(201, 255, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 255, 61, 0); }
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background-color: rgba(28, 34, 38, .94);
  color: var(--fog);
  font-size: 14px;
  font-weight: 700;
}

.nav-toggle-bars { display: inline-flex; flex-direction: column; gap: 5px; width: 18px; }
.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background-color: var(--lime);
  transition: transform .22s ease, width .22s ease;
}
.nav-toggle-bars span:last-child { width: 68%; margin-left: auto; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child { width: 100%; transform: translateY(-3.5px) rotate(-45deg); }

.nav-capsule {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background-color: rgba(28, 34, 38, .9);
  box-shadow: var(--shadow-island);
}

.nav-list { display: flex; align-items: center; gap: 2px; }

.nav-link {
  display: inline-block;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  color: var(--silver);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
}

.nav-link:hover { color: var(--fog); background-color: rgba(201, 255, 61, .1); }

.nav-link[aria-current="page"] {
  background-color: var(--lime);
  color: var(--ink);
}

.nav-ctas {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding-left: 10px;
  border-left: 1px dashed var(--line);
}

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-color: rgba(36, 86, 74, .55);
}

.header-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--lime) 58%, var(--orange));
  transition: width .12s linear;
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  color: var(--fog);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(70% 60% at 8% 0%, rgba(201, 255, 61, .09), transparent 60%),
    radial-gradient(60% 60% at 96% 4%, rgba(255, 106, 43, .1), transparent 60%),
    linear-gradient(180deg, #0E2A22 0%, #0A0F0E 62%);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background-image: repeating-linear-gradient(90deg, var(--lime) 0 14px, transparent 14px 34px);
  opacity: .45;
}

.footer-ticker {
  overflow: hidden;
  border-bottom: 1px dashed var(--line);
  background-color: rgba(10, 15, 14, .55);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: cmd-ticker 36s linear infinite;
}

.footer-ticker:hover .ticker-track { animation-play-state: paused; }

@keyframes cmd-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-run { display: flex; align-items: center; gap: 28px; padding: 11px 14px; }

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--silver);
  white-space: nowrap;
}

.ticker-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(201, 255, 61, .18);
}

.footer-inner {
  width: min(1320px, 100% - 40px);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) 0 clamp(24px, 3vw, 36px);
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2.1fr);
  gap: clamp(28px, 4vw, 64px);
}

.footer-brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  letter-spacing: .04em;
  color: var(--lime);
}

.footer-brand-name { margin-top: 6px; font-size: 18px; font-weight: 700; }

.footer-brand-note { margin-top: 10px; max-width: 34ch; font-size: 14.5px; color: var(--silver); }

.footer-version {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  color: var(--silver);
}

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

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

.footer-col-title {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lime);
}

.footer-list { display: flex; flex-direction: column; gap: 9px; }

.footer-link {
  position: relative;
  display: inline-block;
  font-size: 14.5px;
  color: var(--silver);
  transition: color .18s ease;
}

.footer-link::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 0;
  height: 1px;
  background-color: var(--lime);
  transition: width .18s ease;
}

.footer-link:hover { color: var(--lime); }
.footer-link:hover::before { width: 8px; }

.contact-item { display: inline-block; font-size: 13.5px; color: var(--silver); word-break: break-all; }

.footer-base {
  width: min(1320px, 100% - 40px);
  margin-inline: auto;
  padding-bottom: 28px;
}

.footer-contact-line {
  padding: 16px 0;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  color: var(--silver);
}

.legal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--silver);
}

.legal-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.legal-link { color: var(--fog); border-bottom: 1px solid var(--line); transition: color .18s ease, border-color .18s ease; }
.legal-link:hover { color: var(--lime); border-color: var(--lime); }

.legal-brand { font-family: var(--font-mono); font-size: 12.5px; color: var(--silver); }

/* ---------- 8. 通用内容组件 ---------- */
.card {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: linear-gradient(160deg, rgba(22, 64, 52, .78), rgba(28, 34, 38, .88));
  transition: border-color .2s ease, transform .2s ease;
}

.card:hover { border-color: var(--lime); transform: translateY(-2px); }

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card-title { font-size: 18px; font-weight: 700; line-height: 1.35; }

.card-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--silver);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--silver);
}

.tag-lime { border-color: var(--lime); color: var(--lime); }
.tag-orange { border-color: var(--orange); color: var(--orange); }
.tag-teal { border-color: var(--teal); color: var(--teal); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--silver);
}

.crumbs a { color: var(--silver); }
.crumbs a:hover { color: var(--lime); }
.crumbs .crumb-sep { color: var(--line); }
.crumbs [aria-current] { color: var(--fog); }

.ruler {
  height: 14px;
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px);
  opacity: .85;
}

/* 图片容器基础规则（页面阶段放置 <img> 即可） */
.figure { display: flex; flex-direction: column; gap: 10px; margin: 0; }

.figure-media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background-color: var(--ink-2);
  background-image: linear-gradient(135deg, rgba(22, 64, 52, .85), rgba(28, 34, 38, .9));
}

.figure-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(155, 176, 170, .1) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(155, 176, 170, .08) 0 1px, transparent 1px 44px);
}

.figure-media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(10, 15, 14, .72));
}

.figure-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure-caption { font-family: var(--font-mono); font-size: 13px; color: var(--silver); }

.figure-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background-color: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
}

.ratio-wide { aspect-ratio: 16 / 9; }
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-square { aspect-ratio: 1 / 1; }
.ratio-tall { aspect-ratio: 3 / 4; }

/* 长文章节跟随目录 */
.chapter-rail {
  position: sticky;
  top: 128px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 14px;
  border-left: 1px dashed var(--line);
}

.chapter-link {
  padding: 5px 0;
  font-size: 14px;
  color: var(--silver);
  transition: color .18s ease, transform .18s ease;
}

.chapter-link:hover { color: var(--fog); }

.chapter-link[aria-current] { color: var(--lime); transform: translateX(3px); }

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 86px;
  z-index: 70;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background-color: var(--panel);
  color: var(--lime);
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, border-color .2s ease;
}

.to-top[data-visible="true"] { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { border-color: var(--lime); }

/* 移动端固定收藏 / 订阅条 */
.dock { display: none; }

/* 纯前端筛选 */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background-color: rgba(28, 34, 38, .7);
  color: var(--silver);
  font-size: 13.5px;
  font-weight: 600;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.filter-btn:hover { color: var(--fog); border-color: var(--silver); }

.filter-btn[aria-pressed="true"] {
  background-color: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

/* 入场显现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}

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

/* ---------- 9. 响应式 ---------- */
@media (max-width: 1080px) {
  .brand-tagline { display: none; }
}

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }

  .nav-capsule {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 82px;
    z-index: 95;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    margin-left: 0;
    padding: 12px;
    border-radius: 22px;
    background-color: rgba(14, 42, 34, .98);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  }

  .nav-capsule[data-open] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }

  .nav-link { padding: 13px 14px; border-radius: 14px; font-size: 16px; }

  .nav-ctas {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-left: 0;
    padding-left: 0;
    padding-top: 12px;
    border-left: 0;
    border-top: 1px dashed var(--line);
  }

  .nav-ctas .btn { width: 100%; }

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

  .chapter-rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding-left: 0;
    padding-top: 12px;
    border-left: 0;
    border-top: 1px dashed var(--line);
  }
}

@media (max-width: 780px) {
  .brand-pulse { display: none; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand-mark { font-size: 32px; }
}

@media (max-width: 700px) {
  .dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 75;
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background-color: rgba(28, 34, 38, .95);
    box-shadow: var(--shadow-island);
  }

  .dock .btn { flex: 1 1 0; }

  .to-top { right: 14px; bottom: 84px; }
}

@media (max-width: 560px) {
  .header-rail { width: calc(100% - 24px); }
  .brand-mark { font-size: 17px; }
  .brand-name { font-size: 14px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-contact-line { font-size: 12.5px; }
  .legal-bar { flex-direction: column; align-items: flex-start; }
}

/* ---------- 10. 动效退让 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .ticker-track { animation: none; transform: none; flex-wrap: wrap; width: 100%; }

  .ticker-run { flex-wrap: wrap; }
}
