/* =========================================================
   谈球吧看台 — 共享站点样式 /assets/site.css
   结构：重置 · 变量 · 排版 · 布局骨架 · 头部 · 页脚 · 组件 · 响应式 · 动效降级
   ========================================================= */

/* ---------- 01 重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5,
p, figure, blockquote, dl, dd,
ul, ol { margin: 0; }

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

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

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

a { color: inherit; }

:where([id]) { scroll-margin-top: clamp(96px, 16vh, 148px); }

/* ---------- 02 设计变量 ---------- */
:root {
  --ink: #071C17;
  --ink-2: #0E2A22;
  --turf: #1F4A36;
  --cement: #C9CEC7;
  --mist: #8A938C;
  --paper: #F4F6F0;
  --neon: #B6FF3B;
  --ref: #FFD24A;
  --injury: #FF5A4E;
  --noise: #121614;

  --shell-width: 1220px;
  --gutter: clamp(16px, 4vw, 48px);
  --line: rgba(201, 206, 199, 0.22);
  --line-soft: rgba(201, 206, 199, 0.12);
  --radius-organic: 26px 6px 26px 6px;
  --radius-chip: 2px 12px 2px 12px;

  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Roboto Mono", "IBM Plex Mono", Menlo, Consolas, monospace;
  --font-display: "Barlow Condensed", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

/* ---------- 03 基础排版 ---------- */
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(44px, 8vw, 112px); }
h2 { font-size: clamp(30px, 4.4vw, 60px); }
h3 { font-size: clamp(21px, 2.4vw, 30px); line-height: 1.2; }

p { line-height: 1.75; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--neon);
  color: #06210F;
}

/* ---------- 04 布局骨架 ---------- */
.shell {
  width: min(var(--shell-width), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.band {
  position: relative;
  padding-block: clamp(40px, 7vw, 96px);
  background: var(--ink);
  color: var(--paper);
}

.band--ink { background: var(--ink); }
.band--seat { background: var(--ink-2); }
.band--turf { background: var(--turf); }

.band--paper {
  background: var(--paper);
  color: var(--ink);
}

.band--cement {
  background: var(--cement);
  color: var(--ink);
}

.band--paper .eyebrow,
.band--cement .eyebrow { color: #1C5A3B; }

.band--noise::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(244, 246, 240, 0.06) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.6;
}

.grid {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
}

.grid--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.grid--8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

.prose {
  max-width: 34em;
}

.prose p + p { margin-top: 1.1em; }

.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;
}

/* ---------- 05 头部：双层看台 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--paper);
  background: linear-gradient(180deg, rgba(7, 28, 23, 0.985), rgba(7, 28, 23, 0.93));
  border-bottom: 1px solid rgba(182, 255, 59, 0.18);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.skip-link {
  position: absolute;
  left: 14px;
  top: -80px;
  z-index: 120;
  display: inline-block;
  padding: 0.62em 1.1em;
  background: var(--neon);
  color: #06210F;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-chip);
  transition: top 0.18s ease;
}

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

/* 上层：品牌灯箱带 */
.header-strip {
  background: rgba(14, 42, 34, 0.92);
  border-bottom: 1px solid var(--line-soft);
}

.header-strip__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(10px, 2.4vw, 30px);
  min-height: 46px;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  flex: none;
}

.brand__glyph {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
  border: 2px solid var(--neon);
  border-radius: 4px 12px 4px 12px;
}

.brand__glyph::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--neon);
  border-radius: 2px 8px 2px 8px;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand__tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--mist);
  padding-left: 10px;
  border-left: 1px solid var(--line);
  line-height: 1.4;
}

.brand-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: #9FB3A6;
}

.brand-line__mark {
  display: block;
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 0 3px rgba(182, 255, 59, 0.14);
}

.header-utility {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--mist);
  white-space: nowrap;
}

/* 下层：席位牌栏目条 */
.header-bar__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 26px);
  min-height: 64px;
  padding-block: 8px;
}

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

.site-nav__list {
  display: flex;
  align-items: stretch;
  gap: clamp(2px, 1.2vw, 18px);
  margin: 0;
  padding: 0;
}

.site-nav__item { flex: none; }

.site-nav__item > a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--cement);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.site-nav__item > a:hover {
  color: var(--paper);
  border-bottom-color: rgba(182, 255, 59, 0.55);
}

.site-nav__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--mist);
  transition: color 0.18s ease;
}

.site-nav__label { white-space: nowrap; }

.site-nav__item > a[aria-current="page"] {
  color: var(--neon);
  border-bottom-color: var(--neon);
  background: linear-gradient(180deg, transparent, rgba(182, 255, 59, 0.1));
}

.site-nav__item > a[aria-current="page"] .site-nav__num { color: var(--neon); }

.header-bar__cta { flex: none; }

.nav-hint {
  display: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  color: var(--mist);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0.5em 0.9em;
  border: 1px solid var(--line);
  border-radius: var(--radius-chip);
  color: var(--paper);
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.nav-toggle:hover { border-color: rgba(182, 255, 59, 0.55); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--neon);
  border-radius: 2px;
  transition: background 0.2s ease;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--neon);
  border-radius: 2px;
  transition: transform 0.2s ease, top 0.2s ease;
}

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

.site-header[data-open] .nav-toggle__bars { background: transparent; }
.site-header[data-open] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- 06 页脚：台阶剖面 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 104px);
  background: var(--noise);
  color: var(--cement);
  border-top: 1px solid rgba(182, 255, 59, 0.2);
  overflow: hidden;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(244, 246, 240, 0.05) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.55;
}

.site-footer > * { position: relative; z-index: 1; }

.footer-tiers {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 34px;
}

.footer-tiers__step {
  flex: 1 1 0;
  height: 100%;
  background: linear-gradient(180deg, rgba(31, 74, 54, 0.85), rgba(18, 22, 20, 0.05));
  border-radius: 10px 10px 0 0;
}

.footer-tiers__step:nth-child(2n) { height: 68%; }
.footer-tiers__step:nth-child(3n) { height: 44%; }
.footer-tiers__step:nth-child(5n) { height: 82%; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr) minmax(0, 0.85fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(32px, 5vw, 64px);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--paper);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--neon);
  display: inline-block;
}

.footer-brand__note {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--mist);
}

.footer-brand__cta { margin-top: 22px; }

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--cement);
  padding-left: 12px;
  position: relative;
  margin-bottom: 14px;
}

.footer-col__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 2px;
  background: var(--neon);
}

.footer-links {
  display: grid;
  gap: 2px;
}

.footer-links a {
  display: inline-block;
  padding: 5px 0;
  font-size: 14.5px;
  color: #B9C2BA;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-links a:hover {
  color: var(--neon);
  border-bottom-color: rgba(182, 255, 59, 0.5);
}

.footer-lines {
  display: grid;
  gap: 12px;
}

.footer-lines li { display: grid; gap: 2px; }

.footer-lines__k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--mist);
}

.footer-lines__val {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  line-height: 1.65;
  color: #CBD3CA;
  overflow-wrap: anywhere;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px clamp(14px, 3vw, 40px);
  padding-block: 18px 26px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--mist);
}

.footer-legal { font-family: var(--font-mono); letter-spacing: 0.02em; }
.footer-meta { font-family: var(--font-mono); letter-spacing: 0.02em; }

.footer-quick {
  margin-left: auto;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.footer-quick a {
  color: #AEB8AF;
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-quick a:hover { color: var(--neon); }

/* ---------- 07 通用组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.figure-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mist);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.72em 1.35em;
  border: 1px solid transparent;
  border-radius: 4px 18px 4px 18px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn--sm { font-size: 13.5px; padding: 0.55em 1em; }

.btn--primary {
  background: var(--neon);
  color: #06210F;
}

.btn--primary:hover {
  background: #CBFF6C;
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--neon);
  border-color: rgba(182, 255, 59, 0.45);
}

.btn--ghost:hover {
  background: rgba(182, 255, 59, 0.1);
  border-color: var(--neon);
  transform: translateY(-2px);
}

.btn--quiet {
  background: rgba(201, 206, 199, 0.12);
  color: var(--paper);
  border-color: var(--line);
}

.btn--quiet:hover {
  background: rgba(201, 206, 199, 0.2);
  transform: translateY(-2px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3em 0.7em;
  border: 1px solid var(--line);
  border-radius: var(--radius-chip);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.tag--out {
  color: var(--injury);
  border-color: rgba(255, 90, 78, 0.5);
  background: rgba(255, 90, 78, 0.1);
}

.tag--doubt {
  color: var(--ref);
  border-color: rgba(255, 210, 74, 0.5);
  background: rgba(255, 210, 74, 0.1);
}

.tag--fit {
  color: var(--neon);
  border-color: rgba(182, 255, 59, 0.45);
  background: rgba(182, 255, 59, 0.1);
}

.tag--neutral {
  color: var(--mist);
  border-color: var(--line);
  background: rgba(138, 147, 140, 0.08);
}

.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  color: rgba(138, 147, 140, 0.7);
}

.breadcrumbs__item a {
  color: var(--cement);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.breadcrumbs__item a:hover {
  color: var(--neon);
  border-bottom-color: rgba(182, 255, 59, 0.5);
}

.toc {
  display: grid;
  gap: 2px;
}

.toc__link {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  padding: 0.45em 0 0.45em 0.85em;
  border-left: 2px solid var(--line);
  font-size: 14px;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.toc__link:hover {
  color: var(--paper);
  border-left-color: rgba(182, 255, 59, 0.6);
}

.toc__link[aria-current] {
  color: var(--neon);
  border-left-color: var(--neon);
}

.toc__num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--mist);
}

.toc__link[aria-current] .toc__num { color: var(--neon); }

/* 图片容器基础 */
.media-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-organic);
  background:
    linear-gradient(150deg, rgba(31, 74, 54, 0.8), rgba(7, 28, 23, 0.95) 62%),
    var(--ink-2);
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }

.media-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-frame__cap {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 0.25em 0.65em;
  border-radius: var(--radius-chip);
  background: rgba(7, 28, 23, 0.75);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ---------- 08 脚本注入件 ---------- */
.scroll-meter {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 100;
  background: rgba(7, 28, 23, 0.55);
  pointer-events: none;
}

.scroll-meter__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--neon), var(--ref));
  transition: width 0.08s linear;
}

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.7em 1.05em;
  border: 1px solid rgba(182, 255, 59, 0.42);
  border-radius: 4px 16px 4px 16px;
  background: rgba(14, 42, 34, 0.95);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.to-top[data-visible="true"] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover { background: rgba(31, 74, 54, 0.95); }

/* 滚动显现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ---------- 09 响应式：平板 ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
  .footer-col--contact { grid-column: 1 / -1; }
  .footer-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .grid--7-5,
  .grid--8-4,
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 10 响应式：移动端头部 ---------- */
@media (max-width: 899px) {
  .site-header { position: sticky; }

  .header-strip__inner { min-height: 42px; padding-block: 7px; }

  .header-utility { display: none; }

  .header-bar__inner { min-height: 56px; }

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

  .header-bar__cta {
    order: 2;
    margin-left: auto;
  }

  .site-nav {
    order: 3;
    flex: 0 0 100%;
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.3s ease, visibility 0.3s ease;
  }

  .site-nav > .site-nav__list {
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding-block: 4px 14px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .site-header[data-open] .site-nav {
    grid-template-rows: 1fr;
    visibility: visible;
  }

  .site-nav__item { scroll-snap-align: start; }

  .site-nav__item > a {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-chip);
    background: rgba(201, 206, 199, 0.06);
  }

  .site-nav__item > a:hover { border-color: rgba(182, 255, 59, 0.5); }

  .site-nav__item > a[aria-current="page"] {
    border-color: var(--neon);
    background: rgba(182, 255, 59, 0.12);
  }

  .nav-hint {
    display: block;
    order: 4;
    flex: 0 0 100%;
    padding-bottom: 12px;
  }
}

/* ---------- 11 响应式：手机 ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }

  .brand__tag { display: none; }

  .brand-line { font-size: 10.5px; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }

  .footer-lines { grid-template-columns: minmax(0, 1fr); }

  .footer-base { flex-direction: column; align-items: flex-start; gap: 8px; }

  .footer-quick { margin-left: 0; }

  .to-top { font-size: 11px; padding: 0.6em 0.9em; }
}

/* ---------- 12 动效降级 ---------- */
@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;
  }

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

  .to-top { transform: none; }
}
