/* ==========================================================================
   宝马娱乐会馆 · 共享站点样式  /assets/site.css
   框架式导航 + 街角夜色 + 复古出版色
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --navy: #0A1A2A;
  --deep: #12304A;
  --steel: #1E4A6E;
  --silver: #93A3B3;
  --bright: #DDE4EC;
  --cream: #F4EEE3;
  --neon: #FF6A2B;
  --lamp: #FFC978;
  --press: #C0432F;
  --mint: #4FA88A;
  --ink: #221A14;

  --font-display: "Noto Sans SC", "HarmonyOS Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-body: "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --shell: 1280px;
  --gutter: 24px;
  --header-h: 68px;

  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --pill: 999px;

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy);
  color: var(--bright);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#main-content { scroll-margin-top: calc(var(--header-h) + 20px); }

h1, h2, h3, h4 {
  margin: 0 0 .55em;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.18;
}

p { margin: 0 0 1em; }

ul, ol { margin: 0 0 1em; padding-left: 1.15em; }

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

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

button { font: inherit; }

::selection {
  background: var(--lamp);
  color: var(--navy);
}

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

/* ---------- 工具类 ---------- */

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

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

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.78;
}

.prose h2 { margin-top: 1.9em; font-size: 28px; }
.prose h3 { margin-top: 1.6em; font-size: 22px; }
.prose p  { margin: 0 0 1.15em; }
.prose ul,
.prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose a {
  color: var(--press);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}
.prose a:hover { color: var(--neon); }
.prose blockquote {
  margin: 1.6em 0;
  padding: .2em 0 .2em 1.25em;
  border-left: 3px solid var(--press);
  color: var(--ink);
  opacity: .85;
}

.surface-cream {
  background: var(--cream);
  color: var(--ink);
}
.surface-cream .eyebrow,
.surface-cream .breadcrumbs { color: #6d6055; }
.surface-cream .breadcrumbs a { color: #6d6055; }
.surface-cream .breadcrumbs a:hover { color: var(--press); }
.surface-cream .breadcrumbs__sep { color: #b9ab9a; }
.surface-cream .btn--ghost {
  background: transparent;
  border-color: #cbbda9;
  color: var(--ink);
}
.surface-cream .btn--ghost:hover {
  border-color: var(--press);
  color: var(--press);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--silver);
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  background: transparent;
  color: var(--bright);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
  text-align: center;
  cursor: pointer;
  transition:
    transform .2s var(--ease),
    background-color .2s var(--ease),
    border-color .2s var(--ease),
    color .2s var(--ease),
    box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--neon);
  border-color: var(--neon);
  color: #10202e;
  box-shadow: 0 16px 32px -20px rgba(255, 106, 43, .95);
}
.btn--primary:hover { background: #ff7f4c; border-color: #ff7f4c; }

.btn--ghost {
  background: rgba(18, 48, 74, .5);
  border-color: var(--steel);
  color: var(--bright);
}
.btn--ghost:hover { border-color: var(--lamp); color: var(--lamp); }

.btn--quiet {
  padding-left: 10px;
  padding-right: 10px;
  color: var(--lamp);
}
.btn--quiet:hover { color: var(--neon); }

/* ---------- 胶囊与状态 ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border: 1px solid var(--steel);
  border-radius: var(--pill);
  background: rgba(18, 48, 74, .62);
  color: var(--bright);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}
.surface-cream .pill {
  border-color: #cbbda9;
  background: rgba(255, 255, 255, .55);
  color: var(--ink);
}

.status-panel {
  position: relative;
  padding: 26px 28px;
  border: 1px solid var(--steel);
  border-radius: var(--r-lg);
  background: linear-gradient(155deg, rgba(30, 74, 110, .58), rgba(10, 26, 42, .94));
  overflow: hidden;
}
.status-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--lamp), var(--neon));
}

/* ---------- 图片容器基础规则 ---------- */

.media-frame {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--steel);
  border-radius: var(--r-lg);
  background:
    radial-gradient(90% 90% at 78% -18%, rgba(255, 201, 120, .16), transparent 60%),
    linear-gradient(150deg, #12304A, #0A1A2A 72%);
  overflow: hidden;
}
.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }

.media-frame:empty::after {
  content: "";
  position: absolute;
  inset: auto -12% -42% -12%;
  height: 74%;
  background:
    repeating-linear-gradient(90deg, rgba(147, 163, 179, .20) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(147, 163, 179, .13) 0 1px, transparent 1px 32px);
  transform: perspective(340px) rotateX(63deg);
  transform-origin: bottom center;
  opacity: .6;
  pointer-events: none;
}

.media-frame__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 20px 14px;
  background: linear-gradient(180deg, transparent, rgba(10, 26, 42, .92));
  color: var(--bright);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  line-height: 1.5;
}

/* ---------- 面包屑 ---------- */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--silver);
}
.breadcrumbs a {
  color: var(--silver);
  transition: color .2s var(--ease);
}
.breadcrumbs a:hover { color: var(--lamp); }
.breadcrumbs__sep { color: var(--steel); user-select: none; }
.breadcrumbs [aria-current="page"] { color: var(--bright); }

/* ---------- 章节编号 ---------- */

.chapter-mark {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--silver);
}
.chapter-mark__num {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--press);
  transition: color .24s var(--ease), transform .24s var(--ease);
}
.surface-cream .chapter-mark { color: #7b6d60; }
.surface-cream .chapter-mark__num { color: var(--press); }

[data-chapter] { scroll-margin-top: calc(var(--header-h) + 28px); }
[data-chapter].is-lit .chapter-mark__num {
  color: var(--neon);
  transform: translateY(-1px);
}

/* ---------- 显现（滚动触发） ---------- */

.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   头部：框架式导航条
   ========================================================================== */

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 20px;
  border-radius: var(--pill);
  background: var(--lamp);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background:
    radial-gradient(120% 190% at 88% -60%, rgba(255, 201, 120, .16), transparent 62%),
    linear-gradient(180deg, #0d2135 0%, #0A1A2A 78%);
  border-bottom: 1px solid var(--steel);
  box-shadow: 0 22px 44px -36px #000;
  color: var(--bright);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: var(--shell);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 8px var(--gutter);
}

/* 品牌字标：竖排堆叠 */
.brandmark {
  order: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  padding: 4px 2px;
  color: var(--bright);
  transition: transform .2s var(--ease);
}
.brandmark:hover { transform: translateY(-1px); }

.brandmark__glyph {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(221, 228, 236, .18);
  border-radius: 13px;
  background:
    radial-gradient(70% 70% at 30% 18%, rgba(255, 201, 120, .22), transparent 70%),
    linear-gradient(150deg, #1E4A6E, #0b1f30);
}
.brandmark__glyph svg { display: block; width: 21px; height: 21px; }

.brandmark__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  line-height: 1.1;
}
.brandmark__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .03em;
  color: var(--bright);
}
.brandmark__tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--silver);
}

/* 移动导航按钮 */
.nav-toggle {
  order: 3;
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 15px 8px 13px;
  border: 1px solid var(--steel);
  border-radius: var(--pill);
  background: rgba(18, 48, 74, .72);
  color: var(--bright);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.nav-toggle:hover { border-color: var(--lamp); }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}
.nav-toggle__bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--lamp);
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 主导航 */
.frame-nav {
  order: 4;
  margin-left: auto;
}
.frame-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.frame-nav__link {
  display: block;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  color: var(--bright);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition:
    transform .2s var(--ease),
    background-color .2s var(--ease),
    border-color .2s var(--ease),
    color .2s var(--ease);
}
.frame-nav__link:hover {
  transform: translateY(-2px);
  border-color: var(--steel);
  background: rgba(30, 74, 110, .45);
}
.frame-nav__link[aria-current="page"] {
  border-color: var(--lamp);
  background: var(--lamp);
  color: #0A1A2A;
  font-weight: 700;
}
.frame-nav__link[aria-current="page"]:hover {
  transform: translateY(-2px);
  background: #ffd79c;
  border-color: #ffd79c;
}

/* 版本徽标 */
.version-badge {
  order: 2;
  position: relative;
  flex: 0 0 auto;
  margin-left: 10px;
}
.version-badge__button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--steel);
  border-radius: var(--pill);
  background: rgba(18, 48, 74, .88);
  color: var(--bright);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .03em;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.version-badge__button:hover { border-color: var(--lamp); }
.version-badge__button[aria-expanded="true"] { border-color: var(--lamp); background: rgba(30, 74, 110, .9); }

.version-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(79, 168, 138, .55);
  animation: corner-pulse 2.4s ease-in-out infinite;
}
@keyframes corner-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 168, 138, .5); }
  50%      { box-shadow: 0 0 0 6px rgba(79, 168, 138, 0); }
}

.version-badge__v { color: var(--lamp); }
.version-badge__sep { color: var(--steel); }
.version-badge__state { color: var(--mint); }

.version-pop {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 120;
  width: 272px;
  max-width: calc(100vw - 32px);
  padding: 16px 18px 14px;
  border: 1px solid var(--steel);
  border-radius: var(--r-md);
  background: #0c2134;
  box-shadow: 0 30px 56px -30px #000;
  color: var(--bright);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.68;
}
.version-pop[hidden] { display: none !important; }
.version-pop::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 22px;
  width: 10px;
  height: 10px;
  background: #0c2134;
  border-left: 1px solid var(--steel);
  border-top: 1px solid var(--steel);
  transform: rotate(45deg);
}
.version-pop__title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lamp);
}
.version-pop__line { margin: 0 0 8px; color: var(--bright); }
.version-pop__line .mono { color: var(--lamp); }
.version-pop__link {
  color: var(--mint);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}
.version-pop__link:hover { color: var(--lamp); }
.version-pop__meta {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(30, 74, 110, .8);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--silver);
}

/* 阅读进度 */
.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 201, 120, .08);
  overflow: hidden;
  pointer-events: none;
}
.header-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lamp), var(--neon));
  box-shadow: 0 0 12px rgba(255, 201, 120, .55);
}

/* ==========================================================================
   页脚：四栏错落
   ========================================================================== */

.site-footer {
  position: relative;
  margin-top: 0;
  padding: 68px 0 0;
  border-top: 1px solid var(--steel);
  background:
    radial-gradient(90% 150% at 6% 118%, rgba(255, 201, 120, .13), transparent 62%),
    radial-gradient(70% 130% at 96% -16%, rgba(255, 106, 43, .11), transparent 62%),
    linear-gradient(180deg, #0c2033, #08151f 90%);
  color: var(--bright);
  overflow: hidden;
}

.footer-inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.35fr 1fr;
  gap: 40px 36px;
  align-items: start;
}

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

.footer-brand {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1.25;
  color: var(--bright);
}
.footer-line {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--bright);
}
.footer-note {
  margin: 0;
  max-width: 30ch;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--silver);
}

.footer-title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--lamp);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-link {
  display: inline-block;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--bright);
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.footer-link:hover {
  color: var(--lamp);
  transform: translateX(2px);
}

.footer-contact {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-contact__k {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--silver);
}
.footer-contact__v {
  display: block;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--bright);
  overflow-wrap: anywhere;
}
.footer-contact__v.mono { font-size: 14px; color: var(--lamp); }

.footer-icp {
  margin: 20px 0 0;
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--silver);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 52px;
  padding: 26px 0 22px;
  border-top: 1px solid rgba(30, 74, 110, .78);
}
.footer-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--silver);
}
.footer-copy--dim { color: rgba(147, 163, 179, .72); }

.footer-glow {
  height: 4px;
  background: linear-gradient(
    90deg,
    rgba(255, 201, 120, 0) 0%,
    rgba(255, 201, 120, .78) 22%,
    rgba(255, 106, 43, .62) 62%,
    rgba(255, 201, 120, 0) 100%);
  box-shadow: 0 -2px 22px rgba(255, 201, 120, .32);
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (min-width: 981px) {
  .footer-col:nth-child(2) { margin-top: 12px; }
  .footer-col:nth-child(3) { margin-top: 24px; }
  .footer-col:nth-child(4) { margin-top: 36px; }
}

@media (max-width: 1080px) {
  .frame-nav__link {
    padding: 8px 11px;
    font-size: 14px;
  }
  .brandmark__tag { display: none; }
  .version-badge__sep { display: none; }
}

@media (max-width: 920px) {
  :root { --header-h: 62px; --gutter: 18px; }

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

  .frame-nav {
    order: 5;
    flex: 0 0 100%;
    display: none;
    margin: 6px 0 0;
    padding: 12px 0 4px;
    border-top: 1px solid rgba(30, 74, 110, .8);
  }
  .frame-nav[data-open="true"] { display: block; }
  .frame-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .frame-nav__link {
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 15px;
  }

  .version-badge { margin-left: auto; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 34px 28px;
  }
  .footer-col--brand { grid-column: 1 / -1; }
  .footer-col--brand .footer-note { max-width: 46ch; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; --r-lg: 22px; --r-md: 16px; }

  body { font-size: 16px; }

  .header-inner { gap: 10px; padding: 9px var(--gutter); }
  .brandmark__name { font-size: 15px; }
  .brandmark__glyph { width: 32px; height: 32px; border-radius: 11px; }
  .version-badge__button { padding: 6px 11px; font-size: 11px; }
  .nav-toggle { padding: 7px 12px 7px 11px; font-size: 11px; }
  .nav-toggle__label { display: none; }

  .site-footer { padding-top: 52px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-base { margin-top: 36px; }
  .footer-copy { font-size: 11.5px; }

  .media-frame--wide { aspect-ratio: 16 / 10; }
  .media-frame--tall { aspect-ratio: 3 / 4; }
}

@media (max-width: 380px) {
  .version-badge__state { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

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

  .version-badge__dot { animation: none !important; }
  .header-progress__bar { transition: none !important; }
  .footer-link:hover,
  .frame-nav__link:hover,
  .btn:hover,
  .brandmark:hover { transform: none !important; }
}
