/* ==========================================================================
   88体育主站 — /assets/site.css
   共享外壳：重置 / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ========================================================================== */

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

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

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

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

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

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

a { color: inherit; }

/* ---------- 2. Tokens ---------- */
:root {
  --bg: #061F1A;
  --bg-deep: #03130F;
  --panel: #0C2E26;
  --raise: #123D32;
  --ink: #E8FFF9;
  --ink-soft: rgba(232, 255, 249, .84);
  --ink-dim: rgba(232, 255, 249, .60);
  --sage: #7FA99B;
  --cyan: #35F2D0;
  --cyan-deep: #0FA88F;
  --amber: #FFB13B;
  --violet: #8C5CFF;
  --alert: #FF6B5E;
  --paper: #F4E9D8;

  --line: rgba(127, 169, 155, .26);
  --line-strong: rgba(127, 169, 155, .48);

  --radius: 2px;
  --shell: 1360px;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --break-nav: 980px;

  --font-display: "Barlow Condensed", "Arial Narrow", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, "SimSun", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;

  --ease: cubic-bezier(.22, .68, .32, 1);
}

/* ---------- 3. Base / 中文排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(120% 78% at 10% -12%, rgba(53, 242, 208, .09), transparent 56%),
    radial-gradient(90% 66% at 100% -4%, rgba(140, 92, 255, .09), transparent 62%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.005em;
  color: var(--ink);
}

h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.42rem); }
h4 { font-size: 1.02rem; }

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

strong { color: var(--ink); font-weight: 700; }

::selection {
  background: var(--cyan);
  color: #04211B;
}

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

#main-content:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: -6px;
}

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

.section { padding-block: clamp(2.75rem, 6vw, 5.5rem); }
.section--tight { padding-block: clamp(1.75rem, 3.5vw, 2.75rem); }

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

.num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.015em;
}

.prose {
  max-width: 68ch;
  font-size: 1.02rem;
  line-height: 1.78;
  color: var(--ink-soft);
}

.prose h2,
.prose h3 {
  margin-top: 2rem;
  margin-bottom: .7rem;
  color: var(--ink);
}

.prose p { margin-bottom: 1.05rem; }

.prose ul,
.prose ol {
  margin: 0 0 1.1rem;
  padding-left: 1.15rem;
  list-style: disc;
}

.prose ol { list-style: decimal; }

.prose li { margin-bottom: .4rem; }

.prose a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 242, 208, .45);
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

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

.prose blockquote {
  margin: 1.4rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--amber);
  font-family: var(--font-serif);
  color: var(--ink-soft);
}

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 300;
  display: inline-block;
  padding: .62rem 1.05rem;
  background: var(--cyan);
  color: #04211B;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .08em;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .9);
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background:
    linear-gradient(180deg, rgba(6, 31, 26, .985), rgba(6, 31, 26, .93));
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 150% at 6% 0%, rgba(53, 242, 208, .12), transparent 62%),
    radial-gradient(50% 150% at 94% 0%, rgba(140, 92, 255, .12), transparent 66%);
}

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: .82rem var(--gutter);
}

.header-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .68rem;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 40px;
  background: var(--cyan);
  color: #04211B;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -.05em;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 76% 100%, 0 100%);
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}

.brand:hover .brand-mark { background: #6bffe4; }
.brand:active .brand-mark { transform: translateY(1px); }

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.18;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: .07em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .24em;
  color: var(--sage);
  white-space: nowrap;
}

/* 赛季状态 */
.season-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  padding: .24rem .62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .71rem;
  letter-spacing: .08em;
  color: var(--sage);
  white-space: nowrap;
}

.season-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(53, 242, 208, .16);
}

/* 右轨 */
.header-index {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 0;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.site-nav { min-width: 0; }

.nav-list {
  display: flex;
  align-items: center;
  gap: .1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  position: relative;
  display: block;
  padding: .45rem .66rem;
  border-radius: var(--radius);
  color: var(--sage);
  font-size: .89rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: .66rem;
  right: .66rem;
  bottom: .26rem;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .24s var(--ease), background-color .24s var(--ease);
}

.nav-list a:hover {
  color: var(--ink);
  background: rgba(18, 61, 50, .55);
}

.nav-list a:hover::after { transform: scaleX(1); }

.nav-list a[aria-current="page"] {
  color: var(--cyan);
  background: rgba(53, 242, 208, .08);
}

.nav-list a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--amber);
}

/* 移动端索引按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .55rem;
  padding: .48rem .72rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .16em;
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease), background-color .18s var(--ease);
}

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

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform .22s var(--ease), opacity .16s var(--ease);
}

.site-header[data-open] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header[data-open] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.site-header[data-open] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 刻度尺与滚动进度 */
.header-scale {
  position: relative;
  height: 3px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--line-strong) 0 1px,
    transparent 1px 12px
  );
  opacity: .9;
}

.scroll-progress {
  position: absolute;
  inset: 0;
  display: block;
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--amber) 78%, var(--violet) 100%);
  will-change: transform;
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .68rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .86rem;
  letter-spacing: .11em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color .2s var(--ease),
    color .2s var(--ease),
    border-color .2s var(--ease),
    transform .2s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--cyan);
  color: #04211B;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.btn-primary:hover { background: #6bffe4; }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(53, 242, 208, .07);
}

.header-cta { flex: 0 0 auto; }

/* ---------- 8. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(3.5rem, 7vw, 6.5rem);
  background: linear-gradient(180deg, var(--panel) 0%, rgba(6, 31, 26, .96) 72%, var(--bg-deep) 100%);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.footer-scale {
  height: 8px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--line-strong) 0 1px,
    transparent 1px 10px
  );
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  opacity: .75;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2.5fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.25rem, 4.5vw, 3.5rem) var(--gutter) clamp(1.75rem, 3vw, 2.5rem);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: .95rem;
  min-width: 0;
}

.footer-brand .brand-mark {
  width: 52px;
  height: 46px;
  font-size: 1.16rem;
}

.footer-tagline {
  margin: 0;
  max-width: 32ch;
  font-size: .87rem;
  line-height: 1.7;
  color: var(--ink-dim);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  min-width: 0;
}

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

.footer-title {
  margin: 0 0 .95rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--sage);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  color: var(--ink-soft);
  font-size: .89rem;
  line-height: 1.55;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

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

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: .62rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: .81rem;
  line-height: 1.5;
  color: var(--ink-soft);
  word-break: break-word;
}

.footer-label {
  display: block;
  margin-bottom: .12rem;
  font-family: var(--font-serif);
  font-style: normal;
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sage);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 1rem var(--gutter) 1.75rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .71rem;
  letter-spacing: .07em;
  color: var(--sage);
}

.footer-base p { margin: 0; }
.footer-icp { color: var(--amber); }

/* ---------- 9. 通用内容组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .9rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: .73rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--sage);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--amber);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: .71rem;
  letter-spacing: .06em;
  color: var(--sage);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(127, 169, 155, .5);
}

.breadcrumbs a {
  color: var(--sage);
  text-decoration: none;
  transition: color .18s var(--ease);
}

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

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

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 61, 50, .5);
  font-family: var(--font-mono);
  font-size: .69rem;
  letter-spacing: .08em;
  color: var(--sage);
  white-space: nowrap;
}

.tag--home {
  background: var(--amber);
  border-color: var(--amber);
  color: #2A1700;
}

.tag--away {
  border-color: rgba(255, 177, 59, .55);
  color: var(--amber);
  background: rgba(255, 177, 59, .08);
}

.tag--live {
  border-color: rgba(53, 242, 208, .55);
  color: var(--cyan);
  background: rgba(53, 242, 208, .10);
}

/* 数据条 */
.meter {
  position: relative;
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(127, 169, 155, .18);
  overflow: hidden;
}

.meter > span {
  display: block;
  height: 100%;
  width: var(--value, 50%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan));
  transform-origin: left center;
  transition: width .9s var(--ease);
}

.meter--amber > span {
  background: linear-gradient(90deg, #c07a10, var(--amber));
}

/* 图片容器基础规则（页面阶段在其中放 <img alt>） */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--raise), var(--panel));
}

.media-frame::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  z-index: 1;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
  opacity: .85;
  pointer-events: none;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
}

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

@media (max-width: 560px) {
  .media-frame { aspect-ratio: 4 / 3; }
  .media-frame--wide { aspect-ratio: 16 / 9; }
}

/* 纸张叠层与印刷标签 */
.paper-stack {
  position: relative;
  padding: clamp(1.1rem, 2.4vw, 1.75rem);
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    8px 8px 0 -1px var(--panel),
    8px 8px 0 0 var(--line);
}

.paper-tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .26rem .58rem;
  background: var(--paper);
  color: #22302A;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .67rem;
  letter-spacing: .14em;
  border-radius: var(--radius);
  transform: rotate(-1.4deg);
  box-shadow: 0 8px 16px -10px rgba(0, 0, 0, .9);
}

/* ---------- 10. 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1180px) {
  .nav-list a {
    padding: .42rem .52rem;
    font-size: .855rem;
  }
  .season-chip { display: none; }
  .header-inner { gap: 1rem; }
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }

  .header-inner {
    flex-wrap: nowrap;
    gap: .75rem;
  }

  .header-identity {
    flex: 1 1 auto;
    gap: .6rem;
  }

  .nav-panel {
    position: absolute;
    left: calc(var(--gutter) * -1);
    right: calc(var(--gutter) * -1);
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: .55rem;
    padding: .9rem var(--gutter) 1.35rem;
    background: linear-gradient(180deg, var(--panel), #08241E);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 28px 44px -28px rgba(0, 0, 0, .95);
  }

  .site-header[data-open] .nav-panel { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list a {
    padding: .78rem .55rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(127, 169, 155, .16);
    border-radius: 0;
  }

  .nav-list a::after { display: none; }

  .nav-list a[aria-current="page"] {
    color: var(--cyan);
    border-left: 2px solid var(--amber);
    padding-left: .75rem;
  }

  .header-cta {
    margin-top: .45rem;
    width: 100%;
    padding-block: .85rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand { flex-direction: row; align-items: flex-start; gap: 1.25rem; }
  .footer-tagline { max-width: 42ch; }
}

@media (max-width: 720px) {
  body { font-size: 15px; }

  .brand-mark { width: 40px; height: 36px; font-size: .95rem; }
  .brand-name { font-size: .98rem; }
  .brand-sub { font-size: .58rem; letter-spacing: .2em; }

  .nav-toggle-label { display: none; }
  .nav-toggle { padding: .5rem .6rem; }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { flex-direction: column; }
  .footer-base { justify-content: flex-start; gap: .35rem 1.1rem; }
  .footer-icp { width: 100%; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .paper-stack { box-shadow: 5px 5px 0 -1px var(--panel), 5px 5px 0 0 var(--line); }
}

/* ---------- 12. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-progress { transition: none; }
  .meter > span { transition: none; }
}
