/* =========================================================
   吉祥访体育 · /assets/site.css
   共享层：重置 / 令牌 / 命令栏 / 页脚 / 通用组件
   ========================================================= */

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

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

body { margin: 0; }

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

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

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

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

ul, ol { margin: 0; padding: 0; list-style: none; }

p { margin: 0; }

h1, h2, h3, h4, h5, h6 { margin: 0; }

figure, blockquote { margin: 0; }

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

[hidden] { display: none !important; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  --ink-900: #0A0F2C;
  --ink-850: #0E1436;
  --ink-800: #141B45;
  --ink-700: #263168;

  --cyan: #2FE6C8;
  --orange: #FF7A2F;
  --home: #6FE3B0;
  --away: #7C9BFF;

  --paper: #F1F4FF;
  --muted: #A6B1DE;
  --tag-paper: #F5F6FA;

  --line: rgba(38, 49, 104, 0.95);
  --line-soft: rgba(38, 49, 104, 0.6);
  --line-cyan: rgba(47, 230, 200, 0.34);
  --line-orange: rgba(255, 122, 47, 0.36);

  --font-head: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: 1320px;
  --gutter: clamp(16px, 3vw, 32px);
  --gap: clamp(16px, 2vw, 24px);
  --header-h: 64px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 22px;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

h1 { font-size: clamp(22px, 3.2vw, 44px); }
h2 { font-size: clamp(19px, 2.2vw, 30px); }
h3 { font-size: clamp(17px, 1.5vw, 21px); }
h4 { font-size: 16px; }

strong { font-weight: 600; }

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

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  transform: translateY(-260%);
  display: inline-block;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--ink-900);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: -0.01em;
  border-radius: var(--r-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.16s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/* ---------- 5. 命令栏页头 ---------- */
.cmd-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 15, 44, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.cmd-bar__inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

/* 品牌铭牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 10px 0;
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--cyan);
  color: var(--ink-900);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 15px;
  line-height: 1;
  border-radius: 10px 4px 10px 4px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.brand__desc {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* 导航 */
.cmd-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.cmd-nav__inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmd-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.cmd-nav__link {
  display: inline-block;
  padding: 9px 9px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.cmd-nav__link:hover { color: var(--paper); }

.cmd-nav__link:focus-visible {
  color: var(--paper);
  outline: 2px solid var(--cyan);
  outline-offset: 0;
  border-radius: 4px;
}

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

/* 通用入口 */
.cmd-nav__utility {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.util-link {
  display: inline-block;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.util-link:hover {
  color: var(--cyan);
  border-color: var(--line-cyan);
}

/* 联赛切换器 */
.league-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.league-switch__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.league-switch__seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.league-switch__tab {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.league-switch__tab:hover { color: var(--paper); }

.league-switch__tab[aria-pressed="true"],
.league-switch__tab.is-active {
  background: var(--cyan);
  color: var(--ink-900);
  font-weight: 700;
}

/* 移动抽屉按钮 */
.nav-toggle {
  display: none;
  width: 46px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  align-content: center;
  gap: 4px;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.18s var(--ease);
}

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

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--paper);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1;
}

.nav-toggle.is-open .nav-toggle__bar:first-child { transform: translateY(3px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle__bar:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* 阅读进度 */
.read-track {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(38, 49, 104, 0.55);
  pointer-events: none;
  z-index: 90;
}

.read-track__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--away) 62%, var(--orange) 100%);
}

/* ---------- 6. 页脚 ---------- */
.site-foot {
  margin-top: clamp(56px, 8vw, 110px);
  background:
    linear-gradient(180deg, var(--ink-900) 0%, var(--ink-850) 100%);
  border-top: 1px solid var(--line);
  position: relative;
}

.site-foot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--cyan) 0 28px,
    transparent 28px 56px,
    var(--ink-700) 56px 84px,
    transparent 84px 112px
  );
  opacity: 0.5;
}

.site-foot__inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(38px, 5vw, 60px) var(--gutter) 28px;
}

.site-foot__top {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(0, 1.7fr);
  gap: clamp(26px, 4vw, 56px);
  padding-bottom: clamp(26px, 3.5vw, 42px);
  border-bottom: 1px solid var(--line);
}

.foot-brand__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.foot-brand__line {
  margin-top: 10px;
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.foot-brand__stamp {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 6px 12px 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.foot-brand__stamp::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(47, 230, 200, 0.16);
}

.foot-nav__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

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

.foot-nav__link {
  display: inline-block;
  padding: 2px 0;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.foot-nav__link:hover {
  color: var(--paper);
  border-bottom-color: var(--cyan);
}

.site-foot__meta {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(24px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--line);
}

.foot-contact__row {
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
}

.foot-legal__list {
  display: grid;
  gap: 8px;
}

.site-foot__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.foot-copy,
.foot-icp { line-height: 1.7; }

.foot-icp { color: var(--muted); }

/* ---------- 7. 布局工具 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(44px, 6vw, 84px) 0; }
.section--tight { padding: clamp(22px, 3vw, 40px) 0; }
.section--panel { background: var(--ink-850); }
.section--paper { background: var(--tag-paper); color: var(--ink-900); }

.grid {
  display: grid;
  gap: var(--gap);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stack { display: grid; gap: 16px; }

.scroll-x {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-700) transparent;
}

.scroll-x::-webkit-scrollbar { height: 8px; }
.scroll-x::-webkit-scrollbar-track { background: var(--ink-800); border-radius: 8px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--ink-700); border-radius: 8px; }
.scroll-x::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

.divider {
  height: 1px;
  background: var(--line);
}

/* ---------- 8. 文本辅助 ---------- */
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.muted { color: var(--muted); }

.lead {
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.8;
  max-width: 62ch;
  color: var(--paper);
}

.prose {
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--paper);
}

.prose p { margin: 0 0 1.05em; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 { margin: 2em 0 0.6em; }
.prose h3 { margin: 1.7em 0 0.5em; }

.prose a {
  color: var(--cyan);
  border-bottom: 1px solid var(--line-cyan);
}

.prose a:hover { border-bottom-color: var(--cyan); }

.prose ul,
.prose ol {
  margin: 0 0 1.05em;
  padding-left: 1.3em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.4em; }

.section--paper .prose { color: var(--ink-900); }
.section--paper .prose a { color: #0d6f63; border-bottom-color: rgba(13, 111, 99, 0.45); }
.section--paper .muted,
.section--paper .lead { color: #3b4780; }

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--cyan);
  color: var(--ink-900);
}

.btn--primary:hover { background: #57f0d7; }

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

.btn--ghost:hover {
  color: var(--cyan);
  border-color: var(--line-cyan);
  background: rgba(47, 230, 200, 0.06);
}

.btn--signal {
  background: var(--orange);
  color: #1B0A01;
}

.btn--signal:hover { background: #ff9152; }

/* ---------- 10. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  border-radius: var(--r-sm);
  background: rgba(47, 230, 200, 0.12);
  color: var(--cyan);
  border: 1px solid var(--line-cyan);
}

.tag--signal {
  background: rgba(255, 122, 47, 0.14);
  color: var(--orange);
  border-color: var(--line-orange);
}

.tag--neutral {
  background: rgba(38, 49, 104, 0.5);
  color: var(--muted);
  border-color: var(--line);
}

/* ---------- 11. 面板与面包屑 ---------- */
.panel {
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(18px, 2.2vw, 26px);
}

.panel--flush {
  padding: 0;
  overflow: hidden;
}

.section--paper .panel {
  background: #FFFFFF;
  border-color: rgba(38, 49, 104, 0.22);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

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

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

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

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

/* ---------- 12. 图片容器（页面阶段放置占位） ---------- */
.figure { display: block; }

.figure__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  background-color: #0C1230;
  background-image:
    linear-gradient(rgba(38, 49, 104, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 49, 104, 0.55) 1px, transparent 1px),
    radial-gradient(120% 90% at 20% 0%, rgba(47, 230, 200, 0.10) 0%, transparent 62%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
}

.figure__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.figure__frame--wide { aspect-ratio: 21 / 9; }
.figure__frame--tall { aspect-ratio: 3 / 4; }
.figure__frame--square { aspect-ratio: 1 / 1; }

.figure__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  line-height: 1.7;
  color: var(--muted);
}

.section--paper .figure__frame {
  background-color: #E7EAF4;
  border-color: rgba(38, 49, 104, 0.2);
}

.section--paper .figure__caption { color: #3b4780; }

/* ---------- 13. 左侧索引当前项 ---------- */
[data-index-link] {
  position: relative;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

[data-index-link].is-current {
  color: var(--cyan);
}

[data-index-link].is-current::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: var(--cyan);
}

/* ---------- 14. 平板 ---------- */
@media (max-width: 1080px) {
  .cmd-bar__inner {
    flex-wrap: wrap;
    gap: 0;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .brand { order: 1; }
  .nav-toggle { order: 2; display: grid; margin-left: auto; }
  .league-switch {
    order: 3;
    width: 100%;
    margin-top: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .league-switch::-webkit-scrollbar { display: none; }

  .cmd-nav {
    order: 4;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 70;
    background: var(--ink-850);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.24s var(--ease), opacity 0.18s var(--ease),
                visibility 0s linear 0.24s;
  }

  .cmd-nav[data-open] {
    max-height: min(72vh, 520px);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.24s var(--ease), opacity 0.18s var(--ease),
                visibility 0s;
  }

  .cmd-nav__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px var(--gutter) 20px;
  }

  .cmd-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .cmd-nav__link {
    padding: 12px 12px;
    font-size: 15px;
    border-bottom: 0;
    border-left: 2px solid transparent;
    border-radius: var(--r-md);
  }

  .cmd-nav__link[aria-current="page"] {
    background: var(--ink-800);
    border-left-color: var(--cyan);
    border-bottom-color: transparent;
  }

  .cmd-nav__utility {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }

  .util-link { padding: 8px 12px; font-size: 12px; }

  .site-foot__top,
  .site-foot__meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-nav__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 15. 手机 ---------- */
@media (max-width: 640px) {
  html { scroll-padding-top: 76px; }

  body { font-size: 15px; }

  .cmd-bar__inner { padding-top: 6px; padding-bottom: 6px; }

  .brand__desc { display: none; }

  .league-switch__label { display: none; }

  .foot-nav__list { grid-template-columns: minmax(0, 1fr); gap: 9px; }

  .site-foot__base {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }

  .panel { border-radius: var(--r-md); }
}

/* ---------- 16. 降低动态效果 ---------- */
@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;
    scroll-behavior: auto !important;
  }

  .cmd-nav,
  .cmd-nav[data-open] {
    transition-delay: 0s !important;
  }
}
