/* ============================================================
   乐竞体育 · 共享样式表 /assets/site.css
   侧边品牌轨道 + 赛道灰／草原青 + 奶油纸长文
   ============================================================ */

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

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

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

ul, ol { 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; padding: 0; cursor: pointer; }

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

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

h1, h2 { font-weight: 900; line-height: 1.14; letter-spacing: -0.02em; }
h3, h4 { font-weight: 700; line-height: 1.24; letter-spacing: -0.01em; }

/* ---------- 2. 变量 ---------- */
:root {
  --forest:  #0B2B2A;
  --carbon:  #14181A;
  --cream:   #F3EBDD;
  --ink:     #241C16;
  --flame:   #E64A2E;
  --neon:    #36F0C0;
  --steel:   #2F6F6A;
  --mist:    #C9C2B6;
  --paper:   #FFF9EF;
  --signal:  #F2B544;

  --rail-w: 92px;
  --rail-h: 64px;
  --wrap: 1200px;
  --gutter: clamp(18px, 4vw, 56px);

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

  --fz-12: 0.75rem;
  --fz-14: 0.875rem;
  --fz-16: 1rem;
  --fz-20: 1.25rem;
  --fz-28: 1.75rem;
  --fz-40: 2.5rem;
  --fz-64: 4rem;
  --fz-96: 6rem;

  --line-ink: rgba(36, 28, 22, 0.16);
  --line-mist: rgba(201, 194, 182, 0.2);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: var(--fz-16);
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 960px) {
  body { padding-top: var(--rail-h); }
}

@media (min-width: 961px) {
  body { padding-left: var(--rail-w); }
  html { scroll-padding-top: 16px; }
}

::selection { background: var(--forest); color: var(--neon); }

:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(11, 43, 42, 0.55);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

#main-content { display: block; }

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--neon);
  color: var(--forest);
  font-size: var(--fz-14);
  font-weight: 800;
  letter-spacing: 0.06em;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}

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

@media (min-width: 961px) {
  .skip-link { left: calc(var(--rail-w) + 14px); }
}

/* ---------- 5. 头部外壳 ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--rail-h);
  padding: 0 14px;
  background: var(--forest);
  color: var(--paper);
  border-bottom: 1px solid var(--line-mist);
}

/* 品牌 */
.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.rail-brand__glyph {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--flame);
  color: var(--flame);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 82% 100%, 0 100%);
}

.rail-brand__wordmark {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.rail-brand__text {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--paper);
}

.rail-brand__sub {
  font-size: 10px;
  letter-spacing: 0.16em;
  line-height: 1.2;
  color: var(--mist);
  white-space: nowrap;
}

/* 状态灯 */
.rail-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon);
  animation: status-pulse 2.8s ease-in-out infinite;
}

.rail-status__text {
  display: none;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--neon);
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(54, 240, 192, 0.45); }
  50%      { box-shadow: 0 0 0 8px rgba(54, 240, 192, 0); }
}

/* 移动端切换按钮 */
.nav-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(201, 194, 182, 0.38);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.nav-toggle__bars { display: grid; gap: 4px; }

.nav-toggle__bars i {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:first-child {
  transform: translateY(2.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:last-child {
  transform: translateY(-2.75px) rotate(-45deg);
}

/* 导航抽屉（移动优先） */
.rail-nav {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(84vw, 320px);
  padding: 22px 20px 30px;
  background: var(--forest);
  color: var(--paper);
  border-right: 1px solid var(--line-mist);
  box-shadow: 26px 0 60px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
  transform: translateX(-101%);
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 0.7, 0.3, 1), visibility 0.28s;
}

.rail-nav[data-open] {
  transform: translateX(0);
  visibility: visible;
}

.rail-nav__list {
  display: flex;
  flex-direction: column;
  counter-reset: navidx;
}

.rail-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 4px;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--mist);
  border-bottom: 1px solid rgba(201, 194, 182, 0.14);
  transition: color 0.16s ease;
}

.rail-nav__link::before {
  counter-increment: navidx;
  content: counter(navidx, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--steel);
}

.rail-nav__link:hover,
.rail-nav__link:focus-visible { color: var(--paper); }

.rail-nav__link[aria-current="page"] {
  color: var(--paper);
  font-weight: 800;
  box-shadow: inset 3px 0 0 var(--flame);
  padding-left: 12px;
}

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

.rail-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 13px 18px;
  border: 1px solid var(--flame);
  color: var(--flame);
  font-size: 13px;
  letter-spacing: 0.14em;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.rail-cta:hover,
.rail-cta:focus-visible {
  background: var(--flame);
  color: var(--paper);
}

/* 滚动进度（移动端隐藏） */
.rail-progress { display: none; }

/* 移动抽屉打开时锁定滚动 */
@media (max-width: 960px) {
  html.nav-open,
  html.nav-open body { overflow: hidden; }
}

/* ---------- 6. 桌面端：侧边品牌轨道 ---------- */
@media (min-width: 961px) {
  .site-header {
    top: 0; right: auto; bottom: 0;
    width: var(--rail-w);
    height: auto;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 18px 0 16px;
    border-bottom: 0;
    border-right: 1px solid var(--line-mist);
    overflow-y: auto;
    scrollbar-width: none;
  }

  .site-header::-webkit-scrollbar { width: 0; }

  .rail-brand {
    flex: 0 0 auto;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-mist);
  }

  .rail-brand__glyph { width: 38px; height: 38px; font-size: 20px; }

  .rail-brand__wordmark {
    flex-direction: row;
    justify-content: center;
    gap: 8px;
  }

  .rail-brand__text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 14px;
    letter-spacing: 0.24em;
  }

  .rail-brand__sub {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 10px;
    letter-spacing: 0.2em;
  }

  .rail-status {
    flex: 0 0 auto;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--line-mist);
  }

  .rail-status__text {
    display: block;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 10px;
    letter-spacing: 0.2em;
  }

  .nav-toggle { display: none; }

  .rail-nav {
    position: static;
    flex: 0 0 auto;
    width: 100%;
    padding: 10px 0 0;
    transform: none;
    visibility: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
    gap: 0;
  }

  .rail-nav__list {
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
  }

  .rail-nav__item {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .rail-nav__link {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: block;
    padding: 9px 2px;
    font-size: 11.5px;
    line-height: 1.15;
    letter-spacing: 0.14em;
    border-bottom: 1px solid rgba(201, 194, 182, 0.14);
    transition: color 0.16s ease;
  }

  .rail-nav__link::before { content: none; }

  .rail-nav__link[aria-current="page"] {
    box-shadow: none;
    padding-left: 2px;
    color: var(--paper);
    position: relative;
  }

  .rail-nav__link[aria-current="page"]::after {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: -10px;
    width: 2px;
    background: var(--flame);
  }

  .rail-cta {
    align-self: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin: 16px auto 0;
    padding: 12px 4px;
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  .rail-progress {
    display: block;
    position: fixed;
    top: 0; bottom: 0;
    left: calc(var(--rail-w) - 2px);
    width: 2px;
    z-index: 81;
    background: rgba(201, 194, 182, 0.16);
    pointer-events: none;
  }

  .rail-progress__bar {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--neon), var(--flame));
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform 0.08s linear;
  }
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  padding: clamp(44px, 6vw, 76px) 0 26px;
  background: var(--carbon);
  color: var(--mist);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--flame) 0 2px,
    transparent 2px 20px
  );
  opacity: 0.75;
}

.footer__inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

@media (min-width: 961px) {
  .footer__grid {
    grid-template-columns: 1.5fr 0.85fr 0.85fr 0.85fr 1.4fr;
    gap: clamp(20px, 3vw, 44px);
  }
}

.footer__brand-name {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.footer__brand-line {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--steel);
}

.footer__badge {
  display: inline-block;
  margin-top: 18px;
  padding: 5px 10px;
  background: var(--neon);
  color: var(--forest);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.footer__col-title {
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-mist);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--paper);
}

.footer__nav { display: flex; flex-direction: column; }

.footer__link {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--mist);
  transition: color 0.16s ease, padding-left 0.16s ease;
}

.footer__link:hover,
.footer__link:focus-visible {
  color: var(--neon);
  padding-left: 6px;
}

.footer__contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(201, 194, 182, 0.16);
}

.footer__contact-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(201, 194, 182, 0.62);
}

.footer__contact-value {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--paper);
  word-break: break-all;
}

.footer__legal {
  margin-top: clamp(30px, 4vw, 46px);
  padding-top: 20px;
  border-top: 1px solid rgba(201, 194, 182, 0.16);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 11.5px;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: rgba(201, 194, 182, 0.72);
}

.footer__legal p { max-width: 48ch; }

.footer__legal-note { color: var(--signal); }

/* ---------- 8. 通用容器与按钮 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  font-size: var(--fz-14);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease,
              border-color 0.18s ease, transform 0.18s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn--flame {
  background: var(--flame);
  border-color: var(--flame);
  color: var(--paper);
}

.btn--flame:hover { background: #c93c22; border-color: #c93c22; }

.btn--ghost {
  border-color: var(--line-ink);
  color: var(--ink);
}

.btn--ghost:hover { border-color: var(--ink); background: rgba(36, 28, 22, 0.05); }

.btn--onDark {
  border-color: rgba(255, 249, 239, 0.4);
  color: var(--paper);
}

.btn--onDark:hover { border-color: var(--neon); color: var(--neon); }

.btn--block { width: 100%; }

/* ---------- 9. 面包屑 ---------- */
.crumbs { padding-block: 22px 0; }

.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--steel);
}

.crumbs__item { display: flex; align-items: center; gap: 10px; }

.crumbs__item + .crumbs__item::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--mist);
}

.crumbs__link { color: var(--steel); transition: color 0.16s ease; }
.crumbs__link:hover { color: var(--flame); }

.crumbs__current { color: var(--ink); font-weight: 700; }

/* ---------- 10. 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--carbon);
  border: 1px solid rgba(201, 194, 182, 0.35);
  aspect-ratio: 16 / 10;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.media:hover img { transform: scale(1.03); }

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

.media--skew {
  clip-path: polygon(0 0, 100% 0, 100% 90%, 93% 100%, 0 100%);
}

.media__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 7px 12px;
  background: rgba(11, 43, 42, 0.86);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1.5;
}

/* ---------- 11. 网格与滚动带 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.band {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--steel) transparent;
  -webkit-overflow-scrolling: touch;
}

.band::-webkit-scrollbar { height: 3px; }
.band::-webkit-scrollbar-thumb { background: var(--steel); }

.band__item {
  flex: 0 0 clamp(260px, 30vw, 380px);
  scroll-snap-align: start;
}

/* ---------- 12. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid currentColor;
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1.6;
  color: var(--steel);
}

.tag--flame { color: var(--flame); }

.tag--neon {
  color: var(--forest);
  background: var(--neon);
  border-color: var(--neon);
  font-weight: 700;
}

.tag--signal {
  color: var(--ink);
  background: var(--signal);
  border-color: var(--signal);
  font-weight: 700;
}

/* ---------- 13. 章节头 / 章节 / 面板 / 数字 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
  padding-bottom: 14px;
  margin-bottom: clamp(20px, 3vw, 36px);
  border-bottom: 1px solid var(--line-ink);
}

.section-head__title {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-head__note {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--steel);
}

.chapter { padding-top: 18px; }

.chapter__num {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--flame);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--flame);
}

.chapter__title {
  margin-top: 12px;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.panel {
  padding: clamp(18px, 3vw, 32px);
  background: var(--cream);
  border: 1px solid var(--line-ink);
}

.panel--dark {
  background: var(--forest);
  color: var(--paper);
  border-color: rgba(201, 194, 182, 0.24);
}

.panel--carbon {
  background: var(--carbon);
  color: var(--paper);
  border-color: rgba(201, 194, 182, 0.18);
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat__num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--flame);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--steel);
}

/* ---------- 14. 正文排版 ---------- */
.prose {
  max-width: 38em;
  font-size: var(--fz-16);
  line-height: 1.85;
  color: var(--ink);
}

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

.prose h2 {
  margin: 1.8em 0 0.6em;
  font-size: var(--fz-28);
  color: var(--ink);
}

.prose h3 {
  margin: 1.4em 0 0.5em;
  font-size: var(--fz-20);
  color: var(--ink);
}

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

.prose strong { font-weight: 800; }

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

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

.prose li + li { margin-top: 0.4em; }

.prose blockquote {
  margin: 1.4em 0;
  padding: 12px 0 12px 18px;
  border-left: 2px solid var(--flame);
  color: var(--steel);
}

/* ---------- 15. 展览式注释 ---------- */
.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--steel);
}

.eyebrow--vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.28em;
}

/* ---------- 16. 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 17. 降级动画 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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