/* ============================================================
   LEYU赛场 · /assets/site.css
   共享层：基础重置 / 设计变量 / 中文排版 / 头部导轨 / 页脚数据带
            通用按钮 / 面包屑 / 正文容器 / 网格 / 图像容器 / 可展开组
   ============================================================ */

/* ---------- 01 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

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

ul, ol { list-style: none; }

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

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

a { color: inherit; }

/* ---------- 02 设计变量 ---------- */
:root {
  --ink: #0A1622;
  --ink-2: #13263A;
  --ink-3: #1B344C;
  --paper: #F4EFE6;
  --rule: #D6CFC2;
  --cyan: #3DF2D0;
  --teal: #0E8C7E;
  --signal: #FF4B2B;
  --amber: #FFB24D;
  --muted: #7A8FA3;
  --white: #FFFFFF;

  --line: rgba(214, 207, 194, 0.14);
  --line-strong: rgba(214, 207, 194, 0.28);
  --body-dim: #BFCED9;

  --rail-w: 96px;
  --bar-h: 56px;
  --pad: clamp(18px, 3.4vw, 56px);
  --maxw: 1360px;

  --font-display: "Arial Narrow", "Helvetica Neue Condensed", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
  --font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --t-fast: 120ms;
  --t-base: 160ms;
  --t-slow: 240ms;
}

/* ---------- 03 全局底色与中文排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(19, 38, 58, 0.9) 0, rgba(10, 22, 34, 0) 640px),
    repeating-linear-gradient(90deg, rgba(214, 207, 194, 0.045) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(214, 207, 194, 0.045) 0 1px, transparent 1px 80px);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 901px) {
  body { padding-left: var(--rail-w); }
}

@media (max-width: 900px) {
  body { padding-top: var(--bar-h); }
}

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

/* ---------- 04 跳至主要内容的链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform var(--t-base) ease;
}

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

@media (min-width: 901px) {
  .skip-link { left: calc(var(--rail-w) + 12px); }
}

/* ---------- 05 头部：竖向框架导轨 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
}

@media (min-width: 901px) {
  .site-header {
    width: var(--rail-w);
    height: 100vh;
    height: 100dvh;
  }
}

@media (max-width: 900px) {
  .site-header {
    width: 100%;
    height: var(--bar-h);
  }
}

.scroll-meter {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 200;
  pointer-events: none;
}

@media (min-width: 901px) {
  .scroll-meter {
    left: var(--rail-w);
    width: calc(100% - var(--rail-w));
  }
}

.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, var(--ink-2) 0, #0E1D2D 58%, var(--ink) 100%);
  border-right: 1px solid var(--line-strong);
}

.rail-head {
  padding: 16px 12px 14px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: block;
  text-decoration: none;
}

.brand__word {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--white);
}

.brand__tail {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--cyan);
}

.brand__note {
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* 移动端顶栏的抽屉触发按钮 */
.nav-toggle { display: none; }

.rail-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.rail-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 0;
}

.rail-list {
  display: flex;
  flex-direction: column;
}

.rail-link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 12px 11px 13px;
  text-decoration: none;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition:
    color var(--t-base) ease,
    background-color var(--t-base) ease,
    border-color var(--t-base) ease;
}

.rail-link__idx {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: rgba(122, 143, 163, 0.72);
  transition: color var(--t-base) ease;
}

.rail-link__text {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.rail-link:hover {
  color: var(--white);
  background-color: rgba(61, 242, 208, 0.07);
  border-left-color: var(--teal);
}

.rail-link:hover .rail-link__idx { color: var(--cyan); }

.rail-link[aria-current="page"] {
  color: var(--white);
  background-color: rgba(61, 242, 208, 0.11);
  border-left-color: var(--cyan);
}

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

.rail-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.lamp {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.lamp__dot {
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(61, 242, 208, 0.16);
  animation: lampPulse 2.6s ease-in-out infinite;
}

@keyframes lampPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.38; }
}

.rail-util {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--t-base) ease, border-color var(--t-base) ease;
}

.rail-util:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* 移动端：导轨折叠为顶部刻度带，栏目从左侧滑出 */
@media (max-width: 900px) {
  .rail {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding: 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
    background: linear-gradient(90deg, var(--ink-2) 0, rgba(10, 22, 34, 0.97) 100%);
  }

  .rail-head {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border-bottom: 0;
  }

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

  .brand__word { font-size: 17px; }

  .brand__tail {
    margin-top: 0;
    font-size: 9px;
    letter-spacing: 0.26em;
  }

  .brand__note { display: none; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 11px;
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--paper);
    transition: border-color var(--t-base) ease, color var(--t-base) ease;
  }

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

  .nav-toggle__bars {
    position: relative;
    display: block;
    flex: none;
    width: 16px;
    height: 8px;
  }

  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 16px;
    height: 1px;
    background: var(--cyan);
    transition: transform var(--t-base) ease, opacity var(--t-base) ease;
  }

  .nav-toggle__bars::before { top: 0; }
  .nav-toggle__bars::after { bottom: 0; }

  .site-header[data-open] .nav-toggle__bars::before {
    transform: translateY(4px) rotate(45deg);
  }

  .site-header[data-open] .nav-toggle__bars::after {
    transform: translateY(-3px) rotate(-45deg);
  }

  .rail-panel {
    position: fixed;
    top: var(--bar-h);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px var(--pad) 34px;
    background: linear-gradient(180deg, #0E1D2D 0, var(--ink) 100%);
    border-top: 1px solid var(--line);
    overflow-y: auto;
    transform: translateX(-101%);
    visibility: hidden;
    transition: transform var(--t-slow) ease, visibility var(--t-slow) ease;
  }

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

  .rail-nav {
    flex: 0 0 auto;
    overflow: visible;
    padding: 0;
  }

  .rail-link {
    flex-direction: row;
    align-items: baseline;
    gap: 16px;
    padding: 15px 4px 15px 12px;
    border-bottom: 1px solid var(--line);
  }

  .rail-link__text { font-size: 16px; }

  .rail-link__idx { font-size: 10px; }

  .rail-foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
  }
}

/* ---------- 06 页脚：横向数据带 ---------- */
.site-footer {
  position: relative;
  background: var(--ink-2);
  border-top: 1px solid var(--line-strong);
}

.site-footer::before {
  content: "";
  display: block;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--cyan) 0 2px, transparent 2px 14px);
  opacity: 0.62;
}

.footer-band {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  padding: 0 var(--pad);
}

.footer-col {
  padding: 38px 30px 38px 0;
  border-right: 1px solid var(--line);
}

.footer-col:first-child { padding-left: 0; }

.footer-col:last-child {
  border-right: 0;
  padding-right: 0;
}

.footer-brand {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.03em;
  color: var(--white);
  text-decoration: none;
}

.footer-brand span {
  margin-left: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--cyan);
  vertical-align: 3px;
}

.footer-lede {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.85;
  color: #A9BCCB;
}

.footer-lede--dim {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.footer-title {
  position: relative;
  padding-top: 12px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 1px;
  background: var(--cyan);
}

.footer-title--gap { margin-top: 28px; }

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

.footer-list a {
  display: inline-block;
  padding: 5px 0;
  font-size: 14px;
  color: #C4D2DC;
  text-decoration: none;
  transition: color var(--t-base) ease, transform var(--t-base) ease;
}

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

.footer-list--plain li {
  padding: 5px 0;
  font-size: 14px;
  color: var(--muted);
}

.footer-contact {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
}

.footer-contact dt {
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

.footer-contact dd {
  font-size: 14px;
  line-height: 1.6;
  color: #C4D2DC;
}

.footer-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}

.footer-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
  padding: 14px var(--pad);
  border-top: 1px solid var(--line);
  background: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-strip__live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.footer-strip__legal { color: var(--muted); }

@media (max-width: 1080px) and (min-width: 681px) {
  .footer-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .footer-col { padding: 34px 26px; }

  .footer-col:nth-child(odd) { padding-left: 0; }

  .footer-col:nth-child(even) {
    border-right: 0;
    padding-right: 0;
  }

  .footer-col:nth-child(1),
  .footer-col:nth-child(2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 680px) {
  .footer-band { grid-template-columns: 1fr; }

  .footer-col {
    padding: 26px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .footer-col:last-child { border-bottom: 0; }

  .footer-strip { justify-content: flex-start; }
}

/* ---------- 07 通用排版组件 ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "zero" 1, "tnum" 1;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

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

.section--tight { padding: clamp(30px, 4vw, 56px) 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.display-1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 6.2vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--white);
}

.display-2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--white);
}

.display-3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.6vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--white);
}

.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.8;
  color: var(--body-dim);
}

.prose p + p { margin-top: 1.1em; }

.prose strong {
  font-weight: 600;
  color: var(--white);
}

.prose a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(61, 242, 208, 0.42);
}

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

.divider {
  height: 1px;
  border: 0;
  background: var(--line);
}

.tick-rule {
  height: 6px;
  background: repeating-linear-gradient(90deg, rgba(214, 207, 194, 0.55) 0 1px, transparent 1px 12px);
  opacity: 0.6;
}

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
}

/* ---------- 08 数据面板 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 2.6vw, 32px);
  background: var(--ink-2);
  border: 1px solid var(--line);
}

.paper-panel {
  padding: clamp(22px, 3vw, 40px);
  background: var(--paper);
  color: var(--ink);
  border-left: 3px solid var(--cyan);
}

.paper-panel p,
.paper-panel .prose { color: #1D2C3A; }

.paper-panel .eyebrow { color: var(--teal); }

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "zero" 1, "tnum" 1;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--cyan);
}

.stat__num--signal { color: var(--signal); }

.stat__unit {
  margin-left: 5px;
  font-size: 0.42em;
  letter-spacing: 0;
  color: var(--muted);
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(61, 242, 208, 0.35);
}

.tag--amber {
  color: var(--amber);
  border-color: rgba(255, 178, 77, 0.4);
}

.tag--signal {
  color: var(--signal);
  border-color: rgba(255, 75, 43, 0.45);
}

.tag--muted {
  color: var(--muted);
  border-color: var(--line-strong);
}

/* ---------- 09 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--cyan);
  background: transparent;
  border: 1px solid var(--cyan);
  transition:
    background-color var(--t-base) ease,
    color var(--t-base) ease,
    border-color var(--t-base) ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--cyan);
  color: var(--ink);
}

.btn--solid {
  background: var(--cyan);
  color: var(--ink);
}

.btn--solid:hover,
.btn--solid:focus-visible {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.btn--signal {
  border-color: var(--signal);
  color: var(--signal);
}

.btn--signal:hover,
.btn--signal:focus-visible {
  background: var(--signal);
  color: var(--white);
}

/* ---------- 10 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.crumbs li + li::before {
  content: "/";
  color: rgba(122, 143, 163, 0.6);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t-base) ease;
}

.crumbs a:hover { color: var(--cyan); }

.crumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 11 图像容器（页面阶段放置图片） ---------- */
.frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink-2);
  border: 1px solid var(--line);
}

.frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 22, 34, 0) 44%, rgba(10, 22, 34, 0.76) 100%);
  pointer-events: none;
  z-index: 1;
}

.frame--16x9 { aspect-ratio: 16 / 9; }
.frame--4x3 { aspect-ratio: 4 / 3; }
.frame--1x1 { aspect-ratio: 1 / 1; }
.frame--tall { aspect-ratio: 3 / 4; }

.frame--pitch::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(244, 239, 230, 0.09) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgba(244, 239, 230, 0.09) 0 1px, transparent 1px 56px);
}

.frame__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 7px 11px;
  background: rgba(10, 22, 34, 0.86);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ---------- 12 可展开内容组 ---------- */
.disclosure { border-top: 1px solid var(--line); }

.disclosure__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 18px 0;
  text-align: left;
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0;
  transition: color var(--t-base) ease;
}

.disclosure__btn:hover { color: var(--cyan); }

.disclosure__sign {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
}

.disclosure__sign::before,
.disclosure__sign::after {
  content: "";
  position: absolute;
  background: var(--cyan);
  transition: transform var(--t-base) ease, opacity var(--t-base) ease;
}

.disclosure__sign::before {
  top: 6px;
  left: 0;
  width: 14px;
  height: 2px;
}

.disclosure__sign::after {
  top: 0;
  left: 6px;
  width: 2px;
  height: 14px;
}

.disclosure__btn[aria-expanded="true"] .disclosure__sign::after {
  transform: scaleY(0);
  opacity: 0;
}

.disclosure__panel {
  padding: 0 0 22px;
  color: var(--body-dim);
}

.disclosure__panel[hidden] { display: none; }

/* ---------- 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-behavior: auto !important;
  }

  .scroll-meter { transition: none; }
}
