/* ============================================================
   huanyun-sports.com.cn — 共享站点样式 /assets/site.css
   侧边轨道 + 命令栏 + 连续画布
   ============================================================ */

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

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

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

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

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

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

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

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

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. tokens ---------- */
:root {
  --ink: #0B0E13;
  --ink-2: #141A22;
  --blue: #1F5BFF;
  --blue-mist: #7FA4FF;
  --lime: #C8FF3C;
  --orange: #FF6A18;
  --white: #FFFFFF;
  --fog: #A9B4C4;
  --rule: #2A3441;
  --indigo: #0E2A66;

  --font-display: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;

  --rail-w: 88px;
  --shell: 1400px;
  --pad: clamp(16px, 3.2vw, 48px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: 180ms;
  --dur-slow: 260ms;
}

/* ---------- 3. base / 中文排版 ---------- */
body {
  background: var(--ink);
  color: var(--fog);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.012em;
  color: var(--white);
}

h1 { font-size: clamp(34px, 5.4vw, 68px); }
h2 { font-size: clamp(26px, 3.6vw, 44px); }
h3 { font-size: clamp(19px, 2.2vw, 26px); }
h4 { font-size: 17px; letter-spacing: 0; }

p { text-wrap: pretty; }

.measure { max-width: 38em; }
.measure--narrow { max-width: 30em; }
.measure--wide { max-width: 60em; }

.prose p { max-width: 36em; margin-bottom: 1.2em; }
.prose p:last-child { margin-bottom: 0; }

strong, b { color: var(--white); font-weight: 700; }

::selection { background: var(--lime); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* ---------- 4. 通用容器与骨架 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

#main-content { scroll-margin-top: 130px; }

.divider {
  height: 1px;
  border: 0;
  background: var(--rule);
  position: relative;
}

.divider--ticked::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(127, 164, 255, .35) 0 1px, transparent 1px 28px);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 120px);
  line-height: .84;
  letter-spacing: -.03em;
  color: rgba(31, 91, 255, .32);
  font-variant-numeric: tabular-nums;
}

.num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

/* ---------- 5. skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  padding: 11px 18px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 14px;
  transform: translateY(-240%);
  transition: transform 150ms var(--ease);
}

.skip-link:focus { transform: translateY(0); }

/* ---------- 6. 品牌轨道 ---------- */
.brand-rail { display: none; }

.rail-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--white);
}

.rail-mark__glyph {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--white);
  color: var(--blue);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.rail-mark:hover .rail-mark__glyph { background: var(--lime); color: var(--ink); }

.rail-mark__word {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .32em;
  color: var(--white);
}

.rail-dock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 0 6px;
}

.rail-dock__stat {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  color: rgba(255, 255, 255, .55);
}

.rail-dock__link {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--white);
  padding: 12px 8px;
  border: 1px solid rgba(255, 255, 255, .4);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.rail-dock__link:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

/* ---------- 7. 头部外壳 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 14, 19, .97);
  border-bottom: 1px solid var(--rule);
}

.site-header.is-scrolled {
  border-bottom-color: #364356;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

.site-header__bar { position: relative; }

/* ---------- 8. 命令栏 ---------- */
.cmdbar__inner,
.cmdbar {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 26px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 10px var(--pad);
  min-height: 62px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  flex: 0 0 auto;
}

.brand-lockup__glyph {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  line-height: 1;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.brand-lockup:hover .brand-lockup__glyph { background: var(--lime); color: var(--ink); }

.brand-lockup__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  color: var(--white);
  letter-spacing: .01em;
  white-space: nowrap;
}

.brand-lockup__tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--ink);
  background: var(--lime);
  padding: 3px 6px;
  line-height: 1.2;
}

.sync-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .01em;
  color: var(--fog);
  white-space: nowrap;
}

.sync-line__state {
  color: var(--lime);
  font-weight: 700;
  letter-spacing: .08em;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  flex: 0 0 auto;
  animation: syncPulse 3s ease-out infinite;
}

@keyframes syncPulse {
  0% { box-shadow: 0 0 0 0 rgba(200, 255, 60, .55); }
  70% { box-shadow: 0 0 0 9px rgba(200, 255, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 255, 60, 0); }
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 11px 18px;
  background: var(--orange);
  color: #0B0E13;
  border: 1px solid var(--orange);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13.5px;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.cta:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); }

/* ---------- 9. 导航按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid var(--rule);
  background: var(--ink-2);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

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

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 160ms var(--ease), top 160ms var(--ease);
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

[data-nav-toggle][aria-expanded="true"] {
  border-color: var(--lime);
  color: var(--lime);
}

[data-nav-toggle][aria-expanded="true"] .nav-toggle__bars { background: var(--lime); }
[data-nav-toggle][aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
[data-nav-toggle][aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- 10. 导航 ---------- */
.site-nav {
  background: var(--ink-2);
  border-top: 1px solid var(--rule);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0 var(--pad);
}

.site-nav__item { display: flex; }

.site-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 13px 18px;
  border-bottom: 2px solid transparent;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--fog);
  white-space: nowrap;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.site-nav__link:hover {
  color: var(--white);
  background: rgba(31, 91, 255, .14);
  border-bottom-color: var(--orange);
}

.site-nav__idx {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--blue-mist);
  transition: color var(--dur) var(--ease);
}

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

.site-nav__link[aria-current="page"] .site-nav__idx { color: var(--lime); }

/* ---------- 11. 滚动进度 ---------- */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.scroll-meter__fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--blue-mist) 55%, var(--lime));
  transition: width 130ms linear;
}

/* ---------- 12. 按钮 / 标签 / 面包屑 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.btn--solid { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn--solid:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }

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

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--rule);
  background: rgba(20, 26, 34, .72);
  color: var(--fog);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.5;
}

.tag--blue { background: var(--blue); border-color: var(--blue); color: var(--white); }
.tag--lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.tag--orange { background: var(--orange); border-color: var(--orange); color: var(--ink); }

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6F7889;
}

.crumb a { color: var(--blue-mist); transition: color var(--dur) var(--ease); }
.crumb a:hover { color: var(--lime); }
.crumb__sep { color: var(--rule); }

/* ---------- 13. 纸张叠层块 ---------- */
.stack {
  position: relative;
  background: var(--indigo);
  border: 1px solid rgba(127, 164, 255, .3);
  padding: clamp(20px, 3vw, 34px);
  box-shadow: 12px 12px 0 0 var(--ink-2), 12px 12px 0 1px var(--rule);
}

.stack__label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--lime);
  text-transform: uppercase;
}

/* ---------- 14. 图片容器（供页面阶段使用） ---------- */
.figure {
  position: relative;
  margin: 0;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.figure img,
.figure__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, var(--ink-2), var(--indigo));
}

.figure--wide img { aspect-ratio: 21 / 9; }
.figure--square img { aspect-ratio: 1 / 1; }
.figure--portrait img { aspect-ratio: 4 / 5; }
.figure--tall img { aspect-ratio: 3 / 4; }

.figure--framed::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  pointer-events: none;
  z-index: 2;
}

.figure__cap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  padding: 12px 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
}

/* ---------- 15. 页脚 ---------- */
.site-footer {
  margin-top: clamp(56px, 8vw, 120px);
  background: var(--ink-2);
  border-top: 1px solid var(--rule);
}

.footer-rule {
  height: 5px;
  background: linear-gradient(90deg, var(--blue) 0 34%, var(--lime) 34% 62%, var(--orange) 62% 100%);
}

.footer-inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--pad) 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 38px 32px;
}

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

.footer-col--brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

.footer-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  color: var(--white);
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-logo__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--ink);
  background: var(--lime);
  padding: 3px 7px;
}

.footer-line {
  font-size: 14px;
  line-height: 1.8;
  color: var(--fog);
  max-width: 30em;
}

.footer-line--quiet { color: #7C8492; font-size: 13px; margin-top: 12px; }

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

.footer-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--blue-mist);
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  position: relative;
  display: inline-block;
  padding-left: 0;
  font-size: 14px;
  color: var(--fog);
  transition: color 150ms var(--ease), padding-left 160ms var(--ease);
}

.footer-links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--orange);
  transition: width 160ms var(--ease);
}

.footer-links a:hover { color: var(--white); padding-left: 15px; }
.footer-links a:hover::before { width: 10px; }

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--fog);
}

.footer-contact__k {
  display: inline-block;
  margin-right: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--blue-mist);
  border: 1px solid var(--rule);
  padding: 1px 6px;
}

.footer-hours { color: var(--lime); font-size: 13px; }

.footer-inquiry {
  display: inline-block;
  margin-top: 16px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--blue-mist);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  color: var(--blue-mist);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer-inquiry:hover { color: var(--orange); border-color: var(--orange); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  margin-top: clamp(36px, 5vw, 60px);
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.footer-closing {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--white);
  border-left: 3px solid var(--lime);
  padding-left: 12px;
  line-height: 1.5;
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #7C8492;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.footer-sep { color: var(--rule); }

/* ---------- 16. 显现与高亮钩子 ---------- */
[data-reveal] {
  opacity: 0;
  transition: opacity 360ms var(--ease);
}

[data-reveal].is-in { opacity: 1; }

[data-spy] { transition: background-color 220ms var(--ease); }
[data-spy].is-active { background-color: rgba(31, 91, 255, .08); }

/* ---------- 17. 响应式 ---------- */
@media (max-width: 1079px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 20;
    display: none;
    padding: 6px var(--pad) 20px;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 22px 40px rgba(0, 0, 0, .55);
  }

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

  .site-nav__list {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0;
  }

  .site-nav__item { display: block; }

  .site-nav__link {
    width: 100%;
    justify-content: flex-start;
    padding: 15px 4px 15px 12px;
    border-bottom: 1px solid var(--rule);
    border-left: 2px solid transparent;
    font-size: 15px;
  }

  .site-nav__link:hover {
    border-bottom-color: var(--rule);
    border-left-color: var(--orange);
    background: rgba(31, 91, 255, .12);
  }

  .site-nav__link[aria-current="page"] {
    border-bottom-color: var(--rule);
    border-left-color: var(--lime);
    background: rgba(200, 255, 60, .07);
  }
}

@media (min-width: 1100px) {
  body { padding-left: var(--rail-w); }

  .brand-rail {
    display: flex;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--rail-w);
    z-index: 90;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 24px;
    background: var(--blue);
    border-right: 1px solid rgba(255, 255, 255, .16);
  }

  .brand-rail::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-image: repeating-linear-gradient(180deg, rgba(255, 255, 255, .35) 0 1px, transparent 1px 34px);
    pointer-events: none;
  }
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .footer-grid {
    grid-template-columns: 1.7fr 1fr 1.2fr 1fr 1.4fr;
    gap: 44px 34px;
  }
}

@media (max-width: 900px) {
  .sync-line { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 15.5px; }

  .cmdbar { gap: 10px; padding-block: 9px; min-height: 58px; }

  .brand-lockup__name { font-size: 15.5px; }

  .cta { padding: 10px 13px; font-size: 12.5px; }

  .nav-toggle { padding: 9px 11px; }

  .footer-base { justify-content: flex-start; }
}

/* ---------- 18. 动效克制 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .sync-dot {
    animation: none;
    box-shadow: 0 0 0 3px rgba(200, 255, 60, .25);
  }

  [data-reveal] { opacity: 1; }

  .scroll-meter__fill { transition: none; }
}
