/* ==========================================================================
   开运赛场 — /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ========================================================================== */

/* 1. 变量
   -------------------------------------------------------------------------- */
:root {
  --navy: #0E2A47;
  --navy-mid: #1C4165;
  --stone: #33383D;
  --moss: #5C6B4E;
  --clay: #A9421F;
  --amber: #EE7A3C;
  --gold: #C9A227;
  --cream: #F7F4ED;
  --shale: #E5E1D6;
  --ice: #A8C4DA;

  --line: rgba(168, 196, 218, 0.55);
  --line-dark: rgba(14, 42, 71, 0.16);
  --line-light: rgba(168, 196, 218, 0.28);

  --shadow-soft: 0 1px 2px rgba(14, 42, 71, 0.06), 0 10px 24px rgba(14, 42, 71, 0.05);

  --font-display: "Source Han Sans SC Heavy", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell-max: 1320px;
  --gutter: clamp(16px, 4vw, 60px);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background-color: var(--cream);
  color: var(--stone);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}
.site-header :focus-visible { outline-color: var(--amber); }
.btn-primary:focus-visible { outline-color: var(--navy); }

/* 3. 排版与容器
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: var(--moss);
}

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

.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.2em; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--clay); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* 4. 按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 10px 18px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: transparent;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease),
              border-color 0.24s var(--ease), transform 0.24s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--cream);
}
.btn-primary:hover { background: #93381A; border-color: #93381A; }

.btn-line { border-color: var(--line-dark); color: var(--navy); }
.btn-line:hover { border-color: var(--clay); color: var(--clay); }

.btn-ghost {
  border-color: rgba(168, 196, 218, 0.45);
  color: var(--ice);
}
.btn-ghost:hover {
  color: var(--cream);
  border-color: var(--ice);
  background: rgba(168, 196, 218, 0.1);
}

/* 5. 跳转链接与滚动进度
   -------------------------------------------------------------------------- */
.skip-link {
  position: fixed;
  left: 14px;
  top: -120px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--navy);
  font-size: 14px;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 14px; }

/* 6. 头部命令栏
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--navy);
  border-bottom: 1px solid var(--line);
  color: var(--cream);
}

.header-scale {
  height: 5px;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(168, 196, 218, 0.45) 0 1px,
    transparent 1px 40px
  );
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.12s linear;
  will-change: transform;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 36px);
  min-height: var(--header-h);
  padding-block: 12px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 0 0 auto;
  text-decoration: none;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--cream);
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(168, 196, 218, 0.85);
}

.primary-nav { margin-inline: auto; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px 8px 13px;
  color: rgba(247, 244, 237, 0.82);
  font-size: 14.5px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-link:hover { color: var(--cream); background: rgba(168, 196, 218, 0.1); }
.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0;
  color: rgba(168, 196, 218, 0.7);
}
.nav-link[aria-current="page"] {
  color: var(--amber);
  background: rgba(168, 196, 218, 0.08);
}
.nav-link[aria-current="page"] .nav-index { color: var(--amber); }
.nav-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--clay);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.cmd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(168, 196, 218, 0.4);
  background: transparent;
  color: var(--ice);
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.cmd-btn:hover {
  color: var(--cream);
  border-color: var(--ice);
  background: rgba(168, 196, 218, 0.1);
}
.cmd-btn-mark {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  color: var(--amber);
  transition: transform 0.24s var(--ease);
}
.cmd-btn[aria-expanded="true"] .cmd-btn-mark { transform: rotate(45deg); }

/* 7. 全站目录面板
   -------------------------------------------------------------------------- */
.command-panel {
  display: none;
  background: var(--navy-mid);
  border-top: 1px solid var(--line-light);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.command-panel[data-open="true"] {
  display: block;
  animation: panel-drop 0.24s var(--ease);
}
@keyframes panel-drop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.command-inner {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  padding-block: clamp(24px, 3vw, 40px);
  padding-bottom: clamp(28px, 4vw, 52px);
}

.command-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ice);
}
.command-filter-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: rgba(247, 244, 237, 0.62);
}
.command-filter {
  width: 100%;
  padding: 10px 12px;
  background: rgba(14, 42, 71, 0.55);
  border: 1px solid rgba(168, 196, 218, 0.35);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 13px;
}
.command-filter::placeholder { color: rgba(168, 196, 218, 0.55); }
.command-filter:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-color: var(--amber);
}
.command-empty {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(247, 244, 237, 0.72);
}
.command-quick {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 22px;
}
.command-status {
  min-height: 1.2em;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(247, 244, 237, 0.8);
}

.command-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  align-content: start;
}
.command-item { border-bottom: 1px solid rgba(168, 196, 218, 0.18); }
.command-link {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 10px 14px 12px;
  color: rgba(247, 244, 237, 0.9);
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.command-link:hover { background: rgba(168, 196, 218, 0.1); color: var(--cream); }
.command-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ice);
}
.command-name { font-size: 15px; }
.command-route {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(168, 196, 218, 0.6);
}
.command-link[aria-current="page"] { color: var(--amber); }
.command-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--clay);
}
.command-link[aria-current="page"] .command-index,
.command-link[aria-current="page"] .command-route { color: var(--amber); }

/* 8. 页脚
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: clamp(48px, 6vw, 96px);
  padding-block: clamp(40px, 5vw, 68px) clamp(24px, 3vw, 40px);
  background: var(--cream);
  border-top: 1px solid var(--line-dark);
  color: var(--stone);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3.4vw, 64px);
}

.footer-brand-name {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--navy);
}
.footer-brand-note {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.75;
  color: var(--moss);
}

.footer-col-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--navy);
}

.footer-toggle {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--line-dark);
  background: transparent;
  color: var(--moss);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.footer-toggle-mark { transition: transform 0.24s var(--ease); }
.footer-toggle[aria-expanded="true"] .footer-toggle-mark { transform: rotate(45deg); }

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-link {
  position: relative;
  display: inline-block;
  padding: 5px 8px 5px 11px;
  color: var(--stone);
  font-size: 14.5px;
  line-height: 1.6;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer-link:hover { color: var(--clay); }
.footer-link[aria-current="page"] { color: var(--clay); }
.footer-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  background: var(--clay);
}

.footer-lines {
  font-size: 14px;
  line-height: 1.85;
  color: var(--moss);
}
.footer-line + .footer-line { margin-top: 4px; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--line-dark);
  font-size: 13px;
  color: var(--moss);
}
.footer-icp {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.footer-copy { max-width: 68ch; }

/* 9. 通用内容组件
   -------------------------------------------------------------------------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--moss);
}
.breadcrumb-link { color: var(--moss); text-decoration: none; }
.breadcrumb-link:hover { color: var(--clay); }
.breadcrumb-sep { color: rgba(92, 107, 78, 0.5); }
.breadcrumb-current { color: var(--navy); }

.data-card {
  position: relative;
  padding: clamp(18px, 2.2vw, 26px);
  background: #FFFDF8;
  border: 1px solid var(--line-dark);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease);
}
.data-card:hover {
  transform: translateY(-2px);
  border-color: var(--clay);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.table caption {
  caption-side: top;
  padding-bottom: 10px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--moss);
}
.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-dark);
  text-align: left;
  vertical-align: top;
}
.table thead th {
  border-bottom: 1px solid var(--navy);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--navy);
}
.table tbody tr:nth-child(even) { background: var(--shale); }
.table .data-num { white-space: nowrap; }

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

/* 10. 图片容器（页面阶段放置占位）
   -------------------------------------------------------------------------- */
.media-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  border: 1px solid var(--line);
}
.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 42, 71, 0) 42%, rgba(14, 42, 71, 0.55) 100%);
  pointer-events: none;
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--3x4 { aspect-ratio: 3 / 4; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-caption {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: var(--moss);
}

/* 11. 动效协议
   -------------------------------------------------------------------------- */
.js-on [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js-on [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.is-active { color: var(--clay); }

/* 12. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .header-inner { justify-content: space-between; }
  .primary-nav { display: none; }
  .header-actions { margin-left: auto; }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .footer-brand { padding-bottom: 26px; }
  .footer-col { border-top: 1px solid var(--line-dark); }
  .footer-col-title {
    margin-bottom: 0;
    padding: 16px 0;
    border-top: 0;
  }
  .footer-toggle { display: inline-flex; }
  .footer-col-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }
  .footer-col-body.is-open { max-height: 24rem; }
  .footer-list,
  .footer-lines { padding-bottom: 18px; }
  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  :root { --header-h: 62px; }
  body { font-size: 16px; }
  .brand-tag { display: none; }
  .brand-name { font-size: 1.05rem; }
  .header-scale { height: 4px; }
  .header-inner { padding-block: 10px; }

  .command-panel[data-open="true"] {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    max-height: none;
    z-index: 70;
    overflow-y: auto;
  }
  .command-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .command-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .command-link { grid-template-columns: 32px minmax(0, 1fr) auto; }
}

/* 13. 减少动效
   -------------------------------------------------------------------------- */
@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;
  }
  .scroll-progress { transition: none; }
  .js-on [data-reveal] { opacity: 1; transform: none; }
}
