/* ==========================================================================
   开云安装 · 数字竞技档案库 —— 共享样式表 /assets/site.css
   框架式导航 + 珠宝色分区 + 等宽索引
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  --obsidian: #0A0D10;
  --mica: #F5F7F6;
  --graphite: #1C2329;
  --pitch: #00E17B;
  --orange: #FF5C24;
  --blue: #3D7BFF;
  --teal: #0C3B36;
  --indigo: #1E1747;
  --wine: #4A1421;

  --ink: var(--obsidian);
  --muted: rgba(245, 247, 246, 0.62);
  --muted-soft: rgba(245, 247, 246, 0.44);
  --muted-dark: rgba(10, 13, 16, 0.68);
  --rule: rgba(245, 247, 246, 0.09);

  --rail: 14px;
  --header-h: 74px;
  --wrap: 1240px;
  --wide: 1440px;

  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 28px);
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 0 var(--rail);
  border-left: 1px solid var(--graphite);
  border-right: 1px solid var(--graphite);
  background: var(--obsidian);
  color: var(--mica);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

h1, h2, h3, h4, h5, p, figure, blockquote { margin: 0; }

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

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

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

/* ---------- 3. 骨架：跳过链接 / 框架容器 ---------- */
.skip-link {
  position: fixed;
  top: -200px;
  left: calc(var(--rail) + 12px);
  z-index: 120;
  padding: 11px 18px;
  background: var(--pitch);
  color: var(--obsidian);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 2px;
  transition: top 0.2s var(--ease);
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 40px;
}

.section { padding: 96px 0; }

/* ---------- 4. 页头（框架式导航上边） ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 13, 16, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--graphite);
  transition: box-shadow 0.3s var(--ease);
}

.site-header[data-scrolled] {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--wide);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 12px 36px;
}

.header-progress {
  height: 2px;
  background: rgba(245, 247, 246, 0.06);
}

.header-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--pitch);
  transition: width 0.12s linear;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  background: var(--pitch);
  color: var(--obsidian);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
}

.brand-id { display: block; }

.brand-name {
  display: block;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.15;
}

.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-soft);
  line-height: 1.5;
}

/* 主导航 */
.site-nav { flex: 1 1 auto; display: flex; justify-content: center; }

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

.nav-link {
  display: inline-block;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: rgba(245, 247, 246, 0.72);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--mica);
  border-color: var(--graphite);
  background: rgba(245, 247, 246, 0.03);
}

.nav-link[aria-current="page"] {
  color: var(--obsidian);
  background: var(--pitch);
  border-color: var(--pitch);
  font-weight: 700;
}

/* 右侧动作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.adapt-flag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted-soft);
  padding: 5px 9px;
  border: 1px solid var(--graphite);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--graphite);
  border-radius: 2px;
  background: transparent;
}

.nav-toggle > span {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--mica);
  transition: background 0.2s var(--ease);
}

.nav-toggle > span::before,
.nav-toggle > span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--mica);
  transition: transform 0.25s var(--ease);
}

.nav-toggle > span::before { top: -6px; }
.nav-toggle > span::after { top: 6px; }

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

/* ---------- 5. 页脚 ---------- */
.site-footer {
  margin-top: 0;
  border-top: 1px solid var(--graphite);
  background: var(--obsidian);
}

.footer-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 3px;
}

.footer-strip span:nth-child(1) { background: var(--pitch); }
.footer-strip span:nth-child(2) { background: var(--blue); }
.footer-strip span:nth-child(3) { background: var(--orange); }
.footer-strip span:nth-child(4) { background: var(--teal); }

.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 64px 36px 0;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) 3fr;
  gap: 56px;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--rule);
}

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; }

.footer-brand .brand-mark {
  width: 46px;
  height: 46px;
  font-size: 15px;
  margin-bottom: 18px;
}

.footer-brand-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.footer-brand-note {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  line-height: 1.9;
  color: var(--muted-soft);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer-col-title {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--graphite);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--pitch);
}

.footer-link {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 7px 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(245, 247, 246, 0.72);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.footer-link::before {
  content: "";
  flex: none;
  width: 10px;
  height: 1px;
  background: var(--graphite);
  transition: width 0.2s var(--ease), background-color 0.2s var(--ease);
}

.footer-link:hover { color: var(--pitch); padding-left: 5px; }
.footer-link:hover::before { width: 17px; background: var(--pitch); }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 40px;
  padding: 26px 0 36px;
}

.footer-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 30px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.footer-meta-list li { display: flex; align-items: baseline; gap: 8px; }

.meta-key {
  color: var(--muted-soft);
  letter-spacing: 0.14em;
  flex: none;
}

.meta-val { color: rgba(245, 247, 246, 0.78); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted-soft);
}

.footer-icp { color: var(--muted); }

/* ---------- 6. 排版与索引元素 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pitch);
}

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

.seq {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted-soft);
}

.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.04em; }

.num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.section-title {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 34em;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.8;
  color: rgba(245, 247, 246, 0.72);
}

.prose { max-width: 38em; }

.prose p {
  font-size: 17px;
  line-height: 1.85;
  color: rgba(245, 247, 246, 0.78);
}

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

.prose a { color: var(--pitch); border-bottom: 1px solid rgba(0, 225, 123, 0.4); }

/* ---------- 7. 分区底板 ---------- */
.panel {
  background: var(--mica);
  color: var(--obsidian);
}

.panel .prose p { color: var(--muted-dark); }
.panel .section-title { color: var(--obsidian); }
.panel .lede { color: var(--muted-dark); }

.band {
  position: relative;
  padding: 64px 0;
  background: var(--teal);
  color: var(--mica);
  border-top: 1px solid var(--graphite);
  border-bottom: 1px solid var(--graphite);
}

.band--indigo { background: var(--indigo); }
.band--wine { background: var(--wine); }

/* ---------- 8. 网格与形状 ---------- */
.grid12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-10 { grid-column: span 10; }
.span-11 { grid-column: span 11; }
.span-12 { grid-column: span 12; }

.notch {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}

/* ---------- 9. 卡片与标签 ---------- */
.card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--graphite);
  background: rgba(245, 247, 246, 0.02);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.card:hover {
  border-color: var(--pitch);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 225, 123, 0.09);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--graphite);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.tag--pitch { color: var(--pitch); border-color: rgba(0, 225, 123, 0.4); }
.tag--blue { color: var(--blue); border-color: rgba(61, 123, 255, 0.4); }
.tag--orange { color: var(--orange); border-color: rgba(255, 92, 36, 0.4); }

/* ---------- 10. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn-primary { background: var(--pitch); color: var(--obsidian); }
.btn-primary:hover { background: #35F09A; }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  border-color: var(--graphite);
  color: var(--mica);
  background: rgba(245, 247, 246, 0.02);
}

.btn-ghost:hover { border-color: var(--pitch); color: var(--pitch); }

.btn-orange { background: var(--orange); color: var(--obsidian); }
.btn-orange:hover { background: #FF7E52; }

.btn-sm { padding: 8px 14px; font-size: 12.5px; letter-spacing: 0.06em; }

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--muted-soft);
}

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

.breadcrumb li:not(:first-child)::before {
  content: "/";
  color: var(--graphite);
}

.breadcrumb a { color: var(--muted); transition: color 0.2s var(--ease); }
.breadcrumb a:hover { color: var(--pitch); }
.breadcrumb [aria-current="page"] { color: var(--mica); }

/* ---------- 12. 图片容器（页面阶段放置 <img>） ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--graphite);
  background-image:
    repeating-linear-gradient(90deg, rgba(245, 247, 246, 0.045) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(0deg, rgba(245, 247, 246, 0.045) 0 1px, transparent 1px 32px),
    radial-gradient(120% 120% at 18% 0%, #14232C 0%, #0A0D10 62%);
}

.media-frame > img,
.media-frame > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    rgba(245, 247, 246, 0.3) 0 1px,
    transparent 1px 14px
  );
  opacity: 0.55;
  pointer-events: none;
}

.media-frame--veil::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 42%, rgba(10, 13, 16, 0.78));
  pointer-events: none;
}

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

/* ---------- 13. 页面级左侧目录 ---------- */
.page-toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
}

.toc-title {
  padding-bottom: 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--graphite);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.toc-list a {
  display: block;
  padding: 9px 0 9px 16px;
  border-left: 1px solid var(--graphite);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    padding-left 0.2s var(--ease);
}

.toc-list a:hover { color: var(--mica); }

.toc-list a[aria-current="true"] {
  color: var(--pitch);
  border-left-color: var(--pitch);
  padding-left: 22px;
}

/* ---------- 14. 显现动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1180px) {
  .adapt-flag { display: none; }
  .nav-link { padding: 8px 9px; font-size: 13px; }
}

@media (max-width: 1080px) {
  .brand-sub { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
}

@media (max-width: 980px) {
  .nav-toggle { display: grid; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 55;
    display: block;
    padding: 10px 24px 22px;
    background: var(--obsidian);
    border-bottom: 1px solid var(--graphite);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
      visibility 0.22s var(--ease);
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

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

  .nav-link {
    display: block;
    padding: 14px 6px;
    border: 0;
    border-bottom: 1px solid rgba(245, 247, 246, 0.07);
    border-radius: 0;
    font-size: 15px;
  }

  .nav-link[aria-current="page"] {
    padding-left: 14px;
    background: rgba(0, 225, 123, 0.12);
    color: var(--pitch);
    border-bottom-color: rgba(0, 225, 123, 0.35);
  }

  .header-inner { padding: 10px 22px; }
  .footer-inner { padding: 52px 22px 0; }
  .wrap { padding-inline: 22px; }
  .section { padding: 64px 0; }
}

@media (max-width: 900px) {
  .grid12 {
    grid-template-columns: repeat(6, 1fr);
    gap: 22px;
  }

  .span-3, .span-4, .span-5, .span-6 { grid-column: span 3; }
  .span-7, .span-8, .span-9, .span-10, .span-11, .span-12 { grid-column: span 6; }

  .band { padding: 48px 0; }
}

@media (max-width: 640px) {
  :root { --rail: 10px; --header-h: 66px; }

  body { font-size: 16px; }
  .header-inner { padding: 8px 16px; gap: 12px; }
  .brand-mark { width: 34px; height: 34px; font-size: 12px; }
  .brand-name { font-size: 16px; }
  .btn-sm { padding: 7px 11px; font-size: 11.5px; letter-spacing: 0.04em; }
  .wrap { padding-inline: 16px; }
  .footer-inner { padding: 44px 16px 0; }
  .footer-cols { grid-template-columns: 1fr; gap: 22px; }
  .footer-meta { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-meta-list { flex-direction: column; gap: 8px; }
  .footer-meta-list li { flex-direction: column; gap: 2px; }
}

@media (max-width: 560px) {
  .grid12 { grid-template-columns: 1fr; gap: 18px; }
  [class*="span-"] { grid-column: 1 / -1; }
  .section { padding: 52px 0; }
  .card { padding: 18px; }
}

/* ---------- 16. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
