/* =========================================================
   头头体育APP — shared site kit (/assets/site.css)
   看台夜色 + 电子记分牌 + 粗野主义纸面
   ========================================================= */

/* ---------- 1. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  background: #0B1E19;
}
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, figure, figcaption, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

/* ---------- 2. TOKENS ---------- */
:root {
  --ink:        #0B1E19;   /* 看台深墨绿 */
  --ink-2:      #101315;   /* 记分牌炭黑 */
  --turf:       #22332D;   /* 雾面灰绿 */
  --turf-2:     #1B2A25;   /* 卡片渐变底 */
  --paper:      #F2EAD9;   /* 编辑部奶油纸 */
  --paper-ink:  #1B1512;   /* 深棕黑 */
  --cyan:       #3FE8CE;   /* 边线荧光青 */
  --orange:     #FF7A3C;   /* 暖橙看台灯 */
  --yellow:     #FFE24D;   /* 高亮比分黄 */
  --muted:      #A8BDB3;   /* 正文雾灰绿 */
  --text:       #D9E6DE;
  --line:       rgba(63, 232, 206, .20);
  --hair:       rgba(255, 255, 255, .08);

  --rail:       78px;
  --wrap:       1240px;
  --gutter:     clamp(16px, 4vw, 40px);
  --radius:     2px;

  --shadow-hard: 5px 5px 0 var(--paper-ink);
  --shadow-soft: 0 14px 30px rgba(0, 0, 0, .38);

  --font-display: "Oswald", "Barlow Condensed", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body:    "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, "Courier New", monospace;
}

/* 夜读偏好：整体压暗、降低对比 */
:root[data-dim] {
  --ink:    #060D0B;
  --ink-2:  #0A0C0D;
  --turf:   #17241F;
  --turf-2: #121C18;
  --paper:  #E3DAC5;
  --text:   #BACCC3;
  --muted:  #8CA296;
  --line:   rgba(63, 232, 206, .14);
}

/* ---------- 3. BASE / 中文排版 ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail);
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 480px at 92% -10%, rgba(63, 232, 206, .07), transparent 62%),
    radial-gradient(880px 420px at -12% 34%, rgba(255, 122, 60, .06), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.05vw, 16.5px);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: .01em;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.22;
  color: var(--paper);
}

.mono, code, kbd, samp, .score { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

::selection { background: var(--cyan); color: var(--paper-ink); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* ---------- 4. SKIP LINK ---------- */
.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  transform: translateY(-220%);
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--paper-ink);
  font-weight: 700;
  font-size: .88rem;
  border: 2px solid var(--paper-ink);
  box-shadow: var(--shadow-hard);
  transition: transform .16s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. HEADER ---------- */
.site-header { position: relative; }

/* 5.1 左侧品牌轨道 */
.brand-rail {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 60;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 18px;
  background: var(--ink-2);
  border-right: 2px solid var(--turf);
}
.brand-rail::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
}
.rail-brand {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: .30em;
  color: var(--paper);
}
.rail-brand span { color: var(--cyan); }
.rail-scale {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .30em;
  color: var(--cyan);
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.rail-tag {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .26em;
  color: var(--muted);
}

/* 5.2 上层刊头 */
.header-masthead {
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.masthead-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 11px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px clamp(10px, 2vw, 26px);
}
.masthead-brand {
  display: inline-flex;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .08em;
  color: var(--paper);
}
.masthead-brand span { color: var(--cyan); }
.masthead-line {
  padding-left: 12px;
  border-left: 3px solid var(--orange);
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.masthead-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--muted);
  border: 1px solid rgba(168, 189, 179, .28);
  background: rgba(255, 255, 255, .02);
}
.chip--hl {
  color: var(--yellow);
  border-color: rgba(255, 226, 77, .40);
  background: rgba(255, 226, 77, .06);
}
.masthead-utility {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.utility-link {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  color: var(--cyan);
  padding: 5px 2px;
  border-bottom: 1px solid rgba(63, 232, 206, .45);
  transition: color .16s ease, border-color .16s ease;
}
.utility-link:hover { color: var(--paper); border-color: var(--paper); }
.utility-btn {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  color: var(--muted);
  padding: 5px 10px;
  border: 1px solid rgba(168, 189, 179, .30);
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.utility-btn:hover { color: var(--cyan); border-color: var(--cyan); }
.utility-btn[aria-pressed="true"] {
  color: var(--paper-ink);
  background: var(--cyan);
  border-color: var(--cyan);
}

/* 5.3 下层导航 */
.header-nav-bar {
  position: sticky;
  top: 0;
  z-index: 45;
  background: var(--ink);
  border-bottom: 3px solid var(--paper-ink);
}
.nav-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-height: 54px;
}
.main-nav { flex: 1 1 auto; min-width: 0; }
.nav-list { display: flex; flex-wrap: wrap; gap: 2px; }
.nav-list a {
  display: block;
  padding: 15px 14px 12px;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .12em;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.nav-list a:hover { color: var(--paper); background: var(--turf); }
.nav-list a[aria-current="page"] {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  background: rgba(63, 232, 206, .06);
}
.nav-cta {
  margin-left: auto;
  align-self: center;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .14em;
  white-space: nowrap;
  color: var(--paper-ink);
  background: var(--orange);
  border: 2px solid var(--paper-ink);
  box-shadow: 3px 3px 0 rgba(27, 21, 18, .8);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.nav-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(27, 21, 18, .8);
  background: var(--yellow);
}

/* 5.4 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .16em;
}
.nav-toggle:hover { color: var(--cyan); border-color: var(--cyan); }
.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}
.nav-toggle-bars i {
  display: block;
  height: 2px;
  background: currentColor;
}
.site-header[data-open] .nav-toggle { color: var(--cyan); border-color: var(--cyan); }
.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); }

/* 5.5 阅读进度条 */
.scroll-meter {
  position: fixed;
  top: 0;
  left: var(--rail);
  right: 0;
  height: 3px;
  z-index: 90;
  pointer-events: none;
  background: transparent;
}
.scroll-meter span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
}

/* ---------- 6. FOOTER ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--ink-2);
  border-top: 1px solid var(--line);
}
.footer-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(34px, 5vw, 58px) var(--gutter) 22px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1.1fr .95fr 1.4fr;
  gap: clamp(22px, 3vw, 40px);
  align-items: start;
}
.footer-col { min-width: 0; }
.footer-h {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--cyan);
  padding-bottom: 9px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: .06em;
  color: var(--paper);
  margin-bottom: 10px;
}
.footer-logo span { color: var(--cyan); }
.footer-desc {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 34em;
}
.footer-icp {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--yellow);
}
.footer-links li + li { margin-top: 9px; }
.footer-links a {
  font-size: .88rem;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.footer-links a:hover { color: var(--paper); border-bottom-color: var(--orange); }
.footer-contact li {
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.6;
}
.footer-contact li:first-child,
.footer-contact li:nth-child(2) {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--text);
}
.footer-contact li + li { margin-top: 9px; }
.footer-col--legacy {
  background: var(--turf);
  border-left: 3px solid var(--orange);
  padding: 18px;
  box-shadow: var(--shadow-hard);
}
.legacy-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .1em;
  color: var(--paper-ink);
  background: var(--yellow);
  border: 2px solid var(--paper-ink);
  box-shadow: 4px 4px 0 rgba(27, 21, 18, .9);
  transition: transform .16s ease, box-shadow .16s ease;
}
.legacy-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(27, 21, 18, .9);
}
.footer-bottom {
  margin-top: clamp(28px, 4vw, 46px);
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--muted);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-legal a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.footer-legal a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ---------- 7. LAYOUT PRIMITIVES ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(34px, 5vw, 72px); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: clamp(18px, 2.6vw, 30px);
  border-bottom: 2px solid var(--turf);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .24em;
  color: var(--orange);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--orange);
}
.page-head { padding-block: clamp(26px, 4vw, 52px) clamp(14px, 2vw, 24px); }
.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5.6vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: .01em;
  color: var(--paper);
  margin-top: 10px;
}
.lede {
  margin-top: 14px;
  max-width: 40em;
  font-size: clamp(.95rem, 1.4vw, 1.06rem);
  color: var(--muted);
}

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--aside { grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); align-items: start; }

/* ---------- 8. COMPONENTS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--paper-ink);
  background: var(--orange);
  border: 2px solid var(--paper-ink);
  box-shadow: 4px 4px 0 rgba(27, 21, 18, .85);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(27, 21, 18, .85);
  background: var(--yellow);
}
.btn--ghost {
  color: var(--cyan);
  background: transparent;
  border-color: var(--cyan);
  box-shadow: 4px 4px 0 rgba(63, 232, 206, .28);
}
.btn--ghost:hover { background: rgba(63, 232, 206, .12); color: var(--cyan); }
.btn--paper {
  color: var(--paper-ink);
  background: var(--paper);
  border-color: var(--paper-ink);
}
.btn--paper:hover { background: var(--yellow); }

.card {
  position: relative;
  padding: clamp(16px, 2vw, 22px);
  background: linear-gradient(180deg, var(--turf), var(--turf-2));
  border: 1px solid var(--line);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan), var(--shadow-soft);
}

.paper-panel {
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--paper);
  color: var(--paper-ink);
  border: 3px solid var(--paper-ink);
  box-shadow: var(--shadow-hard);
}
.paper-panel h2,
.paper-panel h3 { color: var(--paper-ink); }
.paper-panel a { color: var(--paper-ink); border-bottom: 1px solid rgba(27, 21, 18, .35); }
.paper-panel a:hover { border-bottom-color: var(--paper-ink); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  color: var(--cyan);
  background: rgba(63, 232, 206, .08);
  border: 1px solid var(--line);
}
.tag--orange {
  color: var(--orange);
  border-color: rgba(255, 122, 60, .38);
  background: rgba(255, 122, 60, .10);
}
.tag--score {
  color: var(--yellow);
  border-color: rgba(255, 226, 77, .38);
  background: rgba(255, 226, 77, .08);
}
.score {
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--yellow);
}

.breadcrumb { padding-block: 16px 0; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--muted);
}
.breadcrumb li { display: flex; align-items: center; gap: 10px; }
.breadcrumb li:not(:first-child)::before { content: "/"; color: var(--turf); }
.breadcrumb a { transition: color .16s ease; }
.breadcrumb a:hover { color: var(--cyan); }

.prose { max-width: 62ch; }
.prose p { margin-bottom: 1.05em; }
.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  color: var(--paper);
  margin: 1.7em 0 .6em;
}
.prose h3 { font-size: 1.08rem; color: var(--cyan); margin: 1.4em 0 .5em; }
.prose a { color: var(--cyan); border-bottom: 1px solid rgba(63, 232, 206, .42); }
.prose a:hover { border-bottom-color: var(--cyan); }
.prose ul { margin-bottom: 1.05em; }
.prose ul li { position: relative; padding-left: 1.25em; margin-bottom: .45em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 8px; height: 8px;
  background: var(--orange);
}

/* ---------- 9. IMAGE CONTAINERS (占位规则) ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--turf);
  border: 2px solid var(--paper-ink);
}
.media-frame > img,
.media-frame > picture > img,
.media-frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(11, 30, 25, .18) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 40%, transparent 42%, rgba(11, 30, 25, .5) 100%);
  mix-blend-mode: multiply;
}
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--thumb { aspect-ratio: 3 / 2; }

/* ---------- 10. 断点 ---------- */
@media (max-width: 1023px) {
  body { padding-left: 0; }
  .brand-rail { display: none; }
  .scroll-meter { left: 0; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--aside { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1024px) {
  .masthead-brand { display: none; }
}
@media (max-width: 899px) {
  .nav-inner {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-block: 10px;
  }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    flex: 1 1 100%;
    order: 5;
    border-top: 1px solid var(--line);
    margin-top: 4px;
  }
  .site-header[data-open] .main-nav { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a {
    padding: 14px 4px 14px 12px;
    border-bottom: 1px solid var(--hair);
    border-left: 3px solid transparent;
  }
  .nav-list a[aria-current="page"] {
    border-left-color: var(--cyan);
    border-bottom-color: var(--hair);
    background: rgba(63, 232, 206, .06);
  }
  .nav-cta { margin-left: auto; }
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .masthead-line { width: 100%; order: 3; white-space: normal; }
  .masthead-meta { order: 4; margin-right: 0; }
  .masthead-utility { order: 2; }
  .footer-bottom { justify-content: flex-start; }
}

/* ---------- 11. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .card:hover, .card:focus-within { transform: none; }
  .btn:hover, .nav-cta:hover, .legacy-link:hover { transform: none; }
}
