/* ============================================================
   OB体育中文站 · 共享样式 /assets/site.css
   1 重置  2 变量  3 排版  4 布局  5 组件  6 头部  7 页脚
   8 返回顶部  9 无障碍  10 响应式
   ============================================================ */

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

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

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

ul, ol { 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%; }

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

/* ---------- 2 变量 ---------- */
:root {
  --ink: #061A2E;
  --ink-soft: #0A2440;
  --teal: #0B3F4C;
  --indigo: #2B1F5E;
  --wine: #5A1F3D;
  --lime: #C6FF3D;
  --orange: #FF6A2A;
  --steel: #8EA2B6;
  --white: #F5F9FC;
  --paper: #F1EDE3;
  --edge: #294860;

  --font-display: 'Noto Sans SC', 'HarmonyOS Sans SC', 'PingFang SC', sans-serif;
  --font-head: 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --shell: 1240px;
  --pad: clamp(16px, 4vw, 40px);
  --header-h: 100px;
  --r: 2px;
  --t: 200ms;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3 排版工具 ---------- */
.display,
.h1,
.h2,
.h3 {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -.015em;
}

.display {
  font-family: var(--font-display);
  font-size: clamp(44px, 8vw, 88px);
  line-height: .98;
}

.h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.05; }
.h2 { font-size: clamp(26px, 3.4vw, 42px); line-height: 1.15; }
.h3 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.3; font-weight: 700; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lime);
}

.prose {
  max-width: 34em;
  line-height: 1.85;
}

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

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: .92em;
  padding: .1em .38em;
  border-radius: var(--r);
  background: rgba(41, 72, 96, .38);
  color: var(--lime);
}

/* ---------- 4 布局 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- 5 组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--r);
  cursor: pointer;
  transition:
    background var(--t) var(--ease),
    color var(--t) var(--ease),
    border-color var(--t) var(--ease),
    transform var(--t) var(--ease);
}

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

.btn-lime {
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 10px 26px -16px rgba(198, 255, 61, .9);
}
.btn-lime:hover { background: #D6FF6D; }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--edge);
}
.btn-ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.btn-orange {
  background: var(--orange);
  color: #FFFFFF;
}
.btn-orange:hover { background: #FF8449; }

.btn-sm {
  padding: 9px 16px;
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--steel);
  border: 1px solid var(--edge);
  border-radius: var(--r);
}

.tag--lime { color: var(--lime); border-color: rgba(198, 255, 61, .55); }
.tag--orange { color: var(--orange); border-color: rgba(255, 106, 42, .55); }

.panel {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  background:
    linear-gradient(160deg, rgba(11, 63, 76, .55) 0%, rgba(6, 26, 46, .92) 68%);
}

.panel--indigo {
  background:
    linear-gradient(160deg, rgba(43, 31, 94, .7) 0%, rgba(6, 26, 46, .94) 70%);
}

.panel--paper {
  background: var(--paper);
  border-color: #CFC7B6;
  color: var(--ink);
}

/* 面包屑 */
.crumbs { padding-block: clamp(16px, 2.4vw, 28px); }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--steel);
}

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

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

.crumbs a {
  color: var(--steel);
  transition: color var(--t) var(--ease);
}
.crumbs a:hover { color: var(--lime); }

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

/* 可复用图片容器 */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--edge);
  border-radius: var(--r);
  background:
    repeating-linear-gradient(115deg, rgba(41, 72, 96, .5) 0 1px, transparent 1px 16px),
    linear-gradient(135deg, var(--teal) 0%, var(--indigo) 58%, var(--wine) 100%);
}

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

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

.media--paper {
  border-color: #CFC7B6;
  background:
    repeating-linear-gradient(115deg, rgba(41, 72, 96, .16) 0 1px, transparent 1px 16px),
    linear-gradient(135deg, var(--paper) 0%, #DDD6C6 100%);
}

.media-tag {
  position: absolute;
  left: 0;
  top: 0;
  padding: 6px 22px 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--lime);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}

/* 章节目录激活态 */
[data-toc] a.is-current {
  color: var(--lime);
  border-color: var(--lime);
}

/* ---------- 6 头部 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 300;
  padding: 10px 22px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--lime);
  border-radius: 0 0 var(--r) var(--r);
  transform: translate(-50%, -130%);
  transition: transform var(--t) var(--ease);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  color: var(--white);
  border-bottom: 1px solid rgba(41, 72, 96, .55);
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(6, 26, 46, .78);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  transition: background var(--t) var(--ease);
}

.site-header[data-scrolled]::before { background: var(--ink); }

.site-header[data-scrolled] {
  border-bottom-color: var(--edge);
  box-shadow: 0 22px 44px -34px rgba(0, 0, 0, .95);
}

/* 顶部状态条 */
.hdr-strip {
  position: relative;
  background: rgba(11, 63, 76, .72);
  border-bottom: 1px solid rgba(198, 255, 61, .12);
}

.hdr-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--steel);
}

.hdr-status {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hdr-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(198, 255, 61, .18);
  animation: hdr-blip 2.6s ease-in-out infinite;
}

@keyframes hdr-blip {
  0%, 100% { opacity: 1; }
  50% { opacity: .32; }
}

.hdr-meta {
  white-space: nowrap;
  letter-spacing: .12em;
}

/* 品牌 + 导航行 */
.hdr-bar { position: relative; }

.hdr-bar-inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  min-height: 68px;
}

.hdr-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.hdr-brandmark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
  background: var(--lime);
  clip-path: polygon(0 0, 100% 0, 100% 74%, 0 100%);
}

.hdr-brandtext {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.1;
}

.hdr-brandname {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--white);
}

.hdr-branddesc {
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--steel);
}

/* 主导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.3vw, 20px);
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 2px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  color: rgba(245, 249, 252, .82);
  transition: color var(--t) var(--ease);
}

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

.nav-link:hover,
.nav-link:focus-visible { color: var(--white); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] { color: var(--lime); font-weight: 700; }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-aside {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: clamp(12px, 2vw, 24px);
  border-left: 1px solid rgba(41, 72, 96, .85);
}

.nav-quick {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--steel);
  border-bottom: 1px dashed transparent;
  padding-bottom: 1px;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.nav-quick:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

/* 移动按钮 */
.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: rgba(6, 26, 46, .55);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease);
}

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

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}

.nav-toggle-icon span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
}

.nav-toggle-icon span:nth-child(1) { top: 0; }
.nav-toggle-icon span:nth-child(2) { top: 5px; }
.nav-toggle-icon span:nth-child(3) { top: 10px; }

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

/* 阅读进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(198, 255, 61, .12);
  pointer-events: none;
}

.scroll-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lime) 0%, var(--orange) 100%);
  transition: width 120ms linear;
}

/* ---------- 7 页脚 ---------- */
.site-footer {
  position: relative;
  color: var(--white);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(43, 31, 94, .55) 0%, rgba(6, 26, 46, 0) 62%),
    var(--ink);
  border-top: 1px solid var(--edge);
  padding-top: clamp(40px, 6vw, 72px);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: min(420px, 52%);
  height: 3px;
  background: linear-gradient(90deg, var(--lime) 0%, var(--orange) 100%);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 2.1fr);
  gap: clamp(32px, 5vw, 72px);
  padding-bottom: clamp(36px, 5vw, 60px);
}

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

.footer-brandline {
  font-family: var(--font-head);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.footer-summary {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--steel);
}

.footer-cta { margin-top: 22px; }

.footer-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.55fr);
  gap: clamp(24px, 3vw, 44px);
  min-width: 0;
}

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

.footer-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lime);
}

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

.footer-list a {
  color: rgba(245, 249, 252, .78);
  transition: color var(--t) var(--ease);
}

.footer-list a:hover { color: var(--lime); }

.footer-group--contact .footer-list { gap: 0; }

.footer-group--contact li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 7px 0;
  font-size: 13px;
  line-height: 1.6;
  border-bottom: 1px dashed rgba(41, 72, 96, .7);
}

.footer-k {
  font-size: 12px;
  color: var(--steel);
  white-space: nowrap;
}

.footer-v {
  color: var(--white);
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding-block: 20px;
  font-size: 12px;
  color: var(--steel);
  border-top: 1px solid rgba(41, 72, 96, .75);
}

.footer-copy {
  margin-right: auto;
  font-family: var(--font-mono);
  letter-spacing: .03em;
}

.footer-legal {
  font-family: var(--font-mono);
  letter-spacing: .03em;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-legal-links a {
  color: var(--steel);
  transition: color var(--t) var(--ease);
}

.footer-legal-links a:hover { color: var(--lime); }

/* ---------- 8 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  background: var(--lime);
  border-radius: var(--r);
  cursor: pointer;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .85);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity var(--t) var(--ease),
    transform var(--t) var(--ease),
    visibility 0s linear var(--t),
    background var(--t) var(--ease);
}

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

.to-top:hover { background: #D6FF6D; }

/* ---------- 9 无障碍 ---------- */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(6, 26, 46, .55);
  border-radius: var(--r);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .hdr-dot { animation: none; }
  .btn:hover { transform: none; }
}

/* ---------- 10 响应式 ---------- */
@media (max-width: 1100px) {
  :root { --header-h: 64px; }

  .hdr-strip { display: none; }
  .hdr-bar-inner { min-height: var(--header-h); }
  .hdr-branddesc { display: none; }

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

  .site-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(400px, 86vw);
    margin-left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 26px 26px 44px;
    background:
      linear-gradient(180deg, rgba(11, 63, 76, .55) 0%, rgba(6, 26, 46, 0) 40%),
      var(--ink);
    border-left: 1px solid var(--edge);
    box-shadow: -30px 0 60px -40px rgba(0, 0, 0, .95);
    overflow-y: auto;
    z-index: 120;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 260ms var(--ease), visibility 0s linear 260ms;
  }

  .site-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
    transition: transform 260ms var(--ease), visibility 0s linear 0s;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 14px 0;
    font-size: 17px;
    font-weight: 600;
    border-bottom: 1px solid rgba(41, 72, 96, .55);
  }

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

  .nav-aside {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 12px;
    padding: 22px 0 0;
    border-left: 0;
  }

  .nav-aside .btn { width: 100%; }

  .nav-quick {
    padding-bottom: 10px;
    font-size: 14px;
  }

  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-group--contact { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .hdr-brandmark { width: 34px; height: 34px; font-size: 13px; }
  .hdr-brandname { font-size: 15px; }
  .nav-toggle-text { display: none; }

  .footer-nav { grid-template-columns: minmax(0, 1fr); }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .footer-copy { margin-right: 0; }
  .footer-legal-links { width: 100%; }
}

@media (max-width: 420px) {
  .footer-group--contact li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* 打印 */
@media print {
  .site-header,
  .to-top,
  .skip-link { display: none !important; }

  body { background: #FFFFFF; color: #111111; }
  .site-footer { background: #FFFFFF; color: #111111; border-top: 1px solid #999999; }
  .footer-summary, .footer-k, .footer-base { color: #444444; }
}
