/* =========================================================
   球会体育App · 共享样式表 /assets/site.css
   高原竞技数据舱 —— 深蓝底 + 经幡五色状态层
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

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

ul, ol { list-style: none; }

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

table { border-collapse: collapse; width: 100%; }

::selection {
  background: var(--accent);
  color: #08122B;
}

/* ---------- 2. 变量 ---------- */
:root {
  /* 色板 */
  --ink-900: #0A1430;   /* 高原夜空深蓝 · 全站主背景 */
  --ink-800: #101E42;   /* 舱体次层深蓝 · 卡片与面板 */
  --ink-700: #1B2F5E;   /* 高原岩蓝 · 描边与分隔 */
  --accent:  #F2C230;   /* 经幡黄 · 唯一高识别强调色 */
  --flag-red:   #E8452C;
  --flag-green: #2FBFA0;
  --flag-blue:  #2E6BE6;
  --paper: #F5F7FA;     /* 经幡白 · 正文与标题 */
  --mist:  #7C93C4;     /* 雾蓝灰 · 次级说明 */
  --ice:   #C9D6F0;     /* 高海拔浅蓝 · 网格与刻度 */
  --deep:  #08122B;     /* 强调色上的文字色 */

  /* 语义别名 */
  --bg: var(--ink-900);
  --surface: var(--ink-800);
  --line: var(--ink-700);

  /* 字体 */
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "Inter", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-data: "Archivo", "Oswald", "Barlow Condensed", "DIN Alternate", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;

  /* 尺度 */
  --rail-w: 88px;
  --topbar-h: 64px;
  --gutter: clamp(20px, 4vw, 48px);
  --unit: 32px;
  --radius: 14px;
  --radius-lg: 26px;
  --shadow: 0 26px 60px -34px rgba(0, 0, 0, .9);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. 中文排版与页面骨架 ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 高原夜空氛围层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 84% 6%, rgba(46, 107, 230, .20), transparent 46%),
    radial-gradient(circle at 8% 94%, rgba(47, 191, 160, .10), transparent 44%);
}

#main-content,
.site-footer { position: relative; z-index: 1; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(34px, 5.4vw, 68px); }
h2 { font-size: clamp(26px, 3.4vw, 44px); }
h3 { font-size: clamp(20px, 2.2vw, 28px); }

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

strong { font-weight: 600; color: var(--paper); }

small { font-size: 13px; color: var(--mist); }

/* 数字视觉权重 */
.num,
[data-num] {
  font-family: var(--font-data);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  font-feature-settings: "tnum" 1;
}

.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.7;
  color: var(--ice);
  max-width: 34em;
}

/* 焦点可见性 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 跳至主内容 */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--deep);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  transform: translateY(-180%);
  transition: transform .12s var(--ease);
}

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

/* ---------- 4. 容器与网格 ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.prose {
  max-width: 36em;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ice);
}

.grid {
  display: grid;
  gap: var(--unit);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* 坐标索引标签 */
.coord {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mist);
}

.coord::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--accent);
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .05em;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .12s var(--ease), color .12s var(--ease), border-color .12s var(--ease);
}

.btn--accent {
  background: var(--accent);
  color: var(--deep);
}

.btn--accent:hover {
  background: #FFD75A;
}

.btn--ghost {
  border-color: var(--line);
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- 6. 面板卡片 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel--float {
  box-shadow: var(--shadow);
}

/* 图片容器基础规则（页面阶段放置 <img> 或内联 SVG） */
.figure {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--ink-800);
  background-image:
    linear-gradient(rgba(201, 214, 240, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 214, 240, .05) 1px, transparent 1px);
  background-size: 36px 36px;
}

.figure > img,
.figure > svg,
.figure > picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--4x3  { aspect-ratio: 4 / 3; }
.figure--1x1  { aspect-ratio: 1 / 1; }
.figure--wide { aspect-ratio: 21 / 9; }

.figure__cap {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(10, 20, 48, .74);
  color: var(--ice);
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* 经幡五色横带 */
.fabric-band {
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--flag-blue) 0 20%,
    var(--paper) 20% 40%,
    var(--flag-red) 40% 60%,
    var(--flag-green) 60% 80%,
    var(--accent) 80% 100%
  );
}

/* ---------- 7. 头部 · 侧边轨道 ---------- */
.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--rail-w);
  background: var(--ink-900);
  border-right: 1px solid var(--line);
}

/* 轨道 */
.rail {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 0 0;
  overflow: hidden;
}

.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 8px 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.rail__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px 14px 14px 5px;
  background: var(--accent);
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}

.rail__edition {
  font-family: var(--font-data);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
  color: var(--mist);
}

.rail__nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

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

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 6px;
}

.rail__link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 9px;
  border-radius: 10px;
  color: #AFC0E2;
  transition: background-color .12s var(--ease), color .12s var(--ease);
}

.rail__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .12s var(--ease);
}

.rail__link:hover {
  background: rgba(27, 47, 94, .85);
  color: var(--paper);
}

.rail__link[aria-current="page"] {
  background: rgba(242, 194, 48, .12);
  color: var(--accent);
  font-weight: 600;
}

.rail__link[aria-current="page"]::before { opacity: 1; }

.rail__idx {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .14em;
  color: var(--mist);
}

.rail__link[aria-current="page"] .rail__idx { color: var(--accent); }

.rail__label {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .02em;
  white-space: nowrap;
}

.rail__cue {
  margin-top: auto;
  padding: 18px 8px 20px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: .1em;
  text-align: center;
  color: var(--mist);
}

/* 顶部条（仅移动端显示） */
.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: var(--topbar-h);
  padding: 0 16px;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 11px 11px 11px 4px;
  background: var(--accent);
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.topbar__name {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--paper);
}

.topbar__name em {
  font-family: var(--font-data);
  font-style: normal;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mist);
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  transition: border-color .12s var(--ease), color .12s var(--ease);
}

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

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background-color .12s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s var(--ease);
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after  { top: 5px; }

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

/* ---------- 8. 页脚 ---------- */
.site-footer {
  margin-top: clamp(64px, 9vw, 128px);
  background: var(--ink-800);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: var(--unit);
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(44px, 6vw, 72px) var(--gutter) 40px;
}

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

.footer-brand {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--paper);
  transition: color .12s var(--ease);
}

.footer-brand:hover { color: var(--accent); }

.footer-edition {
  margin-top: 12px;
  max-width: 20em;
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: .06em;
  color: var(--mist);
}

.footer-title {
  margin-bottom: 16px;
  font-family: var(--font-data);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mist);
}

.footer-list li + li { margin-top: 9px; }

.footer-list a {
  font-size: 14px;
  color: var(--ice);
  transition: color .12s var(--ease);
}

.footer-list a:hover { color: var(--accent); }

.footer-list--contact li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13.5px;
}

.footer-key {
  flex: 0 0 auto;
  min-width: 2.6em;
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--mist);
}

.footer-val {
  color: var(--ice);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.footer-note {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--mist);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px var(--gutter) 24px;
  border-top: 1px solid var(--line);
}

.footer-legal {
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: .02em;
  color: var(--mist);
  font-variant-numeric: tabular-nums;
}

/* ---------- 9. 滚动显现协议 ---------- */
.has-js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .42s var(--ease), transform .42s var(--ease);
}

.has-js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1023px) {
  .grid {
    gap: 24px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .col-3, .col-4, .col-5 { grid-column: span 6; }
  .col-6, .col-7, .col-8 { grid-column: span 6; }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }
}

@media (max-width: 899px) {
  html { scroll-padding-top: calc(var(--topbar-h) + 12px); }

  body {
    padding-left: 0;
    padding-top: var(--topbar-h);
  }

  .skip-link { left: 10px; }

  .site-header {
    inset: 0 0 auto 0;
    width: auto;
    height: var(--topbar-h);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 20, 48, .95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  /* 抽屉遮罩 */
  .site-header::before {
    content: "";
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    z-index: 0;
    background: rgba(4, 8, 20, .6);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s var(--ease);
  }

  .site-header[data-open]::before {
    opacity: 1;
    visibility: visible;
  }

  .topbar {
    position: relative;
    z-index: 2;
    display: flex;
  }

  /* 轨道转为抽屉 */
  .rail {
    position: fixed;
    top: var(--topbar-h);
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 1;
    width: min(82vw, 320px);
    height: auto;
    padding: 16px 0 22px;
    background: var(--ink-800);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    transform: translateX(103%);
    transition: transform .34s var(--ease);
  }

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

  .rail__brand { display: none; }

  .rail__nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  .rail__list {
    gap: 4px;
    padding: 0 12px;
  }

  .rail__link {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 12px;
  }

  .rail__link::before { left: 0; }

  .rail__idx { font-size: 11px; }

  .rail__label {
    font-size: 15px;
    white-space: normal;
  }

  .rail__cue {
    padding: 16px 16px 0;
    text-align: left;
    font-size: 12px;
    letter-spacing: .08em;
  }
}

@media (max-width: 599px) {
  body { font-size: 16px; line-height: 1.75; }

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

  .col-3, .col-4, .col-5,
  .col-6, .col-7, .col-8 { grid-column: span 2; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-bottom: 28px;
  }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn { width: 100%; }
}

/* ---------- 11. 无障碍：减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .has-js .reveal {
    opacity: 1;
    transform: none;
  }

  .rail,
  .site-header::before {
    transition: none !important;
  }
}
