/* ==========================================================================
   金都客户端 · 共享站点样式 /assets/site.css
   暖金 × 墨石 · 展览画册式布局底座
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video, canvas, picture { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
address { font-style: normal; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

/* ---------- 2. 设计变量 ---------- */
:root {
  --ink: #0D0C0A;
  --ink-2: #17150F;
  --ink-3: #221F17;
  --gold: #D9A441;
  --gold-bright: #F1CE83;
  --gold-deep: #A87C2A;
  --amber: #E0733A;
  --jade: #2E8B72;
  --paper: #F3EDE3;
  --paper-white: #FBF7F1;
  --grey: #8B8478;
  --text: #3B372F;
  --text-soft: rgba(59, 55, 47, 0.74);
  --on-ink: rgba(251, 247, 241, 0.74);
  --on-ink-soft: rgba(251, 247, 241, 0.52);
  --line: rgba(13, 12, 10, 0.14);
  --line-strong: rgba(13, 12, 10, 0.26);
  --line-dark: rgba(241, 206, 131, 0.2);
  --glass: rgba(255, 255, 255, 0.06);

  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1280px;
  --gutter: clamp(18px, 4vw, 44px);
  --header-h: 82px;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 页面底色与中文排版 ---------- */
body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--ink);
}
h1 { font-size: clamp(34px, 5.4vw, 68px); }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: clamp(20px, 2.2vw, 24px); }
h4 { font-size: 18px; font-weight: 700; }
strong, b { font-weight: 800; color: var(--ink); }
small { font-size: 13px; color: var(--grey); }
code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: rgba(13, 12, 10, 0.06);
  padding: 2px 6px;
  border-radius: var(--radius);
}
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.mono { font-family: var(--font-mono); letter-spacing: 0.04em; }
.meta { font-size: 13.5px; color: var(--grey); letter-spacing: 0.02em; }
.lead { font-size: clamp(17px, 1.7vw, 20px); line-height: 1.7; color: var(--text-soft); }
.prose { max-width: 38em; }
.prose > * + * { margin-top: 18px; }
.rule { height: 1px; border: 0; margin: 0; background: var(--line); }

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0;
  z-index: 200;
  transform: translateY(-140%);
  background: var(--gold);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 10px 18px;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 头部：紧凑命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--ink);
  color: var(--paper-white);
  border-bottom: 1px solid rgba(241, 206, 131, 0.16);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 164, 65, 0.8), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s var(--ease);
}
.site-header[data-condensed]::after { opacity: 1; }

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  min-height: var(--header-h);
  transition: min-height 0.26s var(--ease);
}
.site-header[data-condensed] .header-inner { min-height: 64px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background: linear-gradient(140deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.04em;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(241, 206, 131, 0.45);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--paper-white);
}
.brand-tagline {
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--on-ink-soft);
}

.site-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-item { display: block; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 13px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(251, 247, 241, 0.68);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(241, 206, 131, 0.6);
  transition: color 0.2s var(--ease);
}
.nav-link:hover { color: var(--gold-bright); background: rgba(241, 206, 131, 0.08); }
.nav-link:hover .nav-index { color: var(--gold-bright); }
.nav-link[aria-current="page"] {
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
}
.nav-link[aria-current="page"] .nav-index { color: rgba(13, 12, 10, 0.62); }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 2px rgba(46, 139, 114, 0.28);
}

.header-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.header-cta { padding: 10px 18px; font-size: 14px; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  background: transparent;
  border: 1px solid rgba(241, 206, 131, 0.4);
  border-radius: var(--radius);
  color: var(--gold-bright);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav-toggle:hover { background: rgba(241, 206, 131, 0.1); border-color: var(--gold); }
.nav-toggle-bars { display: inline-flex; flex-direction: column; gap: 4px; width: 16px; }
.nav-toggle-bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(241, 206, 131, 0.12);
  pointer-events: none;
}
.read-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-bright); }
.btn--ghost {
  background: transparent;
  color: var(--gold-bright);
  border-color: rgba(241, 206, 131, 0.45);
}
.btn--ghost:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn--jade { background: var(--jade); color: var(--paper-white); }
.btn--jade:hover { background: #37A184; }
.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }

/* ---------- 7. 章节骨架 ---------- */
.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(32px, 4vw, 56px); }
.section--paper { background: var(--paper); }
.section--white { background: var(--paper-white); }
.section--dark { background: var(--ink); color: var(--on-ink); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--paper-white); }
.section--dark strong { color: var(--gold-bright); }
.section--dark .lead { color: var(--on-ink); }
.section--dark .meta { color: var(--on-ink-soft); }
.section--dark .rule { background: var(--line-dark); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 28px;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--gold); }
.section-index {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--gold);
}
.section-index--outline {
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
}

/* ---------- 8. 网格与卡片 ---------- */
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.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)); }
.grid--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }

.card {
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 2.6vw, 32px);
}
.card--ink {
  background: var(--ink-2);
  border-color: var(--line-dark);
  color: var(--on-ink);
}
.card--ink h3, .card--ink h4 { color: var(--paper-white); }
.card--glass {
  background: var(--glass);
  border-color: var(--line-dark);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.glass {
  background: var(--glass);
  border: 1px solid var(--line-dark);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ---------- 9. 图片容器（页面阶段放置占位） ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}
.media-frame > img,
.media-frame > svg,
.media-frame > video,
.media-frame > canvas,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 16px;
  height: 16px;
  border-top: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
  opacity: 0.75;
  pointer-events: none;
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--3x4 { aspect-ratio: 3 / 4; }
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--grey);
  letter-spacing: 0.02em;
}

/* ---------- 10. 标签与状态 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.tag--gold { color: var(--gold-deep); border-color: rgba(217, 164, 65, 0.45); background: rgba(217, 164, 65, 0.1); }
.tag--jade { color: var(--jade); border-color: rgba(46, 139, 114, 0.4); background: rgba(46, 139, 114, 0.09); }
.tag--amber { color: var(--amber); border-color: rgba(224, 115, 58, 0.42); background: rgba(224, 115, 58, 0.1); }
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jade);
}

/* ---------- 11. 面包屑 ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--grey);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--gold); }
.breadcrumb a { text-decoration: none; border-bottom: 1px solid transparent; }
.breadcrumb a:hover { color: var(--gold-deep); border-color: rgba(217, 164, 65, 0.6); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ---------- 12. 可展开内容组 ---------- */
.collapse { border-bottom: 1px solid var(--line); }
.collapse:first-of-type { border-top: 1px solid var(--line); }
.collapse-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 22px 4px;
  background: none;
  border: 0;
  text-align: left;
  font-size: clamp(17px, 1.8vw, 20px);
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.collapse-trigger:hover { color: var(--gold-deep); }
.collapse-trigger::after {
  content: "";
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.24s var(--ease);
}
.collapse-trigger[aria-expanded="true"]::after { transform: rotate(-135deg) translateY(-2px); }
.collapse-panel { padding: 0 4px 24px; color: var(--text-soft); max-width: 62ch; }
.collapse-panel > * + * { margin-top: 12px; }

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

/* ---------- 14. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  padding-block: clamp(44px, 6vw, 80px) clamp(24px, 3vw, 36px);
  background: var(--ink);
  color: var(--on-ink);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 164, 65, 0.75) 18%, rgba(217, 164, 65, 0.75) 82%, transparent);
}
.footer-inner { display: flex; flex-direction: column; gap: clamp(30px, 4vw, 52px); }
.footer-top {
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) minmax(0, 2.6fr);
  gap: clamp(28px, 4vw, 64px);
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.brand--footer .brand-name { font-size: 18px; }
.footer-line { font-size: 14px; color: var(--on-ink-soft); max-width: 26em; }
.footer-address {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--on-ink-soft);
}
.footer-contact-item { font-family: var(--font-mono); letter-spacing: 0.03em; color: var(--gold-bright); }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 36px);
}
.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.footer-list { display: flex; flex-direction: column; gap: 10px; }
.footer-list a {
  font-size: 15px;
  color: var(--on-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer-list a:hover { color: var(--gold-bright); border-color: rgba(241, 206, 131, 0.5); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(241, 206, 131, 0.15);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: rgba(251, 247, 241, 0.45);
}

/* ---------- 15. 断点 ---------- */
@media (max-width: 1240px) {
  .brand-tagline { display: none; }
}
@media (max-width: 1079px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 8px var(--gutter) 22px;
    background: var(--ink-2);
    border-top: 1px solid rgba(241, 206, 131, 0.16);
    border-bottom: 1px solid rgba(241, 206, 131, 0.28);
  }
  .site-nav[data-open] { display: block; animation: nav-in 0.22s var(--ease) both; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link {
    padding: 15px 12px;
    font-size: 16px;
    border-radius: 0;
    border-bottom: 1px solid rgba(241, 206, 131, 0.1);
  }
  .nav-link[aria-current="page"] {
    background: rgba(217, 164, 65, 0.14);
    color: var(--gold-bright);
    box-shadow: inset 3px 0 0 var(--gold);
  }
  .nav-link[aria-current="page"] .nav-index { color: var(--gold); }
  .nav-link[aria-current="page"]::after { top: 50%; right: 14px; margin-top: -3px; }
  .grid--split { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .header-inner { gap: 12px; }
  .header-cta { display: none; }
}
@media (max-width: 620px) {
  .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-toggle-text { display: none; }
  .footer-legal { justify-content: flex-start; }
}
@media (max-width: 400px) {
  .footer-cols { grid-template-columns: minmax(0, 1fr); }
}

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

/* ---------- 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;
    scroll-behavior: auto !important;
  }
  .js-ready [data-reveal] { opacity: 1; transform: none; }
}
