/* =========================================================
   球盟会体育 · 共享样式表 /assets/site.css
   视觉方向：夜场赛事指挥中心 / 蓝图网格 / 粗野主义框架
   ========================================================= */

/* ---------- 1. 变量 ---------- */
:root {
  --ink: #0A1F1A;
  --ink-2: #0F2E27;
  --carbon: #111516;
  --grid: #1E3A33;
  --cyan: #35F2D0;
  --gold: #F0B23C;
  --rose: #FF3D6E;
  --paper: #F3EBDC;
  --white: #EAF7F3;
  --mist: #9DB3AC;
  --deep: #06231D;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-17: 1.0625rem;
  --fs-22: 1.375rem;
  --fs-30: 1.875rem;
  --fs-44: 2.75rem;
  --fs-64: 4rem;

  --shell: 1400px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow-hard: 6px 6px 0 rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2. 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background-color: #0A1F1A;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-17);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0;
  color: var(--white);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 蓝图网格背景 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(30, 58, 51, 0.55) 0 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 58, 51, 0.55) 0 1px, transparent 1px);
  background-size: 72px 72px;
}

/* 场馆灯带光晕 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(21, 72, 61, 0.6) 0%, rgba(10, 31, 26, 0) 62%),
    radial-gradient(90% 65% at 100% 100%, rgba(240, 178, 60, 0.07) 0%, rgba(10, 31, 26, 0) 62%);
}

img, svg, video { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 3. 中文排版 ---------- */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--white);
}
h1 { font-size: clamp(2rem, 5.4vw, var(--fs-64)); }
h2 { font-size: clamp(1.5rem, 3.4vw, var(--fs-44)); }
h3 { font-size: clamp(1.15rem, 2vw, var(--fs-22)); }
h4 { font-size: var(--fs-17); }
p { line-height: 1.75; }
strong { font-weight: 700; color: var(--cyan); }

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

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

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 16px;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--deep);
  background: var(--cyan);
  border: 2px solid var(--deep);
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

#main-content:focus { outline: none; }

/* ---------- 5. 容器 / 章节 / 网格 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: 880px; }

.section {
  position: relative;
  padding-block: clamp(44px, 7vw, 96px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
  padding-bottom: 16px;
  margin-bottom: clamp(22px, 3vw, 38px);
  border-bottom: 2px solid var(--grid);
}
.section-index {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.section-title {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-note {
  margin-left: auto;
  max-width: 46ch;
  font-size: var(--fs-14);
  color: var(--mist);
}

.grid { display: grid; gap: clamp(16px, 2vw, 26px); }
.grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.g-4 { grid-column: span 4; }
.g-6 { grid-column: span 6; }
.g-8 { grid-column: span 8; }
.g-12 { grid-column: span 12; }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  border: 2px solid transparent;
  background: transparent;
  color: var(--white);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
              background-color 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease);
}
.btn-primary {
  color: var(--deep);
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 4px 4px 0 var(--gold);
}
.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--gold);
}
.btn-primary:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--gold);
}
.btn-ghost {
  color: var(--white);
  border-color: var(--grid);
}
.btn-ghost:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(53, 242, 208, 0.07);
}
.btn-gold {
  color: #241A03;
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55);
}
.btn-gold:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.55); }
.btn-block { display: flex; width: 100%; }

/* ---------- 7. 头部框架 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: linear-gradient(180deg, #0C2620 0%, #0A1F1A 72%);
  border-bottom: 3px solid var(--grid);
  transition: box-shadow 0.3s var(--ease);
}
.site-header[data-collapsed] { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55); }

.header-scale {
  height: 8px;
  background-image: repeating-linear-gradient(to right, var(--grid) 0 1px, transparent 1px 14px);
  border-bottom: 1px solid rgba(30, 58, 51, 0.7);
}

.header-frame {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 26px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 15px var(--gutter);
  transition: padding 0.3s var(--ease);
}
.site-header[data-collapsed] .header-frame { padding-block: 9px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 0;
}
.brand-mark {
  padding: 9px 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  color: var(--deep);
  background: var(--cyan);
  box-shadow: 4px 4px 0 rgba(240, 178, 60, 0.85);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.brand:hover .brand-mark {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(240, 178, 60, 0.95);
}
.brand-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
  white-space: nowrap;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mist);
  white-space: nowrap;
}

.site-nav { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  counter-reset: navitem;
}
.nav-item { counter-increment: navitem; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 13px;
  font-size: 15px;
  font-weight: 600;
  color: var(--mist);
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease),
              border-color 0.18s var(--ease), font-size 0.25s var(--ease);
}
.nav-link::before {
  content: "0" counter(navitem);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--grid);
  transform: translateY(-2px);
  transition: color 0.18s var(--ease);
}
.nav-link:hover { color: var(--white); background: rgba(30, 58, 51, 0.45); }
.nav-link:hover::before { color: var(--gold); }
.nav-link[aria-current="page"] {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}
.nav-link[aria-current="page"]::before { color: var(--gold); }

.site-header[data-collapsed] .nav-link { padding: 7px 11px; font-size: 13.5px; }
.site-header[data-collapsed] .brand-name { font-size: 17px; }

.nav-foot { display: none; }

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

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--white);
  border: 2px solid var(--grid);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.nav-toggle:hover { color: var(--cyan); border-color: var(--cyan); }
.nav-toggle-bar {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background 0.2s var(--ease);
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease), top 0.2s var(--ease);
}
.nav-toggle-bar::before { top: -5px; }
.nav-toggle-bar::after { top: 5px; }
.site-header[data-open] .nav-toggle-bar { background: transparent; }
.site-header[data-open] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle-bar::after { top: 0; transform: rotate(-45deg); }

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -3px;
  z-index: 6;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--gold) 70%, var(--rose) 100%);
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  background: var(--carbon);
  border-top: 3px solid var(--grid);
  color: var(--mist);
}
.footer-scale {
  height: 8px;
  background-image: repeating-linear-gradient(to right, var(--grid) 0 1px, transparent 1px 14px);
  border-bottom: 1px solid rgba(30, 58, 51, 0.7);
}
.footer-frame {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(30px, 4.5vw, 58px) var(--gutter) 26px;
}

.footer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--grid);
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-mark {
  padding: 9px 10px;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--cyan);
  border: 2px solid var(--grid);
}
.footer-brand-text { display: flex; flex-direction: column; gap: 5px; }
.footer-name {
  font-size: var(--fs-22);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
}
.footer-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist);
}
.footer-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.06em;
  color: var(--mist);
}
.footer-status-dot {
  width: 8px;
  height: 8px;
  background: var(--cyan);
  animation: qmh-pulse 2.4s ease-in-out infinite;
}
@keyframes qmh-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(53, 242, 208, 0.5); }
  50% { opacity: 0.5; box-shadow: 0 0 0 7px rgba(53, 242, 208, 0); }
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1fr 1.25fr 0.9fr;
  gap: 30px 28px;
  padding: 32px 0;
}
.footer-col-title {
  padding-bottom: 8px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--grid);
}
.footer-list { display: flex; flex-direction: column; gap: 2px; }
.footer-link {
  display: inline-block;
  padding: 6px 0;
  font-size: 15px;
  color: var(--mist);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.footer-link:hover,
.footer-link:focus-visible { color: var(--cyan); border-bottom-color: var(--cyan); }
.footer-link-strong { color: var(--white); font-weight: 700; }
.footer-link-legacy {
  color: var(--gold);
  border-bottom: 1px solid rgba(240, 178, 60, 0.45);
}
.footer-link-legacy:hover,
.footer-link-legacy:focus-visible { color: var(--white); border-bottom-color: var(--white); }
.footer-text {
  display: inline-block;
  padding: 4px 0;
  font-size: var(--fs-14);
  line-height: 1.7;
  color: var(--mist);
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  padding-top: 22px;
  border-top: 1px solid var(--grid);
}
.footer-base-item {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.06em;
  color: var(--mist);
}

/* ---------- 9. 通用组件 ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--carbon);
  border: 2px solid var(--grid);
  box-shadow: var(--shadow-hard);
}
.panel-cyan { border-color: rgba(53, 242, 208, 0.5); }
.panel-paper {
  color: #16241F;
  background: var(--paper);
  border-color: #C6BCA6;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.55);
}
.panel-paper .panel-title { color: #16241F; }
.panel-paper .panel-meta { color: #5C6A63; }
.panel-title {
  margin-bottom: 10px;
  font-size: var(--fs-22);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}
.panel-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  border: 1px solid var(--grid);
}
.tag-live { color: var(--cyan); border-color: var(--cyan); }
.tag-warn { color: var(--rose); border-color: var(--rose); }
.tag-gold { color: var(--gold); border-color: var(--gold); }

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding-block: 18px;
}
.crumb-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}
.crumb-item + .crumb-item::before { content: "/"; color: var(--grid); }
.crumb-item a {
  color: var(--mist);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.crumb-item a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.prose { max-width: 70ch; }
.prose p {
  margin-bottom: 1.1em;
  line-height: 1.85;
  color: #D7E6E0;
}
.prose h3 { margin: 1.8em 0 0.7em; }
.prose ul { margin-bottom: 1.2em; }
.prose li { position: relative; padding-left: 20px; margin-bottom: 0.5em; color: #D7E6E0; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 2px;
  background: var(--cyan);
}

.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(160deg, var(--ink-2), var(--ink));
  border: 2px solid var(--grid);
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 31, 26, 0) 42%, rgba(10, 31, 26, 0.78) 100%);
}
.media-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  color: var(--mist);
}
.media-frame--hero { aspect-ratio: 21 / 9; }
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }

/* ---------- 10. 显现动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

/* ---------- 11. 平板 ---------- */
@media (max-width: 1100px) {
  .brand-sub { display: none; }
  .nav-link::before { display: none; }
  .nav-link { padding: 9px 10px; font-size: 14px; }
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 12. 移动端 ---------- */
@media (max-width: 900px) {
  html { scroll-padding-top: 88px; }

  .nav-toggle { display: inline-flex; }
  .site-header[data-collapsed] .nav-link { font-size: 17px; padding: 16px 4px; }

  .site-header::after {
    content: "";
    position: fixed;
    inset: 76px 0 0 0;
    z-index: 4;
    background: rgba(4, 14, 11, 0.74);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
  }
  .site-header[data-open]::after { opacity: 1; pointer-events: auto; }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    width: min(90vw, 380px);
    padding: 26px 22px 26px;
    overflow-y: auto;
    background: var(--carbon);
    border-left: 3px solid var(--grid);
    transform: translateX(103%);
    transition: transform 0.32s var(--ease);
  }
  .site-header[data-open] .site-nav { transform: translateX(0); }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    margin-top: 58px;
  }
  .nav-item { border-bottom: 1px solid var(--grid); }
  .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 4px;
    font-size: 17px;
    border-bottom: 0;
  }
  .nav-link::before {
    display: block;
    order: 2;
    font-size: 11px;
    transform: none;
  }
  .nav-link[aria-current="page"] { border-bottom-color: transparent; }

  .nav-foot {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid var(--grid);
  }
  .nav-foot-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
  }
  .nav-foot-value {
    font-size: var(--fs-14);
    color: var(--mist);
    word-break: break-all;
    margin-bottom: 8px;
  }

  .header-frame { padding-block: 12px; }
  .site-header[data-collapsed] .header-frame { padding-block: 10px; }
  .brand-name { font-size: 17px; }

  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-4, .g-6, .g-8 { grid-column: span 12; }

  .media-frame--hero { aspect-ratio: 16 / 9; }
}

@media (max-width: 560px) {
  .btn { padding: 11px 14px; font-size: 13px; }
  .header-actions .btn { display: none; }
  .site-header[data-open] .header-actions .btn { display: none; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .footer-head { flex-direction: column; align-items: flex-start; }
}

/* 移动端首屏保留 CTA：窄屏下把 CTA 放进抽屉 */
@media (max-width: 560px) {
  .nav-foot .nav-foot-cta { margin-top: 14px; }
}

/* ---------- 13. 动效降级 ---------- */
@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;
  }
  html { scroll-behavior: auto; }
  .scroll-progress { transition: none; }
}
