/* ==========================================================================
   OD赛事官网 — 共享样式表 /assets/site.css
   夜间赛场数据指挥中心：深墨蓝底 / 精密网格 / 直角面板 / 冷青 + 赛道橙
   ========================================================================== */

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

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

body,
h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }

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

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

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

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

table { border-collapse: collapse; border-spacing: 0; }

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 色板 */
  --c-ink-900: #050B18;
  --c-ink-800: #0A1526;
  --c-ink-700: #122241;
  --c-grid: #1E3358;
  --c-cyan: #25E6D8;
  --c-cyan-dim: #0E8F89;
  --c-orange: #FF6B1F;
  --c-white: #E8F1FF;
  --c-steel: #93A8C6;
  --c-green: #38E08B;
  --c-warn: #F5C542;

  /* 字体 */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* 字号八级 */
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-20: 1.25rem;
  --fs-26: 1.625rem;
  --fs-34: 2.125rem;
  --fs-46: 2.875rem;
  --fs-64: 4rem;

  /* 间距节奏 */
  --gap-1: 8px;
  --gap-2: 16px;
  --gap-3: 24px;
  --gap-4: 40px;
  --gap-5: 64px;

  /* 版心 */
  --shell: 1240px;

  /* 动效 */
  --dur: 200ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 基础中文排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--c-ink-900);
  background-image:
    linear-gradient(to right, rgba(30, 51, 88, 0.42) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 51, 88, 0.42) 1px, transparent 1px);
  background-size: 72px 72px;
  background-attachment: fixed;
  color: var(--c-white);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--c-white);
}

h1 { font-size: clamp(2rem, 4.4vw, var(--fs-64)); line-height: 1.06; }
h2 { font-size: clamp(1.5rem, 2.6vw, var(--fs-34)); line-height: 1.16; }
h3 { font-size: var(--fs-20); line-height: 1.32; }
h4 { font-size: var(--fs-16); line-height: 1.4; }

p { text-wrap: pretty; }

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-cyan);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--c-cyan);
}

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

/* ---------- 4. 焦点与可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--c-cyan);
  color: #04101F;
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 5. 布局骨架 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap-2);
}

.section {
  padding-block: clamp(36px, 5.5vw, var(--gap-5));
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gap-2);
  padding-bottom: var(--gap-2);
  margin-bottom: var(--gap-3);
  border-bottom: 1px solid var(--c-grid);
}

.page-head {
  padding-block: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 32px);
  border-bottom: 1px solid var(--c-grid);
}

.page-head__lede {
  max-width: 46ch;
  margin-top: var(--gap-2);
  color: var(--c-steel);
  font-size: var(--fs-16);
  line-height: 1.75;
}

.prose {
  max-width: 44em;
  color: var(--c-steel);
}

.prose h2,
.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  color: var(--c-white);
}

.prose p { margin-top: 1em; }

.prose a {
  color: var(--c-cyan);
  border-bottom: 1px solid rgba(37, 230, 216, 0.35);
}

.prose a:hover { border-bottom-color: var(--c-cyan); }

.prose ul,
.prose ol {
  margin-top: 1em;
  padding-left: 1.25em;
  list-style: disc;
}

.prose ol { list-style: decimal; }

.prose li + li { margin-top: 0.4em; }

/* ---------- 6. 按钮族 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  transition:
    background-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.btn--primary {
  background: var(--c-cyan);
  border-color: var(--c-cyan);
  color: #04101F;
}

.btn--primary:hover {
  background: transparent;
  color: var(--c-cyan);
}

.btn--ghost {
  background: transparent;
  border-color: var(--c-grid);
  color: var(--c-white);
}

.btn--ghost:hover {
  border-color: var(--c-cyan);
  color: var(--c-cyan);
}

.btn--orange {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: #100600;
}

.btn--orange:hover {
  background: transparent;
  color: var(--c-orange);
}

.btn--sm {
  padding: 9px 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
}

/* ---------- 7. 页头：双层信息导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(5, 11, 24, 0.96);
  border-bottom: 1px solid var(--c-grid);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* 第一层：品牌 + 状态说明 + 快捷工具 */
.util-bar {
  background: var(--c-ink-800);
  border-bottom: 1px solid var(--c-grid);
}

.util-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-2);
  min-height: 54px;
}

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

.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--c-cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--c-cyan);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.brand:hover .brand__mark {
  background: var(--c-cyan);
  color: #04101F;
}

.brand__name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--c-white);
  transition: color var(--dur) var(--ease);
}

.brand:hover .brand__name { color: var(--c-cyan); }

.brand__tag {
  padding-left: 10px;
  border-left: 1px solid var(--c-grid);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.1em;
  color: var(--c-steel);
}

.util-bar__note {
  margin-left: auto;
  font-size: var(--fs-12);
  letter-spacing: 0.02em;
  color: var(--c-steel);
  white-space: nowrap;
}

.util-bar__tools {
  display: flex;
  align-items: center;
  gap: var(--gap-1);
  margin-left: auto;
}

.util-link {
  padding: 8px 12px;
  border: 1px solid var(--c-grid);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--c-steel);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.util-link:hover {
  color: var(--c-cyan);
  border-color: var(--c-cyan-dim);
}

/* 第二层：主导航 */
.nav-bar { position: relative; }

.nav-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--gap-3);
  min-height: 62px;
}

.site-nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: var(--gap-3);
}

.site-nav__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  counter-reset: nav-idx;
}

.site-nav__list > li { counter-increment: nav-idx; }

.site-nav__list a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid transparent;
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--c-steel);
  transition:
    color var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.site-nav__list a::before {
  content: counter(nav-idx, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  color: rgba(147, 168, 198, 0.55);
  transition: color var(--dur) var(--ease);
}

.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 2px;
  background: var(--c-cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur) var(--ease);
}

.site-nav__list a:hover {
  color: var(--c-white);
  background: var(--c-ink-700);
}

.site-nav__list a:hover::before { color: var(--c-cyan); }

.site-nav__list a[aria-current="page"] {
  color: var(--c-white);
  background: var(--c-ink-700);
}

.site-nav__list a[aria-current="page"]::before { color: var(--c-cyan); }

.site-nav__list a[aria-current="page"]::after { transform: scaleX(1); }

.nav-bar__cta {
  display: inline-flex;
  margin-left: auto;
  flex-shrink: 0;
}

/* 移动索引按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--c-grid);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
  color: var(--c-cyan);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.nav-toggle:hover { border-color: var(--c-cyan-dim); }

.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 18px;
}

.nav-toggle__bars span {
  display: block;
  height: 1px;
  background: var(--c-cyan);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(4px) 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(-4px) rotate(-45deg);
}

/* 阅读进度尺 */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--c-grid);
  pointer-events: none;
}

.scroll-meter__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--c-cyan);
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  margin-top: var(--gap-5);
  padding-block: var(--gap-5) var(--gap-3);
  background: var(--c-ink-800);
  border-top: 1px solid var(--c-grid);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: var(--gap-4) var(--gap-3);
}

.brand--footer { margin-bottom: var(--gap-2); }

.footer-brand__desc {
  max-width: 30ch;
  color: var(--c-steel);
  font-size: var(--fs-14);
  line-height: 1.75;
}

.footer-brand .btn { margin-top: var(--gap-2); }

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--c-grid);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  color: var(--c-cyan);
}

.footer-col__list li + li { margin-top: 2px; }

.footer-col__list a {
  display: inline-block;
  padding: 6px 0;
  font-size: var(--fs-14);
  color: var(--c-steel);
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.footer-col__list a:hover {
  color: var(--c-cyan);
  transform: translateX(3px);
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-2) var(--gap-3);
  margin-top: var(--gap-4);
  padding-top: var(--gap-3);
  border-top: 1px solid var(--c-grid);
}

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

.footer-contact dt {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.12em;
  color: var(--c-steel);
}

.footer-contact dd {
  color: var(--c-white);
  font-size: var(--fs-14);
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px var(--gap-3);
  margin-top: var(--gap-4);
  padding-top: var(--gap-2);
  border-top: 1px solid var(--c-grid);
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--c-steel);
}

.footer-legal--muted { color: rgba(147, 168, 198, 0.7); }

/* ---------- 9. 通用内容组件 ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: var(--c-steel);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: #2C4A78;
}

.breadcrumb a {
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.breadcrumb a:hover {
  color: var(--c-cyan);
  border-bottom-color: rgba(37, 230, 216, 0.4);
}

.breadcrumb [aria-current="page"] { color: var(--c-white); }

.panel {
  padding: clamp(20px, 3vw, 32px);
  background: var(--c-ink-800);
  border: 1px solid var(--c-grid);
}

.panel--raised { background: var(--c-ink-700); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--c-grid);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.1em;
  color: var(--c-steel);
}

.tag--live {
  color: var(--c-orange);
  border-color: rgba(255, 107, 31, 0.5);
}

.tag--cyan {
  color: var(--c-cyan);
  border-color: rgba(37, 230, 216, 0.45);
}

.tag--done {
  color: var(--c-green);
  border-color: rgba(56, 224, 139, 0.45);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--c-ink-800);
  border: 1px solid var(--c-grid);
}

.stat-strip__item {
  padding: 16px 20px;
  border-left: 1px solid var(--c-grid);
}

.stat-strip__item:first-child { border-left: 0; }

.stat-strip__value {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-26);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--c-cyan);
}

.stat-strip__label {
  display: block;
  font-size: var(--fs-12);
  letter-spacing: 0.06em;
  color: var(--c-steel);
}

.index-rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--c-grid);
}

.index-rail__item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--c-grid);
  color: var(--c-steel);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.index-rail__item:hover {
  color: var(--c-white);
  background: var(--c-ink-800);
}

.index-rail__num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: var(--c-cyan);
}

/* ---------- 10. 图片容器基础规则 ---------- */
.figure {
  position: relative;
  display: block;
  margin: 0;
  background: var(--c-ink-700);
  border: 1px solid var(--c-grid);
  overflow: hidden;
}

.figure__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--c-ink-700);
}

.figure__media img,
.figure__media svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(37, 230, 216, 0.07) 0 1px,
    transparent 1px 5px
  );
}

.figure--wide .figure__media { aspect-ratio: 21 / 9; }
.figure--tall .figure__media { aspect-ratio: 4 / 5; }
.figure--square .figure__media { aspect-ratio: 1 / 1; }

.figure__caption {
  padding: 10px 14px;
  border-top: 1px solid var(--c-grid);
  background: var(--c-ink-800);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--c-steel);
}

.is-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  padding: var(--gap-2);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  line-height: 1.6;
  letter-spacing: 0.14em;
  color: var(--c-steel);
  text-align: center;
}

/* ---------- 11. 渐现 ---------- */
.js-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.js-reveal.is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 12. 响应式：平板 ---------- */
@media (max-width: 1100px) {
  .util-bar__note { display: none; }

  .footer-top {
    grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
    gap: var(--gap-3) var(--gap-2);
  }
}

/* ---------- 13. 响应式：移动导航断点 ---------- */
@media (max-width: 899px) {
  .brand__tag { display: none; }

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

  .nav-bar__inner {
    justify-content: flex-end;
    gap: 0;
    min-height: 58px;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    max-height: 0;
    overflow: hidden;
    background: var(--c-ink-800);
    border-top: 1px solid var(--c-grid);
    border-bottom: 1px solid var(--c-grid);
    transition: max-height var(--dur) var(--ease);
  }

  .site-nav[data-open] {
    max-height: min(72vh, 560px);
    overflow-y: auto;
  }

  .site-nav__list {
    display: block;
    padding: 8px clamp(16px, 4vw, 40px) 0;
  }

  .site-nav__list li + li { border-top: 1px solid var(--c-grid); }

  .site-nav__list a {
    width: 100%;
    padding: 15px 0;
    font-size: var(--fs-16);
    border: 0;
  }

  .site-nav__list a::after { display: none; }

  .site-nav__list a:hover,
  .site-nav__list a[aria-current="page"] {
    background: linear-gradient(to right, rgba(37, 230, 216, 0.12), transparent 70%);
  }

  .site-nav__list a[aria-current="page"] {
    color: var(--c-cyan);
  }

  .nav-bar__cta {
    display: flex;
    margin: 16px clamp(16px, 4vw, 40px) 24px;
  }

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

  .footer-brand { grid-column: 1 / -1; }

  .footer-brand__desc { max-width: 46ch; }
}

/* ---------- 14. 响应式：手机 ---------- */
@media (max-width: 559px) {
  .util-bar__inner { min-height: 50px; }
  .util-bar__tools { display: none; }

  .brand__name { font-size: var(--fs-16); }

  .footer-top { grid-template-columns: 1fr; }

  .footer-contact { grid-template-columns: 1fr; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-strip__item { border-left: 0; border-top: 1px solid var(--c-grid); }
  .stat-strip__item:first-child { border-top: 0; }
}

/* ---------- 15. 降低动效偏好 ---------- */
@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;
  }

  .js-reveal {
    opacity: 1;
    transform: none;
  }

  .footer-col__list a:hover { transform: none; }
}
