/* ==========================================================================
   云顶国际娱乐 · 共享样式表 /assets/site.css
   云端夜空手册系统：夜空墨气层 + 暖纸色手册纸面 + 云顶金色带
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { list-style: none; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- 2. Tokens ---------- */
:root {
  /* 色彩系统 */
  --ink-night: #0A1026;
  --deep-cloud: #13203F;
  --night-purple: #2A1E4A;
  --warm-paper: #E7DDC9;
  --ice-white: #F7F3EA;
  --crest-gold: #D9A93C;
  --pale-gold: #F0D48A;
  --ink-gold: #6B4E12;
  --aurora-purple: #7C5AE0;
  --mist-blue: #9AA6C2;
  --ice-blue: #A8C4E8;

  --on-dark: #F7F3EA;
  --on-dark-muted: #9AA6C2;
  --on-light: #0A1026;
  --on-light-muted: #46536E;

  --hairline-dark: rgba(240, 212, 138, 0.18);
  --hairline-light: rgba(10, 16, 38, 0.12);

  /* 排版 */
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-num: "Inter", "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step-display: clamp(2.4rem, 6vw, 5rem);
  --step-1: clamp(2rem, 5vw, 4.2rem);
  --step-2: clamp(1.6rem, 3.2vw, 2.6rem);
  --step-3: clamp(1.1rem, 1.6vw, 1.4rem);

  /* 节奏与尺寸 */
  --shell-max: 1320px;
  --shell-pad: clamp(18px, 4vw, 56px);
  --rhythm-1: clamp(56px, 7vw, 80px);
  --rhythm-2: clamp(80px, 9vw, 120px);
  --rhythm-3: clamp(96px, 11vw, 160px);

  --header-h: 92px;
  --header-h-slim: 56px;

  --ease: cubic-bezier(0.22, 0.7, 0.28, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.9;
  color: var(--on-dark);
  background: var(--ink-night);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2 { font-weight: 900; letter-spacing: -0.02em; line-height: 1.14; }
h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.4; }
h1 { font-size: var(--step-display); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-3); }

strong, b { font-weight: 700; }

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

.surface-paper :focus-visible,
.surface-ice :focus-visible {
  outline-color: var(--ink-gold);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* ---------- 4. 布局容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.section { position: relative; padding-block: var(--rhythm-2); }
.section--tight { padding-block: var(--rhythm-1); }
.section--deep { padding-block: var(--rhythm-3); }

.grid { display: grid; gap: clamp(20px, 2.6vw, 38px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stack { display: flex; flex-direction: column; }
.stack--sm { gap: 8px; }
.stack--md { gap: 18px; }
.stack--lg { gap: 32px; }

.divider {
  height: 1px;
  border: 0;
  margin-block: clamp(32px, 4vw, 56px);
  background: linear-gradient(90deg, transparent, var(--hairline-dark) 12%, var(--hairline-dark) 88%, transparent);
}

.surface-paper .divider,
.surface-ice .divider {
  background: linear-gradient(90deg, transparent, var(--hairline-light) 12%, var(--hairline-light) 88%, transparent);
}

/* ---------- 5. 背景分区（长卷气层与纸面） ---------- */
.surface-night { background: var(--ink-night); color: var(--on-dark); }

.surface-cloud {
  background: linear-gradient(168deg, var(--ink-night) 0%, var(--deep-cloud) 58%, var(--night-purple) 100%);
  color: var(--on-dark);
}

.surface-paper { background: var(--warm-paper); color: var(--on-light); }
.surface-ice { background: var(--ice-white); color: var(--on-light); }

.surface-paper .eyebrow,
.surface-ice .eyebrow { color: var(--ink-gold); }

.surface-paper .eyebrow::before,
.surface-ice .eyebrow::before { background: var(--ink-gold); }

/* ---------- 6. 章节标识与色带 ---------- */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 64ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--pale-gold);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--crest-gold);
  flex: none;
}

.band {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.6;
  border: 1px solid transparent;
}

.band--gold { background: rgba(217, 169, 60, 0.16); color: var(--pale-gold); border-color: rgba(217, 169, 60, 0.4); }
.band--aurora { background: rgba(124, 90, 224, 0.2); color: #C9BAFF; border-color: rgba(124, 90, 224, 0.48); }
.band--ice { background: rgba(168, 196, 232, 0.14); color: var(--ice-blue); border-color: rgba(168, 196, 232, 0.42); }

.surface-paper .band--gold,
.surface-ice .band--gold { background: rgba(217, 169, 60, 0.2); color: var(--ink-gold); }
.surface-paper .band--ice,
.surface-ice .band--ice { background: rgba(124, 90, 224, 0.1); color: #4A34A8; }
.surface-paper .band--aurora,
.surface-ice .band--aurora { background: rgba(124, 90, 224, 0.14); color: #4A34A8; }

.chapter-no {
  display: block;
  font-family: var(--font-num);
  font-weight: 200;
  font-style: normal;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: rgba(240, 212, 138, 0.32);
}

.surface-paper .chapter-no,
.surface-ice .chapter-no { color: rgba(107, 78, 18, 0.28); }

.link-inline {
  color: var(--ice-blue);
  border-bottom: 1px solid rgba(168, 196, 232, 0.45);
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.link-inline:hover { color: var(--pale-gold); border-bottom-color: var(--crest-gold); }

.surface-paper .link-inline,
.surface-ice .link-inline { color: #3A50A0; border-bottom-color: rgba(58, 80, 160, 0.4); }
.surface-paper .link-inline:hover,
.surface-ice .link-inline:hover { color: var(--ink-gold); border-bottom-color: var(--ink-gold); }

/* ---------- 7. 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.28s var(--ease), background 0.28s var(--ease),
              border-color 0.28s var(--ease), transform 0.28s var(--ease);
}

.btn > span { position: relative; z-index: 1; }

.btn--primary {
  background: linear-gradient(100deg, var(--crest-gold) 0%, #C99324 100%);
  color: #11182F;
  box-shadow: 0 16px 34px -22px rgba(217, 169, 60, 0.95);
}

.btn--primary:hover { transform: translateY(-2px); }

.btn--ghost {
  border-color: rgba(240, 212, 138, 0.45);
  color: var(--pale-gold);
  background: transparent;
}

.btn--ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(100deg, rgba(240, 212, 138, 0.26), rgba(168, 196, 232, 0.22));
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform 0.34s var(--ease);
}

.btn--ghost:hover::before,
.btn--ghost:focus-visible::before { transform: scaleX(1); }

.btn--paper {
  background: var(--ink-night);
  color: var(--ice-white);
}

.btn--paper:hover { background: var(--deep-cloud); transform: translateY(-2px); }

.surface-paper .btn--ghost,
.surface-ice .btn--ghost { border-color: rgba(107, 78, 18, 0.4); color: var(--ink-gold); }

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--on-dark-muted);
}

.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: 0.4; }
.breadcrumb a { transition: color 0.24s var(--ease); }
.breadcrumb a:hover { color: var(--pale-gold); }
.breadcrumb [aria-current="page"] { color: var(--ice-white); }

.surface-paper .breadcrumb,
.surface-ice .breadcrumb { color: var(--on-light-muted); }
.surface-paper .breadcrumb [aria-current="page"],
.surface-ice .breadcrumb [aria-current="page"] { color: var(--on-light); }
.surface-paper .breadcrumb a:hover,
.surface-ice .breadcrumb a:hover { color: var(--ink-gold); }

/* ---------- 9. 正文容器 ---------- */
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: var(--step-2); margin-top: 2em; letter-spacing: -0.02em; }
.prose h3 { font-size: var(--step-3); margin-top: 1.7em; }
.prose ul, .prose ol { display: flex; flex-direction: column; gap: 0.6em; }
.prose li { position: relative; padding-left: 24px; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 10px;
  height: 2px;
  background: var(--crest-gold);
}
.surface-paper .prose li::before,
.surface-ice .prose li::before { background: var(--ink-gold); }

/* ---------- 10. 卡片与标签 ---------- */
.card {
  position: relative;
  padding: clamp(22px, 2.6vw, 34px);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(19, 32, 63, 0.94), rgba(42, 30, 74, 0.72));
  border: 1px solid var(--hairline-dark);
  box-shadow: 0 30px 62px -50px rgba(0, 0, 0, 0.95);
  transition: transform 0.36s var(--ease), box-shadow 0.36s var(--ease), border-color 0.36s var(--ease);
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(240, 212, 138, 0.42);
  box-shadow: 0 44px 76px -50px rgba(217, 169, 60, 0.42);
}

.card--paper {
  background: var(--ice-white);
  color: var(--on-light);
  border-color: var(--hairline-light);
  box-shadow: 0 30px 62px -54px rgba(10, 16, 38, 0.6);
}

.card--paper:hover {
  border-color: rgba(217, 169, 60, 0.6);
  box-shadow: 0 40px 72px -48px rgba(217, 169, 60, 0.55);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.7;
}

.tag--gold { background: rgba(217, 169, 60, 0.18); color: var(--pale-gold); }
.tag--aurora { background: rgba(124, 90, 224, 0.22); color: #C9BAFF; }
.tag--ice { background: rgba(168, 196, 232, 0.16); color: var(--ice-blue); }

.surface-paper .tag--gold,
.surface-ice .tag--gold { background: rgba(217, 169, 60, 0.22); color: var(--ink-gold); }
.surface-paper .tag--aurora,
.surface-ice .tag--aurora { background: rgba(124, 90, 224, 0.14); color: #4A34A8; }
.surface-paper .tag--ice,
.surface-ice .tag--ice { background: rgba(58, 80, 160, 0.12); color: #3A50A0; }

/* ---------- 11. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(150deg, var(--deep-cloud) 0%, var(--night-purple) 100%);
  border: 1px solid var(--hairline-dark);
  isolation: isolate;
}

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

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

.media-frame[data-placeholder]::after {
  content: attr(data-placeholder);
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(247, 243, 234, 0.55);
}

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

/* ---------- 12. 显现动效与滚动组件 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

.chapter-rail {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chapter-rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--on-dark-muted);
  transition: color 0.3s var(--ease);
}

.chapter-rail a::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

.chapter-rail a:hover { color: var(--ice-blue); }
.chapter-rail a.is-active { color: var(--pale-gold); }
.chapter-rail a.is-active::before { width: 34px; background: var(--crest-gold); opacity: 1; }

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
  z-index: 70;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(240, 212, 138, 0.42);
  background: rgba(10, 16, 38, 0.86);
  color: var(--pale-gold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease),
              visibility 0.32s var(--ease), background 0.32s var(--ease);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: rgba(217, 169, 60, 0.22); }

.to-top::before {
  content: "";
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg) translate(1px, 1px);
}

/* ---------- 13. 顶部导航 ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--crest-gold);
  color: #11182F;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transform: translateY(-180%);
  transition: transform 0.24s var(--ease);
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  color: var(--on-dark);
  background: linear-gradient(180deg, rgba(10, 16, 38, 0.98) 0%, rgba(19, 32, 63, 0.86) 100%);
  border-bottom: 1px solid var(--hairline-dark);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header[data-slim] {
  background: linear-gradient(180deg, rgba(10, 16, 38, 0.99) 0%, rgba(19, 32, 63, 0.99) 100%);
  box-shadow: 0 22px 48px -34px rgba(0, 0, 0, 0.95);
}

.header-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 30px);
  transition: min-height 0.35s var(--ease);
}

.site-header[data-slim] .header-inner { min-height: var(--header-h-slim); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  flex: 0 0 auto;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 24%, var(--pale-gold) 0%, rgba(240, 212, 138, 0) 62%),
    linear-gradient(155deg, var(--crest-gold) 0%, var(--aurora-purple) 68%, var(--deep-cloud) 100%);
  box-shadow: 0 0 0 1px rgba(240, 212, 138, 0.42), 0 10px 22px -14px rgba(217, 169, 60, 0.95);
  transition: width 0.35s var(--ease), height 0.35s var(--ease);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 9px;
  height: 2px;
  border-radius: 2px;
  background: rgba(10, 16, 38, 0.55);
}

.site-header[data-slim] .brand-mark { width: 28px; height: 28px; }
.site-header[data-slim] .brand-sub { opacity: 0; visibility: hidden; }

.brand-text { display: flex; flex-direction: column; gap: 1px; }

.brand-name {
  display: block;
  font-size: 1.06rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ice-white);
}

.brand-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--mist-blue);
  line-height: 1.4;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.action-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(168, 196, 232, 0.34);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ice-blue);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.action-link:hover {
  color: var(--ice-white);
  border-color: var(--ice-blue);
  background: rgba(168, 196, 232, 0.12);
}

.action-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(100deg, var(--crest-gold) 0%, #C99324 100%);
  color: #11182F;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 28px -18px rgba(217, 169, 60, 0.95);
  transition: transform 0.28s var(--ease);
}

.action-cta > span { position: relative; z-index: 1; }

.action-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(100deg, var(--pale-gold) 0%, var(--crest-gold) 100%);
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform 0.34s var(--ease);
}

.action-cta:hover::before,
.action-cta:focus-visible::before { transform: scaleX(1); }
.action-cta:hover { transform: translateY(-1px); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(240, 212, 138, 0.34);
  background: rgba(19, 32, 63, 0.6);
  color: var(--pale-gold);
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.nav-toggle:hover { background: rgba(217, 169, 60, 0.16); border-color: rgba(240, 212, 138, 0.6); }

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background 0.2s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.28s var(--ease), top 0.28s var(--ease);
}

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

.site-header[data-open] .nav-toggle-bars { background: transparent; }
.site-header[data-open] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

.primary-nav { display: flex; flex: 0 0 auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 24px);
}

.nav-list a {
  position: relative;
  display: inline-block;
  padding: 8px 2px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(247, 243, 234, 0.78);
  transition: color 0.24s var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--crest-gold), var(--pale-gold));
  transition: left 0.28s var(--ease), right 0.28s var(--ease);
}

.nav-list a:hover { color: var(--ice-white); }
.nav-list a:hover::after { left: 0; right: 0; }

.nav-list a[aria-current="page"] {
  color: var(--pale-gold);
  font-weight: 700;
}

.nav-list a[aria-current="page"]::after {
  left: 0;
  right: 0;
  background: var(--crest-gold);
}

.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(4, 8, 20, 0.74);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s var(--ease), visibility 0.32s var(--ease);
}

.progress-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(240, 212, 138, 0.1);
}

.progress-bar {
  display: block;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--crest-gold) 0%, var(--pale-gold) 55%, var(--aurora-purple) 100%);
  transition: width 0.12s linear;
}

/* ---------- 14. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  color: var(--on-dark);
  background: linear-gradient(180deg, var(--ink-night) 0%, #0B142B 46%, var(--deep-cloud) 100%);
}

.footer-cloud {
  height: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--hairline-dark);
  background:
    radial-gradient(70% 140% at 12% 100%, rgba(124, 90, 224, 0.4) 0%, rgba(124, 90, 224, 0) 68%),
    radial-gradient(52% 120% at 46% 100%, rgba(168, 196, 232, 0.26) 0%, rgba(168, 196, 232, 0) 70%),
    radial-gradient(64% 130% at 84% 100%, rgba(217, 169, 60, 0.28) 0%, rgba(217, 169, 60, 0) 70%);
}

.footer-inner {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: clamp(44px, 5vw, 76px) var(--shell-pad) 38px;
}

.footer-lead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(18px, 3vw, 48px);
  padding-bottom: clamp(28px, 3.4vw, 48px);
  border-bottom: 1px solid var(--hairline-dark);
}

.brand--footer { margin-right: 0; }
.brand--footer .brand-mark { width: 38px; height: 38px; }

.footer-lede {
  flex: 1 1 320px;
  max-width: 56ch;
  font-size: 15px;
  line-height: 1.95;
  color: var(--on-dark-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1.05fr);
  gap: clamp(26px, 3vw, 52px);
  padding-block: clamp(32px, 4vw, 56px);
}

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

.footer-col-title {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--pale-gold);
}

.footer-col-text {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--on-dark-muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-link {
  display: inline-block;
  padding-bottom: 2px;
  font-size: 14px;
  color: rgba(247, 243, 234, 0.82);
  border-bottom: 1px solid transparent;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--pale-gold);
  border-bottom-color: var(--crest-gold);
}

.footer-meta {
  font-size: 13px;
  line-height: 1.85;
  color: var(--mist-blue);
}

.footer-meta + .footer-meta { margin-top: 6px; }

.footer-meta--copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.footer-mail {
  font-family: var(--font-num);
  font-weight: 300;
  color: var(--ice-blue);
  word-break: break-all;
}

.copy-btn {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(240, 212, 138, 0.4);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--pale-gold);
  cursor: pointer;
  transition: background 0.24s var(--ease), color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.copy-btn:hover { background: rgba(240, 212, 138, 0.16); }

.copy-btn.is-done {
  background: var(--crest-gold);
  border-color: var(--crest-gold);
  color: #11182F;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: clamp(20px, 2.4vw, 32px);
  border-top: 1px solid var(--hairline-dark);
}

.footer-copy,
.footer-icp {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--mist-blue);
}

.footer-icp { font-family: var(--font-num); font-weight: 300; }

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1240px) {
  .nav-list { gap: 12px; }
  .nav-list a { font-size: 14px; }
}

@media (max-width: 1120px) {
  .action-link { display: none; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  :root { --header-h: 76px; }

  .brand-sub { display: none; }

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

  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: block;
    width: min(380px, 86vw);
    padding: calc(var(--header-h) + 32px) 30px 48px;
    overflow-y: auto;
    background: linear-gradient(168deg, var(--ink-night) 0%, var(--deep-cloud) 56%, var(--night-purple) 100%);
    border-left: 1px solid var(--hairline-dark);
    box-shadow: -30px 0 70px -50px rgba(0, 0, 0, 0.95);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 0.42s var(--ease), visibility 0.42s var(--ease);
  }

  .site-header[data-open] .primary-nav { transform: translateX(0); visibility: visible; }

  .nav-scrim { display: block; }
  .site-header[data-open] .nav-scrim { opacity: 1; visibility: visible; }

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

  .nav-list li { border-bottom: 1px solid rgba(240, 212, 138, 0.12); }

  .nav-list a {
    display: block;
    padding: 18px 4px 18px 0;
    font-size: 17px;
    font-weight: 600;
    color: rgba(247, 243, 234, 0.86);
  }

  .nav-list a::after { display: none; }

  .nav-list a[aria-current="page"] { color: var(--pale-gold); padding-left: 16px; }

  .nav-list a[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--crest-gold);
    transform: translateY(-50%);
  }

  .chapter-rail { display: none; }
}

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

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

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

@media (max-width: 540px) {
  .action-cta { display: none; }
  .footer-cloud { height: 52px; }
}

/* ---------- 16. 减少动效 ---------- */
@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 { opacity: 1; transform: none; }

  .card:hover,
  .btn--primary:hover,
  .action-cta:hover { transform: none; }

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