/* ============================================================
   千亿球友会 · 共享站点样式 /assets/site.css
   祁连墨绿基底 + 敦煌土金 + 数字青 · 技术蓝图网格
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: 96px;
}

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

ul, ol { margin: 0; padding: 0; }

img, svg, picture, video { display: block; max-inline-size: 100%; }

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

a { color: inherit; }

button { background: none; border: 0; }

/* ---------- 2. Tokens ---------- */
:root {
  /* 色彩 */
  --ink: #0C241F;
  --ink-2: #14342C;
  --ink-3: #1E4A3F;
  --gold: #C8A24A;
  --gold-light: #E7CE92;
  --cyan: #3FC8BE;
  --cyan-deep: #1B7F79;
  --sand: #E9E3D6;
  --cream: #F6F1E6;
  --charcoal: #232825;

  --line-gold: rgba(200, 162, 74, 0.24);
  --line-cyan: rgba(63, 200, 190, 0.18);
  --text-soft: rgba(246, 241, 230, 0.72);
  --text-mute: rgba(246, 241, 230, 0.54);

  /* 字体 */
  --font-display: "PingFang SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "Heiti SC", system-ui, sans-serif;
  --font-body: "PingFang SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-editorial: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  /* 字号 */
  --fs-display: clamp(2.2rem, 6vw, 5.4rem);
  --fs-h1: clamp(2rem, 4.2vw, 3.6rem);
  --fs-h2: clamp(1.7rem, 3vw, 2.4rem);
  --fs-h3: clamp(1.3rem, 2vw, 1.7rem);
  --fs-lead: clamp(1.05rem, 1.6vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;

  /* 结构 */
  --radius-lg: 28px;
  --radius-md: 18px;
  --pill: 999px;
  --shell-max: 1200px;
  --ease: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--cream);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-block-size: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.18;
  text-wrap: balance;
}

p { text-wrap: pretty; }

::selection {
  background: var(--gold);
  color: #0C241F;
}

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

#main-content { scroll-margin-block-start: 96px; }

.visually-hidden {
  position: absolute !important;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. 跳转链 ---------- */
.skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 200;
  padding: 11px 20px;
  border-radius: var(--pill);
  background: var(--gold);
  color: #10261f;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: 2px;
}

/* ---------- 5. 头部 ---------- */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  padding-block: 20px 0;
  pointer-events: none;
}

.scroll-meter {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 2px;
  background: rgba(63, 200, 190, 0.08);
  z-index: 110;
  pointer-events: none;
}

.scroll-meter-fill {
  display: block;
  block-size: 100%;
  inline-size: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan) 58%, var(--gold));
}

.header-shell {
  inline-size: 100%;
  max-inline-size: var(--shell-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4.5vw, 48px);
}

.nav-island {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 24px);
  padding: 9px 10px 9px 18px;
  border-radius: var(--pill);
  border: 1px solid var(--line-gold);
  background: rgba(12, 36, 31, 0.74);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  box-shadow:
    0 22px 46px -32px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(246, 241, 230, 0.06);
  transition: background-color 220ms ease, border-color 220ms ease, padding 220ms ease;
}

.site-header[data-scrolled="true"] .nav-island {
  padding-block: 5px;
  padding-inline: 16px 8px;
  background: rgba(12, 36, 31, 0.95);
  border-color: rgba(200, 162, 74, 0.44);
}

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

.brand-glyph {
  position: relative;
  flex: none;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 12px;
  border: 1px solid rgba(200, 162, 74, 0.55);
  background:
    radial-gradient(circle at 70% 28%, var(--cyan) 0 2.6px, transparent 3.2px),
    linear-gradient(135deg, rgba(200, 162, 74, 0.26), rgba(30, 74, 63, 0.22));
}

.brand-glyph::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(63, 200, 190, 0.36);
  border-radius: 999px 999px 999px 4px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-inline-size: 0;
}

.brand-mark {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--cream);
  white-space: nowrap;
  transition: color var(--ease);
}

.brand-note {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  line-height: 1.3;
  color: rgba(200, 162, 74, 0.86);
  white-space: nowrap;
}

.brand:hover .brand-mark { color: var(--gold-light); }

/* 主导航 */
.primary-nav {
  display: flex;
  margin-inline-start: auto;
}

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

.nav-link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--pill);
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-decoration: none;
  color: rgba(246, 241, 230, 0.74);
  white-space: nowrap;
  transition: color var(--ease), background-color var(--ease);
}

.nav-link:hover {
  color: var(--gold-light);
  background: rgba(30, 74, 63, 0.6);
}

.nav-link[aria-current="page"] {
  color: #10261f;
  background: var(--gold-light);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  inline-size: 42px;
  block-size: 42px;
  border-radius: var(--pill);
  border: 1px solid rgba(200, 162, 74, 0.42);
  background: rgba(30, 74, 63, 0.55);
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease);
}

.nav-toggle:hover {
  background: rgba(30, 74, 63, 0.9);
  border-color: var(--gold);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  inline-size: 18px;
  block-size: 1.5px;
  border-radius: 2px;
  background: var(--gold-light);
  transition: background-color var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  block-size: 1.5px;
  border-radius: 2px;
  background: inherit;
  transition: transform var(--ease), opacity var(--ease);
}

.nav-toggle-bars::before { inset-block-start: -6px; }
.nav-toggle-bars::after { inset-block-start: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  padding: 11px 22px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #12291f;
  font-weight: 500;
}

.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateX(2px);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(200, 162, 74, 0.45);
  color: var(--gold-light);
}

.btn-ghost:hover {
  background: rgba(200, 162, 74, 0.14);
  border-color: var(--gold);
  color: var(--cream);
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-block-start: 1px solid var(--line-gold);
  background:
    radial-gradient(120% 90% at 88% 0%, rgba(27, 127, 121, 0.18), transparent 62%),
    linear-gradient(180deg, #0C241F 0%, #0A1E1A 100%);
  color: var(--text-soft);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    repeating-linear-gradient(90deg, rgba(63, 200, 190, 0.065) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(63, 200, 190, 0.05) 0 1px, transparent 1px 88px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 58%, transparent 88%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 58%, transparent 88%);
  pointer-events: none;
}

.footer-shell {
  padding-block: clamp(48px, 7vw, 84px) clamp(26px, 3.4vw, 36px);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: clamp(32px, 5vw, 64px);
}

.footer-brand { min-inline-size: 0; }

.brand--footer .brand-mark { font-size: 19px; }

.footer-tagline {
  margin-block-start: 18px;
  max-inline-size: 30ch;
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-soft);
}

.footer-stamp {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-block-start: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(63, 200, 190, 0.88);
}

.footer-stamp-dot {
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(63, 200, 190, 0.16);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.footer-col { min-inline-size: 0; }

.footer-col-title {
  margin-block-end: 14px;
  padding-block-end: 10px;
  border-block-end: 1px solid rgba(200, 162, 74, 0.2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--gold);
}

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

.footer-link {
  display: inline-block;
  font-size: 15px;
  line-height: 1.5;
  text-decoration: none;
  color: rgba(246, 241, 230, 0.74);
  border-block-end: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease), transform var(--ease);
}

.footer-link:hover {
  color: var(--gold-light);
  border-block-end-color: rgba(63, 200, 190, 0.6);
  transform: translateX(3px);
}

.footer-meta {
  display: grid;
  gap: 9px;
  margin-block-start: clamp(32px, 5vw, 56px);
  padding-block-start: 22px;
  border-block-start: 1px solid rgba(200, 162, 74, 0.2);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}

.footer-value {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--gold-light);
}

.footer-sep { color: rgba(200, 162, 74, 0.4); }

.footer-address {
  font-size: 14px;
  color: var(--text-soft);
}

.footer-hours {
  font-size: 13.5px;
  color: var(--text-mute);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 24px;
  margin-block-start: 24px;
  padding-block-start: 18px;
  border-block-start: 1px solid rgba(63, 200, 190, 0.14);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: rgba(246, 241, 230, 0.5);
}

.footer-copyright { color: rgba(246, 241, 230, 0.62); }

.footer-year { color: rgba(63, 200, 190, 0.8); }

/* ---------- 8. 容器与分区 ---------- */
.container {
  inline-size: 100%;
  max-inline-size: var(--shell-max);
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 48px);
}

.container--reading { max-inline-size: 780px; }

.section {
  padding-block: clamp(56px, 9vw, 120px);
}

.section--ink {
  background: var(--ink);
  color: var(--cream);
}

.section--ink-2 {
  background: var(--ink-2);
  color: var(--cream);
}

.section--sand {
  background: var(--sand);
  color: var(--charcoal);
}

.section--sand h1,
.section--sand h2,
.section--sand h3 { color: var(--charcoal); }

.section--sand .eyebrow { color: var(--cyan-deep); }

.section--sand .index-num { color: var(--cyan-deep); }

.section--sand .lede,
.section--sand .title-serif { color: #2f3a33; }

.rule {
  inline-size: 100%;
  block-size: 1px;
  border: 0;
  background: var(--line-gold);
}

.section--sand .rule { background: rgba(35, 40, 37, 0.16); }

/* ---------- 9. 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
}

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

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

/* ---------- 10. 索引语汇 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  line-height: 1.5;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  inline-size: 28px;
  block-size: 1px;
  background: currentColor;
  opacity: 0.75;
}

.index-num {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.lede {
  font-family: var(--font-editorial);
  font-size: var(--fs-lead);
  font-weight: 600;
  line-height: 1.75;
  color: rgba(246, 241, 230, 0.88);
}

.title-serif {
  font-family: var(--font-editorial);
  font-weight: 600;
  letter-spacing: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  line-height: 1.5;
  color: var(--cream);
}

.link-arrow {
  color: var(--cyan);
  text-decoration: none;
  border-block-end: 1px solid rgba(63, 200, 190, 0.38);
  transition: color var(--ease), border-color var(--ease);
}

.link-arrow:hover {
  color: var(--gold-light);
  border-block-end-color: var(--gold);
}

.section--sand .link-arrow { color: var(--cyan-deep); }
.section--sand .link-arrow:hover { color: #0e5f5a; border-block-end-color: var(--cyan-deep); }

/* ---------- 11. 面包屑 ---------- */
.breadcrumb { margin: 0; }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: rgba(246, 241, 230, 0.54);
}

.breadcrumb-list > li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-list > li + li::before {
  content: "/";
  margin-inline: 9px;
  color: rgba(200, 162, 74, 0.5);
}

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

.breadcrumb-link:hover { color: var(--gold-light); }

.breadcrumb-current { color: rgba(246, 241, 230, 0.62); }

.section--sand .breadcrumb-list { color: rgba(35, 40, 37, 0.55); }
.section--sand .breadcrumb-link { color: var(--cyan-deep); }
.section--sand .breadcrumb-link:hover { color: #0e5f5a; }
.section--sand .breadcrumb-current { color: rgba(35, 40, 37, 0.62); }

/* ---------- 12. 分类标签 ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: var(--pill);
  border: 1px solid rgba(63, 200, 190, 0.35);
  background: rgba(27, 127, 121, 0.12);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  line-height: 1.6;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}

.tag:hover {
  background: rgba(27, 127, 121, 0.3);
  border-color: var(--cyan);
}

.tag[aria-pressed="true"] {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: #12291f;
}

.section--sand .tag {
  border-color: rgba(27, 127, 121, 0.45);
  background: rgba(27, 127, 121, 0.1);
  color: var(--cyan-deep);
}

.section--sand .tag[aria-pressed="true"] {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--cream);
}

/* ---------- 13. 图片容器（页面阶段放置位图 / SVG） ---------- */
.figure {
  display: grid;
  gap: 12px;
  margin: 0;
}

.figure-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(200, 162, 74, 0.22);
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(63, 200, 190, 0.18), transparent 62%),
    repeating-linear-gradient(45deg, rgba(63, 200, 190, 0.07) 0 1px, transparent 1px 16px),
    linear-gradient(160deg, #14342C 0%, #0C241F 72%);
}

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

.figure-media > img,
.figure-media > svg,
.figure-media > picture,
.figure-media > picture > img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.figure-caption {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  line-height: 1.7;
  color: rgba(246, 241, 230, 0.56);
}

.section--sand .figure-caption { color: rgba(35, 40, 37, 0.6); }
.section--sand .figure-media { border-color: rgba(35, 40, 37, 0.18); }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1024px) {
  .nav-link {
    font-size: 13px;
    padding: 8px 10px;
  }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }

  .primary-nav {
    display: none;
    position: absolute;
    inset-block-start: calc(100% + 12px);
    inset-inline: 0;
    margin-inline-start: 0;
    padding: 10px;
    border-radius: 26px;
    border: 1px solid rgba(200, 162, 74, 0.32);
    background: rgba(15, 42, 36, 0.98);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 26px 52px -32px rgba(0, 0, 0, 0.95);
  }

  .primary-nav[data-open="true"] { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-item + .nav-item { border-block-start: 1px solid rgba(63, 200, 190, 0.12); }

  .nav-link {
    display: block;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
  }

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

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

@media (max-width: 620px) {
  .brand-note { display: none; }

  .brand-mark { font-size: 16px; }

  .brand-glyph {
    inline-size: 30px;
    block-size: 30px;
    border-radius: 10px;
  }

  .nav-island {
    padding: 8px 8px 8px 14px;
    gap: 8px;
  }

  .site-header[data-scrolled="true"] .nav-island { padding-inline: 12px 6px; }

  .btn-sm { padding: 7px 13px; font-size: 12.5px; }

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

  .footer-bottom { justify-content: flex-start; }

  .footer-contact { font-size: 13.5px; }
}

/* ---------- 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;
  }

  .btn-primary:hover,
  .footer-link:hover { transform: none; }
}
