/* =========================================================
   178体育平台 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ========================================================= */

/* ---------- 01. 变量 ---------- */
:root {
  --navy: #0B1E3A;
  --navy-deep: #050F1F;
  --paper: #F2F5F8;
  --white: #FFFFFF;
  --orange: #FF6A1A;
  --teal: #00C9A7;
  --yellow: #FFD23F;
  --violet: #6C4DFF;
  --slate: #44556B;
  --ink: #101820;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --maxw: 1240px;
  --header-h: 84px;
  --gutter: clamp(18px, 4vw, 40px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-panel: 0 18px 42px -30px rgba(11, 30, 58, .55);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; }
button { font: inherit; }
a { color: inherit; }

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

body.nav-open { overflow: hidden; }

/* ---------- 03. 排版工具 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section-head {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin-block-end: clamp(24px, 4vw, 44px);
}

.section-index {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .22em;
  color: var(--teal);
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -.01em;
  color: var(--navy);
}

.section-desc {
  color: var(--slate);
  font-size: 1rem;
  max-width: 62ch;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal);
}

.on-dark {
  background: var(--navy);
  color: rgba(255, 255, 255, .82);
}
.on-dark .section-title { color: #fff; }
.on-dark .section-desc { color: rgba(255, 255, 255, .68); }
.on-dark .eyebrow,
.on-dark .section-index { color: var(--teal); }

.slant-band {
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--orange), var(--yellow) 32%, var(--teal) 68%, var(--violet));
  transform: skewY(-1.2deg);
  transform-origin: left center;
}

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

/* ---------- 04. 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}
.grid-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.grid-8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 05. 面板 / 卡片 / 数据 ---------- */
.panel {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(11, 30, 58, .1);
  box-shadow: var(--shadow-panel);
  padding: clamp(18px, 3vw, 30px);
}

.panel-cut {
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  border-color: transparent;
}

.card {
  display: grid;
  gap: 8px;
  align-content: start;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.45;
}

.card-note {
  font-size: .875rem;
  color: var(--slate);
  line-height: 1.7;
}

.stat { display: grid; gap: 6px; }

.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--navy);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .14em;
  color: var(--slate);
  text-transform: uppercase;
}

.on-dark .stat-value { color: #fff; }
.on-dark .stat-label { color: rgba(255, 255, 255, .6); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 9px;
  color: #06604f;
  background: rgba(0, 201, 167, .14);
  border: 1px solid rgba(0, 201, 167, .34);
}
.on-dark .tag {
  color: #7ff0dc;
  background: rgba(0, 201, 167, .16);
  border-color: rgba(0, 201, 167, .42);
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 3px 8px;
  color: #101820;
  background: var(--yellow);
}
.badge-orange { background: var(--orange); color: #101820; }
.badge-violet { background: var(--violet); color: #fff; }

/* ---------- 06. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .9375rem;
  line-height: 1;
  padding: 13px 22px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  color: #101820;
  background: var(--orange);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform .22s var(--ease), background-color .22s var(--ease), color .22s var(--ease);
}
.btn:hover { transform: translateX(6px); }
.btn-primary { background: linear-gradient(100deg, var(--orange), #FF8A3D); color: #101820; }
.btn-solid { background: var(--navy); color: #fff; }
.btn-solid:hover { background: #12294c; }
.btn-ghost {
  background: rgba(255, 255, 255, .04);
  color: #fff;
  clip-path: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

/* ---------- 07. 面包屑 / 长文 ---------- */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--slate);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before {
  content: "/";
  color: rgba(68, 85, 107, .45);
}
.breadcrumbs a {
  text-decoration: none;
  border-bottom: 1px solid rgba(68, 85, 107, .32);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.breadcrumbs a:hover {
  color: var(--violet);
  border-color: var(--violet);
}
.on-dark .breadcrumbs,
.on-dark .breadcrumbs a { color: rgba(255, 255, 255, .7); }

.prose {
  max-width: 760px;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--ink);
}
.prose h2 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--navy);
  margin: 2.1em 0 .7em;
}
.prose h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.7em 0 .6em;
}
.prose p { margin-bottom: 1.1em; }
.prose ul,
.prose ol { margin: 0 0 1.2em; padding-inline-start: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose a {
  color: var(--violet);
  text-decoration: none;
  border-bottom: 1px solid rgba(108, 77, 255, .4);
}
.prose a:hover { border-color: var(--violet); }
.on-dark .prose { color: rgba(255, 255, 255, .82); }
.on-dark .prose h2,
.on-dark .prose h3 { color: #fff; }

/* ---------- 08. 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, #0B1E3A 0%, #050F1F 100%);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 52%, rgba(0, 201, 167, .22) 100%),
    linear-gradient(0deg, rgba(5, 15, 31, .45) 0%, transparent 46%);
}
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

/* ---------- 09. 筛选 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .12em;
  padding: 9px 16px;
  color: var(--slate);
  background: transparent;
  border: 1px solid rgba(11, 30, 58, .2);
  cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.filter-btn:hover {
  color: var(--navy);
  border-color: var(--navy);
}
.filter-btn[aria-pressed="true"] {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}
.on-dark .filter-btn {
  color: rgba(255, 255, 255, .7);
  border-color: rgba(255, 255, 255, .28);
}
.on-dark .filter-btn:hover { color: #fff; border-color: #fff; }
.on-dark .filter-btn[aria-pressed="true"] {
  color: #101820;
  background: var(--teal);
  border-color: var(--teal);
}

/* ---------- 10. 显现 / 计数 ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .36s var(--ease), transform .36s var(--ease);
}
.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 11. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: -120px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 12px 24px;
  font-weight: 700;
  font-size: .9375rem;
  text-decoration: none;
  color: #101820;
  background: var(--orange);
  transition: top .22s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- 12. 头部 ---------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 80;
  --header-h: 84px;
  color: #fff;
  background: linear-gradient(180deg, rgba(5, 15, 31, .8) 0%, rgba(5, 15, 31, .38) 62%, rgba(5, 15, 31, 0) 100%);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled {
  --header-h: 64px;
  background: var(--navy);
  box-shadow: 0 16px 34px -24px rgba(0, 0, 0, .9);
}

.header-shell {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 40px);
  max-width: var(--maxw);
  margin-inline: auto;
  height: var(--header-h);
  padding-inline: var(--gutter);
  transition: height .3s var(--ease);
}

.header-brand {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: #fff;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #08182f;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  clip-path: polygon(16% 0, 100% 0, 84% 100%, 0 100%);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.16;
}

.brand-name {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: .01em;
}

.brand-slogan {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .16em;
  color: var(--teal);
}

.site-nav { margin-inline-start: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1.2vw, 16px);
  list-style: none;
  padding: 0;
}

.nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .8);
  transition: color .2s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s var(--ease);
}
.nav-link:hover,
.nav-link:focus-visible { color: #fff; }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: #fff; }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link[aria-current="page"] .nav-index { color: var(--orange); }

.nav-index {
  font-family: var(--font-mono);
  font-size: .625rem;
  letter-spacing: .14em;
  color: rgba(0, 201, 167, .9);
}

.nav-label { display: block; }

.nav-foot { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 3;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
  padding: 10px 12px;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .22);
}
.nav-toggle-label {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .16em;
}
.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 22px;
}
.nav-toggle-bars i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .24s var(--ease), opacity .24s var(--ease);
}
.site-header[data-open] .nav-toggle-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.scroll-progress {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--yellow) 38%, var(--teal) 74%, var(--violet));
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* ---------- 13. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  color: rgba(255, 255, 255, .76);
  background: linear-gradient(168deg, var(--navy) 0%, var(--navy-deep) 80%);
}

.footer-band {
  display: block;
  position: absolute;
  inset-block-start: 0;
  inset-inline: -6%;
  height: 6px;
  background: linear-gradient(90deg, var(--orange), var(--yellow) 30%, var(--teal) 64%, var(--violet));
  transform: rotate(-1.1deg);
  transform-origin: left center;
}

.footer-inner {
  padding-block: clamp(52px, 7vw, 84px) 26px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.9fr) minmax(0, 1.3fr);
  gap: clamp(24px, 4vw, 56px);
}

.footer-brand { display: grid; gap: 8px; align-content: start; }

.footer-logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-family: var(--font-mono);
  font-size: 1.0625rem;
  font-weight: 700;
  color: #08182f;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  clip-path: polygon(16% 0, 100% 0, 84% 100%, 0 100%);
}

.footer-brand-name {
  font-size: 1.0625rem;
  font-weight: 800;
  color: #fff;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .16em;
  color: var(--teal);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px);
}

.footer-heading {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--teal);
}

.footer-links {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}
.footer-links a {
  display: inline-block;
  font-size: .9375rem;
  text-decoration: none;
  color: rgba(255, 255, 255, .76);
  transition: color .22s var(--ease), padding-left .22s var(--ease);
}
.footer-links a:hover,
.footer-links a:focus-visible {
  color: #fff;
  padding-left: 8px;
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin-bottom: 14px;
  display: grid;
  gap: 10px;
}
.footer-contact-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: .8125rem;
}
.contact-key {
  color: var(--teal);
  letter-spacing: .12em;
}
.contact-val {
  color: rgba(255, 255, 255, .88);
  word-break: break-word;
}

.footer-note {
  max-width: 36ch;
  font-size: .8125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, .55);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  align-items: center;
  margin-block-start: clamp(28px, 4vw, 48px);
  padding-block-start: 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .58);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer-icp { color: rgba(255, 255, 255, .72); }

.footer-stripe {
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--orange), var(--yellow) 28%, var(--teal) 62%, var(--violet));
  transform: skewY(-.5deg);
  transform-origin: left center;
}

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1024px) {
  .grid-7-5,
  .grid-8-4 { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

  /* 移动导航：右侧全屏抽屉 */
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    margin: 0;
    padding: calc(var(--header-h) + 36px) var(--gutter) 48px;
    overflow-y: auto;
    background: linear-gradient(155deg, #0B1E3A 0%, #050F1F 84%);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .34s var(--ease), visibility .34s var(--ease);
  }
  .site-header[data-open] .site-nav {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-link {
    flex-direction: row;
    align-items: baseline;
    gap: 14px;
    padding: 14px 6px;
    font-size: clamp(1.15rem, 5vw, 1.4rem);
    font-weight: 800;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  .nav-link::after { display: none; }
  .nav-index { font-size: .75rem; }

  .nav-foot {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-block-start: 24px;
  }
  .nav-foot .btn { justify-content: flex-start; }

  .header-actions { display: none; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 680px) {
  :root { --header-h: 70px; }

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

  .site-header.is-scrolled { --header-h: 58px; }

  .header-brand { gap: 9px; }
  .brand-mark { width: 38px; height: 38px; font-size: .8125rem; }
  .brand-name { font-size: .9375rem; }
  .brand-slogan { font-size: .625rem; letter-spacing: .1em; }

  .footer-cols { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .btn:hover { transform: none; }
}
