/* ==========================================================================
   球盟会官网 — /assets/site.css
   近单色 · 框线 · 哨牌语义
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

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

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

img,
svg,
picture {
  max-width: 100%;
}

img { border: 0; }

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

a { color: inherit; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #101613;
  --graphite: #2A332E;
  --slate: #5F6B64;
  --mist: #C9D0CB;
  --paper: #F4F6F4;
  --paper-alt: #E7ECE8;
  --pitch: #1E7A4C;
  --pitch-deep: #145436;
  --pitch-tint: #D8EBDF;
  --card-red: #C8342B;
  --card-yellow: #E8B21C;

  --max: 1280px;
  --gutter: 24px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 200ms;

  --font-display: "Archivo Narrow", "Barlow Condensed", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, Consolas, monospace;

  --radius-pill: 999px;
}

/* ---------- 3. Base / 中文排版 ---------- */
body {
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 { font-size: clamp(40px, 5vw, 64px); }
h2 { font-size: clamp(28px, 3vw, 40px); }
h3 { font-size: clamp(20px, 2vw, 24px); line-height: 1.3; }

strong, b { font-weight: 600; color: var(--ink); }

small { font-size: 12px; line-height: 1.4; }

::selection {
  background: var(--pitch-tint);
  color: var(--pitch-deep);
}

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

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 200;
  display: inline-block;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  transition: top 180ms var(--ease);
}

.skip-link:focus {
  top: 16px;
  color: var(--paper);
}

/* ---------- 5. Header 悬浮胶囊 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 12px 0 18px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 68%, rgba(244, 246, 244, 0) 100%);
}

.header-meter {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: rgba(16, 22, 19, 0.08);
  overflow: hidden;
}

.header-meter-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--pitch);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 80ms linear;
}

.header-shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.header-island {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  padding: 7px 9px 7px 16px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: 4px 4px 0 0 rgba(16, 22, 19, 0.13);
  transition: min-height var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.site-header[data-condensed] .header-island {
  min-height: 50px;
  box-shadow: 5px 5px 0 0 rgba(16, 22, 19, 0.18);
}

/* --- 品牌浮岛 --- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: var(--paper);
}

.brand-chip {
  display: block;
  width: 13px;
  height: 8px;
  border-radius: 2px;
}

.brand-chip--pitch { background: var(--pitch); }
.brand-chip--card { background: var(--card-yellow); }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-tag {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--slate);
  white-space: nowrap;
}

/* --- 导航 --- */
.site-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--graphite);
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: color 180ms var(--ease), background-color 180ms var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  background: var(--pitch);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 180ms var(--ease);
}

.nav-link:hover {
  color: var(--ink);
  background: var(--paper-alt);
}

.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  color: var(--pitch-deep);
  font-weight: 600;
}

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 9px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  transition: background-color 180ms var(--ease);
}

.nav-cta:hover { background: var(--pitch-deep); }

/* --- 移动端汉堡 --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 8px 15px 8px 13px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms var(--ease);
}

.nav-toggle:hover { background: var(--paper-alt); }

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 14px;
}

.nav-toggle-bars span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- 6. Footer 深色场区 ---------- */
.site-footer {
  position: relative;
  margin-top: 104px;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--pitch) 0 40px,
    transparent 40px 58px
  );
}

.footer-shell {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: 66px var(--gutter) 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.5fr;
  gap: 48px 32px;
  align-items: start;
}

.footer-col { min-width: 0; }

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--paper);
  margin-bottom: 14px;
}

.footer-statement {
  max-width: 32ch;
  font-size: 14.5px;
  line-height: 1.8;
  color: #B9C3BD;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #8E9A93;
}

.footer-badge {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid rgba(244, 246, 244, 0.3);
  border-radius: var(--radius-pill);
  color: var(--pitch-tint);
  white-space: nowrap;
}

.footer-col-title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7F8C85;
}

.footer-links {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-link {
  display: inline-block;
  font-size: 14px;
  color: #C6CFC9;
  text-decoration: none;
  transition: color 180ms var(--ease), transform 180ms var(--ease);
}

.footer-link:hover {
  color: var(--pitch-tint);
  transform: translateX(3px);
}

.contact-list {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-item { display: block; }

.contact-label {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7F8C85;
}

.contact-value {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: #E6EBE8;
  word-break: break-word;
}

.contact-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(244, 246, 244, 0.14);
  font-size: 12.5px;
  line-height: 1.75;
  color: #8E9A93;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid rgba(244, 246, 244, 0.16);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: #8E9A93;
}

.footer-copy { color: #9AA6A0; }

.footer-icp {
  color: #9AA6A0;
  font-variant-numeric: tabular-nums;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.footer-sep {
  margin-inline: 7px;
  color: #5C6862;
}

.footer-link--sm {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: #8E9A93;
}

.footer-link--sm:hover {
  color: var(--pitch-tint);
  transform: none;
}

/* ---------- 7. 返回索引按钮 ---------- */
.to-top {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 65;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 17px;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              visibility var(--dur) var(--ease),
              background-color 180ms var(--ease),
              border-color 180ms var(--ease);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--pitch-deep);
  border-color: var(--pitch-deep);
}

/* ---------- 8. 通用布局与正文 ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.75;
  color: var(--graphite);
}

.prose > * + * { margin-top: 1em; }
.prose > * + h2 { margin-top: 2.2em; }
.prose > * + h3 { margin-top: 1.8em; }
.prose > * + ul,
.prose > * + ol { margin-top: 1em; }
.prose li + li { margin-top: 0.4em; }

.prose h2 { font-size: clamp(28px, 3vw, 40px); }
.prose h3 { font-size: 22px; }

.prose a {
  color: var(--pitch-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose a:hover { color: var(--pitch); }

.prose ul,
.prose ol { padding-left: 1.2em; }

.prose blockquote {
  padding-left: 18px;
  border-left: 3px solid var(--mist);
  color: var(--slate);
}

.rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--mist);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
}

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

.sec-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(56px, 8vw, 112px);
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: #B6C0B9;
  font-variant-numeric: tabular-nums;
}

/* ---------- 9. 网格 ---------- */
.grid {
  display: grid;
  gap: 24px;
}

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

/* ---------- 10. 卡片 / 标签 ---------- */
.card {
  position: relative;
  padding: 24px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--pitch-tint);
  color: var(--pitch-deep);
  white-space: nowrap;
}

.tag--red { background: #F6DFDD; color: #8E211A; }
.tag--yellow { background: #FBEEC9; color: #6B5104; }
.tag--pitch { background: var(--pitch); color: #FFFFFF; }

/* ---------- 11. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms var(--ease),
              color 180ms var(--ease),
              border-color 180ms var(--ease),
              transform 180ms var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--pitch);
  border-color: var(--pitch);
  color: #FFFFFF;
}

.btn--primary:hover {
  background: var(--pitch-deep);
  border-color: var(--pitch-deep);
}

.btn--ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------- 12. 面包屑 ---------- */
.breadcrumb {
  margin: 0 0 26px;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  color: var(--slate);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 8px;
  color: var(--mist);
  letter-spacing: 0;
}

.breadcrumb-link {
  color: var(--slate);
  text-decoration: none;
  transition: color 180ms var(--ease);
}

.breadcrumb-link:hover {
  color: var(--pitch-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb-current { color: var(--ink); }

/* ---------- 13. 图片容器基础 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper-alt);
  border: 2px solid var(--ink);
  border-radius: 14px;
  aspect-ratio: 16 / 10;
}

.media-frame > img,
.media-frame > picture,
.media-frame > picture > img {
  display: block;
  width: 100%;
  height: 100%;
}

.media-frame > img,
.media-frame > picture > img {
  object-fit: cover;
  object-position: center;
  filter: saturate(0.86) contrast(1.04);
}

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

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1120px) {
  .nav-link { padding: 8px 9px; font-size: 13.5px; }
  .nav-link::after { left: 9px; right: 9px; }
  .header-island { gap: 12px; padding-left: 14px; }
}

@media (max-width: 920px) {
  :root { --gutter: 16px; }

  .site-header { padding: 10px 0 14px; }

  .header-island {
    min-height: 56px;
    gap: 10px;
    padding: 6px 8px 6px 12px;
    border-radius: var(--radius-pill);
  }

  .brand-tag { display: none; }
  .brand-name { font-size: 16px; }

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

  .site-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 90;
    display: block;
    margin-left: 0;
    padding: 10px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 22px;
    box-shadow: 6px 6px 0 0 rgba(16, 22, 19, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, calc(100% + 28px), 0);
    transition: transform var(--dur) var(--ease),
                opacity var(--dur) var(--ease),
                visibility var(--dur) var(--ease);
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .nav-link {
    display: block;
    padding: 11px 12px;
    font-size: 14px;
    border-radius: 12px;
  }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"] {
    background: var(--pitch-tint);
    color: var(--pitch-deep);
  }

  .nav-item:last-child { grid-column: 1 / -1; }

  .nav-cta {
    display: block;
    width: 100%;
    margin: 4px 0 0;
    padding: 12px;
    text-align: center;
    border-radius: 12px;
  }

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

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 28px;
  }

  .footer-brand { grid-column: 1 / -1; }

  .to-top {
    left: 14px;
    right: auto;
    bottom: 14px;
    padding: 9px 14px;
  }
}

@media (max-width: 640px) {
  .site-footer { margin-top: 72px; }

  .footer-shell { padding: 52px var(--gutter) 28px; }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 38px;
  }

  .footer-wordmark { font-size: 24px; }

  .card { padding: 18px; }
}

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

  .footer-link:hover { transform: none; }
  .to-top { transform: none; }
}
