/* =========================================================
   球盟会主站 · 共享样式 /assets/site.css
   夜场墨绿底 · 越位线细线系统 · 数据列导向
   ========================================================= */

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

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

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--night);
  background-image:
    radial-gradient(1200px 620px at 88% -12%, rgba(232, 180, 76, 0.07), transparent 62%),
    radial-gradient(900px 520px at -12% 32%, rgba(30, 107, 76, 0.20), transparent 66%);
  background-repeat: no-repeat;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, pre { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 2px;
}

/* ---------- 变量 ---------- */
:root {
  --night: #0C1512;
  --board: #16211C;
  --turf: #1E6B4C;
  --moss: #7FA98C;
  --lamp: #E8B44C;
  --red: #D9483B;
  --blue: #4C7FB0;
  --cream: #F2EFE6;
  --stone: #9AA79F;
  --clay: #C2734E;

  --line-moss: rgba(127, 169, 140, 0.28);
  --line-blue: rgba(76, 127, 176, 0.35);
  --line-strong: rgba(127, 169, 140, 0.50);

  --font-display: "Source Han Sans SC", "HarmonyOS Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "Sarasa Mono SC", "Noto Sans Mono CJK SC", ui-monospace,
    SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 180ms;
  --dur: 240ms;
  --dur-slow: 320ms;

  --wrap: 1320px;
  --pad: clamp(16px, 4vw, 40px);
  --grid: 24px;
}

/* ---------- 排版基座 ---------- */
p { max-width: 68ch; }

strong { font-weight: 700; color: var(--cream); }

::selection {
  background: var(--lamp);
  color: var(--night);
}

/* ---------- 工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.mono {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.tnum {
  font-variant-numeric: tabular-nums slashed-zero;
  font-feature-settings: "tnum" 1, "zero" 1;
}

/* ---------- 分区与标题 ---------- */
.section {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: clamp(24px, 4vw, 44px);
  border-bottom: 1px solid var(--line-moss);
}

.section__title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: 0.2em;
  color: var(--moss);
  text-transform: uppercase;
}

/* 滚动章节高亮协议 */
[data-chapter] {
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
[data-chapter].is-dim {
  color: var(--moss);
  opacity: 0.72;
}
[data-chapter].is-current {
  color: var(--cream);
  opacity: 1;
}

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

.col-main { grid-column: 1 / span 7; }

.col-rule {
  grid-column: 8 / span 1;
  position: relative;
}
.col-rule::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line-blue);
}

.col-data { grid-column: 9 / span 4; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition:
    background var(--dur) var(--ease),
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.btn--primary {
  background: var(--lamp);
  border-color: var(--lamp);
  color: var(--night);
}
.btn--primary:hover {
  background: transparent;
  color: var(--lamp);
}

.btn--ghost {
  border-color: var(--line-moss);
  color: var(--cream);
}
.btn--ghost:hover {
  border-color: var(--lamp);
  color: var(--lamp);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding-block: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--stone);
}
.breadcrumb li {
  display: flex;
  align-items: center;
}
.breadcrumb li + li::before {
  content: "／";
  margin-inline: 8px;
  color: var(--line-strong);
}
.breadcrumb a {
  color: var(--moss);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.breadcrumb a:hover {
  color: var(--cream);
  border-bottom-color: var(--lamp);
}
.breadcrumb span[aria-current] {
  color: var(--cream);
}

/* ---------- 图片容器（供页面阶段放置占位） ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line-moss);
  background-color: #101c17;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(127, 169, 140, 0.12) 0 1px,
      rgba(127, 169, 140, 0) 1px 11px
    ),
    linear-gradient(
      140deg,
      rgba(30, 107, 76, 0.50) 0%,
      rgba(12, 21, 18, 0.92) 55%,
      rgba(232, 180, 76, 0.20) 100%
    );
  background-size: 11px 11px, cover;
}

.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(
      150deg,
      rgba(12, 21, 18, 0.55) 0%,
      rgba(232, 180, 76, 0.10) 68%,
      rgba(30, 107, 76, 0.30) 100%
    ),
    repeating-linear-gradient(
      0deg,
      rgba(12, 21, 18, 0.18) 0 1px,
      rgba(12, 21, 18, 0) 1px 3px
    );
}

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

/* =========================================================
   共享头部
   ========================================================= */
.skip-link {
  position: absolute;
  left: calc(var(--pad) + 4px);
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--lamp);
  color: var(--night);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus {
  top: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(12, 21, 18, 0.95);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-moss);
  color: var(--cream);
}

.header-inner {
  display: flex;
  flex-direction: column;
}

/* --- 上层：品牌与赛季阶段 --- */
.header-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(12px, 2vw, 28px);
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  text-decoration: none;
  color: var(--cream);
}

.brand__mark {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--lamp);
  transform: rotate(45deg);
  transition: transform var(--dur-slow) var(--ease);
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--lamp);
  transition: background var(--dur) var(--ease);
}
.brand:hover .brand__mark {
  transform: rotate(135deg);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand__name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--cream);
  white-space: nowrap;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--stone);
  white-space: nowrap;
}

.season-switch {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  border: 1px solid var(--line-blue);
  background: rgba(22, 33, 28, 0.6);
}

.season-switch__label {
  padding-inline: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--stone);
  white-space: nowrap;
}

.season-switch__btn {
  -webkit-appearance: none;
  appearance: none;
  padding: 9px 13px;
  border: 0;
  border-left: 1px solid var(--line-blue);
  background: transparent;
  color: var(--moss);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.season-switch__btn:hover {
  color: var(--cream);
  background: rgba(127, 169, 140, 0.12);
}
.season-switch__btn.is-active {
  background: var(--lamp);
  color: var(--night);
  font-weight: 700;
}

.utility-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.utility-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--stone);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.utility-links a:hover {
  color: var(--cream);
  border-bottom-color: var(--lamp);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--lamp);
  border: 1px solid var(--lamp);
  color: var(--night);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.header-cta:hover {
  background: transparent;
  color: var(--lamp);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  -webkit-appearance: none;
  appearance: none;
  padding: 9px 13px;
  background: transparent;
  border: 1px solid var(--line-blue);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-toggle:hover {
  border-color: var(--lamp);
  color: var(--lamp);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  flex: none;
  width: 16px;
  height: 11px;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1px;
  background: currentColor;
  transition: top var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.nav-toggle__bars::before { top: 1px; }
.nav-toggle__bars::after  { top: 9px; }

.site-header[data-open="true"] .nav-toggle__bars::before {
  top: 5px;
  transform: rotate(16deg);
}
.site-header[data-open="true"] .nav-toggle__bars::after {
  top: 5px;
  transform: rotate(-16deg);
}

/* --- 越位线分隔 --- */
.offside-rule {
  height: 1px;
  background-image: linear-gradient(
    90deg,
    rgba(76, 127, 176, 0.14) 0%,
    rgba(76, 127, 176, 0.50) 18%,
    rgba(127, 169, 140, 0.32) 44%,
    rgba(232, 180, 76, 0.75) 62%,
    rgba(127, 169, 140, 0.32) 80%,
    rgba(76, 127, 176, 0.14) 100%
  );
}

/* --- 下层：栏目 --- */
.header-bottom {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
}

.primary-nav {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 13px 15px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--moss);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 8px;
  height: 1px;
  background: var(--lamp);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-slow) var(--ease);
}
.nav-link:hover { color: var(--cream); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  color: var(--lamp);
  font-weight: 700;
}
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--lamp);
}

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}
.read-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--lamp));
}

/* =========================================================
   共享页脚
   ========================================================= */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(64px, 9vw, 120px);
  background: linear-gradient(180deg, rgba(22, 33, 28, 0.85) 0%, rgba(10, 18, 16, 1) 100%);
  border-top: 1px solid var(--line-moss);
  color: var(--stone);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 32%;
  max-width: 420px;
  height: 1px;
  background: var(--lamp);
}

.site-footer::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -120px;
  width: 420px;
  height: 420px;
  border: 1px solid var(--line-blue);
  transform: rotate(24deg);
  opacity: 0.55;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(40px, 6vw, 72px) 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line-moss);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 36ch;
}
.footer-brand .brand__mark {
  flex: none;
}

.footer-brand__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--cream);
  max-width: none;
}

.footer-brand__sub {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: var(--moss);
  max-width: none;
}

.footer-brand__note {
  padding-left: 12px;
  border-left: 1px solid var(--line-blue);
  font-size: 13px;
  line-height: 1.7;
  color: var(--stone);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--moss);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-links a {
  width: fit-content;
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(242, 239, 230, 0.78);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer-links a:hover {
  color: var(--lamp);
  border-bottom-color: var(--lamp);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-block: clamp(20px, 3vw, 28px);
  border-bottom: 1px solid var(--line-moss);
}
.footer-contact p {
  max-width: 76ch;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--stone);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
}

.footer-legal,
.footer-copy {
  max-width: none;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--stone);
}
.footer-legal { color: var(--moss); }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1100px) {
  .utility-links { display: none; }
  .header-top { gap: 14px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; max-width: 52ch; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .brand { margin-right: auto; }

  .season-switch {
    order: 4;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .season-switch::-webkit-scrollbar { display: none; }
  .season-switch__label { display: none; }

  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-main { grid-column: 1 / -1; }
  .col-rule { display: none; }
  .col-data { grid-column: 1 / -1; }

  .primary-nav {
    flex: 1 1 100%;
    background-image: linear-gradient(
      160deg,
      rgba(30, 107, 76, 0.28) 0%,
      rgba(12, 21, 18, 0) 62%
    );
  }

  html.js .primary-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dur-slow) var(--ease);
  }
  html.js .site-header[data-open="true"] .primary-nav {
    max-height: 460px;
    overflow-y: auto;
  }

  .primary-nav__list {
    flex-direction: column;
    padding-block: 6px 18px;
  }

  .nav-link {
    display: flex;
    padding: 15px 2px;
    font-size: 16px;
    border-bottom: 1px solid var(--line-moss);
  }
  .nav-link::after { display: none; }
}

@media (max-width: 600px) {
  :root { --pad: 16px; --grid: 16px; }

  .header-top { padding-block: 11px; gap: 10px; }
  .brand__sub { display: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-brand { max-width: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   降低动效
   ========================================================= */
@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;
  }

  .brand:hover .brand__mark { transform: rotate(45deg); }
  .nav-link:hover::after { transform: scaleX(0); }
}
