/* ============================================================
   华体育主站 · 共享样式 /assets/site.css
   曜石黑铺底 · 侧边轨道导航脊 · 玻璃层与实色层并置
   ============================================================ */

:root {
  --obsidian: #0A0D11;
  --charcoal: #141A22;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.14);
  --amber: #FF8A1E;
  --amber-deep: #C9600A;
  --cyan: #33E1D6;
  --cyan-dark: #148C86;
  --sand: #F5F2EC;
  --graphite: #9AA4B0;
  --coral: #FF6B5A;
  --recover: #3FBF7F;
  --line: #26303B;

  --rail-w: 240px;
  --radius: 3px;
  --gutter: 24px;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo,
    Consolas, "Liberation Mono", monospace;
}

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

html {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  padding: 0 0 0 var(--rail-w);
  min-height: 100vh;
  background: var(--obsidian);
  color: var(--sand);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--sand);
}

p { margin: 0 0 1em; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--amber); }

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

ul, ol { margin: 0 0 1em; padding-left: 1.4em; }

button { font: inherit; color: inherit; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

::selection { background: rgba(255, 138, 30, 0.32); color: var(--sand); }

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

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  display: inline-block;
  padding: 10px 18px;
  background: var(--amber);
  color: #0A0D11;
  font-size: 14px;
  font-weight: 700;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: translateY(0); color: #0A0D11; }

/* ============================================================
   HEADER · 侧边轨道导航脊
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  background: var(--charcoal);
  border-right: 1px solid var(--line);
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100%;
  padding: 24px 16px 20px;
}

.rail__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--sand);
  text-decoration: none;
}
.brand:hover { color: var(--sand); }

.brand__mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--amber);
  color: #0A0D11;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  border-radius: 2px;
  transition: background 0.18s ease;
}
.brand:hover .brand__mark { background: var(--amber-deep); }

.brand__text { min-width: 0; display: block; }
.brand__name {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.brand__sub {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--graphite);
  line-height: 1.4;
}

/* 移动端抽屉按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--sand);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.nav-toggle:hover { border-color: var(--amber); color: var(--amber); }

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.18s ease, background 0.18s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.site-header[data-open] .nav-toggle__bars { background: transparent; }
.site-header[data-open] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* 导航脊 */
.rail__nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.rail__nav::-webkit-scrollbar { width: 4px; }
.rail__nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

.rail__heading {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--graphite);
  text-transform: uppercase;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  color: var(--sand);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--amber);
  color: var(--sand);
}
.nav-link[aria-current="page"] {
  background: rgba(255, 138, 30, 0.14);
  border-left-color: var(--amber);
  color: var(--amber);
}
.nav-link__index {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--cyan-dark);
}
.nav-link[aria-current="page"] .nav-link__index { color: var(--cyan); }
.nav-link__text { min-width: 0; }

/* 快速入口 */
.rail__quick { display: flex; flex-direction: column; gap: 8px; }
.rail__quick .rail__heading { margin-bottom: 4px; }

.quick-card {
  display: block;
  padding: 12px 14px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 2px;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.quick-card:hover {
  border-color: var(--amber);
  background: rgba(255, 138, 30, 0.1);
  color: inherit;
}
.quick-card__label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--sand);
  line-height: 1.4;
}
.quick-card__note {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--graphite);
  line-height: 1.5;
}
.quick-card:hover .quick-card__label { color: var(--amber); }

.rail__tagline {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--graphite);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: 72px;
  background: var(--charcoal);
  border-top: 1px solid var(--line);
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2.1fr) minmax(250px, 1.35fr);
  gap: 40px;
}

.footer__brand { display: flex; flex-direction: column; gap: 6px; }
.footer__mark {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--sand);
}
.footer__sub {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--graphite);
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer__col-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--graphite);
  text-transform: uppercase;
}

.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__link {
  display: inline-block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--sand);
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}
.footer__link:hover { color: var(--cyan); transform: translateX(2px); }

.footer__contact {
  padding: 20px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.footer__contact .footer__col-title { margin-bottom: 16px; }

.contact-line {
  display: flex;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
}
.contact-line__key {
  flex: 0 0 auto;
  width: 40px;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cyan-dark);
}
.contact-line__val { min-width: 0; color: var(--sand); word-break: break-word; }

.footer__fineprint {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--graphite);
}

.footer__base {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 24px 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--graphite);
}
.footer__note { margin: 0; max-width: 62ch; line-height: 1.7; }
.footer__legal {
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.footer__icp { color: var(--graphite); }

/* ============================================================
   通用组件
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section--tight { padding: 40px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.lede {
  font-size: 19px;
  line-height: 1.7;
  color: var(--sand);
  max-width: 60ch;
}

.sidenote {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--graphite);
  max-width: 40ch;
}

.prose p { max-width: 68ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--sand);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:hover { border-color: var(--amber); color: var(--amber); }

.btn--primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #0A0D11;
}
.btn--primary:hover {
  background: var(--amber-deep);
  border-color: var(--amber-deep);
  color: #0A0D11;
}

.btn--ghost { background: var(--glass); }
.btn--ghost:hover { background: var(--glass-strong); }

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--graphite);
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line);
}
.breadcrumb a { color: var(--graphite); text-decoration: none; }
.breadcrumb a:hover { color: var(--cyan); }

/* 状态标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--glass);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--graphite);
  white-space: nowrap;
}
.tag--amber { background: rgba(255, 138, 30, 0.16); color: var(--amber); }
.tag--cyan { background: rgba(51, 225, 214, 0.14); color: var(--cyan); }
.tag--coral { background: rgba(255, 107, 90, 0.16); color: var(--coral); }
.tag--recover { background: rgba(63, 191, 127, 0.16); color: var(--recover); }

/* Bento 骨架 */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}
.bento__cell {
  padding: 24px;
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.bento__cell--glass {
  background: var(--glass);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* 横向轨道 */
.track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: thin;
}
.track > * {
  flex: 0 0 min(320px, 78vw);
  scroll-snap-align: start;
}
.track::-webkit-scrollbar { height: 6px; }
.track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* 图片容器基础规则（页面阶段放置占位） */
.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--charcoal);
}
.media-frame > img,
.media-frame > svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--wide { aspect-ratio: 21 / 9; }

/* 滚动进度与返回顶部（由 JS 注入） */
.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: 2px;
  z-index: 80;
  pointer-events: none;
  background: transparent;
}
.scroll-progress__bar {
  height: 100%;
  width: 0;
  background: var(--amber);
  transition: width 0.08s linear;
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(20, 26, 34, 0.92);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--amber); color: var(--amber); }

/* 显现（仅在有 JS 时启用） */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.has-js [data-reveal="in"] {
  opacity: 1;
  transform: none;
}

/* ============================================================
   中屏：导航脊收窄为 84px，导航文字转纵向
   ============================================================ */
@media (min-width: 768px) and (max-width: 1099px) {
  :root { --rail-w: 84px; }

  .rail {
    padding: 20px 8px 18px;
    gap: 16px;
    align-items: center;
  }
  .rail__top { flex-direction: column; gap: 14px; }
  .brand { gap: 0; }
  .brand__text { display: none; }
  .rail__heading { display: none; }

  .rail__nav { width: 100%; }
  .nav-list { gap: 6px; }
  .nav-link {
    justify-content: center;
    padding: 12px 4px;
    border-left: 0;
    border-radius: 2px;
  }
  .nav-link__index { display: none; }
  .nav-link__text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 13px;
    letter-spacing: 0.16em;
    line-height: 1.15;
  }

  .rail__quick { width: 100%; }
  .quick-card { padding: 12px 6px; text-align: center; }
  .quick-card__label {
    display: inline-block;
    writing-mode: vertical-rl;
    text-orientation: upright;
    margin: 0 auto;
    font-size: 12.5px;
    letter-spacing: 0.1em;
  }
  .quick-card__note { display: none; }
  .rail__tagline { display: none; }
}

/* ============================================================
   窄屏：顶部条 + 下拉抽屉
   ============================================================ */
@media (max-width: 767px) {
  :root { --rail-w: 0px; }

  html { scroll-padding-top: 76px; }

  body { padding-left: 0; padding-top: 60px; }

  .site-header {
    width: 100%;
    height: auto;
    max-height: 100vh;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(20, 26, 34, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .rail {
    height: auto;
    padding: 10px 16px 20px;
    gap: 0;
    align-items: stretch;
  }

  .rail__top { gap: 12px; }
  .nav-toggle { display: inline-flex; }

  .rail__nav,
  .rail__quick,
  .rail__tagline { display: none; }

  .rail__nav { margin-top: 18px; }
  .rail__quick { margin-top: 22px; }
  .rail__tagline { margin-top: 20px; line-height: 1.6; }

  .site-header[data-open] .rail__nav { display: block; }
  .site-header[data-open] .rail__quick { display: flex; }
  .site-header[data-open] .rail__tagline { display: block; }

  .nav-list { gap: 4px; }
  .nav-link {
    padding: 12px 10px;
    font-size: 16px;
    border-left-width: 2px;
  }
  .rail__heading { margin-top: 4px; }

  .quick-card { padding: 14px 16px; }

  html.nav-open,
  html.nav-open body { overflow: hidden; }

  .scroll-progress { left: 0; }
  .to-top { right: 16px; bottom: 16px; }
}

/* ---------- 页脚响应式 ---------- */
@media (max-width: 960px) {
  .footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
  .footer__contact { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .footer__inner {
    grid-template-columns: 1fr;
    padding: 40px 20px 28px;
  }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__base { padding: 20px 20px 28px; }
  .footer__legal { white-space: normal; }
  .footer__contact { padding: 16px; }

  .container { padding: 0 20px; }
  .section { padding: 56px 0; }
  .section--tight { padding: 32px 0; }
}

/* ---------- 降低动效 ---------- */
@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;
  }
  .has-js [data-reveal] { opacity: 1; transform: none; }
}
