/* ==========================================================================
   头头体育赛事 · /assets/site.css
   框架式导航 / 斜切分区 / 等宽索引 / 夜间球场配色
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

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

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

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

a {
  color: inherit;
}

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩体系 */
  --c-ink: #06120E;
  --c-stand: #0A1D16;
  --c-panel: #10291F;
  --c-line: #1E3A2E;
  --c-line-soft: #3A5749;
  --c-lime: #C8FF3D;
  --c-lime-dim: #8FBF2A;
  --c-orange: #FF9A3C;
  --c-body: #E8F2EC;
  --c-muted: #93A79C;
  --c-white: #FFFFFF;

  /* 字体族 */
  --f-display: 'Barlow Semi Condensed', 'Archivo Narrow', 'Oswald', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --f-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --f-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;

  /* 尺度 */
  --pad-x: clamp(20px, 4vw, 64px);
  --maxw: 1280px;
  --gap: 24px;
  --header-h: 68px;

  /* 层级 */
  --z-header: 60;
  --z-frame: 200;
}

/* ---------- 3. 中文排版基线 ---------- */
body {
  background: var(--c-ink);
  color: var(--c-body);
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.16;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--c-lime);
  color: var(--c-ink);
}

/* ---------- 4. 焦点与可访问性 ---------- */
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--c-lime);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 300;
  transform: translate(-50%, -140%);
  padding: 10px 22px;
  background: var(--c-lime);
  color: var(--c-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

#main-content:focus {
  outline: none;
}

/* ---------- 5. 页面外框与滚动刻度 ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: var(--z-frame);
  border-top: 1px solid var(--c-line);
  border-left: 1px solid var(--c-line);
  border-right: 1px solid var(--c-line);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  z-index: 210;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--c-lime) 0%, var(--c-lime-dim) 100%);
  transform: scaleY(var(--scroll-progress, 0));
  transform-origin: 50% 0;
  opacity: 0.85;
  pointer-events: none;
}

/* ---------- 6. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(6, 18, 14, 0.93);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
}

.site-header__rail {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 28px);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--c-body);
}

.brand__mark {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  background: var(--c-lime);
  clip-path: polygon(0 0, 100% 0, 100% 58%, 58% 100%, 0 100%);
  transition: background-color 0.2s ease;
}

.brand__mark::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 2px;
  background: var(--c-ink);
  transform: translateY(-50%) skewX(-24deg);
}

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

.brand__name {
  display: block;
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--c-body);
  transition: color 0.2s ease;
}

.brand__meta {
  display: block;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--c-muted);
}

.brand:hover .brand__name {
  color: var(--c-white);
}

.brand:hover .brand__mark {
  background: var(--c-lime-dim);
}

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

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px clamp(10px, 1.4vw, 22px);
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  color: var(--c-muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.site-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--c-line-soft);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.26s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.18s ease;
}

.site-nav__idx {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--c-line-soft);
  transition: color 0.18s ease;
}

.site-nav__link:hover {
  color: var(--c-body);
}

.site-nav__link:hover::after {
  transform: scaleX(1);
}

.site-nav__link:hover .site-nav__idx {
  color: var(--c-lime-dim);
}

.site-nav__link[aria-current='page'] {
  color: var(--c-body);
}

.site-nav__link[aria-current='page']::after {
  transform: scaleX(1);
  background: var(--c-lime);
}

.site-nav__link[aria-current='page'] .site-nav__idx {
  color: var(--c-lime);
}

/* 检索入口 */
.header-search {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 13px;
  border: 1px solid var(--c-line);
  background: transparent;
  color: var(--c-body);
  font-size: 12.5px;
  line-height: 1;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.header-search:hover {
  color: var(--c-lime);
  border-color: var(--c-lime-dim);
  background: rgba(200, 255, 61, 0.06);
}

.header-search:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--c-lime);
  color: var(--c-lime);
}

.header-search__label {
  display: inline-block;
}

.search-glint {
  position: relative;
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.search-glint::after {
  content: '';
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 6px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid var(--c-line);
  background: transparent;
  color: var(--c-body);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-toggle:hover {
  color: var(--c-lime);
  border-color: var(--c-lime-dim);
}

.nav-toggle__box {
  display: grid;
  gap: 3px;
  width: 16px;
}

.nav-toggle__box span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.24s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.18s ease;
}

.nav-toggle__text {
  display: inline-block;
}

[data-open='true'] .nav-toggle__box span:nth-child(1) {
  transform: translateY(4.5px) rotate(45deg);
}

[data-open='true'] .nav-toggle__box span:nth-child(2) {
  opacity: 0;
}

[data-open='true'] .nav-toggle__box span:nth-child(3) {
  transform: translateY(-4.5px) rotate(-45deg);
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--c-ink);
  border-top: 1px solid var(--c-line);
  padding: clamp(34px, 5vw, 64px) var(--pad-x) clamp(22px, 3vw, 34px);
}

.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.site-footer__strip {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-line);
}

.site-footer__strip::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 1px;
  background: var(--c-lime);
}

.site-footer__note {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  line-height: 1.6;
  color: var(--c-muted);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3.4vw, 44px);
  padding: clamp(26px, 3.6vw, 42px) 0 clamp(26px, 3.4vw, 38px);
}

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

.foot-col__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
  color: var(--c-lime-dim);
}

.foot-col__title::before {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--c-lime-dim);
  flex: 0 0 auto;
}

.foot-col__list {
  display: grid;
  gap: 9px;
}

.foot-link {
  display: inline-block;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--c-body);
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.foot-link:hover {
  color: var(--c-lime);
  transform: translateX(3px);
}

.foot-contact {
  display: grid;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-body);
  overflow-wrap: anywhere;
}

.foot-contact__k {
  display: block;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: var(--c-muted);
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: clamp(16px, 2.4vw, 24px);
  border-top: 1px solid var(--c-line);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--c-muted);
}

/* ---------- 8. 正文容器与面包屑 ---------- */
.page-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(26px, 4.4vw, 56px) var(--pad-x) clamp(48px, 7vw, 96px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: clamp(16px, 2.6vw, 26px);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  color: var(--c-muted);
}

.breadcrumb a {
  color: var(--c-muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.breadcrumb a:hover {
  color: var(--c-lime);
}

.breadcrumb__sep {
  color: var(--c-line-soft);
}

.breadcrumb [aria-current='page'] {
  color: var(--c-body);
}

/* ---------- 9. 章节头 ---------- */
.section-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-bottom: clamp(16px, 2vw, 24px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-line);
}

.section-head::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 54px;
  height: 1px;
  background: var(--c-lime);
}

.section-head__idx {
  flex: 0 0 auto;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1.4;
  color: var(--c-lime);
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  color: var(--c-body);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  line-height: 1.4;
  color: var(--c-lime);
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--c-lime-dim);
  flex: 0 0 auto;
}

/* ---------- 10. 栅格 ---------- */
.grid {
  display: grid;
  gap: var(--gap);
}

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

.grid--5-7 {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

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

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

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

/* ---------- 11. 面板与标签 ---------- */
.panel {
  position: relative;
  background: var(--c-panel);
  border: 1px solid var(--c-line);
  padding: clamp(16px, 2vw, 24px);
}

.panel--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}

.exhibit-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  border: 1px solid var(--c-line);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  line-height: 1.7;
  white-space: nowrap;
  color: var(--c-muted);
}

.exhibit-tag--lime {
  color: var(--c-lime);
  border-color: var(--c-lime-dim);
}

.exhibit-tag--orange {
  color: var(--c-orange);
  border-color: rgba(255, 154, 60, 0.45);
}

/* ---------- 12. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid transparent;
  background: none;
  color: var(--c-body);
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background: var(--c-lime);
  color: var(--c-ink);
  font-weight: 600;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.btn--primary:hover {
  background: var(--c-lime-dim);
}

.btn--ghost {
  border-color: var(--c-line);
  color: var(--c-body);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.btn--ghost:hover {
  border-color: var(--c-lime-dim);
  color: var(--c-lime);
}

.btn--primary:focus-visible,
.btn--ghost:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--c-lime);
}

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

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

.media::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

a.media:hover::after,
.media:hover::after {
  border-color: var(--c-lime);
  box-shadow: inset 0 0 0 1px rgba(200, 255, 61, 0.35);
}

.media--wide {
  aspect-ratio: 21 / 9;
}

.media--square {
  aspect-ratio: 1 / 1;
}

.media--portrait {
  aspect-ratio: 4 / 5;
}

.media__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 6px 10px;
  background: rgba(6, 18, 14, 0.88);
  border-top: 1px solid var(--c-lime-dim);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  color: var(--c-body);
}

/* ---------- 14. 工具类 ---------- */
.mono {
  font-family: var(--f-mono);
  letter-spacing: 0.08em;
}

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

.accent {
  color: var(--c-lime);
}

/* ---------- 15. 返回顶部 ---------- */
.totop {
  position: fixed;
  right: clamp(14px, 2.4vw, 28px);
  bottom: clamp(14px, 2.4vw, 28px);
  z-index: 220;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--c-lime-dim);
  background: var(--c-ink);
  color: var(--c-lime);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.2s ease;
}

.totop[data-visible='true'] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.totop:hover {
  background: rgba(200, 255, 61, 0.14);
}

.totop:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--c-lime);
}

.totop__arrow {
  display: block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid currentColor;
}

/* ---------- 16. 响应式 ---------- */
@media (max-width: 1024px) {
  .grid--4-8,
  .grid--5-7,
  .grid--7-4,
  .grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 900px) {
  :root {
    --header-h: 60px;
  }

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    padding: 10px var(--pad-x) 20px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--c-stand);
    border-top: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0.24s;
  }

  [data-open='true'] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__list > li + li {
    border-top: 1px solid rgba(30, 58, 46, 0.72);
  }

  .site-nav__link {
    padding: 14px 0;
    font-size: 15px;
    white-space: normal;
  }

  .site-nav__idx {
    font-size: 10px;
  }

  .site-nav__link::after {
    display: none;
  }

  .site-nav__link[aria-current='page'] {
    color: var(--c-lime);
  }

  .site-nav__link[aria-current='page'] .site-nav__idx {
    color: var(--c-lime);
  }
}

@media (max-width: 760px) {
  .brand__meta {
    display: none;
  }

  .header-search__label {
    display: none;
  }

  .header-search {
    padding: 10px 11px;
  }

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

  .site-footer__base {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .site-footer__strip {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .nav-toggle__text {
    display: none;
  }

  .nav-toggle {
    padding: 9px 10px;
  }
}

/* ---------- 17. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .foot-link:hover {
    transform: none;
  }

  .totop {
    transform: none;
  }
}
