/* ============================================================
   球盟会赛场 · 共享样式 /assets/site.css
   夜航战术室：框架式导航 + 左侧阅读刻度 + 连续画布
   ============================================================ */

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

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

body { margin: 0; }

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

ul, ol { padding: 0; 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; }

address { font-style: normal; }

/* ---------- 2. Variables ---------- */
:root {
  --navy-900: #04101D;
  --navy-800: #071A2B;
  --navy-700: #0C2740;
  --cyan-400: #35E0CF;
  --cyan-200: #9AF4EA;
  --amber-500: #FFB547;
  --amber-200: #FFD79A;
  --text: #E8F6F3;
  --text-dim: #8DAEAD;
  --line: #1E4552;
  --grad-special: linear-gradient(160deg, #0A2A3A 0%, #06202E 100%);

  --font-head: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, ui-monospace, monospace;

  --header-h: 74px;
  --rail-w: 72px;
  --wrap: 1240px;
  --radius: 4px;
}

/* ---------- 3. Base ---------- */
html { background: var(--navy-900); }

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  background:
    radial-gradient(1200px 620px at 84% -12%, rgba(53, 224, 207, 0.10), transparent 62%),
    radial-gradient(900px 520px at 4% 8%, rgba(255, 181, 71, 0.06), transparent 60%),
    var(--navy-900);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.2rem, 5vw, 4.8rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.3rem); }
h4 { font-size: 1rem; }

p { text-wrap: pretty; }

::selection {
  background: rgba(53, 224, 207, 0.28);
  color: var(--text);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. Layout shell ---------- */
#main-content {
  padding-top: var(--header-h);
  min-height: 60vh;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 40px);
  padding-right: clamp(16px, 4vw, 40px);
}

@media (min-width: 1080px) {
  #main-content { padding-left: var(--rail-w); }
}

/* ---------- 5. Type helpers ---------- */
.lead {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.85;
  color: var(--text);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--cyan-400);
  opacity: 0.8;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.section-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.015em;
  line-height: 1.24;
}

.data-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

/* ---------- 6. Buttons & tags ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--cyan-400) 0%, #1FC0B2 100%);
  color: #04101D;
  box-shadow: 0 12px 28px rgba(53, 224, 207, 0.16);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--cyan-200) 0%, var(--cyan-400) 100%);
  box-shadow: 0 14px 34px rgba(53, 224, 207, 0.26);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--cyan-200);
  background: rgba(53, 224, 207, 0.05);
}

.btn--ghost:hover {
  border-color: var(--cyan-400);
  color: var(--cyan-400);
  background: rgba(53, 224, 207, 0.11);
}

.btn--amber {
  background: var(--amber-500);
  color: #20150A;
  box-shadow: 0 12px 26px rgba(255, 181, 71, 0.16);
}

.btn--amber:hover { background: var(--amber-200); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--cyan-200);
  background: rgba(53, 224, 207, 0.05);
}

.tag--amber {
  color: var(--amber-200);
  border-color: rgba(255, 181, 71, 0.4);
  background: rgba(255, 181, 71, 0.08);
}

/* ---------- 7. Breadcrumbs ---------- */
.breadcrumbs {
  padding: 18px 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

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

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

.breadcrumbs li + li::before {
  content: "/";
  color: #2D5461;
}

.breadcrumbs a { transition: color 0.16s ease; }
.breadcrumbs a:hover { color: var(--cyan-400); }
.breadcrumbs [aria-current="page"] { color: var(--amber-200); }

/* ---------- 8. Grid / panel ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 28px);
  grid-template-columns: minmax(0, 1fr);
}

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

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

@media (min-width: 1080px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--split {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
  }
}

.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(12, 39, 64, 0.55) 0%, rgba(7, 26, 43, 0.35) 100%);
}

.panel--flush {
  padding: 0;
  border: 0;
  background: none;
}

/* ---------- 9. Media frame（页面阶段放图片占位） ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--grad-special);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(53, 224, 207, 0.22);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.05) brightness(0.92);
}

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

.media-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--cyan-200);
  background: linear-gradient(0deg, rgba(4, 16, 29, 0.94) 0%, rgba(4, 16, 29, 0) 100%);
}

/* ---------- 10. Filter bar ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filter-bar-label {
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

.filter-btn {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.filter-btn:hover {
  color: var(--cyan-200);
  border-color: rgba(53, 224, 207, 0.5);
}

.filter-btn[aria-pressed="true"] {
  color: #04101D;
  background: var(--cyan-400);
  border-color: var(--cyan-400);
  font-weight: 700;
}

[data-filter-item].is-hidden { display: none; }

/* ---------- 11. Reveal ---------- */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ============================================================
   12. HEADER — 框架式导航
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  color: var(--text);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -120px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 3px;
  background: var(--cyan-400);
  color: #04101D;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  transition: top 0.18s ease;
}

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

.header-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  height: 72px;
  padding: 0 clamp(14px, 2vw, 26px);
  background: linear-gradient(180deg, rgba(7, 26, 43, 0.98) 0%, rgba(4, 16, 29, 0.96) 100%);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 1080px) {
  .header-bar { padding-left: calc(var(--rail-w) + 22px); }

  .header-bar::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--rail-w);
    width: 1px;
    background: var(--line);
  }
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--cyan-400);
  background: linear-gradient(160deg, rgba(53, 224, 207, 0.16) 0%, rgba(53, 224, 207, 0) 72%);
  box-shadow: inset 0 0 0 1px rgba(53, 224, 207, 0.06);
}

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

.brand-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

@media (max-width: 479px) {
  .brand-sub { display: none; }
}

/* 主导航 */
.site-nav { margin-left: auto; }

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

.nav-list a {
  position: relative;
  display: block;
  padding: 8px 11px;
  border-radius: 3px;
  font-size: 0.88rem;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-list a:hover {
  color: var(--cyan-200);
  background: rgba(53, 224, 207, 0.08);
}

.nav-list a[aria-current="page"] {
  color: var(--cyan-400);
  font-weight: 700;
}

.nav-list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan-400) 0%, rgba(53, 224, 207, 0) 100%);
}

/* 工具区 */
.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
}

.header-tag {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  white-space: nowrap;
}

@media (max-width: 1279px) {
  .header-tag { display: none; }
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--cyan-200);
  background: rgba(53, 224, 207, 0.06);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.nav-toggle:hover {
  border-color: rgba(53, 224, 207, 0.55);
  background: rgba(53, 224, 207, 0.12);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 9px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--cyan-400);
  transition: transform 0.2s ease, top 0.2s ease, bottom 0.2s ease;
}

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

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

.site-header[data-open] .nav-toggle-bars::after {
  bottom: 3.5px;
  transform: rotate(-45deg);
}

/* 进度线 */
.progress-track {
  position: relative;
  height: 2px;
  overflow: hidden;
  background: rgba(30, 69, 82, 0.55);
}

.progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan-400) 0%, var(--cyan-200) 55%, var(--amber-500) 100%);
}

/* 左侧阅读刻度轨 */
.frame-rail {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  z-index: 90;
  display: none;
  flex-direction: column;
  align-items: center;
  width: var(--rail-w);
  padding: 20px 0 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 26, 43, 0.92) 0%, rgba(4, 16, 29, 0.78) 100%);
}

.rail-label {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  opacity: 0.85;
}

.rail-ticks {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.rail-tick {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: #33586A;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.rail-tick.is-active {
  color: var(--cyan-400);
  text-shadow: 0 0 12px rgba(53, 224, 207, 0.5);
}

.tick-num { display: block; }

.rail-meter {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2px;
  background: rgba(30, 69, 82, 0.5);
}

.rail-meter-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleY(0);
  transform-origin: 50% 0;
  background: linear-gradient(180deg, var(--cyan-400) 0%, var(--amber-500) 100%);
}

@media (min-width: 1080px) {
  .frame-rail { display: flex; }
}

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

  .header-tools { margin-left: auto; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 99;
    margin: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 8px clamp(14px, 4vw, 24px) 22px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #071A2B 0%, #04101D 100%);
    box-shadow: 0 26px 52px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }

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

  .nav-list a {
    padding: 14px 4px;
    border-bottom: 1px solid rgba(30, 69, 82, 0.7);
    border-radius: 0;
    font-size: 1rem;
  }

  .nav-list a[aria-current="page"]::after {
    left: 4px;
    right: auto;
    bottom: 9px;
    width: 20px;
  }

  .site-header[data-open] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* ============================================================
   13. FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 40px) 26px;
  border-top: 1px solid var(--line);
  color: var(--text);
  background:
    radial-gradient(900px 380px at 12% 0%, rgba(53, 224, 207, 0.09), transparent 62%),
    radial-gradient(700px 320px at 92% 100%, rgba(255, 181, 71, 0.06), transparent 60%),
    linear-gradient(180deg, #04101D 0%, #071A2B 58%, #030C17 100%);
}

@media (min-width: 1080px) {
  .site-footer { padding-left: calc(var(--rail-w) + clamp(16px, 4vw, 40px)); }
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--cyan-400);
  background: linear-gradient(160deg, rgba(53, 224, 207, 0.16) 0%, rgba(53, 224, 207, 0) 72%);
}

.footer-name {
  font-family: var(--font-head);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.footer-line {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.footer-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.16s ease;
}

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

.footer-address {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 14px;
  font-size: 0.9rem;
}

.footer-key {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: #3C6675;
  padding-top: 4px;
}

.footer-val {
  color: var(--text);
  word-break: break-word;
}

.footer-note {
  margin-top: 16px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 181, 71, 0.4);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-dim);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: clamp(28px, 4vw, 46px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.footer-icp { color: #5C8695; }

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

@media (min-width: 1080px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.7fr) minmax(0, 1.25fr);
  }
}

/* ============================================================
   14. Reduced motion
   ============================================================ */
@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-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .site-nav { transition: none !important; }
}
