/* ==========================================================================
   天博体育赛事 · /assets/site.css
   共享层：reset / 设计令牌 / 中文排版 / 头部 / 页脚 / 通用组件
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: #071A2F;
}

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

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

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

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

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

a { color: inherit; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  /* 色彩 */
  --deep:        #071A2F; /* 深场蓝 · 全站基底 */
  --panel:       #0E2A47; /* 面板深蓝 */
  --steel:       #16395C; /* 边框钢蓝 */
  --white:       #F2F6FA; /* 冷白 */
  --muted:       #9DB2C6; /* 看台灰蓝 */
  --cyan:        #00E5D0; /* 荧光青 · 第一强调 */
  --orange:      #FF6A1A; /* 活力橙 · 第二强调 */
  --cyan-soft:   #7CF6E4; /* 浅荧光青 */
  --orange-soft: #FFB37A; /* 浅活力橙 */
  --ink:         #0A0F14; /* 近黑 · 阴影与页脚 */
  --teal:        #1E7A6E; /* 深青 · 低饱和数据底 */
  --pale:        #E6EDF5; /* 浅底蓝 · 反色区块 */

  /* 字体 */
  --font-display: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-body:    var(--font-display);
  --font-serif:   "Noto Serif SC", "Songti SC", "SimSun", "Georgia", serif;
  --font-mono:    "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 字号阶梯 12 / 14 / 16 / 20 / 28 / 40 / 64 / 96 / mega */
  --fs-xs:   clamp(11px, 0.35vw + 10.2px, 12px);
  --fs-sm:   clamp(13px, 0.4vw + 12px, 14px);
  --fs-base: clamp(16px, 0.35vw + 15px, 18px);
  --fs-md:   clamp(18px, 0.8vw + 15.5px, 20px);
  --fs-lg:   clamp(22px, 2vw + 14px, 28px);
  --fs-xl:   clamp(28px, 3.2vw + 14px, 40px);
  --fs-2xl:  clamp(38px, 5vw + 16px, 64px);
  --fs-3xl:  clamp(52px, 6.6vw + 16px, 96px);
  --fs-mega: clamp(72px, 12vw, 176px);

  /* 布局 */
  --shell:  1240px;
  --gutter: clamp(16px, 4vw, 40px);

  /* 动效与材质 */
  --ease:    cubic-bezier(.2, .7, .2, 1);
  --lift:    0 10px 0 rgba(10, 15, 20, .55);
  --lift-sm: 0 5px 0 rgba(10, 15, 20, .55);
  --ring:    0 0 0 2px var(--cyan);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.75;
  color: var(--white);
  background-color: var(--deep);
  -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.12;
  letter-spacing: -0.02em;
  color: var(--white);
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p + p { margin-top: 1.2em; }

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

em { font-family: var(--font-serif); font-style: normal; font-weight: 600; }

::selection { background-color: var(--cyan); color: var(--deep); }

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

/* ---------- 4. 工具类 ---------- */
.shell {
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--deep);
  background-color: var(--cyan);
  border: 2px solid var(--ink);
  box-shadow: var(--lift-sm);
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

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

/* 滚动显现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.4s var(--ease),
    transform 0.4s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

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

/* ---------- 5. 头部 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  background-color: transparent;
  border-bottom: 2px solid transparent;
  transition:
    background-color 0.32s var(--ease),
    border-color 0.32s var(--ease),
    box-shadow 0.32s var(--ease);
}

.site-header[data-scrolled="true"] {
  background-color: rgba(7, 26, 47, 0.97);
  border-bottom-color: var(--steel);
  box-shadow: 0 8px 0 rgba(10, 15, 20, 0.5);
}

.header-inner {
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 24px);
  min-height: 78px;
  padding-block: 10px;
  transition: min-height 0.3s var(--ease), padding 0.3s var(--ease);
}

.site-header[data-scrolled="true"] .header-inner {
  min-height: 62px;
  padding-block: 6px;
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background-color: var(--cyan);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.02em;
  border: 2px solid var(--ink);
  box-shadow: 0 4px 0 rgba(10, 15, 20, 0.6);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.brand:hover .brand-mark {
  background-color: var(--orange);
}

.brand-text { display: block; }

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
  white-space: nowrap;
}

.brand-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.09em;
  color: var(--muted);
  white-space: nowrap;
}

/* 主导航 */
.primary-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-list::-webkit-scrollbar { display: none; }

.nav-list a {
  display: block;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid transparent;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.nav-list a:hover {
  color: var(--white);
  background-color: var(--panel);
  border-color: var(--steel);
}

.nav-list a[aria-current="page"] {
  color: var(--deep);
  background-color: var(--cyan);
  border-color: var(--cyan);
  font-weight: 700;
}

/* 同步角标 */
.header-sync {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  color: var(--muted);
  background-color: rgba(14, 42, 71, 0.72);
  border: 2px solid var(--steel);
  white-space: nowrap;
}

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

.sync-time { color: var(--cyan); }

@keyframes syncPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.7); }
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--white);
  background-color: var(--panel);
  border: 2px solid var(--steel);
  box-shadow: var(--lift-sm);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

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

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background-color: currentColor;
  transition: background-color 0.2s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.22s var(--ease), top 0.22s var(--ease);
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background-color: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { top: 0; transform: rotate(-45deg); }

/* 阅读进度条 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 3px;
  background-color: var(--cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  background-color: var(--ink);
  color: var(--muted);
  border-top: 2px solid var(--steel);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: clamp(28px, 4vw, 44px);
  border-bottom: 2px solid var(--steel);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  background-color: var(--cyan);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.02em;
  border: 2px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.65);
}

.footer-brand-text { display: block; }

.footer-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
}

.footer-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.footer-sync {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 14px;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
  background-color: var(--deep);
  border: 2px solid var(--steel);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  padding-block: clamp(32px, 5vw, 56px);
  border-bottom: 2px solid var(--steel);
}

.footer-col-title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-col ul {
  display: grid;
  gap: 10px;
}

.footer-col a {
  display: inline-block;
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.footer-col a:hover {
  color: var(--white);
  border-bottom-color: var(--orange);
}

.footer-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(20px, 3vw, 44px);
  padding-block: clamp(26px, 4vw, 40px);
}

.footer-line {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.footer-line + .footer-line { margin-top: 6px; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-block: 20px 34px;
  border-top: 2px solid var(--steel);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- 7. 通用组件 ---------- */
/* 面板 */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 36px);
  background-color: var(--panel);
  border: 2px solid var(--steel);
  box-shadow: var(--lift);
}

.panel--flush { padding: 0; }

.panel--pale {
  background-color: var(--pale);
  border-color: var(--pale);
  color: var(--deep);
}

.panel--pale h2,
.panel--pale h3,
.panel--pale h4 { color: var(--deep); }

.panel--pale .panel-corner { color: #4A5D73; }

.panel-corner {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-corner--hot { color: var(--orange); }
.panel-corner--cyan { color: var(--cyan); }

/* 堆叠面板 */
.stack > * + * { margin-top: -14px; }

/* 栅格 */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
}

.grid--split  { grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); }
.grid--halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 13px 24px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--deep);
  background-color: var(--cyan);
  border: 2px solid var(--cyan);
  box-shadow: var(--lift-sm);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
              background-color 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 rgba(10, 15, 20, 0.55);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 0 rgba(10, 15, 20, 0.55);
}

.btn--ghost {
  color: var(--cyan);
  background-color: transparent;
  border-color: var(--cyan);
}

.btn--ghost:hover { background-color: rgba(0, 229, 208, 0.12); }

.btn--hot {
  color: var(--ink);
  background-color: var(--orange);
  border-color: var(--orange);
}

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.crumbs > li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--steel);
}

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

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

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

/* 分段切换 */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  background-color: var(--panel);
  border: 2px solid var(--steel);
  box-shadow: var(--lift-sm);
}

.segmented button {
  padding: 10px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
  border-right: 2px solid var(--steel);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.segmented button:last-child { border-right: 0; }

.segmented button:hover { color: var(--white); background-color: rgba(22, 57, 92, 0.6); }

.segmented button[aria-selected="true"],
.segmented button.is-active {
  color: var(--deep);
  background-color: var(--cyan);
}

/* 图片容器 */
.figure-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: var(--panel);
  border: 2px solid var(--steel);
  box-shadow: var(--lift);
}

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

.figure-frame--wide  > img,
.figure-frame--wide  > picture > img,
.figure-frame--wide  > svg { aspect-ratio: 21 / 9; }

.figure-frame--std   > img,
.figure-frame--std   > picture > img,
.figure-frame--std   > svg { aspect-ratio: 16 / 9; }

.figure-frame--plate > img,
.figure-frame--plate > picture > img,
.figure-frame--plate > svg { aspect-ratio: 4 / 3; }

.figure-frame--tall  > img,
.figure-frame--tall  > picture > img,
.figure-frame--tall  > svg { aspect-ratio: 3 / 4; }

.figure-frame__caption {
  display: block;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--muted);
  background-color: var(--deep);
  border-top: 2px solid var(--steel);
}

/* 正文容器 */
.prose {
  max-width: 72ch;
}

.prose > * + * { margin-top: 1.2em; }

.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }

.prose h2 + *,
.prose h3 + * { margin-top: 0.8em; }

.prose ul,
.prose ol {
  padding-left: 1.3em;
  list-style: none;
}

.prose li {
  position: relative;
  padding-left: 0;
  margin-top: 0.5em;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: 0.72em;
  width: 7px;
  height: 7px;
  background-color: var(--cyan);
}

.prose blockquote {
  margin-top: 1.6em;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--orange);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--white);
}

.prose a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 2px solid var(--teal);
  transition: border-color 0.18s var(--ease);
}

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

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1080px) {
  .header-sync { display: none; }
}

@media (max-width: 960px) {
  .grid--split,
  .grid--thirds { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 6px 0 26px;
    background-color: var(--deep);
    border-bottom: 2px solid var(--steel);
    box-shadow: 0 12px 0 rgba(10, 15, 20, 0.5);
  }

  .primary-nav[data-open="false"] { display: none; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-inline: var(--gutter);
    overflow: visible;
  }

  .nav-list a {
    padding: 15px 10px;
    font-size: 16px;
    border-bottom: 2px solid var(--steel);
  }

  .nav-list a:hover { border-color: var(--steel); }

  .nav-list li:last-child a { border-bottom: 0; }

  .footer-bottom { grid-template-columns: minmax(0, 1fr); }
}

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

@media (max-width: 640px) {
  .grid--halves { grid-template-columns: minmax(0, 1fr); }

  .header-inner { min-height: 66px; }

  .site-header[data-scrolled="true"] .header-inner { min-height: 58px; }

  .brand-tag { display: none; }

  .footer-nav { grid-template-columns: minmax(0, 1fr); }

  .footer-top { align-items: flex-start; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 15px; }

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

  .nav-toggle-text { display: none; }
}

/* ---------- 9. Reduced motion ---------- */
@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;
  }

  .sync-dot { animation: none; opacity: 1; transform: none; }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0ms;
  }

  .btn:hover { transform: none; }
}
