/* ===================================================================
   球盟会赛场 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 页头 / 页脚 / 通用组件
   =================================================================== */

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, p,
ul, ol, 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; }

:where(h1, h2, h3, h4) { font-weight: 900; line-height: 1.08; }

/* ---------- 变量 ---------- */
:root {
  --field: #07130F;
  --stand: #0C1F18;
  --board: #14332A;
  --cream: #F2E8D2;
  --ink: #221A15;
  --cyan: #38F2D0;
  --amber: #FFA23A;
  --whistle: #E4572E;
  --mint: #7FA99B;
  --white: #F7FBF9;

  --line: rgba(127, 169, 155, .42);
  --line-soft: rgba(127, 169, 155, .2);
  --grid-line: rgba(127, 169, 155, .075);
  --ink-line: rgba(34, 26, 21, .28);
  --ink-muted: #6C5B43;

  --max: 1440px;
  --rail: 264px;
  --gutter: clamp(16px, 3vw, 40px);
  --gap: 24px;

  --font-display: "Barlow Condensed", "Oswald", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 基础 ---------- */
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background-color: var(--field);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 96px 96px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

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

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- 排版工具 ---------- */
.u-label {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mint);
}

.u-label::before {
  content: "";
  width: 14px;
  height: 1px;
  flex: none;
  background: currentColor;
}

.data-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  line-height: 1.06;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--white);
}

/* ---------- 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.grid-12 > * { min-width: 0; }

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

@media (min-width: 901px) {
  .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-9 { grid-column: span 9; }
  .col-12 { grid-column: span 12; }
}

.section {
  padding-block: clamp(48px, 6.5vw, 96px);
}

.section--stand { background: var(--stand); }

.section--cream {
  background: var(--cream);
  color: var(--ink);
}

.section--cream .section-title { color: var(--ink); }
.section--cream .u-label { color: var(--ink-muted); }

/* ---------- 正文流 ---------- */
.prose {
  max-width: 38em;
  font-size: 16px;
  line-height: 1.95;
  color: rgba(247, 251, 249, .9);
}

.prose > * + * { margin-top: 1.1em; }

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.95rem);
  letter-spacing: .03em;
  color: var(--white);
  margin-top: 1.9em;
}

.prose h3 {
  font-size: 1.1rem;
  letter-spacing: .02em;
  color: var(--white);
  margin-top: 1.6em;
}

.prose ul { display: grid; gap: .55em; }

.prose li {
  position: relative;
  padding-left: 1.15em;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .9em;
  width: 9px;
  height: 1px;
  background: var(--cyan);
}

.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: .22em;
}

.panel--cream .prose,
.section--cream .prose { color: rgba(34, 26, 21, .88); }
.panel--cream .prose h2,
.panel--cream .prose h3,
.section--cream .prose h2,
.section--cream .prose h3 { color: var(--ink); }
.panel--cream .prose a,
.section--cream .prose a { color: #1E6B5C; }
.panel--cream .prose li::before,
.section--cream .prose li::before { background: var(--whistle); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  border: 1px solid var(--cyan);
  background: var(--cyan);
  color: var(--field);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  cursor: pointer;
  transition: transform .18s ease-out, background-color .18s ease-out, border-color .18s ease-out, color .18s ease-out;
}

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

.btn--ghost {
  background: transparent;
  color: var(--cyan);
}

.btn--ghost:hover {
  background: var(--board);
  border-color: var(--cyan);
  color: var(--white);
}

/* ---------- 面包屑 ---------- */
.crumbs {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mint);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.crumbs li + li::before {
  content: "/";
  color: var(--line);
}

.crumbs a {
  color: var(--white);
  text-decoration: none;
  transition: color .18s ease-out;
}

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

.crumbs [aria-current="page"] { color: var(--cyan); }

/* ---------- 面板 / 卡片 / 标签 ---------- */
.panel {
  position: relative;
  background: var(--stand);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: clamp(18px, 2.4vw, 30px);
}

.panel--cream {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--ink-line);
}

.panel--cream .u-label { color: var(--ink-muted); }

.panel--cream .tag {
  color: var(--ink-muted);
  border-color: var(--ink-line);
}

.panel--raised {
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .4);
}

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

.panel--cream .panel__head { border-bottom-color: var(--ink-line); }

.tile {
  display: block;
  background: var(--stand);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: clamp(16px, 2vw, 24px);
  transition: transform .18s ease-out, border-color .18s ease-out, background-color .18s ease-out;
}

.tile:hover,
.tile:focus-within {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: var(--board);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 3px 9px;
  border: 1px solid var(--line);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.6;
}

.tag--cyan {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--field);
}

.tag--amber {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--field);
}

.tag--whistle {
  background: var(--whistle);
  border-color: var(--whistle);
  color: var(--white);
}

/* ---------- 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--board);
  border: 1px solid var(--line);
  border-radius: 0;
}

.media img,
.media picture,
.media svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--square { aspect-ratio: 1 / 1; }
.media--wide { aspect-ratio: 21 / 9; }
.media--portrait { aspect-ratio: 3 / 4; }

.media--field::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(127, 169, 155, .32);
  background-image:
    linear-gradient(to right, rgba(127, 169, 155, .18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(127, 169, 155, .18) 1px, transparent 1px);
  background-size: 25% 25%;
  pointer-events: none;
}

.media--overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 19, 15, 0) 35%, rgba(7, 19, 15, .88) 100%);
  pointer-events: none;
}

.media__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 6px 12px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 200;
  transform: translate(-50%, -160%);
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--field);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .18s ease-out;
}

.skip-link:focus,
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ===================================================================
   页头
   =================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--field);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(56, 242, 208, .12);
}

/* 状态条 */
.ticker {
  background: var(--stand);
  border-bottom: 1px solid var(--line-soft);
}

.ticker__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: var(--max);
  margin-inline: auto;
  padding: 7px var(--gutter);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mint);
}

.ticker__item { white-space: nowrap; }

.ticker__item--flag {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  color: var(--amber);
}

.ticker__item--flag::before {
  content: "";
  width: 16px;
  height: 1px;
  background: currentColor;
}

.ticker__item--dim { color: var(--mint); }

.ticker__item--num { color: var(--cyan); }

.ticker__slash {
  margin: 0 .4em;
  color: var(--mint);
}

.ticker__grid {
  flex: 1 1 auto;
  height: 1px;
  min-width: 24px;
  background-image: repeating-linear-gradient(to right, var(--line) 0 8px, transparent 8px 16px);
}

/* 报头 */
.masthead { border-bottom: 1px solid var(--line-soft); }

.masthead__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(14px, 2vw, 22px) var(--gutter) clamp(12px, 1.8vw, 18px);
}

.masthead__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  justify-self: start;
}

.masthead__meta--left { justify-self: start; }

.masthead__edition {
  color: var(--white);
  font-size: 12px;
  letter-spacing: .1em;
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-self: center;
  text-decoration: none;
  transition: color .18s ease-out;
}

.masthead__brand:hover .masthead__name,
.masthead__brand:focus-visible .masthead__name { color: var(--cyan); }

.masthead__mark {
  flex: none;
  width: 16px;
  height: 42px;
  border: 1px solid var(--line);
  background-image:
    linear-gradient(var(--cyan), var(--cyan)),
    linear-gradient(var(--cyan), var(--cyan));
  background-size: 100% 2px, 2px 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.masthead__stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.masthead__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  line-height: 1;
  letter-spacing: .08em;
  color: var(--white);
  white-space: nowrap;
  transition: color .18s ease-out;
}

.masthead__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--cyan);
}

.masthead__cta { justify-self: end; }

/* 导航条 */
.nav-bar { background: var(--stand); }

.nav-bar__inner {
  display: flex;
  align-items: stretch;
  gap: 16px;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nav { flex: 1 1 auto; }

.nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px 12px;
  border-bottom: 2px solid transparent;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: .1em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease-out, background-color .18s ease-out, border-color .18s ease-out;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--cyan);
  background: var(--board);
  border-bottom-color: var(--line);
}

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

.nav-bar__note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mint);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  padding: 12px 4px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

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

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .18s ease-out, opacity .18s ease-out;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-toggle__text { line-height: 1; }

html:not(.js) .nav-toggle { display: none; }

/* 滚动进度 */
.progress {
  height: 2px;
  background: rgba(127, 169, 155, .2);
}

.progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
}

/* 页头响应式 */
@media (max-width: 900px) {
  .nav-bar__inner { flex-wrap: wrap; gap: 0; }
  .nav-toggle { display: inline-flex; }
  .nav { flex-basis: 100%; }
  html.js .nav { display: none; }
  html.js .nav[data-open="true"] { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; }
  .nav__link {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line-soft);
    border-left: 2px solid transparent;
    justify-content: space-between;
  }
  .nav__link:hover,
  .nav__link:focus-visible,
  .nav__link[aria-current="page"] {
    border-bottom-color: var(--line-soft);
    border-left-color: var(--cyan);
  }
  .nav-bar__note { display: none; }
  .ticker__item--dim { display: none; }
}

@media (max-width: 760px) {
  .masthead__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    padding: 16px var(--gutter) 14px;
  }
  .masthead__meta { display: none; }
  .masthead__brand { justify-self: center; }
  .masthead__cta { justify-self: stretch; width: 100%; }
  .ticker__inner { gap: 12px; font-size: 10px; letter-spacing: .12em; }
}

/* ===================================================================
   页脚
   =================================================================== */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--stand);
  border-top: 1px solid var(--line);
  color: var(--mint);
}

.footer__rule {
  height: 10px;
  border-bottom: 1px solid var(--line-soft);
  background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 48px);
}

.footer__inner {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(32px, 4.5vw, 56px) var(--gutter) 26px;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(24px, 4vw, 64px);
}

.footer__brand { min-width: 0; }

.footer__brand-link {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.1;
  letter-spacing: .08em;
  color: var(--white);
  text-decoration: none;
  transition: color .18s ease-out;
}

.footer__brand-link:hover,
.footer__brand-link:focus-visible { color: var(--cyan); }

.footer__tagline {
  margin-top: 10px;
  max-width: 30ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--white);
}

.footer__note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  max-width: 36ch;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--mint);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer__col { min-width: 0; }

.footer__title {
  display: flex;
  align-items: center;
  gap: .6em;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer__title::before {
  content: "";
  width: 12px;
  height: 1px;
  background: currentColor;
}

.footer__list { display: grid; gap: 10px; }

.footer__list a {
  display: inline-block;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  font-size: 14px;
  line-height: 1.7;
  color: var(--white);
  text-decoration: none;
  transition: color .18s ease-out, border-color .18s ease-out;
}

.footer__list a:hover,
.footer__list a:focus-visible {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  margin-top: clamp(28px, 3.5vw, 44px);
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.footer__contact-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.footer__contact-key {
  flex: none;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.footer__contact-val {
  color: var(--white);
  word-break: break-all;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--mint);
}

.footer__legal-line { line-height: 1.8; }

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

@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__legal { flex-direction: column; }
}

/* ===================================================================
   动画：章节显现
   =================================================================== */
html.js [data-reveal] {
  opacity: .6;
  transform: translateY(12px);
  transition: opacity .5s ease-out, transform .5s ease-out;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .btn:hover,
  .tile:hover,
  .tile:focus-within { transform: none; }
}
