/* ===========================================================
   完美体育官网 · /assets/site.css
   共享外壳：reset / 设计变量 / 中文排版 / 头部 / 页脚 / 通用组件
   =========================================================== */

/* ---------- 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, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- 2. design tokens ---------- */
:root {
  --ink: #0B1E33;
  --ink-2: #132C47;
  --ink-3: #1B3A5C;
  --signal: #FF6A1A;
  --score: #FFC53D;
  --referee: #29A36A;
  --paper: #F4ECDD;
  --brown: #2B2118;
  --mist: #8FA3B8;
  --perf: #D8D0C0;
  --injury: #E5484D;
  --on-signal: #1A0F06;

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

  --shell: 1240px;
  --header-h: 128px;
  --radius-pill: 999px;
  --radius-card: 18px;
  --line: 2px solid var(--brown);
  --shadow-hard: 5px 5px 0 rgba(0, 0, 0, 0.55);
  --shadow-paper: 6px 6px 0 var(--brown);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. base / 中文排版 ---------- */
body {
  padding-top: var(--header-h);
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.78;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(143, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.22; font-weight: 900; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5vw, 62px); }
h2 { font-size: clamp(26px, 3.2vw, 42px); }
h3 { font-size: clamp(20px, 2.1vw, 28px); }
p { text-wrap: pretty; }
strong, b { font-weight: 800; }
::selection { background: var(--signal); color: var(--on-signal); }

/* ---------- 4. 无障碍基础 ---------- */
:focus-visible { outline: 3px solid var(--score); outline-offset: 3px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 300;
  transform: translateY(-200%);
  padding: 10px 18px; border: var(--line); border-radius: var(--radius-pill);
  background: var(--score); color: var(--brown);
  font-size: 14px; font-weight: 800; text-decoration: none;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 布局容器 ---------- */
.shell { width: min(var(--shell), calc(100% - 2.5rem)); margin-inline: auto; }
.container { width: min(1120px, calc(100% - 2.5rem)); margin-inline: auto; }
.section { position: relative; padding: clamp(44px, 6.5vw, 92px) 0; }
.section--tight { padding: clamp(28px, 4vw, 52px) 0; }
.stack > * + * { margin-top: 1rem; }
.rule {
  height: 3px; border: 0; margin: clamp(28px, 4vw, 54px) 0;
  background: linear-gradient(90deg, var(--signal), rgba(255, 106, 26, 0) 72%);
}
.grid { display: grid; gap: clamp(16px, 2.2vw, 28px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------- 6. 头部：固定赛况带 + 悬浮胶囊导航 ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 120;
  display: flex; flex-direction: column;
}
.score-strip {
  background: var(--ink-2);
  border-bottom: var(--line);
  color: var(--paper);
}
.score-strip__inner {
  display: flex; align-items: center;
  gap: clamp(10px, 2vw, 26px);
  min-height: 40px; overflow: hidden;
  font-size: 13px;
}
.score-strip__match { display: inline-flex; align-items: center; gap: 10px; }
.score-strip__team { font-size: 13px; font-weight: 700; white-space: nowrap; }
.score-strip__score {
  font-family: var(--font-mono);
  font-size: 18px; font-weight: 800; letter-spacing: 0.06em;
  color: var(--score);
  animation: score-pulse 4s var(--ease) infinite;
}
.score-strip__half {
  font-family: var(--font-mono); font-size: 12px; color: var(--mist);
  white-space: nowrap;
}
.score-strip__next {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--mist); white-space: nowrap;
}
.score-strip__clock {
  font-family: var(--font-mono); font-weight: 800; letter-spacing: 0.08em;
  color: var(--score);
  background: rgba(255, 197, 61, 0.12);
  border: 1px solid rgba(255, 197, 61, 0.35);
  border-radius: 6px; padding: 2px 9px;
}

.nav-shell { position: relative; padding: 12px 0 10px; }
.nav-shell__inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px 8px 12px;
  background: var(--ink-2);
  border: var(--line); border-radius: var(--radius-pill);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  color: var(--paper); text-decoration: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.brand:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5); }
.brand__mark {
  position: relative; flex: 0 0 auto;
  width: 30px; height: 22px;
  border: 2px solid var(--signal); border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 106, 26, 0.3), rgba(255, 106, 26, 0.08));
}
.brand__mark::before, .brand__mark::after {
  content: ""; position: absolute; left: 3px; right: 3px; height: 3px;
  background-image: radial-gradient(circle, var(--signal) 1.1px, transparent 1.4px);
  background-size: 5px 3px; opacity: 0.85;
}
.brand__mark::before { top: 2px; }
.brand__mark::after { bottom: 2px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.16; }
.brand__name { font-size: 15px; font-weight: 800; letter-spacing: 0.04em; }
.brand__line { font-size: 11px; letter-spacing: 0.14em; color: var(--mist); }

.nav-capsule {
  display: flex; align-items: center; gap: 8px;
  padding: 6px;
  background: var(--ink-2);
  border: var(--line); border-radius: var(--radius-pill);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}
.nav-list {
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-item { flex: 0 0 auto; }
.nav-link {
  display: block; padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; white-space: nowrap;
  color: var(--mist); text-decoration: none;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.nav-link:hover { color: var(--paper); background: rgba(143, 163, 184, 0.14); }
.nav-link[aria-current="page"] {
  background: var(--signal); color: var(--on-signal); font-weight: 800;
  box-shadow: inset 0 0 0 2px rgba(26, 15, 6, 0.33);
}
.nav-capsule__cta { flex: 0 0 auto; }

.nav-toggle {
  display: none; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--ink-2);
  border: var(--line); border-radius: var(--radius-pill);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  color: var(--paper); font-size: 14px; font-weight: 700;
  cursor: pointer;
}
.nav-toggle__bars { display: flex; flex-direction: column; gap: 4px; width: 20px; }
.nav-toggle__bars i {
  display: block; height: 2px; border-radius: 2px; background: var(--signal);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle__text { letter-spacing: 0.1em; }

.scroll-progress {
  height: 3px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--signal), var(--score));
  transition: transform 0.12s linear;
}
.site-header[data-scrolled] .nav-shell { padding-top: 8px; padding-bottom: 8px; }
.site-header[data-scrolled] .brand,
.site-header[data-scrolled] .nav-capsule,
.site-header[data-scrolled] .nav-toggle { box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5); }

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border: var(--line); border-radius: var(--radius-pill);
  background: var(--ink-3); color: var(--paper);
  font-size: 15px; font-weight: 700; line-height: 1.5;
  text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
              background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5); }
.btn--signal { background: var(--signal); color: var(--on-signal); }
.btn--score { background: var(--score); color: var(--on-signal); }
.btn--ghost {
  background: transparent; color: var(--paper);
  border-color: rgba(244, 236, 221, 0.6); box-shadow: none;
}
.btn--ghost:hover { background: rgba(244, 236, 221, 0.1); transform: none; box-shadow: none; }

/* ---------- 8. 面包屑 ---------- */
.breadcrumbs { padding: 18px 0 0; }
.breadcrumb-list {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px; color: var(--mist);
}
.breadcrumb-item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb-item + .breadcrumb-item::before {
  content: "›"; font-weight: 800; color: var(--signal);
}
.breadcrumb-link {
  color: var(--mist); text-decoration: none;
  border-bottom: 1px dashed rgba(143, 163, 184, 0.5); padding-bottom: 1px;
}
.breadcrumb-link:hover { color: var(--score); }
.breadcrumb-item [aria-current="page"] { color: var(--paper); font-weight: 700; }

/* ---------- 9. 卡片 / 标签 / 注释 / 时间码 ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--ink-2);
  border: var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow-hard);
}
.card--paper { background: var(--paper); color: var(--brown); box-shadow: var(--shadow-paper); }
.card--cut { border-radius: 24px 24px 24px 0; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px;
  border: 1px solid rgba(143, 163, 184, 0.45);
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; color: var(--mist);
  white-space: nowrap;
}
.tag--live { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.tag--ok { background: var(--referee); border-color: var(--referee); color: #062315; }
.tag--alert { background: var(--injury); border-color: var(--injury); color: #fff; }

.status-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--referee);
  animation: dot-pulse 2s infinite;
}
.tag--live .status-dot { background: var(--on-signal); }

.annotation {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--mist);
}
.annotation--vertical { writing-mode: vertical-rl; letter-spacing: 0.34em; text-transform: none; }
.chapter-index {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 800; letter-spacing: 0.16em;
  color: var(--signal);
}
.timecode {
  display: inline-block;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  color: var(--score);
  background: rgba(255, 197, 61, 0.1);
  border: 1px solid rgba(255, 197, 61, 0.35);
  border-radius: 6px; padding: 3px 9px;
}
.perf-strip {
  height: 14px; background-color: var(--perf);
  background-image: radial-gradient(circle at 13px 7px, rgba(11, 30, 51, 0.92) 3.6px, transparent 4.2px);
  background-size: 26px 14px;
  border-bottom: 2px solid var(--brown);
}
.surface-paper { background: var(--paper); color: var(--brown); }
.surface-paper .rule { background: linear-gradient(90deg, var(--brown), rgba(43, 33, 24, 0) 72%); }
.surface-paper .annotation,
.surface-paper .media__caption { color: #6B5B49; }

/* ---------- 10. 图片容器（页面阶段放图 / 占位） ---------- */
.media {
  position: relative; overflow: hidden; isolation: isolate;
  border: var(--line); border-radius: var(--radius-card);
  background: var(--ink-2); box-shadow: var(--shadow-hard);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--cinema { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media__court {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(143, 163, 184, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 163, 184, 0.22) 1px, transparent 1px);
  background-size: 34px 34px;
}
.media__grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  mix-blend-mode: overlay;
  background-image: radial-gradient(rgba(244, 236, 221, 0.14) 1px, transparent 1px);
  background-size: 3px 3px;
}
.media__frame-no { position: absolute; left: 12px; bottom: 12px; z-index: 2; }
.media__caption { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--mist); }

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(40px, 6vw, 90px);
  background: var(--ink-2);
  border-top: var(--line);
  color: var(--paper);
}
.site-footer__inner { padding: clamp(30px, 4vw, 56px) 0 24px; }

.footer-top {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) 2fr;
  gap: clamp(24px, 3.4vw, 56px);
  align-items: start;
}
.footer-brand {
  display: flex; flex-direction: column; gap: 10px;
  padding: clamp(18px, 2.2vw, 26px);
  background: var(--ink);
  border: var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow-hard);
}
.footer-brand__name { font-size: clamp(20px, 2.4vw, 26px); font-weight: 900; letter-spacing: 0.02em; }
.footer-brand__line { font-size: 14px; letter-spacing: 0.16em; color: var(--score); }
.footer-brand__note { font-size: 14px; line-height: 1.7; color: var(--mist); }
.footer-brand__cta { align-self: flex-start; margin-top: 6px; }

.footer-index {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.footer-col__link {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 16px 18px;
  background: rgba(11, 30, 51, 0.55);
  border: 2px solid rgba(143, 163, 184, 0.28);
  border-radius: 14px;
  color: var(--paper); text-decoration: none;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease),
              transform 0.18s var(--ease);
}
.footer-col__link:hover {
  border-color: var(--signal);
  background: rgba(255, 106, 26, 0.12);
  transform: translateY(-3px);
}
.footer-col__no {
  font-family: var(--font-mono); font-size: 12px; font-weight: 800;
  letter-spacing: 0.14em; color: var(--signal);
}
.footer-col__title { font-size: 16px; font-weight: 700; }
.footer-col__desc { font-size: 12.5px; line-height: 1.6; color: var(--mist); }

.footer-meta {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) 2fr;
  gap: clamp(20px, 3vw, 48px);
  margin-top: clamp(24px, 3.4vw, 48px);
  padding-top: clamp(20px, 2.6vw, 32px);
  border-top: 2px dashed rgba(143, 163, 184, 0.32);
}
.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact__row { display: flex; flex-wrap: wrap; gap: 10px; font-size: 14px; }
.footer-contact__key {
  min-width: 72px; font-size: 12px; letter-spacing: 0.12em; color: var(--mist);
}
.footer-contact__val { color: var(--paper); word-break: break-word; }
.footer-contact__val--mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

.footer-legal { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-legal__list { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-legal__list a {
  font-size: 14px; color: var(--paper); text-decoration: none;
  border-bottom: 1px solid rgba(255, 106, 26, 0.5); padding-bottom: 2px;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.footer-legal__list a:hover { color: var(--signal); border-color: var(--signal); }
.footer-legal__icp, .footer-legal__copy {
  font-size: 12.5px; letter-spacing: 0.04em; color: var(--mist);
}

.footer-base {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px;
  margin-top: clamp(20px, 2.6vw, 34px);
  padding-top: 18px;
  border-top: 2px solid rgba(143, 163, 184, 0.22);
}
.to-top {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 2px solid rgba(143, 163, 184, 0.45);
  border-radius: var(--radius-pill);
  color: var(--paper); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
              color 0.18s var(--ease);
}
.to-top:hover { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }

/* ---------- 12. 显现协议 ---------- */
html.has-js [data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
html.has-js [data-reveal][data-revealed] { opacity: 1; transform: none; }

/* ---------- 13. 动效 ---------- */
@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
@keyframes score-pulse {
  0%, 88%, 100% { transform: scale(1); }
  92% { transform: scale(1.09); }
  96% { transform: scale(1); }
}
@keyframes capsule-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1040px) {
  :root { --header-h: 118px; }
  .nav-toggle { display: inline-flex; }
  .nav-capsule {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    display: none;
    flex-direction: column; align-items: stretch; gap: 10px;
    padding: 14px; border-radius: 22px;
    background: var(--ink-2);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.55);
  }
  .nav-capsule[data-open] { display: flex; animation: capsule-in 0.22s var(--ease); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 4px; overflow: visible; }
  .nav-link { padding: 12px 16px; border-radius: 14px; font-size: 16px; }
  .nav-link[aria-current="page"] { border-radius: 14px; }
  .nav-capsule__cta { width: 100%; }
  .footer-top,
  .footer-meta { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .score-strip__half { display: none; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root { --header-h: 110px; }
  body { font-size: 16px; }
  .shell, .container { width: min(var(--shell), calc(100% - 1.7rem)); }
  .brand { padding: 7px 14px 7px 10px; }
  .brand__line { display: none; }
  .score-strip__next { font-size: 11px; gap: 6px; }
  .score-strip__score { font-size: 16px; }
  .footer-contact__key { min-width: 100%; }
}

/* ---------- 15. 减弱动效 ---------- */
@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;
  }
  html.has-js [data-reveal] { opacity: 1; transform: none; }
}
