/* ==========================================================================
   开运体育 · 共享外壳样式 /assets/site.css
   支撑：侧边轨道导航、悬浮摘要带、三层页脚、画布分区与基础组件
   ========================================================================== */

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

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

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

ul, ol { padding: 0; }

img { max-width: 100%; display: block; }

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

a { color: inherit; }

/* ---------- 2. CSS 变量 ---------- */
:root {
  --red: #E23A2E;
  --red-deep: #A6201B;
  --ink: #12100F;
  --ink-2: #1E1B19;
  --paper: #F5EFE6;
  --cream: #FBF8F3;
  --gold: #F0B429;
  --cyan: #2FA8A0;
  --white: #FFFFFF;
  --rose: #8C8378;

  --rail-w: 88px;
  --bar-h: 56px;
  --wrap: 1280px;
  --note-w: 180px;

  --r-sm: 16px;
  --r-md: 24px;
  --r-lg: 32px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono",
    Menlo, Consolas, monospace;
}

/* ---------- 3. 中文基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  padding-left: var(--rail-w);
  padding-top: var(--bar-h);
  -webkit-font-smoothing: antialiased;
}

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

::selection {
  background: var(--red);
  color: var(--white);
}

#main-content {
  display: block;
  scroll-margin-top: calc(var(--bar-h) + 8px);
}

/* ---------- 4. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  z-index: 200;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 0 0 var(--r-sm) 0;
  transform: translateY(-130%);
  transition: transform 0.2s var(--ease);
}

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

/* ---------- 5. 外壳根 ---------- */
.site-head { display: block; }

/* ---------- 6. 轨道阅读进度刻度 ---------- */
.rail-scan {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--rail-w);
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 70;
  pointer-events: none;
}

.rail-scan__fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red) 0%, var(--gold) 100%);
  transition: width 0.12s linear;
}

/* ---------- 7. 品牌轨道与主导航 ---------- */
.brand-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 10px 20px;
  background: var(--ink-2);
  color: var(--white);
  border-right: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-mark__glyph {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--red);
  color: var(--white);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark__name {
  writing-mode: vertical-rl;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.72);
}

.rail-list {
  flex: 1;
  width: 100%;
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.rail-link {
  display: block;
  width: 100%;
  padding: 13px 4px;
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.rail-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
}

.rail-link[aria-current="page"] {
  color: var(--gold);
  background: rgba(240, 180, 41, 0.12);
  box-shadow: inset 3px 0 0 var(--gold);
}

.rail-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.rail-foot__num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.rail-foot__label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.38);
}

/* ---------- 8. 悬浮摘要带 ---------- */
.brief-bar {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  z-index: 50;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 3vw, 40px);
  background: rgba(245, 239, 230, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(18, 16, 15, 0.1);
}

.brief-bar__lead {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
}

.brief-bar__num {
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--red);
  white-space: nowrap;
}

.brief-bar__sep {
  color: var(--rose);
}

.brief-bar__text {
  color: rgba(18, 16, 15, 0.66);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brief-bar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn--red {
  background: var(--red);
  color: var(--white);
}

.btn--red:hover {
  background: var(--red-deep);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(18, 16, 15, 0.24);
}

.btn--ghost:hover {
  background: rgba(18, 16, 15, 0.07);
}

.btn--gold {
  background: var(--gold);
  color: var(--ink);
}

.btn--gold:hover {
  background: #ffc945;
  transform: translateY(-1px);
}

/* ---------- 10. 移动端顶部条与抽屉按钮 ---------- */
.topline { display: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--red);
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.nav-toggle__bars i {
  display: block;
  width: 14px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) {
  opacity: 0;
}

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

.nav-toggle__label { line-height: 1; }

/* ---------- 11. 页脚 ---------- */
.site-foot {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
}

.foot-top {
  background: var(--red-deep);
  color: var(--white);
}

.foot-top__inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 46px) clamp(18px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 48px);
  align-items: start;
}

.foot-top__call { min-width: 0; }

.foot-top__lead {
  margin: 0 0 18px;
  max-width: 22em;
  font-size: clamp(17px, 2.1vw, 25px);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.foot-top__quick { min-width: 0; }

.foot-quick-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.foot-quick-list a {
  display: inline-block;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.13);
  color: var(--white);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background-color 0.2s var(--ease);
}

.foot-quick-list a:hover {
  background: rgba(255, 255, 255, 0.24);
}

.foot-mid { background: var(--ink); }

.foot-mid__inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 58px) clamp(18px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
}

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

.foot-col__title {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.foot-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-list a {
  display: inline-block;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.foot-list a:hover {
  color: var(--white);
  border-bottom-color: var(--red);
}

.foot-base { background: var(--ink-2); }

.foot-base__inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 26px clamp(18px, 4vw, 56px) 34px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-base__brand {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--white);
}

.foot-base__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
}

.foot-base__legal {
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.44);
}

.foot-ruler {
  height: 16px;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.5) 0 1px,
    transparent 1px 14px
  );
  opacity: 0.34;
}

/* ---------- 12. 排版组件 ---------- */
.index-tag {
  display: block;
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.band--paper .index-tag,
.band--cream .index-tag,
.brief-bar .index-tag {
  color: var(--red);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--rose);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.band--ink .eyebrow,
.band--ink2 .eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.display-xl {
  font-size: clamp(40px, 8.2vw, 104px);
  font-weight: 250;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.display-lg {
  font-size: clamp(30px, 4.6vw, 58px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.display-md {
  font-size: clamp(21px, 2.6vw, 32px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.num-xl {
  display: block;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: clamp(48px, 9vw, 132px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.03em;
}

.band--ink .num-xl,
.band--ink2 .num-xl {
  color: var(--gold);
}

.prose {
  max-width: 40em;
  font-size: 17px;
  line-height: 1.85;
}

.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }

.prose a {
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid rgba(226, 58, 46, 0.35);
}

.prose a:hover { border-bottom-color: var(--red); }

.band--ink .prose a,
.band--ink2 .prose a {
  color: var(--gold);
  border-bottom-color: rgba(240, 180, 41, 0.42);
}

.lede {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.005em;
}

/* ---------- 13. 布局容器与画布分区 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 56px);
}

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

.band--paper { background: var(--paper); color: var(--ink); }
.band--cream { background: var(--cream); color: var(--ink); }
.band--ink { background: var(--ink); color: var(--white); }
.band--ink2 { background: var(--ink-2); color: var(--white); }

.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 28px);
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.with-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--note-w);
  gap: clamp(24px, 3vw, 56px);
  align-items: start;
}

.note-rail {
  position: sticky;
  top: calc(var(--bar-h) + 20px);
  font-size: 13px;
  line-height: 1.75;
  color: var(--rose);
}

.band--ink .note-rail,
.band--ink2 .note-rail {
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- 14. 面包屑 ---------- */
.crumbs {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--rose);
}

.band--ink .crumbs,
.band--ink2 .crumbs {
  color: rgba(255, 255, 255, 0.5);
}

.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.crumbs li + li::before {
  content: "/";
  color: currentColor;
  opacity: 0.6;
}

.crumbs a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s var(--ease);
}

.crumbs a:hover { color: var(--red); }

/* ---------- 15. 图片容器基础规则 ---------- */
.frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--ink-2);
  isolation: isolate;
}

.frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
}

.frame--21x9 { aspect-ratio: 21 / 9; }
.frame--16x9 { aspect-ratio: 16 / 9; }
.frame--4x5 { aspect-ratio: 4 / 5; }
.frame--1x1 { aspect-ratio: 1 / 1; }

.frame--tilt {
  border-radius: 0;
  clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
}

.frame--gold {
  box-shadow: 0 0 0 2px var(--gold);
}

.frame--soft { border-radius: var(--r-md); }

.frame__cap {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--white);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

/* ---------- 16. 显现与展开动效 ---------- */
[data-js="on"] .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}

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

[data-disclose-panel][hidden] { display: none; }

body.nav-open { overflow: hidden; }

/* ---------- 17. 响应式：平板与手机 ---------- */
@media (max-width: 1180px) {
  .with-note {
    grid-template-columns: minmax(0, 1fr);
  }

  .note-rail {
    position: static;
  }
}

@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  :root {
    --rail-w: 0px;
    --bar-h: 56px;
  }

  body {
    padding-left: 0;
    font-size: 16px;
    line-height: 1.8;
  }

  .skip-link { left: 0; }

  /* 顶部摘要条 */
  .topline {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    height: var(--bar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    background: var(--ink-2);
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .topline__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
  }

  .topline__brand .brand-mark__glyph {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 15px;
  }

  .topline__brand .brand-mark__name {
    writing-mode: horizontal-tb;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--white);
  }

  /* 悬浮摘要带在移动端收起 */
  .brief-bar { display: none; }

  /* 侧边轨道转为底部抽屉 */
  .brand-rail {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    max-height: 78vh;
    overflow-y: auto;
    padding: 22px 18px calc(24px + env(safe-area-inset-bottom));
    gap: 14px;
    align-items: stretch;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    transform: translateY(103%);
    visibility: hidden;
    transition: transform 0.3s var(--ease), visibility 0.3s var(--ease);
    z-index: 90;
  }

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

  .brand-rail .brand-mark { display: none; }

  .rail-list {
    flex: none;
    justify-content: flex-start;
    gap: 4px;
  }

  .rail-link {
    padding: 14px 16px;
    text-align: left;
    font-size: 16px;
    letter-spacing: 0.08em;
    border-radius: var(--r-sm);
  }

  .rail-link[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--gold);
  }

  .rail-foot {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 14px;
  }

  .rail-foot__num { font-size: 16px; }

  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 85;
    background: rgba(18, 16, 15, 0.52);
  }

  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: minmax(0, 1fr); }

  .foot-top__inner,
  .foot-mid__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-quick-list { gap: 8px; }

  .prose { max-width: none; }

  .index-tag { margin-bottom: 10px; }
}

@media (max-width: 520px) {
  .brief-bar__actions { gap: 8px; }
  .display-xl { line-height: 1.02; }
  .foot-base__meta { gap: 6px 16px; }
}

/* ---------- 18. 降低动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

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

  .rail-scan__fill { transition: none; }
}
