/* ==========================================================================
   城市哨声 · 共享样式表 /assets/site.css
   深夜球场绿底 + 哨声荧光黄锚点 + 粗边硬阴影 Bento 资料格
   ========================================================================== */

/* ---------- 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, ul, ol { margin: 0; }

ul, ol { padding: 0; list-style: none; }

img, svg, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; padding: 0; cursor: pointer; }

table { border-collapse: collapse; width: 100%; }

main { display: block; }

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 色板 */
  --pitch: #0B2A22;
  --pitch-deep: #071A15;
  --chalk: #F4F6F3;
  --whistle: #D8F32A;
  --whistle-soft: #EAF98F;
  --brick: #B4402A;
  --brick-soft: #D96A55;
  --concrete: #C9CFC7;
  --graphite: #111413;
  --index-gray: #7C8B84;

  /* 语义 */
  --bg: var(--pitch);
  --bg-deep: var(--pitch-deep);
  --text: var(--chalk);
  --text-dim: var(--index-gray);
  --accent: var(--whistle);
  --alert: var(--brick);
  --line: 2px solid rgba(201, 207, 199, 0.42);
  --line-strong: 2px solid var(--concrete);
  --border-hard: 2px solid var(--graphite);
  --shadow-hard: 6px 6px 0 var(--graphite);
  --shadow-hard-sm: 4px 4px 0 var(--graphite);

  /* 字体 */
  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 布局 */
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 36em;

  /* 动效 */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur: 240ms;
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--pitch);
  background-image:
    radial-gradient(circle at 6% -8%, rgba(216, 243, 42, 0.09), transparent 42%),
    radial-gradient(circle at 98% 2%, rgba(180, 64, 42, 0.12), transparent 38%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--chalk);
}

h1 { font-size: clamp(34px, 5.6vw, 64px); }
h2 { font-size: clamp(24px, 3.2vw, 38px); }
h3 { font-size: clamp(19px, 2.2vw, 24px); }
h4 { font-size: 17px; line-height: 1.4; }

strong, b { font-weight: 700; }

.mono,
code,
kbd {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* ---------- 4. 可访问性 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 120;
  display: inline-block;
  padding: 10px 18px;
  background: var(--whistle);
  color: var(--graphite);
  font-weight: 700;
  font-size: 14px;
  border: 2px solid var(--graphite);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus { top: 12px; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 5. 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose {
  max-width: var(--measure);
  font-size: 17px;
  line-height: 1.75;
  color: var(--chalk);
}

.prose p + p { margin-top: 1.1em; }
.prose h2 { margin-top: 1.7em; margin-bottom: 0.6em; }
.prose h3 { margin-top: 1.5em; margin-bottom: 0.5em; }
.prose ul, .prose ol { margin-top: 1em; padding-left: 1.2em; }
.prose li { margin-top: 0.4em; }
.prose li::marker { color: var(--whistle); }

.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.grid--bento { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ---------- 6. 基础组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--whistle);
  color: var(--graphite);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  border: 2px solid var(--graphite);
  box-shadow: var(--shadow-hard-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--graphite); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--graphite); }

.btn--ghost {
  background: transparent;
  color: var(--chalk);
  border-color: var(--concrete);
}

.btn--brick {
  background: var(--brick);
  color: var(--chalk);
  border-color: var(--graphite);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--index-gray);
}

.breadcrumb a {
  color: var(--concrete);
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.breadcrumb a:hover { color: var(--whistle); border-bottom-color: var(--whistle); }
.breadcrumb [aria-current="page"] { color: var(--chalk); }
.breadcrumb__sep { color: var(--index-gray); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--whistle);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--whistle);
  flex: none;
}

.card {
  padding: clamp(18px, 2.4vw, 28px);
  background: rgba(244, 246, 243, 0.035);
  border: var(--line-strong);
  box-shadow: var(--shadow-hard);
}

.card--chalk { background: var(--chalk); color: var(--graphite); border-color: var(--graphite); }
.card--whistle { background: var(--whistle); color: var(--graphite); border-color: var(--graphite); }

.card--chalk h2, .card--chalk h3, .card--whistle h2, .card--whistle h3 { color: inherit; }

.card__index {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--index-gray);
  margin-bottom: 10px;
}

.card--chalk .card__index, .card--whistle .card__index { color: rgba(17, 20, 19, 0.6); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  border: 2px solid currentColor;
  color: var(--chalk);
}

.tag--whistle { background: var(--whistle); color: var(--graphite); border-color: var(--graphite); }
.tag--brick { background: var(--brick); color: var(--chalk); border-color: var(--brick); }
.tag--outline { background: transparent; color: var(--concrete); border-color: var(--concrete); }

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--whistle);
}

.divider {
  height: 10px;
  border: 0;
  background-image: repeating-linear-gradient(
    115deg,
    transparent 0 10px,
    rgba(201, 207, 199, 0.5) 10px 12px
  );
}

/* 图片容器基础规则：页面阶段放入 <img> 或内联 SVG 即可 */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--pitch-deep);
  border: var(--line-strong);
  box-shadow: var(--shadow-hard);
}

.media > img,
.media > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(244, 246, 243, 0.22) 0.6px, transparent 0.7px);
  background-size: 3px 3px;
  opacity: 0.35;
  mix-blend-mode: overlay;
}

.media--wide { aspect-ratio: 16 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }

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

.filter-btn {
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1;
  color: var(--chalk);
  background: transparent;
  border: 2px solid var(--concrete);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.filter-btn[aria-pressed="true"] {
  background: var(--whistle);
  color: var(--graphite);
  border-color: var(--graphite);
  box-shadow: 3px 3px 0 var(--graphite);
}

.filter-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--index-gray);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding: 7px 11px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1;
  color: var(--chalk);
  background: transparent;
  border: 2px solid var(--concrete);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.copy-btn[data-state="done"] { color: var(--whistle); border-color: var(--whistle); }

/* 联赛色签 */
.league-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1;
  color: var(--chalk);
  background: rgba(244, 246, 243, 0.04);
  border: 2px solid var(--concrete);
}

.league-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--whistle);
}

.league-tag:nth-child(4n + 2)::before { background: var(--whistle-soft); }
.league-tag:nth-child(4n + 3)::before { background: var(--brick-soft); }
.league-tag:nth-child(4n + 4)::before { background: var(--concrete); }

/* ---------- 7. 站点头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--pitch);
  border-bottom: var(--line-strong);
}

/* 上层：品牌说明条 */
.masthead {
  background: var(--pitch-deep);
  border-bottom: var(--line);
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px clamp(12px, 2.4vw, 28px);
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 12px var(--gutter);
  transition: padding var(--dur) var(--ease);
}

.site-header.is-condensed .masthead__inner { padding-block: 5px; }

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.masthead__pulse {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--whistle);
}

.masthead__pulse svg { width: 24px; height: 24px; }

.masthead__pulse circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: whistleOut 900ms var(--ease) 1 both;
}

@keyframes whistleOut {
  0% { transform: scale(0.45); opacity: 0.15; }
  60% { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.masthead__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--chalk);
}

.masthead__tag {
  flex: none;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--whistle-soft);
  border: 1px solid var(--concrete);
}

.masthead__sub {
  flex: 1 1 260px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  color: var(--concrete);
}

.masthead__utility {
  display: flex;
  flex: none;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.util-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--chalk);
  border-bottom: 1px dotted var(--concrete);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.util-link:hover { color: var(--whistle); border-bottom-color: var(--whistle); }

.util-link--brick { color: var(--brick-soft); border-bottom-color: var(--brick-soft); }

/* 下层：栏目导航 */
.navbar {
  position: relative;
  background: var(--pitch);
}

.navbar__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 28px);
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--gutter);
  min-height: 62px;
}

.navbar__label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--index-gray);
}

.navbar__nav { flex: 1 1 auto; min-width: 0; }

.navbar__list {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(6px, 1.6vw, 24px);
}

.navbar__item { flex: none; }

.navbar__link {
  position: relative;
  display: inline-block;
  padding: 18px 2px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--chalk);
  transition: color var(--dur) var(--ease);
}

.navbar__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  height: 3px;
  background: var(--whistle);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}

.navbar__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 7px;
  height: 7px;
  background: var(--whistle);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.navbar__link:hover { color: var(--whistle); }
.navbar__link:hover::after { transform: scaleX(1); }

.navbar__link[aria-current="page"],
.navbar__link.is-active { color: var(--whistle); }

.navbar__link[aria-current="page"]::after,
.navbar__link[aria-current="page"]::before,
.navbar__link.is-active::after,
.navbar__link.is-active::before { transform: scaleX(1); opacity: 1; }

.navbar__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  color: var(--graphite);
  background: var(--whistle);
  border: 2px solid var(--graphite);
  box-shadow: 3px 3px 0 var(--graphite);
}

.nav-toggle--ghost {
  background: transparent;
  color: var(--chalk);
  border-color: var(--concrete);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 14px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 14px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.nav-toggle__label { display: block; }

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: rgba(244, 246, 243, 0.12);
}

.read-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--whistle);
  transition: width 120ms linear;
}

/* 移动端联赛目录抽屉（桌面隐藏） */
.league-index { display: none; }

.league-index__title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--index-gray);
  margin-bottom: 14px;
}

.league-index__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- 8. 站点页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--pitch-deep);
  border-top: var(--line-strong);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 44px);
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) var(--gutter) 0;
}

.footer__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  color: var(--chalk);
}

.footer__line {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--concrete);
}

.footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-bottom: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--whistle);
  border-bottom: 2px solid var(--whistle);
}

.footer__heading {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--whistle);
}

.footer__list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }

.footer__link {
  font-size: 14.5px;
  color: var(--concrete);
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer__link:hover { color: var(--whistle); border-bottom-color: var(--whistle); }

.footer__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: var(--wrap);
  margin: clamp(28px, 4vw, 44px) auto 0;
  padding: 0 var(--gutter);
}

.footer__contact {
  max-width: var(--wrap);
  margin: clamp(24px, 3vw, 36px) auto 0;
  padding: 20px var(--gutter) 0;
  border-top: 1px solid rgba(201, 207, 199, 0.2);
}

.footer__contact-line {
  font-size: 14px;
  line-height: 1.9;
  color: var(--concrete);
}

.footer__contact-line .mono { color: var(--chalk); }

.footer__contact-line--dim {
  margin-top: 6px;
  font-size: 13px;
  color: var(--index-gray);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 18px var(--gutter) 30px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--index-gray);
}

.footer__ripple {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  color: var(--whistle);
}

.footer__ripple svg { width: 22px; height: 22px; }

/* ---------- 9. 显现动效 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1180px) {
  .masthead__sub { display: none; }
}

@media (max-width: 960px) {
  .navbar__label { display: none; }

  .nav-toggle { display: inline-flex; }

  .navbar__nav,
  .league-index {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    background: var(--pitch-deep);
    border-top: var(--line-strong);
    border-bottom: var(--line-strong);
    padding: 18px var(--gutter) 26px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
  }

  .navbar__nav { display: none; flex-direction: column; }

  .navbar__nav[data-open] { display: flex; }

  .league-index[data-open] { display: block; }

  .navbar__list { flex-direction: column; gap: 0; }

  .navbar__item { width: 100%; border-bottom: 1px solid rgba(201, 207, 199, 0.16); }

  .navbar__link {
    display: block;
    padding: 14px 0;
    font-size: 19px;
  }

  .navbar__link::before { top: 50%; margin-top: -3.5px; left: auto; right: 0; }
  .navbar__link::after { bottom: 8px; }

  .navbar__actions { gap: 10px; }

  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .masthead__inner { gap: 8px 14px; }
  .masthead__utility { width: 100%; margin-left: 0; gap: 18px; }
  .masthead__name { font-size: 16.5px; }
  .navbar__inner { min-height: 56px; }
}

@media (max-width: 560px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__tags { gap: 6px; }
  .league-tag { font-size: 11.5px; padding: 6px 9px; }
  .footer__ripple { margin-left: 0; }
}

/* ---------- 11. 减弱动效 ---------- */
@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;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] { opacity: 1; transform: none; }
}
