/* ==========================================================================
   慧星体育 CN 中文官方站 · 共享样式表 /assets/site.css
   深空控制台体系：命令栏 + 轨道线 + 索引导航 + 暖纸阅读面
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

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

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

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

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

hr {
  border: 0;
}

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩体系 */
  --void: #050A12;
  --console: #0B1422;
  --orbit: #162234;
  --paper: #F4EFE5;
  --ink: #101820;
  --warm: #F8F3E8;
  --muted: #C8C2B4;
  --dim: #66748A;
  --comet: #22F5C8;
  --comet-deep: #0E8F7A;
  --flare: #FF6B3D;
  --amber: #FFC857;
  --graphite: #252B35;

  /* 字体 */
  --font-head: "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: "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;

  /* 尺度 */
  --maxw: 1440px;
  --gutter: 24px;
  --radius: 3px;
  --bar-h: 60px;

  /* 运行时 */
  --scroll: 0;
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--void);
  background-image:
    radial-gradient(circle at 78% -10%, rgba(34, 245, 200, 0.10), transparent 52%),
    radial-gradient(circle at 12% 18%, rgba(255, 107, 61, 0.06), transparent 44%),
    repeating-linear-gradient(90deg, rgba(22, 34, 52, 0.55) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(22, 34, 52, 0.45) 0 1px, transparent 1px 96px);
  background-attachment: fixed;
  color: var(--warm);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

h1 {
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: clamp(2.2rem, 5.6vw, 4.4rem);
}

h2 {
  font-size: clamp(1.4rem, 2.6vw, 2.05rem);
}

h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
}

p {
  max-width: 40em;
}

::selection {
  background: var(--comet);
  color: #04120E;
}

/* ---------- 4. 无障碍焦点与跳过链接 ---------- */
:focus-visible {
  outline: 2px solid var(--comet);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -72px;
  left: 16px;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--comet);
  color: #04120E;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.16s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 5. 工具类 ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--comet);
  box-shadow: 0 0 0 3px rgba(34, 245, 200, 0.18), 0 0 10px rgba(34, 245, 200, 0.55);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--comet);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--comet);
  opacity: 0.8;
}

.rule {
  height: 1px;
  background: var(--orbit);
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

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

.btn--accent {
  background: var(--comet);
  color: #04120E;
  border-color: var(--comet);
}

.btn--accent:hover {
  background: #6FFBDD;
  border-color: #6FFBDD;
}

.btn--ghost {
  background: transparent;
  color: var(--warm);
  border-color: rgba(200, 194, 180, 0.28);
}

.btn--ghost:hover {
  color: var(--comet);
  border-color: var(--comet-deep);
  background: rgba(34, 245, 200, 0.07);
}

.btn--flare {
  background: var(--flare);
  color: #17060A;
  border-color: var(--flare);
}

.btn--flare:hover {
  background: #FF8760;
  border-color: #FF8760;
}

.btn--sm {
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.8rem;
}

/* ---------- 7. 命令栏（Header） ---------- */
.cmd-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(11, 20, 34, 0.82);
  border-bottom: 1px solid var(--orbit);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  color: var(--warm);
}

.cmd-bar__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--comet-deep), var(--comet) 68%, var(--flare));
  transform: scaleX(var(--scroll));
  transform-origin: 0 50%;
  transition: transform 0.09s linear;
  pointer-events: none;
}

.cmd-bar__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px var(--gutter);
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--bar-h);
}

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

.brand__mark {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  border: 1px solid rgba(34, 245, 200, 0.42);
  display: grid;
  place-items: center;
}

.brand__mark::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--comet);
  box-shadow: 0 0 12px rgba(34, 245, 200, 0.75);
}

.brand__mark::after {
  content: "";
  position: absolute;
  left: -15px;
  top: 50%;
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 245, 200, 0.75));
  transform: rotate(-20deg);
  transform-origin: 100% 50%;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.06rem;
  letter-spacing: -0.035em;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  color: var(--muted);
  margin-top: 3px;
}

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

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  margin-left: auto;
  border: 1px solid rgba(200, 194, 180, 0.24);
  border-radius: var(--radius);
  color: var(--warm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

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

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}

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

.cmd-bar[data-open] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.cmd-bar[data-open] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.cmd-bar[data-open] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* 导航带 */
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  margin-right: auto;
  padding-right: 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav__list {
  counter-reset: navidx;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__item {
  display: block;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2px;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav__link::before {
  counter-increment: navidx;
  content: counter(navidx, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: var(--dim);
  transition: color 0.16s ease;
}

.nav__link:hover {
  color: var(--warm);
  background: rgba(34, 245, 200, 0.07);
}

.nav__link:hover::before {
  color: var(--comet-deep);
}

.nav__link[aria-current="page"] {
  color: var(--comet);
  font-weight: 700;
}

.nav__link[aria-current="page"]::before {
  color: var(--comet);
}

.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 7px;
  height: 1px;
  background: var(--comet);
  box-shadow: 0 0 8px rgba(34, 245, 200, 0.6);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  margin-left: 4px;
  border-left: 1px solid var(--orbit);
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--console);
  border-top: 1px solid var(--orbit);
  padding: 64px 0 24px;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(460px, 55%);
  height: 1px;
  background: linear-gradient(90deg, var(--comet), rgba(34, 245, 200, 0));
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(22, 34, 52, 0.5) 0 1px, transparent 1px 120px);
  opacity: 0.5;
}

.footer__grid,
.footer__base {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.7fr 0.85fr 0.85fr 1.3fr;
  gap: 40px 32px;
}

.footer__brand {
  min-width: 0;
}

.footer__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.035em;
  color: var(--warm);
  margin-bottom: 12px;
}

.footer__summary {
  max-width: 26em;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 20px;
}

.footer__col {
  min-width: 0;
}

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--comet);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--orbit);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.16s ease, padding-left 0.16s ease;
}

.footer__link:hover {
  color: var(--comet);
  padding-left: 5px;
}

.footer__contact-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 10px;
  font-size: 0.88rem;
  max-width: none;
}

.footer__contact-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--dim);
}

.footer__contact-value {
  color: var(--warm);
  word-break: break-word;
  line-height: 1.6;
}

.footer__note {
  max-width: 24em;
  margin-top: 14px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 200, 87, 0.5);
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--dim);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--orbit);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--dim);
}

.footer__icp,
.footer__copy {
  margin: 0;
  max-width: none;
}

/* ---------- 9. 布局容器与网格 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding-block: clamp(48px, 7vw, 96px);
}

.grid {
  display: grid;
  gap: var(--gutter);
}

.grid--7-5 {
  grid-template-columns: 7fr 5fr;
}

.grid--8-4 {
  grid-template-columns: 8fr 4fr;
}

/* ---------- 10. 内容层组件 ---------- */
.surface {
  background: rgba(11, 20, 34, 0.86);
  border: 1px solid var(--orbit);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 28px);
}

.surface--glass {
  background: rgba(11, 20, 34, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.surface--graphite {
  background: var(--graphite);
  border-color: rgba(248, 243, 232, 0.1);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--orbit);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

.tag--live {
  color: var(--comet);
  border-color: rgba(34, 245, 200, 0.34);
  background: rgba(34, 245, 200, 0.08);
}

.tag--warn {
  color: var(--amber);
  border-color: rgba(255, 200, 87, 0.36);
  background: rgba(255, 200, 87, 0.09);
}

.tag--alert {
  color: var(--flare);
  border-color: rgba(255, 107, 61, 0.36);
  background: rgba(255, 107, 61, 0.09);
}

/* 图片容器基础规则（共享外壳不放图片，供页面阶段使用） */
.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--graphite);
  border: 1px solid var(--orbit);
  border-radius: var(--radius);
}

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

.media--21x9 { aspect-ratio: 21 / 9; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3  { aspect-ratio: 4 / 3; }
.media--1x1  { aspect-ratio: 1 / 1; }

.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: linear-gradient(0deg, rgba(5, 10, 18, 0.92), rgba(5, 10, 18, 0));
}

/* 面包屑 */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: var(--orbit);
}

.breadcrumb__link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease;
}

.breadcrumb__link:hover {
  color: var(--comet);
}

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

/* ---------- 11. 阅读面与正文 ---------- */
.sheet {
  background: var(--paper);
  color: var(--ink);
}

.sheet .eyebrow {
  color: var(--comet-deep);
}

.sheet .eyebrow::before {
  background: var(--comet-deep);
}

.sheet .rule {
  background: rgba(16, 24, 32, 0.16);
}

.prose {
  max-width: 40em;
  line-height: 1.78;
  font-size: 1rem;
}

.prose p {
  max-width: none;
  margin: 0 0 1.15em;
}

.prose h2,
.prose h3 {
  margin: 1.9em 0 0.6em;
  letter-spacing: -0.015em;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
  margin: 0 0 1.15em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
  margin-bottom: 0.45em;
}

.prose a {
  color: var(--comet-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose strong {
  font-weight: 800;
}

.sheet .prose a {
  color: #0A6E5E;
}

/* ---------- 12. 滚动显现协议 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
  will-change: opacity, transform;
}

[data-reveal][data-delay="1"] { transition-delay: 0.06s; }
[data-reveal][data-delay="2"] { transition-delay: 0.12s; }
[data-reveal][data-delay="3"] { transition-delay: 0.18s; }
[data-reveal][data-delay="4"] { transition-delay: 0.24s; }
[data-reveal][data-delay="5"] { transition-delay: 0.30s; }

[data-reveal="in"] {
  opacity: 1;
  transform: none;
}

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1200px) {
  .nav__status {
    display: none;
  }
}

@media (max-width: 1023px) {
  :root {
    --gutter: 20px;
  }

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

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 70;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 14px var(--gutter) 22px;
    background: rgba(11, 20, 34, 0.97);
    border-bottom: 1px solid var(--orbit);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    max-height: calc(100vh - var(--bar-h));
    overflow-y: auto;
  }

  .cmd-bar[data-open] .nav {
    display: flex;
  }

  .nav__status {
    display: inline-flex;
    margin: 0 0 12px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--orbit);
    font-size: 0.7rem;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav__link {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 6px;
    font-size: 0.96rem;
    border-bottom: 1px solid rgba(22, 34, 52, 0.8);
  }

  .nav__link::before {
    font-size: 0.64rem;
    color: var(--dim);
    min-width: 20px;
  }

  .nav__link[aria-current="page"]::after {
    left: 6px;
    right: auto;
    width: 22px;
    bottom: 10px;
  }

  .nav__actions {
    flex-direction: column;
    align-items: stretch;
    margin: 16px 0 0;
    padding: 16px 0 0;
    border-left: 0;
    border-top: 1px solid var(--orbit);
  }

  .nav__actions .btn {
    width: 100%;
  }

  .grid--7-5,
  .grid--8-4 {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 28px;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 16px;
  }

  .brand__sub {
    font-size: 0.56rem;
    letter-spacing: 0.1em;
  }

  .site-footer {
    padding-top: 48px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer__base {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 32px;
  }
}

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

  .nav-toggle__label {
    display: none;
  }

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

/* ---------- 14. 动效降级 ---------- */
@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;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .cmd-bar__progress {
    transition: none;
  }
}
