/* =========================================================
   8868体育 · 共享样式表 /assets/site.css
   头部 / 页脚 / 基础组件 / 响应式 / 无障碍
   ========================================================= */

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

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

body { margin: 0; }

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

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

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

table { width: 100%; border-collapse: collapse; }

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 品牌色 */
  --grass: #0A5C36;
  --stand-deep: #06341F;
  --field-bright: #12864F;
  --mist: #E8F3EC;
  --orange: #FF6B00;
  --amber: #FFB547;
  --blue: #1E90FF;
  --red: #E63946;
  --ink: #2B2B2B;
  --grey: #6B7379;
  --paper: #FFFFFF;
  --sand: #C8A87C;

  /* 派生 */
  --ink-soft: #3D4649;
  --line: rgba(10, 92, 54, 0.16);
  --line-strong: rgba(10, 92, 54, 0.3);
  --on-dark: rgba(255, 255, 255, 0.78);
  --on-dark-soft: rgba(255, 255, 255, 0.56);

  /* 字体 */
  --font-display: "Archivo Black", "Source Han Sans Heavy", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Source Han Sans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  /* 形状 */
  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 26px;
  --radius-pill: 999px;

  /* 布局 */
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow-soft: 0 20px 44px -32px rgba(6, 52, 31, 0.45);
  --shadow-lift: 0 26px 54px -30px rgba(6, 52, 31, 0.6);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.012em;
  color: var(--ink);
}

h1 { font-size: clamp(38px, 6vw, 64px); }
h2 { font-size: clamp(26px, 3.4vw, 32px); }
h3 { font-size: clamp(20px, 2.4vw, 24px); }
h4 { font-size: 18px; letter-spacing: 0; }

p { max-width: 68ch; }

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

small { font-size: 13px; color: var(--grey); }

[id] { scroll-margin-top: 132px; }
#main-content { display: block; }

/* ---------- 4. 无障碍 ---------- */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--amber);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -120px;
  transform: translateX(-50%);
  z-index: 300;
  padding: 11px 22px;
  border-radius: 0 0 var(--radius-m) var(--radius-m);
  background: var(--orange);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: top 0.22s ease;
}

.skip-link:focus { top: 0; }

/* =========================================================
   5. 页头：居中刊头式导航
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  overflow: hidden;
  background: var(--grass);
  color: #fff;
  box-shadow: 0 16px 34px -26px rgba(6, 52, 31, 0.95);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(120% 180% at 10% -60%, rgba(255, 181, 71, 0.26), transparent 62%),
    radial-gradient(90% 160% at 96% 140%, rgba(18, 134, 79, 0.7), transparent 66%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 76px);
}

.header-shell {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px 0 11px;
  transition: padding 0.26s ease;
}

.site-header.is-condensed .masthead { padding: 8px 0 5px; }

/* 品牌刊头 */
.brand {
  grid-column: 2;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1;
  letter-spacing: 0.07em;
  color: #fff;
  transition: font-size 0.26s ease;
}

.site-header.is-condensed .brand-mark { font-size: clamp(19px, 2.6vw, 24px); }

.brand-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--amber);
  white-space: nowrap;
  overflow: hidden;
  max-height: 22px;
  transition: opacity 0.2s ease, max-height 0.26s ease;
}

.site-header.is-condensed .brand-sub {
  opacity: 0;
  max-height: 0;
}

/* 移动导航按钮 */
.nav-toggle {
  grid-column: 1;
  justify-self: start;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover { background: rgba(255, 255, 255, 0.2); }

.nav-toggle-bars {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 12px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.24s ease, top 0.24s ease;
}

.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { top: 10px; }

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

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

.nav-toggle-text { line-height: 1; }

/* 右侧入口 */
.head-entry {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #fff;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.head-entry:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 181, 71, 0.7);
}

.head-entry-icon {
  width: 19px;
  height: 19px;
}

.head-entry-icon circle,
.head-entry-icon line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

/* 导航栏 */
.site-nav {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(6px, 2.6vw, 38px);
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: block;
  padding: 13px 4px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--on-dark);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link:hover { color: #fff; }

.nav-link[aria-current="page"] {
  color: #fff;
  font-weight: 700;
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--orange);
  transform: translateX(-50%);
}

/* 阅读进度尺 */
.header-progress {
  position: relative;
  z-index: 1;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--field-bright), var(--orange) 62%, var(--amber));
  transition: transform 0.12s linear;
}

/* =========================================================
   6. 页脚：深看台绿长卷
   ========================================================= */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--stand-deep);
  color: var(--on-dark);
  padding: clamp(46px, 7vw, 78px) 0 26px;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: -12% -6%;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(112deg, rgba(200, 168, 124, 0.1) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(64deg, rgba(200, 168, 124, 0.07) 0 1px, transparent 1px 78px),
    radial-gradient(90% 70% at 8% 0%, rgba(200, 168, 124, 0.16), transparent 62%),
    radial-gradient(70% 62% at 94% 104%, rgba(18, 134, 79, 0.5), transparent 68%);
  animation: terrain-drift 30s ease-in-out infinite alternate;
}

@keyframes terrain-drift {
  from { transform: translate3d(-0.5%, 0.4%, 0); }
  to { transform: translate3d(0.5%, -0.5%, 0); }
}

.footer-shell {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1.4fr 1.15fr;
  gap: clamp(24px, 3.4vw, 48px);
  padding-bottom: clamp(26px, 4vw, 44px);
  border-bottom: 1px solid rgba(200, 168, 124, 0.26);
}

.footer-col { min-width: 0; }

.footer-brand {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 12px;
}

.footer-line {
  font-size: 14px;
  line-height: 1.85;
  color: var(--on-dark-soft);
  max-width: 26em;
}

.footer-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 15px;
}

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

.footer-list a {
  color: var(--on-dark);
  transition: color 0.2s ease;
}

.footer-list a:hover,
.footer-list a:focus-visible { color: var(--amber); }

.footer-list--plain li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.7;
  color: var(--on-dark);
  word-break: break-all;
}

.footer-label {
  flex: 0 0 auto;
  min-width: 3.4em;
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(200, 168, 124, 0.9);
}

.footer-icp {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--on-dark-soft);
}

.footer-note {
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.46);
  max-width: 30em;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.46);
}

/* =========================================================
   7. 通用布局与组件
   ========================================================= */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap--narrow { max-width: 880px; }

.prose { font-size: 17px; line-height: 1.8; color: var(--ink-soft); }
.prose p { margin-bottom: 1.1em; }
.prose h2 { margin: 1.9em 0 0.6em; color: var(--ink); }
.prose h3 { margin: 1.5em 0 0.5em; }
.prose ul { margin: 0 0 1.2em; padding-left: 1.1em; list-style: disc; }
.prose li { margin-bottom: 0.5em; }

/* 章节节奏 */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.section-band {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.section-no {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--orange);
}

/* 网格 */
.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 26px);
}

.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)); }
.grid--split { grid-template-columns: 7fr 5fr; }

/* 卡片 */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}

.card--mist {
  background: var(--mist);
  border-color: transparent;
}

.card--dark {
  background: var(--stand-deep);
  border-color: transparent;
  color: var(--on-dark);
}

.card--dark h2,
.card--dark h3 { color: #fff; }

/* 数据 */
.data {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.data--xl {
  display: block;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--grass);
}

.data--accent {
  display: block;
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--orange);
}

/* 侧边注释 */
.annotation {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--grey);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 16px 30px -20px rgba(255, 107, 0, 0.9);
}

.btn--primary:hover { background: #ff7d1f; }

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

.btn--ghost:hover {
  background: var(--mist);
  border-color: var(--field-bright);
}

.btn--on-dark {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.btn--on-dark:hover { background: rgba(255, 255, 255, 0.22); }

/* 筛选胶囊 */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--grass);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.pill:hover {
  background: var(--mist);
  border-color: var(--field-bright);
}

.pill.is-active,
.pill[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* 面包屑 */
.breadcrumb {
  font-size: 13px;
  color: var(--grey);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.breadcrumb li::after {
  content: "/";
  color: rgba(107, 115, 121, 0.55);
}

.breadcrumb li:last-child::after { content: ""; }

.breadcrumb a { color: var(--grass); }
.breadcrumb a:hover { color: var(--blue); }

/* 图片容器（页面阶段放置 img） */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--mist);
  aspect-ratio: 16 / 10;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.06);
}

.media-frame__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 18px;
  background: linear-gradient(to top, rgba(6, 52, 31, 0.88), rgba(6, 52, 31, 0));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: var(--grass);
  color: #fff;
  box-shadow: 0 20px 36px -20px rgba(6, 52, 31, 0.95);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s linear, background 0.2s ease;
}

.to-top::after {
  content: "";
  width: 11px;
  height: 11px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg) translate(1px, 1px);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover { background: var(--field-bright); }

/* 内容显现 */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .js-reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   8. 响应式
   ========================================================= */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --gutter: clamp(16px, 5vw, 26px); }

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

  .site-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s ease;
  }

  .site-header[data-open="true"] .site-nav {
    max-height: min(74vh, 540px);
    overflow-y: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 4px 0 14px;
  }

  .nav-item { width: 100%; }

  .nav-link {
    padding: 15px 2px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-link[aria-current="page"] { padding-left: 15px; }

  .nav-link[aria-current="page"]::after {
    left: 0;
    top: 50%;
    bottom: auto;
    width: 3px;
    height: 18px;
    margin-top: -9px;
    transform: none;
  }

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

  .footer-base { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }

  .annotation {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    letter-spacing: 0.16em;
  }

  .nav-toggle-text { display: none; }

  .masthead { gap: 10px; }
}

/* ---------- 9. 动效降级 ---------- */
@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;
  }

  .js-reveal { opacity: 1; transform: none; }

  .site-footer::before { animation: none; }
}
