/* =========================================================
   澳门沙金安装 · 共享样式表  /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, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }

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

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

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; }

table { border-collapse: collapse; width: 100%; }

hr { border: 0; border-top: 1px solid rgba(201, 194, 182, .22); margin: 32px 0; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  /* 色板 */
  --navy-900: #0C1A28;
  --navy-800: #0F2135;
  --navy-700: #16324A;
  --gold-600: #A9762F;
  --gold-400: #D9A65A;
  --gold-300: #F0C368;
  --jade-600: #2E8B7A;
  --jade-300: #7FC8B8;
  --paper: #F5F0E6;
  --ink: #1D2429;
  --ink-soft: #414A52;
  --line: #C9C2B6;
  --muted: #8A939C;

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

  /* 尺度 */
  --shell: 1240px;
  --gap: 8px;
  --radius: 4px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* 线条与阴影 */
  --rule: 1px solid rgba(169, 118, 47, .38);
  --rule-soft: 1px solid rgba(201, 194, 182, .18);
  --shadow-card: inset 0 1px 0 rgba(240, 195, 104, .10),
                 0 18px 40px -28px rgba(0, 0, 0, .92);
  --shadow-lift: inset 0 1px 0 rgba(240, 195, 104, .20),
                 0 24px 48px -26px rgba(0, 0, 0, .96);
}

/* ---------- 3. 页面基底与中文排版 ---------- */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy-900);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

#main-content { flex: 1 0 auto; outline: none; }

[id] { scroll-margin-top: 96px; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.022em;
  font-stretch: condensed;
}

h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: clamp(20px, 2.1vw, 28px); }
h4 { font-size: clamp(17px, 1.5vw, 20px); letter-spacing: -.01em; }

p { margin: 0 0 1.2em; max-width: 40em; }
p:last-child { margin-bottom: 0; }

::selection { background: rgba(240, 195, 104, .28); color: #fff; }

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

/* 工具类 */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  font-feature-settings: "tnum" 1;
}

.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--gold-400);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  flex: none;
  background: var(--gold-600);
}

.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--gold-400);
  line-height: 1.6;
}

/* ---------- 4. 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 28px;
}
.wrap--narrow { max-width: 820px; }

.section { padding: 72px 0; }
.section--tight { padding: 44px 0; }
.section--dark { background: var(--navy-900); }
.section--mid { background: var(--navy-700); }
.section--paper { background: var(--paper); color: var(--ink); }
.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 { color: var(--ink); }
.section--paper p { color: var(--ink-soft); }
.section--paper .eyebrow { color: var(--gold-600); }
.section--paper .eyebrow::before { background: var(--gold-600); }

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: stretch;
}

.panel {
  position: relative;
  min-width: 0;
  padding: 26px;
  border: var(--rule);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(22, 50, 74, .62), rgba(12, 26, 40, .88));
  box-shadow: var(--shadow-card);
  transition: border-color .22s var(--ease),
              transform .22s var(--ease),
              box-shadow .22s var(--ease);
}

.panel:hover {
  border-color: rgba(217, 166, 90, .72);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.panel--focus {
  border-color: rgba(240, 195, 104, .62);
  background: linear-gradient(180deg, rgba(30, 66, 94, .78), rgba(12, 26, 40, .94));
}

.panel--light {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
.panel--light h1,
.panel--light h2,
.panel--light h3,
.panel--light h4 { color: var(--ink); }
.panel--light p { color: var(--ink-soft); }
.panel--light .eyebrow { color: var(--gold-600); }
.panel--light .eyebrow::before { background: var(--gold-600); }
.panel--light .mono { color: var(--gold-600); }

/* ---------- 5. 图片容器（页面阶段放置占位） ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: var(--rule);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(22, 50, 74, .92), rgba(12, 26, 40, .96));
}

.media > img,
.media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.media--empty::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    115deg,
    rgba(169, 118, 47, .16) 0 1px,
    transparent 1px 14px
  );
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s var(--ease),
              border-color .2s var(--ease),
              color .2s var(--ease),
              transform .2s var(--ease);
}

.btn--gold {
  background: var(--gold-400);
  border-color: var(--gold-300);
  color: #16232E;
}
.btn--gold:hover { background: var(--gold-300); transform: translateY(-2px); }

.btn--outline {
  background: transparent;
  border-color: rgba(169, 118, 47, .58);
  color: var(--paper);
}
.btn--outline:hover {
  border-color: var(--gold-300);
  color: var(--gold-300);
  transform: translateY(-2px);
}

.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--gold-300);
  padding-left: 4px;
  padding-right: 4px;
}
.btn--quiet::after { content: "→"; font-family: var(--font-mono); }
.btn--quiet:hover { color: var(--gold-400); }

/* ---------- 7. 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 20px;
}

.crumbs > li { display: flex; align-items: center; gap: 8px; }

.crumbs a {
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.crumbs a:hover { color: var(--gold-300); border-color: var(--gold-600); }

.crumbs [aria-current="page"] { color: var(--paper); }

.crumbs .sep::before {
  content: "/";
  font-family: var(--font-mono);
  color: var(--gold-600);
}

/* ---------- 8. 正文容器 ---------- */
.prose { max-width: 40em; }

.prose > h2,
.prose > h3 { margin: 1.8em 0 .7em; }

.prose > h2:first-child,
.prose > h3:first-child { margin-top: 0; }

.prose p { margin: 0 0 1.2em; color: inherit; }

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
  display: grid;
  gap: .5em;
}

.prose ul { list-style: none; padding-left: 0; }

.prose ul > li {
  position: relative;
  padding-left: 22px;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .72em;
  width: 8px;
  height: 1px;
  background: var(--gold-600);
}

.prose ol { list-style: decimal; }
.prose ol > li::marker { font-family: var(--font-mono); color: var(--gold-400); }

.prose a {
  color: var(--gold-300);
  text-decoration: none;
  border-bottom: 1px solid rgba(169, 118, 47, .6);
}
.prose a:hover { border-color: var(--gold-300); }

.prose blockquote {
  border-left: 2px solid var(--gold-600);
  padding-left: 18px;
  color: var(--muted);
}

/* ---------- 9. 头部 ---------- */
.skip-link {
  position: absolute;
  left: 20px;
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--gold-300);
  color: #16232E;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(12, 26, 40, .94);
  border-bottom: var(--rule);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.header-shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  min-height: 68px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* 品牌锚点 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 8px 0;
  text-decoration: none;
  color: var(--paper);
}

.brand::before {
  content: "";
  width: 3px;
  height: 24px;
  flex: none;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-600));
}

.brand-name {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  font-stretch: condensed;
  white-space: nowrap;
}

.brand-version {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  padding: 2px 7px;
  border: 1px solid rgba(240, 195, 104, .45);
  border-radius: 3px;
  background: rgba(240, 195, 104, .08);
  color: var(--gold-300);
  white-space: nowrap;
}

/* 移动端栏目按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(169, 118, 47, .5);
  border-radius: var(--radius);
  background: rgba(22, 50, 74, .55);
  color: var(--paper);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.nav-toggle:hover {
  border-color: var(--gold-300);
  background: rgba(22, 50, 74, .92);
}

.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
  height: 14px;
  flex: none;
}
.nav-toggle-icon > span {
  display: block;
  height: 1.5px;
  width: 100%;
  border-radius: 1px;
  background: var(--gold-400);
  transition: transform .24s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon > span:nth-child(1) {
  transform: translateY(4.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon > span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon > span:nth-child(3) {
  transform: translateY(-4.5px) rotate(-45deg);
}

.nav-toggle-text {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
}

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

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

.nav-list > li { display: block; }

.nav-list a {
  position: relative;
  display: block;
  padding: 9px 12px;
  font-size: 14.5px;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
  border-radius: var(--radius);
  transition: color .18s var(--ease), background .18s var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 1px;
  background: var(--gold-400);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .24s var(--ease), background .2s var(--ease);
}

.nav-list a:hover { color: var(--paper); }
.nav-list a:hover::after { transform: scaleX(1); }

.nav-list a[aria-current="page"] { color: var(--paper); }
.nav-list a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--gold-300);
}

.nav-utility {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 10px;
  padding: 6px 13px;
  border: 1px solid rgba(169, 118, 47, .5);
  border-radius: 999px;
  background: rgba(22, 50, 74, .6);
  color: var(--gold-300);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.nav-utility::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--jade-300);
  box-shadow: 0 0 0 3px rgba(127, 200, 184, .16);
}
.nav-utility:hover {
  border-color: var(--gold-300);
  background: rgba(22, 50, 74, .95);
}

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300) 62%, var(--jade-300));
  opacity: .92;
  pointer-events: none;
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  flex: none;
  background: var(--navy-900);
  border-top: var(--rule);
}

.footer-shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 56px 28px 36px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.15fr;
  gap: 44px 40px;
}

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

.footer-mark {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.03em;
  font-stretch: condensed;
  color: var(--paper);
  margin: 0 0 12px;
  max-width: none;
}

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

.footer-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  padding: 3px 9px;
  border: 1px solid rgba(46, 139, 122, .5);
  border-radius: 3px;
  color: var(--jade-300);
}

.footer-heading {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .18em;
  color: var(--gold-400);
  margin: 0 0 16px;
  font-stretch: normal;
}

.footer-nav ul,
.footer-contact ul {
  display: grid;
  gap: 10px;
}

.footer-nav a {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer-nav a:hover {
  color: var(--paper);
  border-bottom-color: var(--gold-400);
}

.footer-contact li {
  display: grid;
  gap: 2px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--paper);
  word-break: break-word;
}

.footer-contact .label { margin-bottom: 0; }

.footer-legal {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px 28px 30px;
  border-top: var(--rule-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}

.footer-legal-note,
.footer-legal-icp {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
  max-width: none;
}

.footer-legal-icp { font-size: 12px; letter-spacing: .06em; }

/* ---------- 11. 显现（需脚本添加 html.js） ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
html.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1080px) {
  .header-shell { padding: 0 22px; }
  .wrap { padding: 0 22px; }
  .footer-shell { padding: 48px 22px 32px; gap: 36px 28px; }
  .footer-legal { padding: 16px 22px 26px; }
  .nav-list a { padding: 9px 9px; font-size: 14px; }
  .nav-list a::after { left: 9px; right: 9px; }
}

@media (max-width: 960px) {
  .header-shell {
    min-height: 60px;
    padding: 0 18px;
    gap: 12px;
  }
  .brand-name { font-size: 17px; }

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: var(--navy-900);
    border-bottom: var(--rule);
    box-shadow: 0 24px 40px -30px rgba(0, 0, 0, .95);
    transition: max-height .28s var(--ease), visibility .28s var(--ease);
  }

  .site-nav[data-open] {
    max-height: 78vh;
    overflow-y: auto;
    visibility: visible;
  }

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

  .nav-list a {
    padding: 13px 20px;
    font-size: 15px;
    border-radius: 0;
  }

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

  .nav-list a[aria-current="page"] {
    color: var(--gold-300);
    background: rgba(22, 50, 74, .55);
    box-shadow: inset 3px 0 0 var(--gold-300);
  }

  .nav-utility {
    margin: 6px 20px 20px;
    align-self: flex-start;
  }

  .footer-shell {
    grid-template-columns: 1fr 1fr;
    gap: 32px 26px;
  }
  .footer-brand { grid-column: 1 / -1; }

  .section { padding: 56px 0; }
  .section--tight { padding: 36px 0; }
}

@media (max-width: 720px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .panel { padding: 22px; }
}

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 18px; }
  .header-shell { padding: 0 16px; }
  .brand { gap: 9px; }
  .brand-name { font-size: 16px; }
  .brand-version { font-size: 10px; padding: 2px 5px; }
  .nav-toggle-text { display: none; }

  .footer-shell {
    grid-template-columns: 1fr;
    padding: 40px 18px 26px;
    gap: 30px;
  }
  .footer-legal {
    padding: 16px 18px 24px;
    flex-direction: column;
    align-items: flex-start;
  }

  .bento { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .section { padding: 44px 0; }
}

/* ---------- 13. 动效减弱 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .panel:hover { transform: none; }
  .btn:hover { transform: none; }
}

/* ---------- 14. 打印 ---------- */
@media print {
  .site-header,
  .site-footer,
  .scroll-progress { display: none; }
  body { background: #fff; color: #000; }
}
