/* ==========================================================================
   安装赛场 · 共享样式表 /assets/site.css
   夜间赛场指挥中心：墨夜基底 + 控制台蓝面板 + 暖纸面长文 + 荧光青数据线
   ========================================================================== */

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

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

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

ul, ol { list-style: none; }

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

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

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

table { border-collapse: collapse; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-night: #071320;
  --console-blue: #10283F;
  --screen-blue: #1E3B55;
  --paper: #F1EADA;
  --paper-shadow: #CFC5B0;
  --cyan: #46F2E0;
  --orange: #FF7A3C;
  --orange-soft: #FFB08A;
  --grass-deep: #2F8F5B;
  --grass-light: #6FCB92;
  --text: #EEF3F7;
  --muted: #9CB0C0;
  --ink-text: #0d1a24;

  --line: rgba(70, 242, 224, 0.28);
  --line-soft: rgba(156, 176, 192, 0.18);
  --line-strong: rgba(70, 242, 224, 0.55);

  --font-display: "Arial Narrow", "Helvetica Neue Condensed", "Helvetica Neue",
    "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-editorial: "Source Han Serif SC", "Noto Serif SC", "Songti SC",
    "SimSun", "STSong", serif;
  --font-body: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, "Courier New", monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --radius: 2px;
  --space: clamp(40px, 6vw, 84px);
  --shadow-panel: 2px 2px 0 rgba(0, 0, 0, 0.38);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 基础与中文排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--ink-night);
  background-image:
    repeating-linear-gradient(0deg, rgba(156, 176, 192, 0.045) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(90deg, rgba(156, 176, 192, 0.045) 0 1px, transparent 1px 72px),
    radial-gradient(1100px 520px at 82% -8%, rgba(47, 143, 91, 0.18), transparent 62%),
    radial-gradient(900px 460px at 4% 2%, rgba(70, 242, 224, 0.07), transparent 58%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  word-break: break-word;
}

h1 {
  font-family: var(--font-editorial);
  font-size: clamp(28px, 3.6vw, 44px);
}

h2 {
  font-family: var(--font-editorial);
  font-size: clamp(22px, 2.4vw, 32px);
}

h3 {
  font-family: var(--font-editorial);
  font-size: clamp(18px, 1.8vw, 24px);
}

h4 {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

p { overflow-wrap: break-word; }

strong { color: var(--text); font-weight: 700; }

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

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

/* ---------- 4. 容器与栅格 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 760px;
}

.section {
  padding-block: var(--space);
}

.grid {
  display: grid;
  gap: clamp(18px, 2.5vw, 32px);
}

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

@media (max-width: 820px) {
  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 5. 排版组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  font-stretch: condensed;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 14px;
  height: 1px;
  background: var(--cyan);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--orange-soft);
}

.rule {
  height: 1px;
  border: 0;
  margin-block: clamp(24px, 3vw, 40px);
  background: linear-gradient(90deg, var(--cyan), rgba(70, 242, 224, 0) 72%);
}

.lede {
  font-family: var(--font-editorial);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.7;
  color: #d5e0ea;
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-stretch: condensed;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
    border-color 0.18s var(--ease), color 0.18s var(--ease);
}

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

.btn--primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #0b1017;
}

.btn--primary:hover {
  background: var(--orange-soft);
  border-color: var(--orange-soft);
  color: #0b1017;
}

.btn--ghost {
  color: var(--cyan);
  border-color: var(--line);
  background: rgba(70, 242, 224, 0.06);
}

.btn--ghost:hover {
  background: rgba(70, 242, 224, 0.14);
  border-color: var(--cyan);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 7. 面板 / 标签 ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--console-blue);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
}

.panel--screen {
  background: var(--screen-blue);
  border-color: var(--line);
}

.panel--paper {
  background: var(--paper);
  border-color: var(--paper-shadow);
  color: var(--ink-text);
}

.panel--paper h2,
.panel--paper h3,
.panel--paper h4,
.panel--paper strong { color: #08161f; }

.panel--paper a {
  color: #0b3a52;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(11, 58, 82, 0.4);
}

.panel--paper a:hover { text-decoration-color: #0b3a52; }

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.panel--paper .panel__head {
  border-bottom-color: rgba(13, 26, 36, 0.16);
}

.panel__body > * + * {
  margin-top: 14px;
}

.tag {
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  white-space: nowrap;
}

.tag--cyan {
  color: var(--cyan);
  border-color: rgba(70, 242, 224, 0.5);
}

.tag--orange {
  color: var(--orange-soft);
  border-color: rgba(255, 122, 60, 0.5);
}

/* ---------- 8. 图片容器 ---------- */
.media-frame {
  position: relative;
  width: 100%;
  min-height: 180px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background-color: var(--screen-blue);
  background-image:
    linear-gradient(135deg, rgba(47, 143, 91, 0.5), rgba(7, 19, 32, 0.9)),
    repeating-linear-gradient(90deg, rgba(70, 242, 224, 0.12) 0 1px, transparent 1px 28px);
}

.media-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--text);
  background: linear-gradient(to top, rgba(7, 19, 32, 0.94), rgba(7, 19, 32, 0));
}

/* ---------- 9. 章节刻度轨 ---------- */
.section-track {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-track__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.section-track__item::before {
  content: "";
  flex: none;
  width: 16px;
  height: 1px;
  background: var(--line-soft);
  transition: width 0.2s var(--ease), background-color 0.2s var(--ease);
}

.section-track__item.is-current {
  color: var(--cyan);
}

.section-track__item.is-current::before {
  width: 28px;
  background: var(--cyan);
}

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

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

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

.breadcrumb__sep { color: var(--screen-blue); }

.breadcrumb__current { color: var(--text); }

/* ---------- 11. 无障碍工具 ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-night);
  background: var(--cyan);
  border-radius: var(--radius);
  transition: top 0.18s var(--ease);
}

.skip-link:focus {
  top: 8px;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ---------- 12. 阅读进度条 ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
  pointer-events: none;
  z-index: 120;
}

/* ---------- 13. 显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

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

[data-section] { scroll-margin-top: 6rem; }

/* ==========================================================================
   14. 头部
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--ink-night);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 1px 0 rgba(70, 242, 224, 0.16);
}

/* 公告滚动带 */
.ticker {
  background: var(--console-blue);
  border-bottom: 1px solid var(--line);
}

.ticker__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 4px var(--gutter);
  min-height: 28px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ticker__inner::-webkit-scrollbar { display: none; }

.ticker__label {
  flex: none;
  padding: 1px 7px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange-soft);
  border: 1px solid rgba(255, 122, 60, 0.45);
  border-radius: var(--radius);
}

.ticker__track {
  display: flex;
  align-items: center;
  gap: 28px;
}

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--muted);
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.ticker__item::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: none;
  background: var(--cyan);
  transform: rotate(45deg);
}

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

/* 主栏 */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding-block: 14px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: none;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--cyan);
}

.brand__mark {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  font-stretch: condensed;
  color: var(--text);
  transition: color 0.18s var(--ease);
}

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

.brand__domain {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--muted);
}

/* 栏目索引按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-stretch: condensed;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

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

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 12px;
}

.nav-toggle__bars i {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

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

.site-header[data-open] .nav-toggle {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* 导航 */
.site-nav { display: block; }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2vw, 30px);
}

.site-nav__link {
  display: block;
  padding: 8px 2px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-stretch: condensed;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.site-nav__link:hover {
  color: var(--text);
  border-bottom-color: var(--line);
}

.site-nav__link[aria-current="page"] {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* 移动 / 平板导航 */
@media (max-width: 959px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 18px var(--gutter) 26px;
    max-height: 72vh;
    overflow-y: auto;
    background: var(--console-blue);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.55);
  }

  .site-header[data-open] .site-nav { display: block; }

  .site-nav__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 22px;
    justify-content: stretch;
  }

  .site-nav__link {
    padding: 12px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--line-soft);
  }
}

@media (max-width: 520px) {
  .brand__mark { font-size: 18px; }
  .header-bar { gap: 14px; min-height: 64px; }
  .ticker__track { gap: 20px; }
}

/* ==========================================================================
   15. 页脚
   ========================================================================== */
.site-footer {
  margin-top: clamp(56px, 8vw, 110px);
  padding-top: clamp(32px, 5vw, 64px);
  font-size: 14px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(16, 40, 63, 0.55), rgba(7, 19, 32, 0.95)),
    radial-gradient(620px 260px at 88% 0%, rgba(47, 143, 91, 0.22), transparent 70%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.35fr 0.85fr;
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(28px, 4vw, 48px);
}

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

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

.footer-label {
  padding-bottom: 10px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-stretch: condensed;
  color: var(--cyan);
  border-bottom: 1px solid var(--line-soft);
}

.footer-index {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-index li { position: relative; }

.footer-index a {
  color: var(--muted);
  transition: color 0.18s var(--ease);
}

.footer-index a:hover { color: var(--text); }

.footer-index .is-anchor { padding-left: 16px; }

.footer-index .is-anchor::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 9px;
  height: 1px;
  background: var(--cyan);
}

.footer-index .is-anchor a { color: var(--cyan); }

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-contact li {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: var(--text);
  overflow-wrap: anywhere;
}

.footer-contact__key {
  display: inline-block;
  min-width: 46px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

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

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-legal a {
  color: var(--muted);
  transition: color 0.18s var(--ease);
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
}

/* ==========================================================================
   16. 降低动效
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

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

  .btn:hover { transform: none; }
  .reading-progress { transition: none; }
}
