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

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

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

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

a { color: inherit; }

table { width: 100%; border-collapse: collapse; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  --night: #0B1F3A;
  --ink: #071426;
  --bone: #F3EFE7;
  --stone: #6E6A63;
  --cyan: #2EE6C8;
  --amber: #FF9A3C;
  --moss: #4C6350;
  --clay: #B5643C;
  --mist: #A9C7C2;
  --cold: #F7FAF9;

  --line-soft: rgba(169, 199, 194, .18);
  --line-mid: rgba(169, 199, 194, .38);
  --line-strong: rgba(169, 199, 194, .62);
  --on-dark: rgba(243, 239, 231, .78);
  --on-dark-dim: rgba(243, 239, 231, .56);

  --font-display: "DIN Condensed", "Barlow Condensed", "Oswald",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Roboto Mono", "DIN Pro",
    Menlo, Consolas, "Courier New", monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 60px;
  --radius: 2px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 901px) {
  :root { --header-h: 72px; }
}

/* ---------- 3. 基础排版 ---------- */
body {
  background: var(--bone);
  color: var(--night);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- 4. 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.grid {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 5. 文字组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--clay);
  line-height: 1.4;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: .7;
  flex: none;
}

.index-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--clay);
  font-variant-numeric: tabular-nums;
}

.display-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 7vw, 104px);
  line-height: .95;
  letter-spacing: -.02em;
}

.lede {
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.8;
  max-width: 36em;
  color: var(--night);
  opacity: .88;
}

.prose {
  max-width: 38em;
  font-size: 16px;
  line-height: 1.85;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 { line-height: 1.35; }
.prose ul, .prose ol { padding-left: 1.2em; list-style: disc; }
.prose a { color: var(--clay); text-decoration: underline; text-underline-offset: 3px; }

.tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid rgba(181, 100, 60, .55);
  color: var(--clay);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  line-height: 1.6;
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: .1em;
  text-decoration: none;
  line-height: 1.4;
  transition: background .25s var(--ease), color .25s var(--ease),
    border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }

.btn--solid {
  background: var(--amber);
  color: var(--night);
  font-weight: 600;
}
.btn--solid:hover { background: var(--cyan); }

.btn--ghost {
  border-color: var(--line-strong);
  color: inherit;
}
.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- 7. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--stone);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--mist);
  margin-left: 2px;
}
.breadcrumb a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.breadcrumb a:hover { color: var(--clay); border-bottom-color: currentColor; }
.breadcrumb [aria-current="page"] { color: var(--night); }

/* ---------- 8. 图片容器（供页面阶段填充） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--line-mid);
  border-radius: var(--radius);
}
.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(7, 20, 38, .22) 0 1px,
    transparent 1px 3px
  );
  opacity: .5;
}
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
}

/* ---------- 9. 横向滑轨（赛季 / 联赛分类） ---------- */
.h-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--moss) transparent;
  -webkit-overflow-scrolling: touch;
}
.h-rail-item {
  flex: 0 0 clamp(220px, 30vw, 320px);
  scroll-snap-align: start;
}

/* ---------- 10. 可访问跳转链接 ---------- */
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 11px 18px;
  background: var(--amber);
  color: var(--night);
  font-size: 13px;
  letter-spacing: .06em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top .24s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- 11. 站点头部 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  color: var(--cold);
  background: linear-gradient(to bottom, rgba(7, 20, 38, .8), rgba(7, 20, 38, .1));
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease),
    box-shadow .35s var(--ease);
}
.site-header.is-stuck {
  background: var(--night);
  border-bottom-color: var(--line-soft);
  box-shadow: 0 24px 48px -34px rgba(7, 20, 38, .95);
}

.header-shell {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* 字标 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cold);
  flex: none;
}
.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--mist);
  background: rgba(46, 230, 200, .06);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
}
.brand-mark::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 4px;
  height: 4px;
  background: var(--amber);
}
.brand-text { display: block; }
.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1.2;
  color: var(--cold);
}
.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .22em;
  line-height: 1.5;
  color: rgba(169, 199, 194, .9);
}

/* 移动端索引按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--cold);
}
.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 16px;
}
.nav-toggle-bars i {
  display: block;
  height: 1px;
  background: var(--cyan);
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:first-child {
  transform: translateY(2.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:last-child {
  transform: translateY(-2.5px) rotate(-45deg);
}
.nav-toggle-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
}

/* 导航 */
.site-nav { display: block; }
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 26px);
}
.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 2px;
  text-decoration: none;
  color: rgba(247, 250, 249, .76);
  font-size: 13px;
  letter-spacing: .04em;
  transition: color .25s var(--ease);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-list a:hover { color: var(--cold); }
.nav-list a:hover::after { transform: scaleX(1); }
.nav-list a:focus-visible::after { transform: scaleX(1); }
.nav-list a[aria-current="page"] { color: var(--cold); }
.nav-list a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--amber);
}
.nav-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--clay);
  font-variant-numeric: tabular-nums;
}
.nav-label { letter-spacing: .05em; }

/* 悬浮比分带 */
.score-ribbon {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  background:
    linear-gradient(90deg, rgba(46, 230, 200, .1), transparent 55%),
    var(--ink);
  border-top: 1px solid var(--line-soft);
  transition: max-height .45s var(--ease), opacity .3s var(--ease);
}
.site-header.is-stuck .score-ribbon {
  max-height: 78px;
  opacity: 1;
}
.ribbon-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--moss) transparent;
}
.ribbon-caption {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
  white-space: nowrap;
}
.ribbon-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: ribbon-pulse 2s ease-out infinite;
}
.ribbon-matches {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 34px);
  flex: 1 1 auto;
}
.ribbon-match {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--on-dark);
}
.ribbon-team { color: var(--cold); }
.ribbon-score {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .02em;
  color: var(--cold);
  font-variant-numeric: tabular-nums;
}
.ribbon-sep { color: var(--cyan); }
.ribbon-state {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--amber);
}
.ribbon-path {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 154, 60, .45);
  padding-bottom: 1px;
  white-space: nowrap;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.ribbon-path:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

@keyframes ribbon-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 230, 200, .55); }
  70% { box-shadow: 0 0 0 7px rgba(46, 230, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 230, 200, 0); }
}

/* 滚动进度线 */
.progress-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
}
.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
}

/* ---------- 12. 站点页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--night);
  color: var(--on-dark);
  padding-top: clamp(48px, 7vw, 88px);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mist), transparent);
  opacity: .55;
}
.footer-grid {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.25fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(32px, 5vw, 64px);
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-tagline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: .04em;
  line-height: 1.25;
  color: var(--cold);
}
.footer-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--on-dark-dim);
  max-width: 26em;
}
.footer-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 16px;
}
.footer-list li + li { margin-top: 10px; }
.footer-list a {
  font-size: 14px;
  text-decoration: none;
  color: var(--on-dark);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.footer-list a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(46, 230, 200, .5);
}
.footer-contact { margin: 0; }
.contact-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.7;
}
.contact-row + .contact-row { margin-top: 10px; }
.contact-key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--mist);
  padding-top: 3px;
}
.contact-val { color: var(--cold); word-break: break-word; }

.footer-base {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 20px var(--gutter) 28px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}
.footer-legal {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: rgba(169, 199, 194, .88);
}
.footer-echoline {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .22em;
  color: var(--amber);
}

/* ---------- 13. 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--night);
  color: var(--cyan);
  border: 1px solid rgba(46, 230, 200, .45);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease),
    visibility .3s var(--ease), border-color .25s var(--ease);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.back-to-top:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- 14. 显现与比分脉冲 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

.score-pulse {
  animation: score-glow .48s ease-out 1, score-hop .48s ease-out 1;
}
@keyframes score-glow {
  0% { text-shadow: 0 0 0 rgba(46, 230, 200, 0); }
  25% { text-shadow: 0 0 18px rgba(46, 230, 200, .75); }
  62% { text-shadow: 0 0 18px rgba(255, 154, 60, .7); }
  100% { text-shadow: 0 0 0 rgba(255, 154, 60, 0); }
}
@keyframes score-hop {
  0% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

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

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 99;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 6px 0 22px;
    background:
      radial-gradient(circle at 88% 8%, rgba(46, 230, 200, .12), transparent 55%),
      var(--night);
    border-top: 1px solid var(--line-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease),
      visibility .25s var(--ease);
  }
  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px var(--gutter);
    font-size: 15px;
    border-bottom: 1px solid rgba(169, 199, 194, .1);
  }
  .nav-list a::after { display: none; }
  .nav-list a[aria-current="page"] {
    background: rgba(46, 230, 200, .08);
  }
  .nav-list a[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--cyan);
  }
  .nav-list a[aria-current="page"] .nav-num { color: var(--amber); }

  .ribbon-path { display: none; }
  .ribbon-inner { padding-block: 9px; }
  .ribbon-matches { gap: 16px; }

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

@media (max-width: 620px) {
  .header-shell { gap: 12px; }
  .brand-name { font-size: 17px; }
  .brand-sub { display: none; }

  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .back-to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}

/* ---------- 16. 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .reveal { opacity: 1; transform: none; }
  .back-to-top { transition: opacity .001ms linear, visibility .001ms linear; }
  .ribbon-dot { animation: none; }
  .score-pulse { animation: none; }
}
