/* ==========================================================================
   球盟会QMH 赛场 · 共享样式表 /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; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-950: #0A1411;
  --pitch-900: #10201B;
  --pitch-700: #17332B;
  --line-300: #2C4C42;
  --lime-400: #C6F24E;
  --lime-200: #E4FBB4;
  --amber-500: #E3A03A;
  --indigo-600: #5749A8;
  --wine-700: #6B2338;
  --paper-050: #F1F5EC;
  --slate-400: #93A69E;

  --font-display: "QMH Narrow", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-editorial: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, monospace;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  --maxw: 1280px;
  --gutter: clamp(16px, 3vw, 40px);
  --hair: 1px solid var(--line-300);
}

/* ---------- 3. 中文排版与页面底 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-950);
  background-image:
    repeating-linear-gradient(to right, rgba(44, 76, 66, 0.20) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(to bottom, rgba(44, 76, 66, 0.14) 0 1px, transparent 1px 88px);
  color: var(--paper-050);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(34px, 6vw, 68px); line-height: 0.95; }
h2 { font-size: clamp(24px, 3.4vw, 38px); }
h3 { font-size: clamp(18px, 2.2vw, 24px); line-height: 1.25; }

p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--lime-400);
  outline-offset: 2px;
}

/* ---------- 4. 容器与布局原语 ---------- */
.qh-shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.qh-section {
  padding-block: clamp(40px, 6vw, 80px);
  border-top: var(--hair);
}
.qh-section:first-of-type { border-top: 0; }

.qh-prose { max-width: 68ch; }
.qh-prose p + p { margin-top: 0.9em; }

.qh-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--slate-400);
}

.qh-rule {
  position: relative;
  height: 1px;
  background: var(--line-300);
  margin-block: clamp(18px, 3vw, 34px);
}
.qh-rule::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  width: 64px;
  height: 5px;
  background: var(--amber-500);
}

/* ---------- 5. 面板 / 说明牌 / 标签 ---------- */
.qh-panel {
  position: relative;
  background: var(--pitch-900);
  border: var(--hair);
  border-radius: 0;
  padding: clamp(18px, 2.6vw, 34px);
}
.qh-panel--stack {
  box-shadow:
    10px 10px 0 -1px var(--ink-950),
    11px 11px 0 0 var(--line-300);
}

.qh-plate {
  background: var(--pitch-700);
  border-left: 2px solid var(--amber-500);
  padding: 14px 18px;
  font-family: var(--font-editorial);
  font-weight: 500;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--paper-050);
}

.qh-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: var(--hair);
  border-left: 2px solid var(--lime-400);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--lime-400);
}

.qh-tag {
  display: inline-block;
  padding: 2px 7px;
  border: var(--hair);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--amber-500);
}

/* ---------- 6. 按钮 ---------- */
.qh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--lime-400);
  border-radius: 0;
  background: transparent;
  color: var(--lime-200);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.qh-btn:hover { background: var(--pitch-700); color: var(--lime-200); }
.qh-btn--solid {
  background: var(--lime-400);
  border-color: var(--lime-400);
  color: var(--ink-950);
}
.qh-btn--solid:hover { background: var(--lime-200); color: var(--ink-950); }

/* ---------- 7. 网格与卡片 ---------- */
.qh-grid {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
}
.qh-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qh-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qh-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.qh-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(16px, 2vw, 22px);
  background: var(--pitch-900);
  border: var(--hair);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.qh-card:hover { border-color: var(--lime-400); background: var(--pitch-700); }

/* ---------- 8. 图片容器（页面阶段放置占位图） ---------- */
.qh-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: var(--hair);
  background-color: var(--pitch-700);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(44, 76, 66, 0.9) 0 1px,
    transparent 1px 12px
  );
}
.qh-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qh-media--wide { aspect-ratio: 21 / 9; }
.qh-media--portrait { aspect-ratio: 3 / 4; }
.qh-media--square { aspect-ratio: 1 / 1; }

.qh-media__caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate-400);
}

/* ---------- 9. 面包屑 ---------- */
.qh-breadcrumb { margin-bottom: clamp(14px, 2vw, 22px); }
.qh-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--slate-400);
}
.qh-breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line-300);
}
.qh-breadcrumb a:hover { color: var(--lime-200); }
.qh-breadcrumb [aria-current="page"] { color: var(--lime-400); }

/* ---------- 10. 筛选 / 联赛选择片 ---------- */
.qh-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--pitch-900);
  border: var(--hair);
}
.qh-filter {
  padding: 5px 12px;
  border: var(--hair);
  background: transparent;
  color: var(--slate-400);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}
.qh-filter:hover { border-color: var(--lime-400); color: var(--lime-200); }
.qh-filter[aria-pressed="true"] {
  border-color: var(--lime-400);
  background: var(--pitch-700);
  color: var(--lime-400);
  font-weight: 700;
}

.qh-chip {
  padding: 4px 10px;
  border: var(--hair);
  background: transparent;
  color: var(--slate-400);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}
.qh-chip:hover { border-color: var(--lime-400); color: var(--lime-200); }
.qh-chip[aria-pressed="true"] {
  background: var(--lime-400);
  border-color: var(--lime-400);
  color: var(--ink-950);
  font-weight: 700;
}

/* ---------- 11. 头部：双层导航 ---------- */
.qh-skip {
  position: absolute;
  left: var(--gutter);
  top: -72px;
  z-index: 120;
  padding: 8px 14px;
  background: var(--lime-400);
  color: var(--ink-950);
  font-size: 13px;
  font-weight: 700;
  transition: top 0.18s ease;
}
.qh-skip:focus { top: 8px; }

.qh-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink-950);
  border-bottom: var(--hair);
}

.qh-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lime-400), var(--amber-500));
  z-index: 5;
}

/* 上层：品牌说明层 */
.qh-header__brand-layer {
  background: rgba(10, 20, 17, 0.94);
  border-bottom: var(--hair);
}
.qh-brandbar {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  padding-block: 12px;
  transition: padding 0.18s ease;
}

.qh-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.qh-brand__mark {
  display: inline-block;
  padding: 5px 7px;
  border: 1px solid var(--lime-400);
  color: var(--lime-400);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.qh-brand__text { display: flex; flex-direction: column; min-width: 0; }
.qh-brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.qh-brand__line {
  font-size: 12px;
  line-height: 1.5;
  color: var(--slate-400);
  letter-spacing: 0.03em;
}

.qh-brandbar__note {
  font-family: var(--font-editorial);
  font-size: 14px;
  color: var(--slate-400);
  border-left: 1px solid var(--line-300);
  padding-left: 14px;
}

.qh-utility {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.qh-weekstate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--slate-400);
}
.qh-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--lime-400);
  box-shadow: 0 0 0 3px rgba(198, 242, 78, 0.16);
}
.qh-utility__link {
  font-size: 13px;
  color: var(--lime-200);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.qh-utility__link:hover { border-bottom-color: var(--lime-400); color: var(--lime-400); }
.qh-board-btn {
  padding: 7px 14px;
  border: 1px solid var(--lime-400);
  background: rgba(23, 51, 43, 0.9);
  color: var(--lime-200);
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.qh-board-btn:hover { background: var(--lime-400); color: var(--ink-950); }

/* 滚动后上层收起为窄条 */
header[data-condensed] .qh-brandbar { padding-block: 6px; }
header[data-condensed] .qh-brandbar__note,
header[data-condensed] .qh-weekstate { display: none; }
header[data-condensed] .qh-brand__line { font-size: 11px; }

/* 下层：栏目层 */
.qh-header__nav-layer {
  background: var(--pitch-900);
  border-top: var(--hair);
}
.qh-navbar {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  min-height: 56px;
}

.qh-navtoggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: var(--hair);
  color: var(--lime-200);
  font-size: 13px;
  font-weight: 700;
}
.qh-navtoggle__bars {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 2px;
  background: var(--lime-400);
}
.qh-navtoggle__bars::before,
.qh-navtoggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--lime-400);
  transition: transform 0.18s ease;
}
.qh-navtoggle__bars::before { top: -5px; }
.qh-navtoggle__bars::after { top: 5px; }
header[data-open] .qh-navtoggle__bars { background: transparent; }
header[data-open] .qh-navtoggle__bars::before { transform: translateY(5px) rotate(45deg); }
header[data-open] .qh-navtoggle__bars::after { transform: translateY(-5px) rotate(-45deg); }
.qh-navtoggle__text { letter-spacing: 0.06em; }

.qh-nav { display: flex; align-items: center; }
.qh-nav__list { display: flex; align-items: center; gap: 2px; }
.qh-nav__link {
  position: relative;
  display: inline-block;
  padding: 14px;
  color: var(--slate-400);
  font-size: 15px;
  transition: color 0.18s ease, background-color 0.18s ease;
}
.qh-nav__link:hover { color: var(--lime-200); background: var(--pitch-700); }
.qh-nav__link[aria-current="page"] {
  color: var(--lime-400);
  font-weight: 700;
}
.qh-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 2px;
  background: var(--lime-400);
}

.qh-leagues {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.qh-leagues__label {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--slate-400);
  margin-right: 2px;
}
.qh-leagues__hint {
  flex-basis: 100%;
  min-height: 0;
  font-size: 12px;
  color: var(--amber-500);
}

/* 悬浮战术板抽屉 */
.qh-drawer {
  position: absolute;
  top: calc(100% - 1px);
  right: var(--gutter);
  z-index: 70;
  width: min(560px, calc(100% - 2 * var(--gutter)));
  padding: clamp(16px, 2vw, 24px);
  background: var(--pitch-700);
  border: 1px solid var(--lime-400);
  box-shadow:
    10px 10px 0 -1px var(--ink-950),
    11px 11px 0 0 var(--line-300);
}
.qh-drawer__head { display: flex; flex-direction: column; gap: 8px; }
.qh-drawer__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.qh-drawer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.qh-step {
  padding: 10px 12px;
  background: var(--pitch-900);
  border-left: 2px solid var(--lime-400);
}
.qh-step__index {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--amber-500);
}
.qh-step__title {
  font-size: 15px;
  font-weight: 700;
  margin-top: 2px;
}
.qh-step__text {
  font-size: 13px;
  line-height: 1.65;
  color: var(--slate-400);
  margin-top: 4px;
}
.qh-drawer__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- 12. 页脚 ---------- */
.qh-footer {
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--pitch-900);
  border-top: var(--hair);
}
.qh-footer::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--indigo-600),
    var(--wine-700) 42%,
    var(--amber-500) 72%,
    var(--lime-400)
  );
}

.qh-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(34px, 5vw, 64px);
}

.qh-footer__brand { display: flex; flex-direction: column; gap: 10px; }
.qh-footer__wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.qh-footer__tag {
  font-family: var(--font-editorial);
  font-size: 14.5px;
  color: var(--slate-400);
}
.qh-footer__closing {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--line-300);
  filter: brightness(1.6);
}

.qh-footer__col { display: flex; flex-direction: column; gap: 10px; }
.qh-footer__title {
  padding-left: 8px;
  border-left: 2px solid var(--lime-400);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--lime-400);
  line-height: 1.4;
}
.qh-footer__links { display: flex; flex-direction: column; }
.qh-footer__links li { padding-block: 3px; }
.qh-footer__links a {
  font-size: 14px;
  color: var(--slate-400);
  transition: color 0.18s ease;
}
.qh-footer__links a:hover { color: var(--lime-200); }

.qh-contact {
  display: grid;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--slate-400);
}
.qh-contact li { display: grid; gap: 2px; }
.qh-contact__key {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--lime-400);
}

.qh-footer__note {
  margin-top: 12px;
  padding-left: 10px;
  border-left: 1px solid var(--line-300);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--slate-400);
}

.qh-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px;
  border-top: var(--hair);
  font-size: 12.5px;
  color: var(--slate-400);
}
.qh-icp { font-family: var(--font-mono); letter-spacing: 0.02em; }
.qh-footer__meta a:hover { color: var(--lime-200); }
.qh-totop {
  padding: 6px 14px;
  border: var(--hair);
  color: var(--slate-400);
  font-size: 12.5px;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.qh-totop:hover { border-color: var(--lime-400); color: var(--lime-400); }

/* ---------- 13. 显现动效协议 ---------- */
.qh-js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.qh-js [data-reveal][data-shown] {
  opacity: 1;
  transform: none;
}

/* ---------- 14. 平板 ---------- */
@media (max-width: 1024px) {
  .qh-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qh-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qh-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qh-nav__link { font-size: 14px; padding: 14px 10px; }
  .qh-nav__link[aria-current="page"]::after { left: 10px; right: 10px; }
}

/* ---------- 15. 移动 ---------- */
@media (max-width: 960px) {
  .qh-brandbar { flex-wrap: wrap; row-gap: 10px; }
  .qh-brandbar__note { display: none; }
  .qh-utility { width: 100%; justify-content: space-between; margin-left: 0; }

  .qh-navbar { flex-wrap: wrap; row-gap: 10px; padding-block: 8px; }
  .qh-navtoggle { display: inline-flex; }
  .qh-nav {
    display: none;
    flex-basis: 100%;
    width: 100%;
    border-top: var(--hair);
    margin-top: 4px;
  }
  header[data-open] .qh-nav { display: block; }
  .qh-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .qh-nav__link {
    display: block;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(44, 76, 66, 0.6);
  }
  .qh-nav__link[aria-current="page"]::after {
    left: auto;
    right: auto;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    height: auto;
  }

  .qh-leagues { flex-basis: 100%; margin-left: 0; }
  .qh-drawer { right: var(--gutter); left: var(--gutter); width: auto; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .qh-grid--2, .qh-grid--3, .qh-grid--4 { grid-template-columns: minmax(0, 1fr); }
  .qh-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .qh-drawer__grid { grid-template-columns: minmax(0, 1fr); }
  .qh-footer__base { justify-content: flex-start; }
  .qh-panel--stack,
  .qh-drawer {
    box-shadow: 6px 6px 0 -1px var(--ink-950), 7px 7px 0 0 var(--line-300);
  }
}

/* ---------- 16. 降低动效偏好 ---------- */
@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;
  }
  .qh-js [data-reveal] { opacity: 1; transform: none; }
}
