/* ==========================================================================
   军体育赛事 · 共享 Site Kit
   文件位置：/assets/site.css
   负责：reset / CSS 变量 / 中文排版 / 页头 / 页脚 / 通用按钮 / 面包屑
         / 正文容器 / 网格 / 基础组件 / 图片容器 / 响应式 / 无障碍
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

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

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

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

button {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

/* ---------- 02 变量 ---------- */
:root {
  /* 品牌色板 */
  --green: #1F3A2E;
  --ink: #111514;
  --orange: #FF6B1A;
  --white: #F4F7F2;
  --olive: #6F7F6A;
  --khaki: #3E4A3A;
  --yellow: #D9B44A;
  --sand: #D9D3C6;
  --steel: #4F6D7A;

  /* 深色区派生色 */
  --on-dark: rgba(244, 247, 242, 0.80);
  --on-dark-soft: rgba(244, 247, 242, 0.60);
  --on-dark-faint: rgba(244, 247, 242, 0.42);
  --line-strong: rgba(217, 211, 198, 0.30);
  --line-soft: rgba(217, 211, 198, 0.14);
  --line-light: rgba(17, 21, 20, 0.16);

  /* 字体 */
  --font-sans: "Noto Sans SC", "Source Han 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;

  /* 尺度 */
  --gutter: clamp(18px, 4vw, 56px);
  --maxw: 1320px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 03 排版与容器 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line-light);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 04 焦点与跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  padding: 11px 18px;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  transform: translateY(-200%);
  transition: transform 0.16s var(--ease);
}

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

/* ---------- 05 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(17, 21, 20, 0.90);
  color: var(--white);
  border-bottom: 1px solid var(--line-soft);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.site-header[data-scrolled="true"] {
  background: var(--ink);
  border-bottom-color: var(--line-strong);
}

/* 坐标索引带 */
.header-rail {
  border-bottom: 1px solid var(--line-soft);
}

.header-rail-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 7px;
}

.rail-code,
.rail-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rail-code {
  color: var(--on-dark-faint);
}

.rail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--on-dark-soft);
}

.rail-meta::before,
.rail-meta::after {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--line-strong);
}

/* 主条 */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2.4vw, 40px);
  padding-block: clamp(12px, 1.6vw, 18px);
}

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

.brand-mark {
  font-size: clamp(17px, 1.7vw, 21px);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--white);
  border-bottom: 2px solid transparent;
  transition: color 0.12s var(--ease), border-color 0.12s var(--ease);
}

.brand-mark:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.brand-version {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.12em;
}

.brand-note {
  margin-left: 6px;
  color: var(--on-dark-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* 主导航 */
.header-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.9vw, 26px);
}

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 6px 2px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--on-dark);
  transition: color 0.12s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.12s var(--ease);
}

.nav-link:hover {
  color: var(--white);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--white);
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* 右端强调块 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.login-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--orange);
  border: 1px solid var(--orange);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  white-space: nowrap;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}

.login-cta:hover {
  background: transparent;
  color: var(--orange);
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  background: transparent;
  transition: border-color 0.12s var(--ease);
}

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

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  transition: transform 0.16s var(--ease), background 0.12s var(--ease);
}

.site-header[data-open] .nav-toggle {
  border-color: var(--orange);
}

.site-header[data-open] .nav-toggle-line {
  background: var(--orange);
}

.site-header[data-open] .nav-toggle-line:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.site-header[data-open] .nav-toggle-line:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* 滚动进度轨 */
.header-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* ---------- 06 页脚 ---------- */
.site-footer {
  background: var(--green);
  color: var(--white);
  border-top: 1px solid var(--line-strong);
}

/* 收束条带 */
.footer-band {
  border-top: 2px solid var(--orange);
  border-bottom: 1px solid var(--line-soft);
  background: var(--green);
}

.footer-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px clamp(18px, 3vw, 40px);
  padding-block: clamp(20px, 2.8vw, 32px);
}

.band-label {
  flex: 0 0 auto;
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.band-action {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--white);
  border-bottom: 2px solid transparent;
  transition: color 0.12s var(--ease), border-color 0.12s var(--ease);
}

.band-action::after {
  content: "→";
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.7em;
  font-weight: 400;
}

.band-action:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.band-meta {
  margin-left: auto;
  color: var(--on-dark-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* 主体 */
.footer-main {
  padding-block: clamp(38px, 5.5vw, 68px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 2fr 1.3fr;
  gap: clamp(28px, 4.5vw, 60px);
  align-items: start;
}

.footer-brand-mark {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.footer-brand-desc {
  margin-top: 12px;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--on-dark);
}

.footer-brand-version {
  display: inline-block;
  margin-top: 16px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 107, 26, 0.55);
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}

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

.footer-col-title {
  margin-bottom: 14px;
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-link {
  display: inline-block;
  padding-bottom: 2px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--on-dark);
  border-bottom: 1px solid transparent;
  transition: color 0.12s var(--ease), border-color 0.12s var(--ease);
}

.footer-link:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.contact-key {
  color: var(--on-dark-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.contact-val {
  font-size: 13px;
  line-height: 1.6;
  color: var(--on-dark);
  overflow-wrap: anywhere;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  transition: color 0.12s var(--ease), background 0.12s var(--ease),
    border-color 0.12s var(--ease);
}

.copy-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.copy-btn[data-copied="true"] {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}

.footer-note {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--on-dark-faint);
}

/* 底栏 */
.footer-base {
  background: var(--ink);
  border-top: 1px solid var(--line-soft);
}

.footer-base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px clamp(16px, 3vw, 40px);
  padding-block: 16px;
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--on-dark-faint);
}

/* ---------- 07 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.12s var(--ease), color 0.12s var(--ease),
    border-color 0.12s var(--ease);
}

.btn--primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.btn--primary:hover {
  background: transparent;
  color: var(--orange);
}

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

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

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

.btn--line:hover {
  background: var(--ink);
  color: var(--white);
}

/* ---------- 08 面包屑 ---------- */
.breadcrumb {
  padding-block: 18px;
  border-bottom: 1px solid var(--line-light);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--olive);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--olive);
}

.breadcrumb-link {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: color 0.12s var(--ease), border-color 0.12s var(--ease);
}

.breadcrumb-link:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* ---------- 09 章节头与路径标签 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px clamp(16px, 2.5vw, 36px);
  margin-bottom: clamp(24px, 3vw, 40px);
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--olive);
}

.section-index {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--orange);
}

.section-title {
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.path-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--khaki);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.12s var(--ease), border-color 0.12s var(--ease);
}

.path-tag:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* ---------- 10 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line-light);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.tag--orange {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.tag--yellow {
  border-color: var(--yellow);
  color: var(--khaki);
}

/* ---------- 11 正文容器 ---------- */
.prose {
  max-width: 72ch;
}

.prose p {
  font-size: 17px;
  line-height: 1.8;
}

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

.prose h2 {
  margin-top: 2em;
  font-size: clamp(24px, 3vw, 32px);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 20px;
  font-weight: 900;
}

.prose ul {
  margin-top: 1em;
  padding-left: 0;
}

.prose li {
  position: relative;
  padding-left: 22px;
  line-height: 1.8;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 10px;
  height: 2px;
  background: var(--orange);
}

/* ---------- 12 网格 ---------- */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
}

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

@media (min-width: 900px) {
  .grid-12 > .span-5 { grid-column: span 5; }
  .grid-12 > .span-6 { grid-column: span 6; }
  .grid-12 > .span-7 { grid-column: span 7; }
  .grid-12 > .span-8 { grid-column: span 8; }
}

/* ---------- 13 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--khaki);
  border: 1px solid var(--khaki);
  aspect-ratio: 16 / 9;
}

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

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

.media-frame--tint > img {
  filter: saturate(0.82) contrast(1.06) sepia(0.14);
}

.media-frame--placeholder {
  background: repeating-linear-gradient(
    135deg,
    var(--khaki) 0 10px,
    #35412F 10px 20px
  );
}

.media-frame-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(17, 21, 20, 0) 0%, rgba(17, 21, 20, 0.85) 100%);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* ---------- 14 筛选 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 6px;
}

.filter-btn {
  padding: 8px 14px;
  border: 1px solid var(--line-light);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.12s var(--ease), color 0.12s var(--ease),
    border-color 0.12s var(--ease);
}

.filter-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.is-hidden {
  display: none !important;
}

/* ---------- 15 响应式 ---------- */
@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-brand { order: 1; }
  .footer-contact { order: 2; }
  .footer-index {
    order: 3;
    grid-column: 1 / -1;
  }
}

@media (max-width: 940px) {
  .header-rail {
    display: none;
  }

  .header-bar {
    gap: 12px;
    padding-block: 12px;
  }

  .brand-note {
    display: none;
  }

  .header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--line-strong);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.24s var(--ease), visibility 0.24s var(--ease);
  }

  .site-header[data-open] .header-nav {
    max-height: min(72vh, 520px);
    overflow-y: auto;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--gutter) 16px;
  }

  .nav-item {
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-item:last-child {
    border-bottom: 0;
  }

  .nav-link {
    display: block;
    padding: 15px 0;
    font-size: 16px;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link[aria-current="page"] {
    color: var(--orange);
  }

  .nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-index {
    grid-template-columns: 1fr 1fr;
  }

  .footer-band-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .band-meta {
    margin-left: 0;
  }

  .footer-base-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .login-cta {
    padding: 9px 13px;
    font-size: 11px;
  }
}

/* ---------- 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;
  }
}
