/* ==========================================================================
   完美体育主站 · /assets/site.css
   共享外壳：reset、令牌、中文排版、页头、页脚、通用组件
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --ink-900: #061421;
  --ink-800: #0B2238;
  --line: #143B5A;
  --teal: #3DF2C0;
  --moss: #6F9A7A;
  --stone: #8C9AA5;
  --paper: #EAF4F0;
  --orange: #FF8A3D;
  --clay: #C76845;
  --deep: #03101C;

  --font-display: "MiSans VF", "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1440px;
  --gutter: clamp(18px, 3vw, 40px);
  --rail: 220px;
  --cut: 14px;
  --sp-section: clamp(48px, 7vw, 96px);
  --header-h: 112px;
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

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

ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

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

a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* ---------- base ---------- */
body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 82% -8%, rgba(61, 242, 192, 0.09), transparent 62%),
    radial-gradient(900px 460px at 2% 24%, rgba(255, 138, 61, 0.05), transparent 60%),
    var(--ink-900);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: clamp(15px, 0.3vw + 14px, 17px);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-underline-offset: 3px;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6vw, 84px); line-height: 1.02; font-weight: 800; }
h2 { font-size: clamp(28px, 3.4vw, 44px); }
h3 { font-size: clamp(19px, 1.6vw, 24px); font-weight: 600; }

p { max-width: 72ch; }
strong { font-weight: 600; color: #fff; }
small { font-size: 12.5px; }

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

#main-content,
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--teal);
  color: var(--deep);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- layout utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--sp-section); }
.section--tight { padding-block: clamp(28px, 4vw, 56px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--moss);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.data-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}

.note {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--stone);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(61, 242, 192, 0.4);
  background: rgba(61, 242, 192, 0.07);
  border-radius: 2px;
}

/* 切角面板：控制台质感 */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.panel::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 26px;
  height: 26px;
  border-top: 1px solid var(--teal);
  border-right: 1px solid var(--teal);
  opacity: 0.55;
  pointer-events: none;
}

.cut {
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 2px;
  clip-path: polygon(
    0 0,
    calc(100% - 10px) 0,
    100% 10px,
    100% 100%,
    10px 100%,
    0 calc(100% - 10px)
  );
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn:focus-visible { outline-offset: -4px; }
.btn--sm { padding: 9px 14px; font-size: 12.5px; }
.btn--primary {
  background: var(--orange);
  color: var(--deep);
  border-color: var(--orange);
}
.btn--primary:hover { background: #ffa063; border-color: #ffa063; transform: translateY(-1px); }
.btn--ghost {
  background: rgba(20, 59, 90, 0.35);
  color: var(--paper);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--stone);
}
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li::after {
  content: "/";
  margin: 0 9px;
  color: var(--line);
}
.breadcrumbs li:last-child::after { content: ""; margin: 0; }
.breadcrumbs a { color: rgba(234, 244, 240, 0.75); }
.breadcrumbs a:hover { color: var(--teal); }
.breadcrumbs [aria-current="page"] { color: var(--teal); }

/* ---------- 页面框架 + 版本锚点 ---------- */
.page-shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 48px);
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  align-items: start;
}

.rail {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  align-self: start;
  padding: 20px 0 20px 2px;
  border-right: 1px solid var(--line);
}

.rail-title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}

.rail-list { display: grid; gap: 2px; }

.rail-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(234, 244, 240, 0.72);
  border-left: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.rail-link:hover { color: var(--paper); border-left-color: var(--line); }
.rail-link[aria-current="true"] {
  color: var(--teal);
  border-left-color: var(--teal);
  background: rgba(61, 242, 192, 0.06);
}

/* ---------- 图片来源容器（页面阶段填写 img） ---------- */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    repeating-linear-gradient(115deg, rgba(20, 59, 90, 0.55) 0 1px, transparent 1px 22px),
    linear-gradient(145deg, var(--ink-800), var(--deep));
}
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.04);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 16, 28, 0) 42%, rgba(3, 16, 28, 0.8));
  pointer-events: none;
}

.media-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--deep);
  background: var(--teal);
  border-radius: 1px;
}

/* ---------- 筛选 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-btn {
  padding: 8px 15px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--stone);
  background: rgba(11, 34, 56, 0.65);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.filter-btn:hover { color: var(--paper); border-color: var(--moss); }
.filter-btn[aria-pressed="true"] {
  color: var(--deep);
  background: var(--teal);
  border-color: var(--teal);
  font-weight: 700;
}

/* ---------- 显现动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   页头：框架式边框导航
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(6, 20, 33, 0.96);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-progress {
  height: 2px;
  background: rgba(20, 59, 90, 0.55);
}
.progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--moss) 70%, var(--clay));
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2vw, 36px);
  min-height: 76px;
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 var(--gutter);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-block: 10px;
}
.brand-mark {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  background: linear-gradient(150deg, var(--teal), var(--moss) 62%, var(--ink-800));
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  height: 2px;
  background: var(--deep);
}
.brand-mark::before { right: 15px; bottom: 15px; opacity: 0.7; }
.brand-mark::after { right: 8px; bottom: 9px; }

.brand-text { display: grid; gap: 2px; }
.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--paper);
}
.brand-desc {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: var(--stone);
}

/* 导航 */
.site-nav { min-width: 0; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}
.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 14px 9px;
  font-size: 13.5px;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--stone);
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.nav-link:hover { color: var(--paper); border-bottom-color: var(--line); }
.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(140, 154, 165, 0.5);
}
.nav-label { display: inline-block; }
.nav-link[aria-current="page"] {
  color: var(--teal);
  border-bottom-color: var(--teal);
}
.nav-link[aria-current="page"] .nav-index { color: var(--teal); }

/* 操作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  height: 40px;
  color: var(--paper);
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.nav-toggle:hover { border-color: var(--teal); color: var(--teal); }
.nav-toggle:focus-visible { outline-offset: -3px; }
.nav-toggle-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
}
.nav-toggle-bars span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 比分条式状态带 */
.header-ticker {
  overflow: hidden;
  border-top: 1px solid rgba(20, 59, 90, 0.8);
  background: linear-gradient(90deg, rgba(11, 34, 56, 0.92), rgba(6, 20, 33, 0.55));
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 34px;
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.ticker-track::-webkit-scrollbar { display: none; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(61, 242, 192, 0.16);
  animation: ticker-pulse 2.4s ease-in-out infinite;
}
.ticker-dot--warm {
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.18);
}
.ticker-label { color: rgba(140, 154, 165, 0.8); }
.ticker-value { color: var(--paper); }

@keyframes ticker-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ==========================================================================
   页脚：终场面板
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 120px);
  background: var(--deep);
  border-top: 1px solid var(--line);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--moss) 42%, var(--clay) 96%);
  opacity: 0.8;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: clamp(24px, 4vw, 56px);
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) var(--gutter) 0;
}

.footer-brand-line {
  font-family: var(--font-display);
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--paper);
  max-width: 20ch;
}
.footer-note {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--stone);
}

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

.footer-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  border-bottom: 1px solid rgba(20, 59, 90, 0.9);
}

.footer-link-list { display: grid; gap: 2px; }

.footer-link {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 6px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(234, 244, 240, 0.78);
  transition: color 0.18s ease, transform 0.18s ease;
}
.footer-link:hover { color: var(--teal); transform: translateX(2px); }

.link-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(140, 154, 165, 0.6);
}

.footer-contact { min-width: 0; }
.contact-row {
  display: grid;
  gap: 2px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(20, 59, 90, 0.75);
}
.contact-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(140, 154, 165, 0.85);
}
.contact-value {
  font-size: 13px;
  line-height: 1.6;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  max-width: var(--max);
  margin: clamp(28px, 4vw, 48px) auto 0;
  padding: 18px var(--gutter) 26px;
  border-top: 1px solid rgba(20, 59, 90, 0.85);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--stone);
}
.copyright { color: rgba(140, 154, 165, 0.9); }
.legal-icp { color: rgba(140, 154, 165, 0.9); }
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.legal-links a {
  color: rgba(234, 244, 240, 0.8);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.legal-links a:hover { color: var(--teal); border-bottom-color: var(--teal); }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1240px) {
  .brand-desc { display: none; }
  .header-actions .btn--ghost { display: none; }
  .nav-link { padding-inline: 7px; font-size: 13px; }
  .nav-index { display: none; }
}

@media (max-width: 1024px) {
  .page-shell { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 4px 0 14px;
  }
  .rail-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .rail-link {
    padding: 6px 12px;
    font-size: 12.5px;
    border-left: 0;
    border: 1px solid var(--line);
    border-radius: 2px;
  }
  .rail-link[aria-current="true"] { border-color: var(--teal); }
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 64px;
    gap: 12px;
  }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    max-height: 70vh;
    overflow-y: auto;
    padding: 6px var(--gutter) 20px;
    background: var(--ink-800);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(3, 16, 28, 0.6);
  }
  .site-nav[data-open="true"] {
    display: block;
    animation: nav-in 0.22s ease-out;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-link {
    display: flex;
    padding: 14px 12px;
    font-size: 15px;
    border-bottom: 1px solid rgba(20, 59, 90, 0.75);
    border-left: 2px solid transparent;
  }
  .nav-link:hover { border-bottom-color: rgba(20, 59, 90, 0.75); border-left-color: var(--line); }
  .nav-link[aria-current="page"] {
    border-bottom-color: rgba(20, 59, 90, 0.75);
    border-left-color: var(--teal);
    background: rgba(61, 242, 192, 0.07);
  }
  .nav-index { display: inline; }
  .header-ticker { display: none; }
  .header-actions .btn--primary { display: none; }
}

@keyframes nav-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-head { align-items: flex-start; }
}

@media (max-width: 480px) {
  .brand-mark { width: 32px; height: 32px; }
  .brand-name { font-size: 16px; }
  .nav-toggle-text { display: none; }
  .footer-links { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; }
  .header-actions .btn { width: auto; }
}

/* ---------- 减少动效 ---------- */
@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;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .footer-link:hover { transform: none; }
  .btn--primary:hover { transform: none; }
}
