/* ==========================================================================
   头头体育CN小站 · 共享样式 /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, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  --night: #0B1B2B;
  --stand: #12293F;
  --lime: #C6FF3D;
  --lime-deep: #8FBF20;
  --alert: #FF7A2F;
  --cyan: #6FE3D2;
  --white: #F2F6FA;
  --muted: #8FA3B8;
  --line: #1E3A52;
  --mask: #06121E;

  --rail-w: 248px;
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --pill: 999px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font-head: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;

  --gap: clamp(16px, 2.4vw, 26px);
  --pad-inline: clamp(20px, 5vw, 56px);
}

/* ---------- 3. 基础与中文排版 ---------- */
html { background: var(--night); }
body {
  min-height: 100vh;
  background: var(--night);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  font-stretch: condensed;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}
h1 { font-size: clamp(38px, 7.2vw, 86px); }
h2 { font-size: clamp(26px, 3.6vw, 46px); }
h3 { font-size: clamp(19px, 2vw, 25px); letter-spacing: -0.01em; }
h4 { font-size: clamp(16px, 1.4vw, 18px); }

::selection { background: var(--lime); color: var(--night); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: #24455F; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--lime-deep); }

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

.skip-link {
  position: absolute;
  left: 14px;
  top: -120px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  border-radius: var(--pill);
  background: var(--lime);
  color: var(--night);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: top 0.22s var(--ease);
}
.skip-link:focus { top: 14px; }

#main-content { display: block; scroll-margin-top: 84px; }

/* ---------- 4. 布局工具 ---------- */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}
.prose { max-width: 68ch; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.25em; }
.prose li { margin-bottom: 0.45em; }
.prose a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--cyan); }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }

.divider { border: 0; border-top: 1px solid var(--line); margin: clamp(28px, 4vw, 48px) 0; }

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

/* ---------- 5. 品牌 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--white);
}
.brand__mark {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--lime), var(--cyan));
  position: relative;
  overflow: hidden;
}
.brand__mark::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(11, 27, 43, 0.55);
}
.brand__text { display: block; min-width: 0; }
.brand__name {
  display: block;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
}
.brand__tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--lime);
  line-height: 1.4;
}
.brand--compact .brand__mark { width: 30px; height: 30px; border-radius: 10px; }
.brand--compact .brand__name { font-size: 15px; }

/* ---------- 6. 滚动进度细线 ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 95;
  pointer-events: none;
  background: rgba(30, 58, 82, 0.55);
}
.progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- 7. 顶部移动栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
  background: rgba(11, 27, 43, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.navtoggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--stand);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.22s var(--ease), color 0.22s var(--ease), background 0.22s var(--ease);
}
.navtoggle:hover { border-color: var(--lime); color: var(--lime); }
.navtoggle__bars { display: grid; gap: 3px; width: 16px; }
.navtoggle__bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
}
.navtoggle[aria-expanded="true"] { border-color: var(--lime); color: var(--lime); }
.navtoggle[aria-expanded="true"] .navtoggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.navtoggle[aria-expanded="true"] .navtoggle__bars i:nth-child(2) { opacity: 0; }
.navtoggle[aria-expanded="true"] .navtoggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 8. 侧边轨道导航 ---------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 70;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 30px 22px 26px;
  background: var(--stand);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rail__brand { padding-bottom: 4px; }
.rail__nav { flex: 1 1 auto; }
.rail__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.rail__label {
  margin: 0 0 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.navlist { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.navlist__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.22s var(--ease), background 0.22s var(--ease), border-color 0.22s var(--ease);
}
.navlist__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #35536F;
  transition: color 0.22s var(--ease);
}
.navlist__link:hover {
  color: var(--white);
  background: rgba(198, 255, 61, 0.08);
  border-color: rgba(198, 255, 61, 0.28);
}
.navlist__link[aria-current="page"] {
  color: var(--night);
  background: var(--lime);
  border-color: var(--lime);
}
.navlist__link[aria-current="page"] .navlist__idx { color: rgba(11, 27, 43, 0.6); }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(6, 18, 30, 0.74);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.scrim.is-active { opacity: 1; visibility: visible; }

/* ---------- 9. 胶囊 / 按钮 / 角标 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(11, 27, 43, 0.6);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.22s var(--ease), color 0.22s var(--ease), background 0.22s var(--ease), transform 0.22s var(--ease);
}
.chip:hover { border-color: var(--lime); color: var(--lime); }
.chip--lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--night);
}
.chip--lime:hover {
  background: var(--lime-deep);
  border-color: var(--lime-deep);
  color: var(--night);
}
.chip--ghost { background: transparent; color: var(--muted); }
.chip--ghost:hover { color: var(--lime); border-color: var(--lime); }
.chip--alert {
  background: rgba(255, 122, 47, 0.16);
  border-color: rgba(255, 122, 47, 0.5);
  color: var(--alert);
}
.chip--alert:hover { border-color: var(--alert); color: var(--alert); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-head);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.btn--lime { background: var(--lime); color: var(--night); }
.btn--lime:hover { background: var(--lime-deep); transform: translateY(-2px); }
.btn--ghost { color: var(--white); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn--alert { background: var(--alert); color: #1A0B02; }
.btn--alert:hover { background: #FF9257; transform: translateY(-2px); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--pill);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.tag--lime { background: rgba(198, 255, 61, 0.14); color: var(--lime); }
.tag--alert { background: rgba(255, 122, 47, 0.18); color: var(--alert); }
.tag--cyan { background: rgba(111, 227, 210, 0.14); color: var(--cyan); }

/* ---------- 10. 通用区块组件 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 28px;
  margin-bottom: clamp(20px, 3vw, 32px);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
}
.lede {
  max-width: 62ch;
  font-size: clamp(16.5px, 1.6vw, 20px);
  line-height: 1.7;
  color: var(--muted);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--stand);
  transition: border-color 0.24s var(--ease), transform 0.24s var(--ease);
}
.card:hover { border-color: var(--lime-deep); transform: translateY(-3px); }
.card--flat { background: rgba(18, 41, 63, 0.55); }
.card--alert { border-color: rgba(255, 122, 47, 0.48); }

.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 100% at 14% 8%, rgba(198, 255, 61, 0.16), transparent 56%),
    repeating-linear-gradient(115deg, rgba(111, 227, 210, 0.10) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, #12293F, #06121E);
}
.media-frame img,
.media-frame svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame__caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  margin: 0;
  padding: 4px 10px;
  border-radius: var(--pill);
  background: rgba(6, 18, 30, 0.72);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--muted);
}
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "／"; color: #33506C; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--lime); }
.breadcrumbs [aria-current="page"] { color: var(--cyan); font-weight: 600; }

.note {
  margin: 0;
  padding: 6px 0 6px 16px;
  border-left: 3px solid var(--lime);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}
.note--alert { border-left-color: var(--alert); }

.scrollx {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.scrollx::-webkit-scrollbar { display: none; }
.scrollx > * { flex: 0 0 auto; scroll-snap-align: start; }

/* ---------- 11. 页脚 ---------- */
.site-footer {
  margin-top: clamp(56px, 9vw, 112px);
  padding: clamp(40px, 6vw, 72px) 0 26px;
  background: linear-gradient(180deg, var(--night) 0%, var(--mask) 100%);
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
  grid-template-columns: 1fr;
}
.footer__brand { display: flex; flex-direction: column; gap: 14px; }
.footer__note {
  max-width: 34ch;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
}
.footer__cols {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.footer__col-title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.footer__list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer__list a {
  color: var(--muted);
  font-size: 14.5px;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer__list a:hover { color: var(--lime); }
.footer__list span {
  color: var(--muted);
  font-size: 14px;
  word-break: break-all;
}

.capsule-strip {
  margin-top: clamp(30px, 4vw, 46px);
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.capsule-strip::-webkit-scrollbar { display: none; }
.capsule-strip__track {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  min-width: 100%;
  padding-inline: var(--pad-inline);
}
.capsule-strip__lead {
  margin-right: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--cyan);
  white-space: nowrap;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 22px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.footer__legal p { margin: 0; }

/* ---------- 12. 进场显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1023px) {
  html.has-nav-open { overflow: hidden; }

  .rail {
    width: min(86vw, 340px);
    padding-top: 78px;
    visibility: hidden;
    transform: translateX(-102%);
    box-shadow: 0 0 0 1px var(--line), 26px 0 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.34s var(--ease), visibility 0.34s var(--ease);
  }
  .rail[data-open="true"] { transform: translateX(0); visibility: visible; }
  .rail__brand { display: none; }

  .navlist__link { font-size: 16.5px; padding: 13px 15px; }
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .topbar { display: none; }
  .scrim { display: none; }
  .progress { left: var(--rail-w); }
  #main-content { scroll-margin-top: 24px; }
}

@media (min-width: 760px) {
  .footer__inner { grid-template-columns: 1fr 1.7fr; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .topbar { padding: 9px 14px; }
  .navtoggle__label { display: none; }
  .brand--compact .brand__name { font-size: 14.5px; }
  .footer__legal { flex-direction: column; align-items: flex-start; }
}

/* ---------- 14. 减弱动效 ---------- */
@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; transform: none; }
  .card:hover, .btn--lime:hover, .btn--alert:hover { transform: none; }
}
