/* ==========================================================================
   加加体育赛场 · 共享 Site Kit
   1. 设计令牌  2. Reset  3. 中英混排基础  4. 通用组件  5. 头部
   6. 页脚  7. 页面基础区块  8. 响应式  9. 动效降级
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --ink-0: #0B0E14;
  --ink-1: #11151F;
  --line: #1A2030;
  --line-strong: #2A3242;
  --cyan: #00E5C7;
  --orange: #FF5A2F;
  --blue: #3A7BFF;
  --lime: #C6FF00;
  --ok: #0FA98F;
  --text: #E8EDF5;
  --muted: #8A94A6;
  --light: #F5F7FA;
  --ink-deep: #04120F;

  --font-heading: "Barlow Condensed", "Archivo Narrow", "PingFang SC", "Heiti SC",
    "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, monospace;
  --font-body: "Inter", "PingFang SC", "Source Han Sans SC", "Microsoft YaHei",
    system-ui, -apple-system, sans-serif;

  --shell: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --gap: 24px;
  --radius: 2px;
  --bp-mobile: 900px;
}

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

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

html.nav-open { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 精密网格底纹：24px 列网格 + 8px 基线感 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.32;
}

main {
  position: relative;
  z-index: 1;
  display: block;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

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

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

/* ---------- 3. 中英混排基础 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.01em;
}

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--cyan);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover { color: var(--lime); }

strong { font-weight: 700; color: var(--text); }
em { font-style: normal; color: var(--cyan); }

.num,
.display-num,
.stat__value,
.footer__legal {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- 4. 通用组件 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--cyan);
  color: var(--ink-deep);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  transition: top 0.15s ease-out;
}
.skip-link:focus { top: 8px; color: var(--ink-deep); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease-out, color 0.15s ease-out,
    border-color 0.15s ease-out;
}
.btn--primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-deep);
}
.btn--primary:hover {
  background: transparent;
  color: var(--cyan);
}
.btn--hot {
  background: var(--orange);
  border-color: var(--orange);
  color: #170604;
}
.btn--hot:hover {
  background: transparent;
  color: var(--orange);
}
.btn--outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
.btn--quiet {
  min-height: 32px;
  padding-inline: 0;
  background: transparent;
  border-color: transparent;
  color: var(--cyan);
}
.btn--quiet:hover { color: var(--lime); }
.btn--lg {
  min-height: 52px;
  padding-inline: 26px;
  font-size: 17px;
}

/* 标签与状态点 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.4;
}
.tag--live { color: var(--lime); border-color: rgba(198, 255, 0, 0.38); }
.tag--hot { color: var(--orange); border-color: rgba(255, 90, 47, 0.42); }
.tag--cool { color: var(--blue); border-color: rgba(58, 123, 255, 0.42); }
.tag--done { color: var(--ok); border-color: rgba(15, 169, 143, 0.42); }

.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(198, 255, 0, 0.12), 0 0 10px rgba(198, 255, 0, 0.8);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.6; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

/* 排版组件 */
.kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

.h-display {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.serif-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.display-num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(56px, 12vw, 160px);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--text);
}
.display-num--cyan { color: var(--cyan); }
.display-num--hot { color: var(--orange); }

.stat {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--cyan);
}
.stat__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.muted { color: var(--muted); }

.panel {
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 20px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb__sep { color: var(--line-strong); }
.breadcrumb [aria-current="page"] { color: var(--text); }

/* 网格 */
.grid { display: grid; gap: var(--gap); }
.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)); }
.grid--split { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); }

/* 图片容器基础规则（页面阶段投放 <img>） */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(0, 229, 199, 0.1), rgba(11, 14, 20, 0) 58%),
    var(--ink-1);
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame__caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 4px 10px;
  border-left: 2px solid var(--cyan);
  background: rgba(11, 14, 20, 0.78);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.5;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-bottom: 1px solid rgba(0, 229, 199, 0.18);
}

/* 横向滚动带 / 表格容器 */
.scroll-strip,
.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  -webkit-overflow-scrolling: touch;
}
.scroll-strip > * { scroll-snap-align: start; }
.table-wrap { border-top: 1px solid var(--line); }

/* ---------- 5. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 20, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-strong);
}

.progress-rail {
  position: relative;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.progress-rail__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.12s linear;
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 14px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  line-height: 1;
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(198, 255, 0, 0.12), 0 0 10px rgba(198, 255, 0, 0.8);
  animation: pulse-dot 2s ease-in-out infinite;
}
.brand__name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0;
  color: var(--text);
  transition: color 0.15s ease-out;
}
.brand:hover .brand__name { color: var(--cyan); }
.brand__tag {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand--footer { gap: 12px; }
.brand--footer .brand__name { font-size: 22px; }

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  min-width: 0;
}
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-nav__list a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.15s ease-out;
}
.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.15s ease-out;
}
.site-nav__list a:hover { color: var(--text); }
.site-nav__list a:hover::after { transform: scaleX(1); }
.site-nav__list a[aria-current="page"] { color: var(--cyan); }
.site-nav__list a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--cyan);
}
.site-nav__cta {
  min-height: 40px;
  padding-inline: 16px;
  font-size: 13px;
  white-space: nowrap;
}

/* 移动端按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color 0.15s ease-out, color 0.15s ease-out;
}
.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }
.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}
.nav-toggle__bars span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 0.15s ease-out;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child {
  transform: translateY(2px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child {
  transform: translateY(-2px) rotate(-45deg);
}
.nav-toggle__text { letter-spacing: 0.14em; }

/* 联赛胶囊带 */
.header__leagues {
  border-top: 1px solid var(--line);
  background: rgba(17, 21, 31, 0.55);
}
.header__leagues-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 8px;
}
.header__leagues-label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.league-capsule {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-block: 2px;
}
.league-capsule::-webkit-scrollbar { display: none; }
.league-capsule__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 0.15s ease-out, color 0.15s ease-out,
    background 0.15s ease-out;
}
.league-capsule__item:hover {
  color: var(--text);
  border-color: var(--muted);
}
.league-capsule__item[aria-pressed="true"] {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(0, 229, 199, 0.09);
}
.league-capsule__item[aria-pressed="true"]::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
}
.header__readout {
  flex: none;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 0;
  border-top: 1px solid var(--line-strong);
  background: var(--ink-1);
}
.footer__stripe {
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--cyan) 0 22%,
    var(--blue) 22% 44%,
    var(--lime) 44% 66%,
    var(--orange) 66% 88%,
    var(--line-strong) 88% 100%
  );
  opacity: 0.85;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-block: 56px 40px;
}
.footer__col { min-width: 0; }
.footer__col--brand { display: block; }
.footer__intro {
  margin-top: 16px;
  max-width: 30ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.footer__meta {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.8;
}
.footer__title {
  padding-top: 12px;
  border-top: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}
.footer__list {
  display: grid;
  gap: 2px;
  margin-top: 14px;
}
.footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s ease-out;
}
.footer__list a:hover { color: var(--cyan); }
.footer__list a[aria-current="page"] { color: var(--cyan); }
.footer__contact {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.footer__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  opacity: 0.85;
}
.footer__value {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 28px;
  padding-block: 18px 26px;
  border-top: 1px solid var(--line);
}
.footer__legal {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- 7. 页面基础区块 ---------- */
.section {
  position: relative;
  padding-block: clamp(72px, 8vw, 128px);
}
.section--light {
  background: var(--light);
  color: var(--ink-0);
}
.section--light .kicker { color: #0A7F72; }
.section--light .muted,
.section--light .stat__label { color: #4A5568; }
.section--light .rule { border-top-color: #D6DDE8; }
.section--light a { color: #0A7F72; }
.section--light .serif-title,
.section--light .h-display { color: var(--ink-0); }

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1080px) {
  .site-nav { gap: 18px; }
  .site-nav__list { gap: 16px; }
  .site-nav__list a { font-size: 13px; }
  .header__readout { display: none; }
}

@media (max-width: 1024px) {
  .brand__tag { display: none; }
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 28px;
    padding-block: 48px 32px;
  }
}

@media (max-width: 900px) {
  html.nav-open { overflow: hidden; }

  .nav-toggle { display: inline-flex; z-index: 70; }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: calc(80px + env(safe-area-inset-top)) var(--gutter)
      calc(32px + env(safe-area-inset-bottom));
    background: var(--ink-0);
    border-top: 2px solid var(--cyan);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
  }
  .site-nav[data-open] {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .site-nav__list a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
    letter-spacing: 0.02em;
    color: var(--text);
  }
  .site-nav__list a::after { display: none; }
  .site-nav__list a[aria-current="page"] {
    color: var(--cyan);
    padding-left: 12px;
    border-left: 2px solid var(--cyan);
  }
  .site-nav__cta {
    width: 100%;
    min-height: 48px;
    margin-top: 28px;
    font-size: 15px;
  }

  .league-capsule__item { min-height: 40px; padding: 8px 14px; }

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

  .section { padding-block: clamp(56px, 9vw, 88px); }
}

@media (max-width: 640px) {
  .header__leagues-label { display: none; }
  .brand__name { font-size: 18px; }
  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-block: 40px 28px;
  }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-block: 16px 24px;
  }
  .footer__legal { font-size: 12px; }
  .media-frame--wide { aspect-ratio: 16 / 9; }
}

/* ---------- 9. 动效降级 ---------- */
[data-reveal] {
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
[data-reveal].is-pending {
  opacity: 0;
  transform: translateY(10px);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@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;
  }
  .brand__dot,
  .status-dot { animation: none; opacity: 1; }
  [data-reveal],
  [data-reveal].is-pending,
  [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
