/* ============================================================
   云体育赛场 — 共享样式表 /assets/site.css
   深靛蓝底 + 矿物色 + 粗野主义档案面板
   ============================================================ */

/* ---------- 1. reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, picture, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; }

/* ---------- 2. tokens ---------- */
:root {
  --ink-900: #0E1730;
  --ink-800: #16244A;
  --ink-700: #1F3566;
  --bone: #EFEADF;
  --stone: #A8A496;
  --moss: #7FA05A;
  --clay: #C46A4A;
  --acid: #C8FF4D;
  --signal: #FF6B2C;
  --lake: #4DD0E1;

  --accent: var(--acid);
  --accent-soft: rgba(200, 255, 77, .14);
  --accent-ink: #0E1730;

  --line: rgba(239, 234, 223, .20);
  --line-strong: rgba(239, 234, 223, .55);
  --shadow-hard: 10px 10px 0 rgba(4, 8, 20, .72);

  --rail-w: 96px;
  --topbar-h: 62px;
  --shell-max: 1240px;
  --gutter: clamp(18px, 4vw, 46px);

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang 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;
}
@media (min-width: 768px) { :root { --topbar-h: 68px; } }

html[data-league="cup"] {
  --accent: var(--signal);
  --accent-soft: rgba(255, 107, 44, .16);
  --accent-ink: #14100D;
}

/* ---------- 3. base ---------- */
body {
  background: var(--ink-900);
  color: var(--bone);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  min-height: 100vh;
  padding-top: var(--topbar-h);
  overflow-x: hidden;
}
@media (min-width: 1000px) {
  body { padding-left: var(--rail-w); }
}

h1, .h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.03em;
}
h2, .h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.02em;
}
h3, .h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.01em;
}

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

#main-content { scroll-margin-top: calc(var(--topbar-h) + 18px); }

/* ---------- 4. header : topbar ---------- */
.site-header { position: relative; }

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -160%);
  background: var(--acid);
  color: var(--ink-900);
  font-weight: 800;
  font-size: 14px;
  padding: 10px 20px;
  border: 2px solid var(--ink-900);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--gutter);
  background: var(--ink-900);
  border-bottom: 2px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  min-width: 0;
}
.brand__mark {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--ink-700);
  transition: background-color .2s ease;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--ink-900);
}
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.15;
  white-space: nowrap;
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--stone);
  line-height: 1.2;
  white-space: nowrap;
}
@media (max-width: 599px) { .brand__sub { display: none; } }

.league-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}
.league-switch__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .24em;
  color: var(--stone);
}
@media (max-width: 767px) { .league-switch__label { display: none; } }

.league-chip {
  border: 2px solid var(--line);
  background: var(--ink-800);
  color: var(--stone);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 5px 11px;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.league-chip:hover { color: var(--bone); border-color: var(--line-strong); }
.league-chip[data-league="premier"][aria-pressed="true"] {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--ink-900);
  box-shadow: 4px 4px 0 rgba(4, 8, 20, .7);
}
.league-chip[data-league="cup"][aria-pressed="true"] {
  background: var(--signal);
  border-color: var(--signal);
  color: #14100D;
  box-shadow: 4px 4px 0 rgba(4, 8, 20, .7);
}
@media (max-width: 479px) {
  .league-chip { font-size: 12px; padding: 4px 8px; border-width: 2px; }
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}
@media (max-width: 479px) {
  .topbar__actions .btn--signal { display: none; }
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  transition: transform .1s linear, background-color .2s ease;
}

/* ---------- 5. header : nav toggle ---------- */
.nav-toggle {
  position: relative;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 2px solid var(--line);
  background: var(--ink-800);
  color: var(--bone);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 11px;
  transition: border-color .2s ease, background-color .2s ease;
}
.nav-toggle:hover { border-color: var(--line-strong); }
.nav-toggle__bars { display: flex; flex-direction: column; gap: 3px; width: 17px; }
.nav-toggle__bars i { display: block; height: 2px; background: var(--bone); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.nav-toggle__bars i { transition: transform .2s ease, opacity .2s ease; }
@media (min-width: 1000px) { .nav-toggle { display: none; } }

/* ---------- 6. header : nav panel ---------- */
.site-nav {
  position: fixed;
  z-index: 70;
  top: var(--topbar-h);
  right: 0;
  bottom: 0;
  width: min(330px, 86vw);
  background: var(--ink-800);
  border-left: 2px solid var(--bone);
  box-shadow: -12px 0 0 rgba(4, 8, 20, .55);
  padding: 18px 0 26px;
  overflow-y: auto;
  transform: translateX(101%);
  transition: transform .28s ease;
}
.site-nav[data-open] { transform: translateX(0); }

.site-nav__list { display: flex; flex-direction: column; }
.site-nav__link {
  display: block;
  padding: 15px 26px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--bone);
  border-bottom: 1px solid var(--line);
  border-left: 4px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.site-nav__link:hover { background: var(--ink-700); }
.site-nav__link[aria-current="page"] {
  background: var(--accent-soft);
  border-left-color: var(--accent);
  color: var(--accent);
}
.site-nav__foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 22px 26px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--stone);
}
.site-nav__dot {
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

@media (min-width: 1000px) {
  .site-nav {
    top: var(--topbar-h);
    left: 0;
    right: auto;
    bottom: 0;
    width: var(--rail-w);
    border-left: 0;
    border-right: 2px solid var(--line);
    box-shadow: none;
    padding: 22px 0;
    transform: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .site-nav__list { gap: 10px; align-items: stretch; padding: 0 10px; }
  .site-nav__link {
    writing-mode: vertical-rl;
    text-orientation: upright;
    text-align: center;
    margin-inline: auto;
    font-size: 13px;
    letter-spacing: .26em;
    padding: 16px 8px;
    border-bottom: 2px solid var(--line);
    border-left: 2px solid transparent;
    background: var(--ink-800);
  }
  .site-nav__link:hover { background: var(--ink-700); }
  .site-nav__link[aria-current="page"] {
    background: var(--accent);
    color: var(--accent-ink);
    border-left-color: var(--accent);
    border-bottom-color: var(--accent);
    box-shadow: 5px 5px 0 rgba(4, 8, 20, .7);
  }
  .site-nav__foot {
    writing-mode: vertical-rl;
    text-orientation: upright;
    margin: auto auto 0;
    letter-spacing: .3em;
    font-size: 10px;
  }
  .site-nav__dot { display: none; }
}

/* ---------- 7. footer ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 110px);
  background: var(--ink-800);
  border-top: 2px solid var(--bone);
  padding: clamp(34px, 5vw, 62px) 0 26px;
  color: var(--stone);
}
.footer-grid {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(26px, 3vw, 40px);
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}
.footer-col { min-width: 0; }

.footer-brand {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--bone);
  line-height: 1.2;
}
.footer-icp {
  margin-top: 10px;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--stone);
  border: 1px solid var(--line);
  padding: 3px 9px;
}
.footer-note {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.7;
  max-width: 32ch;
}

.footer-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .26em;
  color: var(--bone);
  margin-bottom: 14px;
}

.footer-links a {
  display: inline-block;
  padding: 5px 0;
  font-size: 15px;
  color: var(--stone);
  transition: color .2s ease, transform .2s ease;
}
.footer-links a:hover { color: var(--accent); transform: translateX(4px); }

.footer-facts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.footer-facts__k { color: var(--stone); }
.footer-facts__v {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}

.footer-contacts { margin-bottom: 16px; }
.footer-contacts li {
  padding: 4px 0;
  font-size: 14px;
  color: var(--stone);
  word-break: break-word;
}
.footer-contacts li:first-child {
  font-family: var(--font-mono);
  color: var(--bone);
  font-size: 14px;
}

.footer-base {
  max-width: var(--shell-max);
  margin: clamp(26px, 4vw, 44px) auto 0;
  padding: 18px var(--gutter) 0;
  border-top: 2px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--stone);
}

/* ---------- 8. buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 11px 18px;
  border: 2px solid var(--bone);
  background: transparent;
  color: var(--bone);
  box-shadow: 5px 5px 0 rgba(4, 8, 20, .85);
  transition: transform .18s ease, box-shadow .18s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(4, 8, 20, .85); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 rgba(4, 8, 20, .85); }
.btn--sm { padding: 7px 13px; font-size: 13px; }
.btn--acid { background: var(--acid); border-color: var(--acid); color: var(--ink-900); }
.btn--signal { background: var(--signal); border-color: var(--signal); color: #14100D; }
.btn--ghost { background: var(--ink-700); border-color: var(--line-strong); color: var(--bone); }

/* ---------- 9. layout ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.stack { display: grid; gap: clamp(24px, 4vw, 48px); }

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
  .grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .col-4 { grid-column: span 4; }
  .col-6 { grid-column: span 6; }
  .col-8 { grid-column: span 8; }
  .col-12 { grid-column: span 12; }
}

/* ---------- 10. panels & bands ---------- */
.panel {
  position: relative;
  background: var(--ink-800);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-hard);
  padding: clamp(20px, 3vw, 38px);
}
.panel--accent { border-color: var(--accent); }
.panel--flat { box-shadow: none; }

.band {
  background: var(--ink-800);
  border-block: 2px solid var(--line);
  padding-block: clamp(20px, 3vw, 34px);
}
.band--accent { border-block-color: var(--accent); }

.round-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--stone);
}
.round-divider::before,
.round-divider::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--line);
}

/* ---------- 11. type utilities ---------- */
.data {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.vnote {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .32em;
  color: var(--stone);
}
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1em; }
.prose a {
  color: var(--lake);
  border-bottom: 1px solid rgba(77, 208, 225, .45);
}
.prose a:hover { border-bottom-color: var(--lake); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  padding: 3px 9px;
  border: 1px solid var(--line);
  color: var(--stone);
}
.tag--acid { background: var(--acid); border-color: var(--acid); color: var(--ink-900); }
.tag--signal { background: var(--signal); border-color: var(--signal); color: #14100D; }
.tag--moss { background: var(--moss); border-color: var(--moss); color: #101A08; }
.tag--clay { background: var(--clay); border-color: var(--clay); color: var(--bone); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--stone);
}
.crumbs li + li::before {
  content: "/";
  margin: 0 10px;
  color: var(--line-strong);
}
.crumbs a:hover { color: var(--accent); }

/* ---------- 12. figures ---------- */
.figure {
  position: relative;
  overflow: hidden;
  background: var(--ink-700);
  border: 2px solid var(--line);
}
.figure__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--ink-700);
  background-image: repeating-linear-gradient(45deg, rgba(239, 234, 223, .06) 0 10px, transparent 10px 20px);
}
.figure--wide .figure__media { aspect-ratio: 21 / 9; }
.figure--tall .figure__media { aspect-ratio: 3 / 4; }
.figure__cap {
  display: block;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--stone);
  background: var(--ink-800);
  border-top: 2px solid var(--line);
}

/* ---------- 13. reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .4s ease-out, transform .4s ease-out;
  will-change: opacity, transform;
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 14. motion / a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .scroll-progress { transition: none; }
}
