/* ==========================================================================
   site.css — 九博体育 · 中文站 共享外壳
   档案库 + 运动场：炭黑/墨绿打底，荧光青定位，暖橘提醒
   ========================================================================== */

/* ---------- 01. 变量 ---------- */
:root {
  --ink: #0E1412;
  --forest: #12332A;
  --forest-2: #1E4A3D;
  --cyan: #35F0C8;
  --orange: #FF7A3D;
  --paper: #F2F5F3;
  --sand: #D9CFB8;
  --muted: #8A9A94;
  --white: #FFFFFF;
  --alert: #E4573D;

  --line: rgba(53, 240, 200, 0.22);
  --line-2: rgba(138, 154, 148, 0.30);

  --shadow-hard: 6px 6px 0 rgba(0, 0, 0, 0.55);
  --shadow-cyan: 6px 6px 0 rgba(53, 240, 200, 0.22);

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

  --shell: 1280px;
  --gutter: clamp(1rem, 3.2vw, 2.5rem);

  --fs-mono: 0.8125rem;
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: 1.25rem;
  --fs-h3: 1.375rem;
  --fs-h2: clamp(1.625rem, 3vw, 2.5rem);
  --fs-h1: clamp(2.25rem, 5.6vw, 4.5rem);

  --nav-h: 3.5rem;
}

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

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

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

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

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

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

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

p {
  max-width: 38em;
}

/* ---------- 03. 布局原子 ---------- */
.shell {
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.site-main {
  display: block;
}

.stack > * + * {
  margin-top: 1rem;
}

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

/* ---------- 04. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 300;
  transform: translateY(-180%);
  padding: 0.7rem 1.1rem;
  background-color: var(--cyan);
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 800;
  line-height: 1.4;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.6);
  transition: transform 0.18s ease;
}

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

/* ---------- 05. 页头：上层品牌带 ---------- */
.site-header {
  position: relative;
  z-index: 80;
}

.header-top {
  background-color: var(--forest);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(53, 240, 200, 0.10) 0 1px,
    transparent 1px 88px
  );
  border-bottom: 2px solid var(--forest-2);
}

.header-top__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 2rem);
  padding-block: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: var(--paper);
}

.brand__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  background-color: var(--ink);
  color: var(--cyan);
  border: 2px solid var(--cyan);
  box-shadow: 3px 3px 0 rgba(53, 240, 200, 0.35);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--paper);
  white-space: nowrap;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.header-tagline {
  max-width: none;
  min-width: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--forest-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: var(--sand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 检索入口 */
.searchbox {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: min(320px, 34vw);
  padding: 0.55rem 0.8rem;
  background-color: rgba(14, 20, 18, 0.55);
  border: 2px solid var(--cyan);
  box-shadow: 4px 4px 0 rgba(53, 240, 200, 0.16);
  color: var(--sand);
  font-size: var(--fs-small);
  line-height: 1.4;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.searchbox:hover {
  transform: translate(-2px, -2px);
  background-color: rgba(14, 20, 18, 0.9);
  box-shadow: 6px 6px 0 rgba(53, 240, 200, 0.32);
}

.searchbox__glyph {
  position: relative;
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--cyan);
  border-radius: 50%;
}

.searchbox__glyph::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 6px;
  height: 2px;
  background-color: var(--cyan);
  transform: rotate(45deg);
}

.searchbox__ph {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.searchbox__hint {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

/* ---------- 06. 页头：下层主导航（吸顶） ---------- */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 70;
  background-color: var(--ink);
  border-bottom: 2px solid var(--forest-2);
}

.header-nav::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: calc(var(--scroll-progress, 0) * 100%);
  height: 2px;
  background-color: var(--cyan);
  box-shadow: 0 0 8px rgba(53, 240, 200, 0.55);
}

.header-nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--nav-h);
}

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

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

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.95rem 0.7rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--paper);
  border-bottom: 3px solid transparent;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.nav__link:hover {
  color: var(--cyan);
  background-color: var(--forest);
  border-bottom-color: var(--line);
}

.nav__link:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: -3px;
}

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

.nav__link[aria-current="page"] .nav__num {
  color: rgba(14, 20, 18, 0.65);
}

.nav__num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border: 2px solid var(--line-2);
  color: var(--paper);
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}

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

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

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.header-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

/* ---------- 07. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1rem;
  background-color: transparent;
  color: var(--paper);
  border: 2px solid var(--paper);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
    background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5);
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.btn--cyan {
  background-color: var(--cyan);
  color: var(--ink);
  border-color: var(--cyan);
  box-shadow: 4px 4px 0 var(--forest-2);
}

.btn--cyan:hover {
  box-shadow: 6px 6px 0 var(--forest-2);
}

.btn--ghost {
  color: var(--paper);
  border-color: var(--line-2);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
}

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

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

.btn--sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.8125rem;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
}

.btn--sm:hover {
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.45);
}

/* ---------- 08. 排版原子 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  line-height: 1.6;
}

.eyebrow::before {
  content: "";
  width: 14px;
  height: 2px;
  background-color: var(--cyan);
}

.page-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.page-lead {
  max-width: 40em;
  font-size: var(--fs-lead);
  line-height: 1.7;
  color: var(--sand);
}

.sec-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
  line-height: 1.6;
}

/* ---------- 09. 面包屑 ---------- */
.breadcrumbs {
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.breadcrumbs li + li::before {
  content: "/";
  color: var(--forest-2);
}

.breadcrumbs a {
  color: var(--sand);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

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

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

/* ---------- 10. 资料卡 / 标签 ---------- */
.panel {
  position: relative;
  padding: clamp(1.1rem, 2.2vw, 1.75rem);
  background-color: var(--forest);
  border: 2px solid var(--line-2);
  box-shadow: var(--shadow-hard);
  color: var(--paper);
}

.panel--paper {
  background-color: var(--white);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--forest-2);
}

.panel--paper a {
  color: var(--ink);
  border-bottom: 2px solid var(--cyan);
}

.panel--paper :focus-visible {
  outline-color: var(--forest);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  background-color: rgba(14, 20, 18, 0.35);
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--sand);
}

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

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

/* ---------- 11. 图片容器基础 ---------- */
.media-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: var(--forest-2);
  border: 2px solid var(--line-2);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.45);
}

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

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

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

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

.media-frame--placeholder {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(53, 240, 200, 0.10) 0 2px,
    transparent 2px 12px
  );
}

.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0.35rem 0.6rem;
  background-color: var(--ink);
  color: var(--cyan);
  border-top: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

/* ---------- 12. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 7vw, 6rem);
  background-color: var(--forest);
  color: var(--paper);
  border-top: 3px solid var(--cyan);
}

.site-footer::before {
  content: "";
  display: block;
  height: 8px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--cyan) 0 22px,
    transparent 22px 44px
  );
  opacity: 0.55;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 0.9fr 1.3fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding-block: clamp(2.25rem, 4.5vw, 3.5rem);
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.6;
  color: var(--cyan);
}

.footer-col__title::after {
  content: "";
  flex: 1 1 auto;
  height: 2px;
  background-color: var(--forest-2);
}

.footer-brand {
  max-width: none;
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--paper);
}

.footer-desc {
  max-width: 32ch;
  margin: 0 0 1.1rem;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--sand);
}

.footer-links li + li {
  margin-top: 0.55rem;
}

.footer-links a {
  display: inline-block;
  padding-bottom: 1px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--paper);
  border-bottom: 2px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

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

.footer-contact li {
  display: grid;
  gap: 0.1rem;
}

.footer-contact li + li {
  margin-top: 0.75rem;
}

.footer-contact__k {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  line-height: 1.6;
  color: var(--muted);
}

.footer-contact__v {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-legal {
  padding-block: 1.25rem;
  border-top: 2px solid var(--forest-2);
}

.footer-legal__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: var(--muted);
}

.footer-legal__inner p {
  max-width: none;
  margin: 0;
}

.footer-icp {
  color: var(--sand);
}

.footer-note {
  max-width: none;
  margin: 0;
  padding: 0.7rem 0 1.75rem 0.85rem;
  border-left: 3px solid var(--orange);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--sand);
}

/* ---------- 13. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: clamp(0.9rem, 2vw, 1.75rem);
  bottom: clamp(0.9rem, 2vw, 1.75rem);
  z-index: 120;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  background-color: var(--ink);
  color: var(--cyan);
  border: 2px solid var(--cyan);
  box-shadow: 4px 4px 0 var(--forest-2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s,
    background-color 0.16s ease, color 0.16s ease;
}

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

.to-top:hover {
  background-color: var(--cyan);
  color: var(--ink);
}

.to-top__glyph {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
}

/* ---------- 14. 焦点可见 ---------- */
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1110px) {
  .header-top__inner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .header-tagline {
    display: none;
  }

  .searchbox {
    justify-self: end;
    min-width: min(280px, 44vw);
  }
}

@media (max-width: 900px) {
  :root {
    --nav-h: 3.25rem;
  }

  .header-nav__inner {
    gap: 0.6rem;
  }

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

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: min(70vh, 26rem);
    overflow-y: auto;
    padding: 0.5rem;
    background-color: var(--forest);
    border: 2px solid var(--cyan);
    border-top-width: 0;
    box-shadow: 0 10px 0 rgba(0, 0, 0, 0.35);
  }

  .nav[data-open] {
    display: block;
  }

  .nav__list {
    flex-direction: column;
  }

  .nav__link {
    width: 100%;
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--forest-2);
  }

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

  /* 两个高频入口在移动端变为右下角悬浮双按钮 */
  .header-actions {
    position: fixed;
    right: 0.9rem;
    bottom: 0.9rem;
    z-index: 110;
    margin: 0;
    padding: 0.35rem;
    gap: 0.45rem;
    background-color: rgba(14, 20, 18, 0.94);
    border: 2px solid var(--forest-2);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.5);
  }

  .to-top {
    bottom: 5.4rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-desc {
    max-width: 40ch;
  }
}

@media (max-width: 620px) {
  .header-top__inner {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding-block: 0.75rem;
  }

  .searchbox {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .brand__name {
    font-size: 1rem;
  }

  .btn--sm {
    padding: 0.45rem 0.6rem;
    font-size: 0.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-legal__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
}

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

  .btn:hover,
  .searchbox:hover {
    transform: none;
  }

  .to-top {
    transform: none;
  }
}
