/* ============================================================
   万搏体育 · 共享站点样式 /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, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a { color: inherit; }

table { border-collapse: collapse; }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--race);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --snow: #D7E6E8;
  --snow-deep: #A9C6CB;
  --sand: #EADFC9;
  --sand-deep: #D2BE9C;
  --race: #E23E27;
  --race-deep: #C9301B;
  --teal: #0E4B46;
  --teal-soft: #2F7A72;
  --ink: #131719;
  --graphite: #5C6664;
  --paper: #F8F6F1;

  /* 结构 */
  --rail-w: 88px;
  --shell-max: 1280px;
  --gutter: clamp(18px, 3.4vw, 48px);

  /* 字体 */
  --font-head: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  /* 线条与阴影 */
  --line: rgba(19, 23, 25, 0.14);
  --line-soft: rgba(19, 23, 25, 0.08);
  --line-inv: rgba(248, 246, 241, 0.18);
  --shadow-plate: 0 1px 0 rgba(19, 23, 25, 0.06), 0 12px 26px -20px rgba(19, 23, 25, 0.55);

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.22s;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ink);
  word-break: break-word;
}

p { text-wrap: pretty; }

main { display: block; scroll-margin-top: 84px; }

::selection {
  background: var(--race);
  color: #fff;
}

/* ---------- 4. 排版组件 ---------- */
.display {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(40px, 7.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--ink);
  max-width: 46ch;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--teal-soft);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--race);
}

.note {
  font-size: 13px;
  line-height: 1.4;
  color: var(--graphite);
  padding-left: 12px;
  border-left: 2px solid var(--sand-deep);
}

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin-block: clamp(20px, 3vw, 36px);
}

/* ---------- 5. 布局 ---------- */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(40px, 6vw, 84px);
}

.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.grid {
  display: grid;
  gap: clamp(18px, 2.6vw, 32px);
}

.grid--split { grid-template-columns: minmax(0, 1fr); }
.grid--thirds { grid-template-columns: minmax(0, 1fr); }
.grid--sidebar { grid-template-columns: minmax(0, 1fr); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

.btn--primary {
  background: var(--race);
  color: #fff;
  border-color: var(--race);
}
.btn--primary:hover { background: var(--race-deep); border-color: var(--race-deep); }

.btn--teal {
  background: var(--teal);
  color: var(--paper);
  border-color: var(--teal);
}
.btn--teal:hover { background: var(--teal-soft); border-color: var(--teal-soft); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(19, 23, 25, 0.35);
}
.btn--ghost:hover { border-color: var(--race); color: var(--race); }

.btn--quiet {
  padding: 0;
  background: none;
  border: 0;
  color: var(--teal-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn--quiet:hover { color: var(--race); }

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

/* ---------- 7. 展签 / 卡片 / 表格 ---------- */
.plate {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(16px, 2.4vw, 28px);
  box-shadow: var(--shadow-plate);
}

.tag {
  display: inline-block;
  padding: 4px 9px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  background: var(--sand);
  border: 1px solid var(--sand-deep);
  border-radius: 1px;
}
.tag--race { background: var(--race); border-color: var(--race-deep); color: #fff; }
.tag--teal { background: var(--teal); border-color: var(--teal); color: var(--paper); }

.chapter {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.chapter__no {
  font-family: var(--font-mono);
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--sand-deep);
}

.data-table {
  width: 100%;
  font-size: 14px;
  border-top: 1px solid var(--line);
}

.data-table caption {
  text-align: left;
  font-size: 12px;
  color: var(--graphite);
  padding-bottom: 10px;
}

.data-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--graphite);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: baseline;
}

.data-table tbody tr {
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.data-table tbody tr:hover {
  background: var(--sand);
  box-shadow: inset 0 0 0 1px var(--sand-deep);
}

.data-table .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- 8. 媒体容器 ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--snow-deep);
  border: 1px solid var(--line);
}

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

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

.media__caption {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--graphite);
}

/* ---------- 9. 面包屑 ---------- */
.breadcrumb {
  font-size: 12px;
  color: var(--graphite);
}

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

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

.breadcrumb li + li::before {
  content: "/";
  color: var(--sand-deep);
}

.breadcrumb a {
  color: var(--teal-soft);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--race); text-decoration: underline; }

/* ---------- 10. 进场（供页面阶段使用） ---------- */
.reveal { opacity: 1; }

.has-js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}

.has-js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 11. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--race);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform var(--dur) var(--ease);
}

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

/* ---------- 12. 头部：桌面侧边轨道 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 90;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0 22px;
  background: var(--teal);
  color: var(--paper);
  border-right: 1px solid rgba(248, 246, 241, 0.14);
}

/* 滚动进度 */
.rail-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 3px;
  height: 100vh;
  background: rgba(248, 246, 241, 0.14);
  pointer-events: none;
  z-index: 95;
}

.rail-progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--race);
  transform-origin: top left;
  transform: scaleY(var(--p, 0));
  transition: transform 0.08s linear;
}

/* 品牌 */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--paper);
  flex: 0 0 auto;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--race);
  color: #fff;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  border-radius: 1px;
}

.brand__name {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(248, 246, 241, 0.62);
  line-height: 1.2;
}

/* 导航 */
.rail-nav {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.rail-nav__list {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.rail-nav__item { width: 100%; }

.rail-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding: 9px 2px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  color: rgba(248, 246, 241, 0.74);
  border-radius: 1px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.rail-nav__link:hover {
  background: rgba(248, 246, 241, 0.1);
  color: #fff;
}

.rail-nav__no {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(248, 246, 241, 0.5);
}

.rail-nav__label { white-space: nowrap; }

.rail-nav__link[aria-current="page"] {
  background: var(--race);
  color: #fff;
}

.rail-nav__link[aria-current="page"] .rail-nav__no {
  color: rgba(255, 255, 255, 0.78);
}

/* 轨道行动按钮 */
.rail-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
}

.rail-cta {
  writing-mode: vertical-rl;
  padding: 14px 8px;
  font-size: 13px;
  letter-spacing: 0.14em;
}

/* 移动端开关（桌面隐藏） */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--paper);
  border: 1px solid rgba(248, 246, 241, 0.4);
  border-radius: 2px;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.nav-toggle:hover { border-color: var(--paper); background: rgba(248, 246, 241, 0.1); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background-color var(--dur) var(--ease);
}

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

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

.nav-toggle__text { white-space: nowrap; }

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--race);
  color: #fff;
  border-radius: 2px;
  box-shadow: 0 10px 24px -14px rgba(19, 23, 25, 0.9);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.to-top[data-visible] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover { background: var(--race-deep); }

.to-top__icon {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
}

/* ---------- 13. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--teal);
  color: var(--paper);
  padding-block: clamp(42px, 6vw, 76px) 26px;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--race) 0 18%,
    var(--sand-deep) 18% 44%,
    var(--teal-soft) 44% 100%
  );
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    118deg,
    rgba(248, 246, 241, 0.05) 0 1px,
    transparent 1px 10px
  );
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.85fr 0.85fr 0.85fr 1.35fr;
  gap: clamp(20px, 3vw, 40px);
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line-inv);
}

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

.footer-logo {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 2px solid var(--race);
  padding-bottom: 3px;
}

.footer-logo:hover { color: var(--sand); }

.footer-line {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--snow-deep);
}

.footer-tagline {
  margin-top: 12px;
  max-width: 24ch;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(248, 246, 241, 0.78);
}

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

.footer-col__title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--sand);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-inv);
}

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

.footer-col__link {
  display: inline-block;
  font-size: 14px;
  color: rgba(248, 246, 241, 0.82);
  text-decoration: none;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.footer-col__link:hover {
  color: #fff;
  transform: translateX(3px);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.footer-contact__row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(248, 246, 241, 0.16);
}

.footer-contact__key {
  font-size: 12px;
  color: var(--snow-deep);
}

.footer-contact__val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 22px;
}

.footer-legal {
  font-size: 12.5px;
  color: rgba(248, 246, 241, 0.72);
}

.footer-stamp {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--snow-deep);
}

/* ---------- 14. 响应式 ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }

  .grid--split { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .grid--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--sidebar { grid-template-columns: minmax(0, 1fr) minmax(0, 0.42fr); }

  .section__head {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
  }
}

@media (max-width: 1023px) {
  body { padding-top: 64px; }

  .site-header {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 64px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(248, 246, 241, 0.16);
  }

  .rail-progress {
    width: 100%;
    height: 3px;
  }

  .rail-progress__fill {
    transform-origin: left top;
    transform: scaleX(var(--p, 0));
  }

  .brand {
    flex-direction: row;
    gap: 10px;
  }

  .brand__mark { width: 32px; height: 32px; font-size: 16px; }

  .brand__name { font-size: 13px; }

  .brand__sub { display: none; }

  .rail-actions {
    width: auto;
    margin-left: auto;
  }

  .rail-cta {
    writing-mode: horizontal-tb;
    padding: 9px 14px;
    font-size: 13px;
    letter-spacing: 0.02em;
  }

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

  /* 抽屉 */
  .rail-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: auto;
    width: min(340px, 86vw);
    height: 100vh;
    height: 100dvh;
    flex: none;
    display: block;
    align-items: stretch;
    justify-content: flex-start;
    padding: 84px 24px 32px;
    background: var(--teal);
    border-left: 1px solid rgba(248, 246, 241, 0.16);
    box-shadow: -22px 0 46px rgba(19, 23, 25, 0.32);
    overflow-y: auto;
    transform: translateX(103%);
    visibility: hidden;
    transition: transform 0.28s var(--ease), visibility 0.28s var(--ease);
    z-index: 92;
  }

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

  .rail-nav__list { gap: 0; }

  .rail-nav__link {
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 14px;
    padding: 16px 2px;
    font-size: 19px;
    font-weight: 800;
    text-align: left;
    color: var(--paper);
    border-bottom: 1px solid rgba(248, 246, 241, 0.16);
    border-radius: 0;
  }

  .rail-nav__link:hover { background: transparent; color: var(--sand); }

  .rail-nav__no {
    font-size: 10px;
    color: rgba(248, 246, 241, 0.5);
    min-width: 20px;
  }

  .rail-nav__link[aria-current="page"] {
    background: transparent;
    color: var(--race);
  }

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

  .to-top { right: 16px; bottom: 18px; width: 42px; height: 42px; }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-brand,
  .footer-contact { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .to-top { bottom: 14px; }
}

/* 矮视口：收缩轨道间距 */
@media (min-width: 1024px) and (max-height: 760px) {
  .site-header { padding: 12px 0 14px; gap: 10px; }
  .rail-nav__link { padding: 7px 2px; }
  .rail-cta { padding: 11px 7px; font-size: 12px; }
}

/* ---------- 15. 减少动效 ---------- */
@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 .reveal {
    opacity: 1;
    transform: none;
  }

  .rail-progress__fill { transition: none; }
}
