/* ============================================================
   澳门沙金安装 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 页头 / 页脚 / 通用组件
   ============================================================ */

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

* { margin: 0; }

:root {
  color-scheme: dark;

  --ink: #1A1A1A;
  --ink-800: #141414;
  --ink-soft: #2A2A2A;
  --paper: #F7F3EA;

  --gold: #D4A017;
  --gold-light: #F2D27A;
  --gold-deep: #A87B0B;

  --lake: #2E6F95;
  --lake-deep: #1C4A63;

  --crimson: #A63A2E;
  --slate: #6B7C86;

  --line: rgba(247, 243, 234, 0.16);
  --line-soft: rgba(247, 243, 234, 0.09);
  --line-gold: rgba(212, 160, 23, 0.38);
  --line-lake: rgba(46, 111, 149, 0.55);

  --font-display: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-pill: 999px;
  --radius-line: 2px;
  --shadow-float: 0 18px 44px -22px rgba(0, 0, 0, 0.92);

  --shell-max: 1280px;
  --pad-x: clamp(16px, 4vw, 44px);
  --header-offset: 112px;
}

html {
  scroll-padding-top: var(--header-offset);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  min-height: 100%;
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 8% -8%, rgba(46, 111, 149, 0.22), transparent 44%),
    radial-gradient(circle at 92% -4%, rgba(212, 160, 23, 0.14), transparent 40%),
    radial-gradient(circle at 50% 120%, rgba(166, 58, 46, 0.10), transparent 52%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--gold-light);
  text-decoration: none;
  transition: color 0.16s ease;
}
a:hover { color: var(--gold); }

::selection { background: var(--gold); color: #1A1A1A; }

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

/* ---------- 中文排版 ---------- */

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

h1 { font-size: clamp(40px, 6vw, 72px); }
h2 { font-size: clamp(28px, 3.6vw, 48px); }
h3 { font-size: clamp(20px, 2vw, 28px); line-height: 1.3; }
h4 { font-size: 19px; line-height: 1.4; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; }
strong, b { font-weight: 700; }
small { font-size: 13px; line-height: 1.6; }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

.visually-hidden {
  position: absolute !important;
  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;
}

.hairline { height: 1px; border: 0; background: var(--line); }

/* ============================================================
   页头 · 悬浮胶囊浮岛
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: clamp(10px, 1.6vw, 18px) var(--pad-x);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.94) 0%, rgba(20, 20, 20, 0.55) 62%, rgba(20, 20, 20, 0) 100%);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -220%);
  padding: 10px 20px;
  border-radius: var(--radius-line);
  background: var(--gold);
  color: #1A1A1A;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-float);
  transition: transform 0.18s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translate(-50%, 0);
  color: #1A1A1A;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 100%;
  height: 2px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--lake) 0%, var(--gold) 58%, var(--crimson) 100%);
}

.header-shell {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 1.4vw, 22px);
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 8px 10px 8px 18px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  background: rgba(20, 20, 20, 0.84);
  box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--paper);
}
.brand:hover { color: var(--paper); }

.brand-mark {
  display: grid;
  gap: 3px;
  flex: 0 0 auto;
  width: 18px;
}
.brand-mark i {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gold);
}
.brand-mark i:nth-child(2) { width: 68%; background: var(--lake); }
.brand-mark i:nth-child(3) { width: 42%; background: var(--crimson); }

.brand-text { display: block; min-width: 0; }

.brand-name {
  display: block;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-sub {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  line-height: 1.2;
  color: rgba(242, 210, 122, 0.72);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  background: rgba(247, 243, 234, 0.05);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}
.nav-toggle:hover { border-color: var(--gold); background: rgba(212, 160, 23, 0.14); }

.nav-toggle-glyph {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.18s ease;
}
.nav-toggle-glyph::before,
.nav-toggle-glyph::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.18s ease, top 0.18s ease;
}
.nav-toggle-glyph::before { top: -5px; }
.nav-toggle-glyph::after { top: 5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-glyph { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-glyph::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-glyph::after { top: 0; transform: rotate(-45deg); }

.primary-nav { justify-self: center; min-width: 0; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  list-style: none;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: rgba(247, 243, 234, 0.05);
}

.nav-link {
  display: inline-block;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: rgba(247, 243, 234, 0.78);
  transition: color 0.16s ease, background-color 0.16s ease;
}
.nav-link:hover { color: #1A1A1A; background: var(--gold-light); }
.nav-link[aria-current="page"] {
  color: #1A1A1A;
  background: var(--gold);
  font-weight: 700;
}
.nav-link[aria-current="page"]:hover { background: var(--gold-light); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.version-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: rgba(28, 74, 99, 0.32);
}

.version-btn {
  appearance: none;
  padding: 7px 11px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: rgba(247, 243, 234, 0.68);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease;
}
.version-btn:hover { color: var(--gold-light); }
.version-btn.is-active {
  background: var(--lake);
  color: #FFFFFF;
}
.version-btn.is-active:hover { color: #FFFFFF; background: #35799F; }

/* ============================================================
   通用按钮
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-line);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.03em;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn--gold { background: var(--gold); border-color: var(--gold); color: #1A1A1A; }
.btn--gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: #1A1A1A; }

.btn--ghost { background: rgba(247, 243, 234, 0.04); border-color: var(--line-gold); color: var(--paper); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-light); background: rgba(212, 160, 23, 0.12); }

.btn--crimson { background: var(--crimson); border-color: var(--crimson); color: #FFFFFF; }
.btn--crimson:hover { background: #BE4638; border-color: #BE4638; color: #FFFFFF; }

.btn--sm { padding: 8px 15px; font-size: 13px; }

.header-shell .btn { border-radius: var(--radius-pill); }

/* ============================================================
   页脚
   ============================================================ */

.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 110px);
  background: var(--ink-800);
  border-top: 1px solid var(--line-gold);
  color: var(--paper);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(247, 243, 234, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 243, 234, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 68%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 68%);
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 76px) var(--pad-x) 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  gap: clamp(24px, 4vw, 52px);
}

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

.footer-logo {
  display: inline-block;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--paper);
}
.footer-logo:hover { color: var(--gold); }

.footer-tagline {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: rgba(247, 243, 234, 0.62);
}

.footer-facts {
  display: grid;
  gap: 9px;
  margin-top: 22px;
  padding: 16px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.footer-facts li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.footer-fact-k { color: var(--slate); }
.footer-fact-v { color: var(--gold-light); }

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

.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.footer-links {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
}
.footer-links a {
  display: inline-block;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(247, 243, 234, 0.74);
  transition: color 0.16s ease, border-color 0.16s ease;
}
.footer-links a:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-deep);
}

.footer-contact {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-style: normal;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: rgba(247, 243, 234, 0.66);
  overflow-wrap: anywhere;
}
.footer-contact-line { display: block; }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 26px;
  margin-top: clamp(32px, 5vw, 58px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(247, 243, 234, 0.52);
}
.footer-meta > p { margin: 0; }
.footer-copy { letter-spacing: 0.03em; }
.footer-icp { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }
.footer-note {
  flex: 1 1 100%;
  margin-top: 6px;
  max-width: 82ch;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.75;
  color: var(--slate);
}

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 90;
  padding: 10px 17px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  background: rgba(20, 20, 20, 0.92);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 0.16s ease, color 0.16s ease;
}
.to-top:hover { background: var(--gold); color: #1A1A1A; }
.to-top[hidden] { display: none; }

/* ============================================================
   布局容器 · 章节节奏
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.container--narrow { max-width: 860px; }
.container--wide { max-width: 1440px; }

.section { padding-block: clamp(44px, 7vw, 100px); }
.section--tight { padding-block: clamp(26px, 4vw, 56px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.22em;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.lede {
  max-width: 72ch;
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: rgba(247, 243, 234, 0.78);
}

/* ---------- 正文容器 ---------- */

.prose {
  max-width: 72ch;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(247, 243, 234, 0.84);
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: 0.45em; }
.prose strong { color: var(--gold-light); }
.prose a {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--gold-deep);
}
.prose a:hover { color: var(--gold); }
.prose blockquote {
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--gold);
  font-family: var(--font-serif);
  color: rgba(247, 243, 234, 0.72);
}

/* ---------- 网格 / Bento ---------- */

.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--bento { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.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-12 { grid-column: span 12; }

.bento-card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-line);
  background: var(--ink-soft);
  overflow: hidden;
}
.bento-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(247, 243, 234, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 243, 234, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
}
.bento-card > * { position: relative; z-index: 1; }

.bento-card--gold { border-color: var(--line-gold); box-shadow: inset 3px 0 0 var(--gold); }
.bento-card--lake { background: var(--lake-deep); border-color: var(--line-lake); }
.bento-card--paper { background: var(--paper); border-color: rgba(26, 26, 26, 0.12); color: #1A1A1A; }
.bento-card--paper::after { opacity: 0.5; }

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

.breadcrumbs {
  padding-block: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--slate);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
}
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: var(--gold-deep); }
.breadcrumbs a { color: rgba(247, 243, 234, 0.66); }
.breadcrumbs a:hover { color: var(--gold-light); }
.breadcrumbs [aria-current="page"] { color: var(--gold-light); }

/* ---------- 标签 ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-line);
  background: rgba(212, 160, 23, 0.08);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.12em;
}
.tag--lake {
  border-color: var(--line-lake);
  background: rgba(46, 111, 149, 0.18);
  color: #BBD9EA;
}
.tag--crimson {
  border-color: rgba(166, 58, 46, 0.62);
  background: rgba(166, 58, 46, 0.18);
  color: #F0B7AF;
}

/* ---------- 背景分区 ---------- */

.surface-paper { background: var(--paper); color: #1A1A1A; }
.surface-paper h1,
.surface-paper h2,
.surface-paper h3,
.surface-paper h4 { color: #1A1A1A; }
.surface-paper .prose { color: #2A2A2A; }
.surface-paper .prose strong { color: #7A5A05; }
.surface-paper a { color: var(--lake); }
.surface-paper a:hover { color: #1C4A63; }
.surface-paper .lede { color: rgba(26, 26, 26, 0.74); }
.surface-paper .eyebrow { color: var(--gold-deep); }
.surface-paper .eyebrow::before { background: var(--gold-deep); }

.surface-lake { background: var(--lake-deep); color: var(--paper); }
.surface-soft { background: var(--ink-soft); }

/* ---------- 图片容器基础（页面阶段放置占位/图片） ---------- */

.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-line);
  background: linear-gradient(152deg, #12232E 0%, #1A1A1A 56%, #2A1F07 100%);
}
.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(212, 160, 23, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 160, 23, 0.10) 1px, transparent 1px);
  background-size: 36px 36px;
}
.media-frame img,
.media-frame video,
.media-frame picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 0;
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--21x9 { aspect-ratio: 21 / 9; }
.media-frame--slab { aspect-ratio: 4 / 5; }
.media-frame--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
}
.media-frame__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(247, 243, 234, 0.34);
}
.media-frame__caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 12px 14px;
  background: linear-gradient(0deg, rgba(15, 15, 15, 0.92), rgba(15, 15, 15, 0));
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(247, 243, 234, 0.82);
}

/* ---------- 滚动渐显 ---------- */

[data-reveal].is-visible {
  animation: reveal-in 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

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

@media (max-width: 1080px) {
  .nav-link { padding: 7px 10px; font-size: 13px; }
  .version-btn { padding: 7px 9px; font-size: 11px; }
}

@media (max-width: 960px) {
  :root { --header-offset: 96px; }

  .site-header { padding-inline: clamp(10px, 3vw, 18px); }

  .header-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 10px 8px 14px;
  }

  .brand { grid-column: 1; }

  .nav-toggle {
    display: inline-flex;
    grid-column: 2;
    justify-self: end;
  }

  .header-tools { display: none; }

  .primary-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    z-index: 3;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line-gold);
    border-radius: 18px;
    background: rgba(18, 18, 18, 0.97);
    box-shadow: var(--shadow-float);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
  }

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

@media (max-width: 780px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
}

@media (max-width: 620px) {
  body { font-size: 16.5px; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-meta { gap: 6px 18px; }
  .brand-sub { display: none; }
  .nav-toggle-text { display: none; }
  .nav-toggle { padding: 10px 12px; }
}

@media (max-width: 400px) {
  .brand-name { font-size: 15px; letter-spacing: 0.04em; }
}

/* ============================================================
   动效偏好 / 打印
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto !important; }
  [data-reveal].is-visible { animation: none !important; opacity: 1; transform: none; }
}

@media print {
  .site-header,
  .site-footer::before,
  .to-top,
  .scroll-progress,
  .nav-toggle { display: none !important; }
  body { background: #FFFFFF; color: #1A1A1A; }
  .site-footer { border-top: 1px solid #CCCCCC; background: #FFFFFF; color: #1A1A1A; }
  .footer-links a,
  .footer-contact,
  .footer-note,
  .footer-meta { color: #333333; }
  a { text-decoration: underline; }
}
