/* ============================================================
   PG游艺会馆 · 共享外壳样式 /assets/site.css
   赛博档案室 × 游艺厅 · 纵向叙事长卷
   ============================================================ */

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

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

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

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

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

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

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

::selection { background: rgba(56, 242, 210, 0.28); color: #E8F1FF; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-900: #08111F;
  --ink-800: #0F1B2E;
  --ink-700: #16263D;
  --line: #2B405A;

  --cyan: #38F2D2;
  --violet: #9A6BFF;
  --amber: #FFB648;
  --pink: #FF5CA8;

  --paper: #E8F1FF;
  --soft: #C7D7EC;
  --muted: #8FA3BF;

  --font-display: "Oswald", "Bebas Neue", "Noto Sans SC", "Source Han Sans SC",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --header-h: 96px;

  --glow-cyan: 0 18px 46px -24px rgba(56, 242, 210, 0.62);
  --glow-violet: 0 18px 46px -24px rgba(154, 107, 255, 0.62);
}

/* ---------- 3. 基础中文排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--paper);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(880px 520px at 6% -10%, rgba(56, 242, 210, 0.11), transparent 62%),
    radial-gradient(820px 540px at 98% 0%, rgba(154, 107, 255, 0.14), transparent 60%),
    radial-gradient(700px 460px at 50% 118%, rgba(255, 182, 72, 0.06), transparent 62%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 { font-size: clamp(2.25rem, 6vw, 4.25rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.1vw, 1.6rem); letter-spacing: -0.01em; }
h4 { font-size: clamp(1.05rem, 1.6vw, 1.2rem); }

p { max-width: 72ch; }

strong { color: #FFFFFF; font-weight: 700; }

#main-content { scroll-margin-top: clamp(88px, 10vw, 112px); }

/* ---------- 4. 跳过链接 ---------- */
.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 300;
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--ink-900);
  background: var(--cyan);
  border-radius: 0 0 12px 0;
  box-shadow: var(--glow-cyan);
}
.skip-link:focus { left: 0; }

/* ---------- 5. 焦点可见 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 6. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(8, 17, 31, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
}

.header-rail {
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--cyan) 0%,
    var(--violet) 46%,
    var(--amber) 74%,
    rgba(43, 64, 90, 0.25) 100%
  );
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  width: 100%;
  max-width: var(--wrap);
  min-height: 70px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  border-radius: 12px;
  transition: transform 0.2s var(--ease);
}
.brand:hover { transform: translateY(-1px); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-900);
  background: linear-gradient(150deg, var(--cyan) 0%, #1FCBB7 62%, #7BE8FF 100%);
  border-radius: 13px 13px 13px 3px;
  box-shadow: 0 0 0 1px rgba(56, 242, 210, 0.35), var(--glow-cyan);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.12;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--paper);
  white-space: nowrap;
}

.brand-line {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  color: var(--muted);
  white-space: nowrap;
}

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--paper);
  background: rgba(22, 38, 61, 0.78);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.18s ease-out, color 0.18s ease-out,
    background 0.18s ease-out;
}
.nav-toggle:hover {
  color: var(--cyan);
  border-color: rgba(56, 242, 210, 0.55);
  background: rgba(56, 242, 210, 0.09);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
  flex: 0 0 auto;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] {
  color: var(--ink-900);
  background: var(--cyan);
  border-color: var(--cyan);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(4.2px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-4.2px) rotate(-45deg);
}

/* 主导航 */
.primary-nav { margin-left: auto; }

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

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 12px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  border-radius: 9px;
  transition: color 0.18s ease-out, background 0.18s ease-out;
}

.nav-list a::before {
  counter-increment: navidx;
  content: "0" counter(navidx);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--line);
  transition: color 0.18s ease-out;
}

.nav-list a:hover {
  color: var(--paper);
  background: rgba(56, 242, 210, 0.08);
}
.nav-list a:hover::before { color: var(--cyan); }

.nav-list a[aria-current="page"] {
  color: var(--paper);
  font-weight: 700;
  background: rgba(56, 242, 210, 0.1);
}
.nav-list a[aria-current="page"]::before { color: var(--cyan); }
.nav-list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}

/* 快捷入口 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--paper);
  background: rgba(22, 38, 61, 0.68);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.18s ease-out, transform 0.18s var(--ease),
    background 0.18s ease-out;
}
.chip:hover {
  transform: translateY(-2px);
  background: rgba(22, 38, 61, 0.95);
  border-color: currentColor;
}

.chip--cyan { color: var(--cyan); border-color: rgba(56, 242, 210, 0.34); }
.chip--violet { color: var(--violet); border-color: rgba(154, 107, 255, 0.34); }
.chip--amber { color: var(--amber); border-color: rgba(255, 182, 72, 0.34); }

/* 状态条 */
.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--gutter) 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.5;
  color: var(--muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 242, 210, 0.16);
}

.status-code {
  margin-left: auto;
  color: var(--amber);
  letter-spacing: 0.16em;
  white-space: nowrap;
}

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet) 70%, var(--amber));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 8vw, 120px);
  background: var(--ink-800);
  border-top: 1px solid var(--line);
}

.footer-band {
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--violet) 0%,
    var(--cyan) 38%,
    var(--amber) 68%,
    var(--line) 100%
  );
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 2fr);
  gap: clamp(28px, 4vw, 60px);
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 60px) var(--gutter) clamp(26px, 4vw, 40px);
}

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

.brand--footer .brand-mark {
  width: 38px;
  height: 38px;
  font-size: 13px;
  border-radius: 11px 11px 11px 3px;
}

.footer-note {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.footer-cta {
  padding: 10px 18px;
  font-size: 13px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(20px, 3vw, 36px);
  align-content: start;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
  color: var(--cyan);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(43, 64, 90, 0.9);
}

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

.footer-list a {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 6px 0;
  font-size: 14.5px;
  color: var(--soft);
  transition: color 0.18s ease-out, gap 0.18s var(--ease);
}
.footer-list a::before {
  content: "";
  width: 0;
  height: 1.5px;
  border-radius: 2px;
  background: var(--amber);
  transition: width 0.18s var(--ease);
}
.footer-list a:hover {
  color: var(--paper);
  gap: 8px;
}
.footer-list a:hover::before { width: 12px; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 32px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 18px var(--gutter) 32px;
  border-top: 1px solid rgba(43, 64, 90, 0.8);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.footer-contact { max-width: 74ch; }
.footer-legal { color: var(--line); white-space: nowrap; }
.footer-legal span { color: var(--amber); }

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

.section { padding-block: clamp(44px, 6.5vw, 92px); }

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(236px, 1fr)); }

/* ---------- 9. 通用组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.5;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  flex: 0 0 auto;
  background: currentColor;
}

.lead {
  max-width: 64ch;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.8;
  color: var(--soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--paper);
  background: rgba(22, 38, 61, 0.75);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: transform 0.18s var(--ease), border-color 0.18s ease-out,
    background 0.18s ease-out, box-shadow 0.18s ease-out;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 242, 210, 0.6);
  box-shadow: var(--glow-cyan);
}

.btn--primary {
  color: var(--ink-900);
  border-color: transparent;
  background: linear-gradient(120deg, var(--cyan), #2EE0C4 58%, #7BE8FF);
  box-shadow: var(--glow-cyan);
}
.btn--primary:hover {
  background: linear-gradient(120deg, #7BE8FF, var(--cyan) 60%, #2EE0C4);
}

.btn--ghost {
  color: var(--cyan);
  background: transparent;
  border-color: rgba(56, 242, 210, 0.45);
}
.btn--ghost:hover { background: rgba(56, 242, 210, 0.1); }

.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: linear-gradient(160deg, rgba(22, 38, 61, 0.92), rgba(15, 27, 46, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease), border-color 0.2s ease-out,
    box-shadow 0.2s ease-out;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 242, 210, 0.42);
  box-shadow: var(--glow-violet);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--cyan);
  background: rgba(56, 242, 210, 0.1);
  border: 1px solid rgba(56, 242, 210, 0.28);
  border-radius: 6px;
}
.tag--amber {
  color: var(--amber);
  background: rgba(255, 182, 72, 0.1);
  border-color: rgba(255, 182, 72, 0.3);
}
.tag--violet {
  color: var(--violet);
  background: rgba(154, 107, 255, 0.12);
  border-color: rgba(154, 107, 255, 0.3);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  line-height: 1.8;
  color: var(--muted);
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before {
  content: "/";
  margin: 0 8px;
  color: var(--line);
}
.breadcrumb a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease-out, border-color 0.18s ease-out;
}
.breadcrumb a:hover {
  color: var(--cyan);
  border-bottom-color: currentColor;
}
.breadcrumb [aria-current="page"] { color: var(--paper); }

/* 可复用图片容器：页面阶段放入 img 即可 */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 16px;
  background-color: var(--ink-700);
  background-image:
    radial-gradient(120% 90% at 16% 0%, rgba(56, 242, 210, 0.2), transparent 58%),
    radial-gradient(120% 95% at 92% 100%, rgba(154, 107, 255, 0.26), transparent 58%),
    linear-gradient(150deg, rgba(22, 38, 61, 0.95), rgba(8, 17, 31, 0.95));
}
.media > img,
.media > picture,
.media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(8, 17, 31, 0.24) 0,
    rgba(8, 17, 31, 0.24) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.55;
}
.media--wide { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }

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

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1180px) {
  .nav-list a { padding: 9px 9px; font-size: 14px; }
  .header-actions { gap: 6px; }
  .chip { padding: 5px 10px; font-size: 11.5px; }
}

@media (max-width: 1080px) {
  .header-actions { display: none; }
}

@media (max-width: 880px) {
  :root { --header-h: 74px; }

  .header-inner { min-height: 62px; gap: 10px; }

  .brand-mark { width: 38px; height: 38px; font-size: 13px; }
  .brand-name { font-size: 16.5px; }
  .brand-line { display: none; }

  .nav-toggle { display: inline-flex; margin-left: auto; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    padding: 10px var(--gutter) 18px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    background: rgba(15, 27, 46, 0.985);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 48px -30px rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
      visibility 0.2s linear;
  }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    counter-reset: navidx;
  }
  .nav-list a {
    padding: 13px 12px;
    font-size: 16px;
    border-radius: 10px;
  }
  .nav-list a[aria-current="page"]::after {
    left: 12px;
    right: auto;
    width: 24px;
    bottom: 7px;
  }

  .header-status { display: none; }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
  .footer-note { max-width: none; }

  .footer-base {
    font-size: 11px;
    padding-bottom: 28px;
  }
  .footer-legal { white-space: normal; }
}

@media (max-width: 540px) {
  body { font-size: 16px; }
  .brand-text { gap: 0; }
  .brand-name { font-size: 15.5px; }
  .nav-toggle-label { display: none; }
  .nav-toggle { padding: 10px 12px; }

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

  .btn { padding: 11px 20px; font-size: 14px; }
  .breadcrumb { font-size: 10.5px; }
}

/* ---------- 11. 动效偏好 ---------- */
@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;
  }

  .reveal-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .brand:hover,
  .btn:hover,
  .card:hover,
  .chip:hover { transform: none; }

  .scroll-progress { transition: none; }
}
