/* ============================================================
   pixel-arcade-pg.com.cn — shared site.css
   展览画册式暗场：墨空黑留白 / 玻璃层 + 实色层 / 索引坐标
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
  color-scheme: dark;
  scroll-padding-top: calc(var(--bar-h) + 20px);
}

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%; height: auto; }

a { color: inherit; }

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

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #08070E;
  --panel: #12101C;
  --glass: #1E1A33;
  --violet: #7B4DFF;
  --mist: #B9A6FF;
  --orange: #FF7A1A;
  --blue: #38D6FF;
  --lime: #B8FF3C;
  --text: #F3EFFF;
  --muted: #9C95B8;
  --hair: #2E2846;

  --maxw: 1240px;
  --bar-h: 44px;

  --ease: cubic-bezier(.2, .7, .3, 1);

  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --font-display: "Archivo Expanded", "Source Han Sans SC", "PingFang SC",
    "Microsoft YaHei", system-ui, sans-serif;

  --z-header: 100;
  --z-skip: 200;
}

/* ---------- 3. 中文排版基底 ---------- */
body {
  padding-top: var(--bar-h);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: .01em;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 全站暗场底纹：115° 斜向引导线 + 两处微光 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(115deg,
      rgba(123, 77, 255, .055) 0 1px,
      transparent 1px 92px),
    radial-gradient(120% 80% at 88% 4%, rgba(56, 214, 255, .07), transparent 62%),
    radial-gradient(100% 70% at 4% 96%, rgba(255, 122, 26, .05), transparent 58%);
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
}

p { text-wrap: pretty; }

::selection {
  background: var(--violet);
  color: var(--text);
}

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

/* ---------- 4. 通用结构容器 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.container--narrow {
  max-width: 760px;
}

.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.prose {
  max-width: 38em;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
}

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

.prose h2 {
  margin-top: 2em;
  margin-bottom: .6em;
  font-size: 24px;
  padding-left: 12px;
  border-left: 3px solid var(--orange);
}

.prose h3 {
  margin-top: 1.6em;
  margin-bottom: .4em;
  font-size: 19px;
  color: var(--mist);
}

.prose ul, .prose ol {
  margin-top: .8em;
  padding-left: 1.1em;
  list-style: none;
}

.prose li {
  position: relative;
  padding-left: 1em;
  margin-bottom: .4em;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: 6px;
  height: 1px;
  background: var(--violet);
}

.prose a {
  color: var(--mist);
  text-decoration-color: var(--violet);
  text-underline-offset: 3px;
}

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

.prose strong { color: var(--orange); font-weight: 700; }

/* ---------- 5. 层级与标签 ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 200;
  line-height: .92;
  letter-spacing: -.02em;
  color: var(--text);
}

.display--xl { font-size: clamp(56px, 9vw, 140px); }
.display--lg { font-size: clamp(38px, 6vw, 88px); }

.index-num {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
  color: var(--violet);
  font-weight: 400;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
}

.section-label::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--violet);
}

.rule {
  height: 1px;
  width: 100%;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--violet), var(--hair) 38%, transparent);
}

/* ---------- 6. 层与卡片 ---------- */
.surface {
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 3px;
  padding: 24px;
}

.glass {
  background: rgba(30, 26, 51, .72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(185, 166, 255, .16);
  border-radius: 3px;
  padding: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mist);
  background: rgba(30, 26, 51, .6);
  border: 1px solid var(--hair);
  border-radius: 2px;
}

.tag[data-state="active"] {
  color: #12060A;
  background: var(--orange);
  border-color: var(--orange);
  font-weight: 700;
}

/* ---------- 7. 筛选栏 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: rgba(30, 26, 51, .72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(185, 166, 255, .16);
  border-radius: 3px;
}

.filter-btn {
  min-height: 44px;
  padding: 0 16px;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: 2px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--violet);
}

.filter-btn[aria-pressed="true"] {
  color: #12060A;
  background: var(--orange);
  border-color: var(--orange);
  font-weight: 700;
}

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease,
    color .18s ease, transform .18s var(--ease);
}

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

.btn--primary {
  color: #12060A;
  background: var(--orange);
  border-color: var(--orange);
}

.btn--primary:hover { background: #FF9440; border-color: #FF9440; }

.btn--ghost {
  color: var(--text);
  background: rgba(30, 26, 51, .6);
  border-color: var(--hair);
}

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

/* ---------- 9. 面包屑 ---------- */
.breadcrumb {
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

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

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color .18s ease;
}

.breadcrumb a:hover { color: var(--orange); }

.breadcrumb [aria-current="page"] { color: var(--text); }

/* ---------- 10. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(80% 70% at 70% 20%, rgba(123, 77, 255, .22), transparent 70%),
    linear-gradient(135deg, #161226, #0C0A14);
  border: 1px solid var(--hair);
  border-radius: 3px;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(8, 7, 14, .68));
}

.media-frame:hover img { transform: scale(1.03); }

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

.media-caption {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--muted);
}

/* ---------- 11. 无障碍工具类 ---------- */
.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;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: var(--z-skip);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #0B1200;
  background: var(--lime);
  border-radius: 2px;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .18s var(--ease);
}

.skip-link:focus { transform: translateY(0); }

/* ---------- 12. 显现动画 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s var(--ease);
}

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

/* ============================================================
   13. 固定命令栏（header）
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: var(--bar-h);
  background: rgba(8, 7, 14, .88);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--hair);
}

.bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
}

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

.brand-mark {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at 50% 24%, var(--orange) 0 4px, transparent 4.6px),
    linear-gradient(var(--violet), var(--violet)) 50% 68% / 3px 9px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 50% 100% / 18px 3px no-repeat;
}

.brand-word {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  white-space: nowrap;
}

.brand:hover .brand-word { color: var(--mist); }

.chip-version {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  height: 26px;
  padding: 0 10px;
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  background: rgba(30, 26, 51, .7);
  border: 1px solid var(--hair);
  border-radius: 2px;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  animation: chipPulse 2.4s ease-in-out infinite;
}

@keyframes chipPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* 导航 */
.nav {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--bar-h);
  padding: 0 11px;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(123, 77, 255, .14);
}

.nav-index {
  font-size: 10px;
  letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
  color: var(--violet);
}

.nav-link:hover .nav-index { color: var(--mist); }

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

.nav-link[aria-current="page"] .nav-index { color: var(--orange); }

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 0;
  height: 3px;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(255, 122, 26, .85);
}

/* 滚动进度光轨 */
.scroll-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.scroll-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--blue) 58%, var(--orange));
  transition: width .12s linear;
}

/* 移动菜单按钮（桌面隐藏） */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  height: 34px;
  margin-left: auto;
  padding: 0 10px;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--text);
  background: rgba(30, 26, 51, .7);
  border: 1px solid var(--hair);
  border-radius: 2px;
  cursor: pointer;
}

.nav-toggle-bar {
  position: relative;
  width: 14px;
  height: 10px;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 14px;
  height: 1.5px;
  background: var(--orange);
  transition: top .2s var(--ease), transform .2s var(--ease);
}

.nav-toggle-bar::before { top: 0; }
.nav-toggle-bar::after { top: 8px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  top: 4px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  top: 4px;
  transform: rotate(-45deg);
}

/* ============================================================
   14. 页脚：索引图例
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: 96px;
  padding: 56px 0 28px;
  background: var(--panel);
  border-top: 1px solid var(--hair);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(280px, 42%);
  height: 1px;
  background: linear-gradient(90deg, var(--violet), var(--blue));
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.footer-lead {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hair);
}

.footer-brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text);
}

.footer-motto {
  font-size: 11px;
  letter-spacing: .34em;
  color: var(--orange);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 32px 0 40px;
}

.footer-title {
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .16em;
  color: var(--muted);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 24px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: color .18s ease;
}

.footer-link:hover { color: var(--orange); }

.footer-num {
  font-size: 10px;
  letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
  color: var(--violet);
}

.footer-meta {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
}

.footer-copy,
.footer-icp { font-variant-numeric: tabular-nums; }

/* ============================================================
   15. 响应式
   ============================================================ */
@media (max-width: 1080px) {
  .chip-version { display: none; }

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

  .nav {
    position: fixed;
    top: var(--bar-h);
    left: 0;
    right: 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 0 16px;
    max-height: calc(100vh - var(--bar-h));
    overflow-y: auto;
    background: rgba(18, 16, 28, .97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--hair);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s var(--ease), visibility .2s;
  }

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

  .nav-link {
    height: 54px;
    padding: 0 20px;
    font-size: 15px;
    border-bottom: 1px solid var(--hair);
  }

  .nav-link:last-child { border-bottom: 0; }

  .nav-link[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 9px;
    bottom: 9px;
    width: 3px;
    height: auto;
  }

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

@media (max-width: 720px) {
  body { font-size: 16px; }

  .bar-inner { gap: 10px; padding: 0 12px; }

  .brand-word { font-size: 12px; letter-spacing: .04em; }

  .grid { grid-template-columns: 1fr; }

  .surface,
  .glass { padding: 16px; }

  .site-footer { margin-top: 64px; padding: 40px 0 24px; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 24px 0 32px; }

  .footer-brand { font-size: 17px; }

  .footer-base { font-size: 11px; }
}

@media (max-width: 420px) {
  .nav-toggle-text { display: none; }
  .nav-toggle { padding: 0 12px; }
}

/* ---------- 16. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .chip-dot { animation: none; }

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

  .media-frame:hover img { transform: none; }
}
