/* ============================================================
   完美体育主站 · 共享样式表 /assets/site.css
   结构：变量 → 重置 → 中文排版 → 通用组件 → 头部 → 页脚 → 响应式
   ============================================================ */

:root {
  /* 底色层 */
  --c-ink: #0B2B26;
  --c-night: #101E36;
  --c-mid: #070F1C;
  --c-glass: #123033;

  /* 文字层 */
  --c-text: #E6EEF1;
  --c-dim: #9FB3BC;

  /* 语义色带 */
  --c-gold: #F0A03C;
  --c-gold-soft: #FFD79A;
  --c-cyan: #2FD8C6;
  --c-red: #E2453A;
  --c-green: #34C46B;
  --c-violet: #7C6BD6;

  /* 线形 */
  --c-scale: #2A4750;

  /* 尺寸 */
  --shell: 1220px;
  --gutter: clamp(16px, 4vw, 40px);
  --hdr-upper: 44px;
  --hdr-lower: 58px;
  --hdr-h: 102px;

  /* 字体 */
  --f-display: "Barlow Condensed", "Saira Condensed", "Noto Sans SC", sans-serif;
  --f-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  --f-body: "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

body {
  margin: 0;
  padding-top: var(--hdr-h);
  background: var(--c-ink);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--c-scale); }

:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 中文排版 ---------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 300;
  letter-spacing: .01em;
  line-height: 1.15;
}
h1 { font-size: clamp(34px, 6vw, 66px); }
h2 { font-size: clamp(26px, 4vw, 42px); }
h3 { font-size: clamp(20px, 2.6vw, 27px); }
h4 { font-size: clamp(17px, 2vw, 21px); }

.num,
[data-num] {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

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

.page-body {
  display: block;
  padding-block: clamp(28px, 5vw, 64px) clamp(40px, 7vw, 96px);
}

.page-lede {
  max-width: 62ch;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.7;
  color: var(--c-text);
}

/* ---------- 章节 ---------- */
.section {
  position: relative;
  padding-block: clamp(44px, 6.5vw, 92px);
}
.section--ink { background: var(--c-ink); }
.section--night { background: var(--c-night); }
.section--mid { background: var(--c-mid); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.section-num {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--c-gold);
  font-variant-numeric: tabular-nums;
}

.section-title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.15;
  color: var(--c-text);
}

.eyebrow {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-dim);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--c-scale);
  color: var(--c-dim);
  font-family: var(--f-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .1em;
  white-space: nowrap;
}
.tag--gold { color: var(--c-gold); border-color: rgba(240, 160, 60, .42); }
.tag--cyan { color: var(--c-cyan); border-color: rgba(47, 216, 198, .42); }
.tag--red { color: var(--c-red); border-color: rgba(226, 69, 58, .42); }
.tag--green { color: var(--c-green); border-color: rgba(52, 196, 107, .42); }
.tag--violet { color: var(--c-violet); border-color: rgba(124, 107, 214, .42); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .04em;
  text-decoration: none;
  border: 1px solid transparent;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.btn-primary {
  background: var(--c-gold);
  color: #1A1005;
}
.btn-primary:hover { background: var(--c-gold-soft); }

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

/* ---------- 面包屑 ---------- */
.breadcrumb { margin-bottom: 18px; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
}
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--c-scale); }
.breadcrumb a { color: var(--c-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-cyan); }
.breadcrumb [aria-current="page"] { color: var(--c-gold); }

/* ---------- 正文排版 ---------- */
.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-text);
}
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.6em; font-weight: 300; }
.prose h3 { margin-top: 1.4em; font-weight: 400; }
.prose strong { font-weight: 600; color: #FFFFFF; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--c-cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose code {
  font-family: var(--f-mono);
  font-size: .9em;
  padding: 2px 6px;
  background: var(--c-glass);
  border: 1px solid var(--c-scale);
}

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(14px, 2.4vw, 26px);
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-5-3 { grid-template-columns: 5fr 3fr; }
.grid-7-4 { grid-template-columns: 7fr 4fr; }
.grid-3-4-5 { grid-template-columns: 3fr 4fr 5fr; }

/* ---------- 数据轨道 ---------- */
.rail {
  position: sticky;
  top: calc(var(--hdr-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rail-link {
  display: block;
  padding: 8px 12px;
  border-left: 2px solid var(--c-scale);
  font-family: var(--f-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .06em;
  color: var(--c-dim);
  text-decoration: none;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.rail-link:hover { color: var(--c-text); border-left-color: var(--c-dim); }
.rail-link.is-current {
  color: var(--c-cyan);
  border-left-color: var(--c-cyan);
  background: rgba(47, 216, 198, .07);
}

/* ---------- 图片容器（页面阶段使用） ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(47, 216, 198, .06) 0 1px, transparent 1px 9px),
    linear-gradient(135deg, var(--c-glass), var(--c-night));
  border: 1px solid var(--c-scale);
}
.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(230, 238, 241, .06);
  pointer-events: none;
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--3x4 { aspect-ratio: 3 / 4; }

/* ---------- 显现（由 JS 渐进增强） ---------- */
.reveal-init {
  opacity: 0;
  transform: translateY(8px);
}
.reveal-init.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}

/* ============================================================
   头部
   ============================================================ */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--c-gold);
  color: #1A1005;
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(7, 15, 28, .9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-scale);
  color: var(--c-text);
}

/* 上层：品牌说明轨道 */
.header-upper {
  height: var(--hdr-upper);
  overflow: hidden;
  border-bottom: 1px solid rgba(42, 71, 80, .6);
  transition: height .26s var(--ease), opacity .2s var(--ease), border-color .26s var(--ease);
}
.site-header.is-collapsed .header-upper {
  height: 0;
  opacity: 0;
  border-bottom-color: transparent;
}
.header-upper-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: var(--hdr-upper);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--c-text);
  min-width: 0;
}
.brand-mark {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--c-gold) 0%, var(--c-cyan) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 66%, 66% 100%, 0 100%);
}
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-name {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .06em;
  line-height: 1.2;
  white-space: nowrap;
}
.brand-line {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .12em;
  line-height: 1.4;
  color: var(--c-dim);
  white-space: nowrap;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.region-tag {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid rgba(47, 216, 198, .45);
  color: var(--c-cyan);
  font-family: var(--f-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .12em;
  white-space: nowrap;
}
.header-icp {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--c-dim);
  white-space: nowrap;
}

/* 下层：栏目轨道 */
.header-lower {
  position: relative;
  height: var(--hdr-lower);
}
.header-lower-inner {
  display: flex;
  align-items: center;
  height: var(--hdr-lower);
  gap: 14px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--c-scale);
  color: var(--c-text);
  font-size: 13px;
  line-height: 1;
  letter-spacing: .08em;
}
.nav-toggle-bars {
  position: relative;
  width: 16px;
  height: 10px;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1px;
  background: var(--c-cyan);
  transition: transform .2s var(--ease);
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-4.5px) rotate(-45deg); }
.nav-toggle-label { font-family: var(--f-mono); letter-spacing: .14em; }

.primary-nav { min-width: 0; }

.nav-track {
  display: flex;
  align-items: stretch;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-track::-webkit-scrollbar { display: none; }

.nav-item { flex: 0 0 auto; }

.nav-link {
  --line: var(--c-cyan);
  position: relative;
  display: block;
  padding: 20px 15px;
  color: var(--c-dim);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 0;
  height: 2px;
  background: var(--line);
  opacity: 0;
  transform: scaleX(.35);
  transform-origin: left center;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.nav-link:hover { color: var(--c-text); }
.nav-link:hover::after { opacity: .5; transform: scaleX(1); }

.nav-link[data-line="gold"] { --line: var(--c-gold); }
.nav-link[data-line="cyan"] { --line: var(--c-cyan); }
.nav-link[data-line="red"] { --line: var(--c-red); }
.nav-link[data-line="green"] { --line: var(--c-green); }
.nav-link[data-line="violet"] { --line: var(--c-violet); }

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

/* 顶部阅读进度 */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(42, 71, 80, .55);
}
.read-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--c-cyan) 0%, var(--c-gold) 100%);
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  margin-top: clamp(40px, 7vw, 110px);
  background: var(--c-mid);
  border-top: 1px solid var(--c-scale);
  color: var(--c-text);
}

.footer-stripe {
  display: grid;
  grid-template-columns: 8fr 4fr 4fr 6fr;
  height: 3px;
}
.footer-stripe span:nth-child(1) { background: var(--c-gold); }
.footer-stripe span:nth-child(2) { background: var(--c-red); }
.footer-stripe span:nth-child(3) { background: var(--c-green); }
.footer-stripe span:nth-child(4) { background: var(--c-cyan); }

.footer-body {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: clamp(26px, 4vw, 56px);
  padding-block: clamp(36px, 5.5vw, 68px) clamp(24px, 3vw, 36px);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.brand--footer .brand-mark { width: 28px; height: 28px; }
.brand--footer .brand-name { font-size: 19px; }
.footer-tagline {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .1em;
  line-height: 1.7;
  color: var(--c-dim);
}
.region-tag--footer { border-color: rgba(240, 160, 60, .45); color: var(--c-gold); }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 32px);
}
.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.footer-list { display: flex; flex-direction: column; gap: 9px; }
.footer-link {
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-dim);
  text-decoration: none;
  transition: color .18s var(--ease);
}
.footer-link:hover { color: var(--c-cyan); }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) 1.4fr;
  gap: clamp(16px, 2.6vw, 30px);
  padding-block: clamp(22px, 3vw, 32px);
  border-top: 1px solid var(--c-scale);
}
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.contact-item--wide { grid-column: span 1; }
.contact-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--c-dim);
}
.contact-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.contact-value {
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--c-text);
  word-break: break-word;
}
.copy-btn {
  padding: 4px 10px;
  border: 1px solid var(--c-scale);
  color: var(--c-dim);
  font-family: var(--f-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .1em;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.copy-btn:hover { color: var(--c-cyan); border-color: var(--c-cyan); }

.contact-note {
  max-width: 74ch;
  padding-bottom: clamp(22px, 3vw, 32px);
  font-size: 13px;
  line-height: 1.75;
  color: var(--c-dim);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding-block: 20px clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--c-scale);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--c-dim);
}
.legal-icp { color: var(--c-dim); }
.legal-region {
  padding: 2px 8px;
  border: 1px solid var(--c-scale);
  color: var(--c-dim);
}
.footer-closing { margin-left: auto; color: var(--c-dim); }

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

@media (max-width: 880px) {
  :root { --hdr-h: 102px; }

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

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--c-mid);
    border-top: 1px solid var(--c-scale);
    border-bottom: 1px solid var(--c-scale);
    transition: max-height .3s var(--ease);
  }
  .primary-nav[data-open] {
    max-height: 76vh;
    overflow-y: auto;
  }
  .nav-track {
    flex-direction: column;
    gap: 0;
    padding: 6px 0 10px;
    overflow-x: visible;
  }
  .nav-item { width: 100%; }
  .nav-link {
    padding: 15px var(--gutter);
    border-bottom: 1px solid rgba(42, 71, 80, .5);
  }
  .nav-link::after { display: none; }
  .nav-link[aria-current="page"] {
    color: var(--c-gold);
    background: rgba(240, 160, 60, .08);
    border-left: 2px solid var(--c-gold);
  }

  .footer-body { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-contact { grid-template-columns: 1fr; }
  .footer-closing { margin-left: 0; }

  .rail { display: none; }
}

@media (max-width: 760px) {
  .grid-2,
  .grid-3,
  .grid-3-4-5 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root { --hdr-h: 98px; --hdr-lower: 54px; }
  .header-icp { display: none; }
  .brand-line { display: none; }
  .grid { gap: 14px; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .prose, .page-lede { font-size: 15px; }
}

/* ============================================================
   动效偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .reveal-init { opacity: 1; transform: none; }
  .site-header.is-collapsed .header-upper {
    height: 0;
    opacity: 1;
  }
}
