/* ============================================================
   澳门新京葡8888 · 共享样式 /assets/site.css
   设计系统：导航舷窗 / 深海墨蓝 + 鎏金描边 + 纸张叠层
   ============================================================ */

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

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

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

a { text-decoration: none; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 珠宝色分区 */
  --ink: #0B1B2B;
  --ink-deep: #08141F;
  --harbor: #0E3A44;
  --indigo: #1A1836;
  --gold: #E7B75A;
  --gold-light: #F3DCA8;
  --coral: #FF6B4A;
  --teal: #2FB6A8;
  --sand: #C9A063;
  --paper: #F5F0E6;
  --mist: #A9B8C6;

  /* 字体栈：无远程加载 */
  --font-display: "Playfair Display", "思源宋体", "Source Han Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --font-head: "思源黑体", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  /* 尺寸与形状 */
  --container: 1240px;
  --gutter: 20px;
  --radius-window: 18px;
  --radius-card: 12px;
  --radius-pill: 999px;

  /* 印刷描边 */
  --line-gold: rgba(231, 183, 90, 0.28);
  --line-soft: rgba(169, 184, 198, 0.18);
  --press: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -1px 0 rgba(0, 0, 0, 0.35);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* ---------- 3. 基础排版与底色 ---------- */
html, body { min-height: 100%; }

body {
  background-color: var(--ink);
  background-image:
    radial-gradient(90% 60% at 12% -8%, rgba(14, 58, 68, 0.85), transparent 62%),
    radial-gradient(70% 50% at 94% 0%, rgba(26, 24, 54, 0.78), transparent 60%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 768px) {
  body { font-size: 17px; }
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--paper);
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}

@media (min-width: 1180px) {
  h1 { font-size: 64px; }
}

p { max-width: 34em; }

/* ---------- 4. 可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 10px 20px;
  border-radius: 0 0 10px 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: top 160ms var(--ease);
}

.skip-link:focus {
  top: 0;
}

#main-content:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: -2px;
}

/* ---------- 5. 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: 48px;
}

@media (min-width: 768px) {
  .section { padding-block: 72px; }
}

@media (min-width: 1180px) {
  .section { padding-block: 96px; }
}

.stack > * + * { margin-top: 16px; }

.rule {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--line-gold), transparent);
}

.hairline {
  border: 0;
  height: 1px;
  margin-block: 24px;
  background: linear-gradient(90deg, rgba(231, 183, 90, 0.45), rgba(231, 183, 90, 0));
}

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

.prose { max-width: 62ch; }
.prose p + p { margin-top: 16px; }
.prose a {
  color: var(--gold);
  border-bottom: 1px solid rgba(231, 183, 90, 0.5);
}
.prose a:hover { color: var(--gold-light); }

.numeral {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.88;
  color: var(--gold);
}

/* ---------- 6. 标题组 ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.section-head {
  max-width: 660px;
  margin-bottom: 28px;
}

.section-head .eyebrow { margin-bottom: 10px; }

.section-head p {
  margin-top: 12px;
  color: var(--mist);
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
  cursor: pointer;
  transition:
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--sand) 100%);
  border-color: rgba(243, 220, 168, 0.6);
  color: #1A1206;
  box-shadow: var(--press);
}

.btn--gold:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-gold);
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn--coral {
  background: var(--coral);
  border-color: rgba(255, 107, 74, 0.5);
  color: #260C05;
}

.btn--coral:hover {
  background: #FF8368;
}

/* ---------- 8. 舷窗母题 ---------- */
.window {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-window);
  background: linear-gradient(165deg, rgba(14, 58, 68, 0.72) 0%, rgba(26, 24, 54, 0.88) 100%);
  box-shadow: var(--press), 0 18px 40px -24px rgba(0, 0, 0, 0.9);
}

.window__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.window__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.window__body { font-size: 15px; color: var(--mist); }

/* ---------- 9. 卡片 ---------- */
.card {
  position: relative;
  display: block;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  background: rgba(245, 240, 230, 0.04);
  color: inherit;
  box-shadow: var(--press);
  transition:
    transform 160ms var(--ease),
    border-color 160ms var(--ease),
    background-color 160ms var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  background: rgba(245, 240, 230, 0.07);
}

.card__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--coral);
}

.card__title {
  margin-top: 8px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.card__text {
  margin-top: 8px;
  font-size: 15px;
  color: var(--mist);
}

/* ---------- 10. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-gold);
  background: rgba(245, 240, 230, 0.04);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold-light);
  cursor: pointer;
  transition:
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    color 160ms var(--ease);
}

.tag:hover {
  border-color: var(--gold);
  color: var(--paper);
}

.tag--active,
.tag[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--sand) 0%, #B0864A 100%);
  border-color: var(--gold-light);
  color: #1A1206;
}

/* ---------- 11. 网格 ---------- */
.grid {
  display: grid;
  gap: 24px;
}

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

@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 12. 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-card);
  background: linear-gradient(160deg, var(--harbor) 0%, var(--indigo) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.media__img,
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.92) saturate(0.9);
  transition: filter 220ms var(--ease);
}

.media:hover .media__img,
.media:hover img {
  filter: brightness(0.99) saturate(1);
}

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

.media__tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-gold);
  background: rgba(8, 20, 31, 0.82);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--gold-light);
}

/* ---------- 13. 面包屑 ---------- */
.breadcrumb { margin-bottom: 20px; }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mist);
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: rgba(169, 184, 198, 0.45);
}

.breadcrumb__link {
  color: var(--mist);
  transition: color 160ms var(--ease);
}

.breadcrumb__link:hover { color: var(--gold); }

/* ---------- 14. 页头：紧凑命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: var(--paper);
  background: linear-gradient(180deg, rgba(11, 27, 43, 0.97) 0%, rgba(11, 27, 43, 0.9) 100%);
  border-bottom: 1px solid var(--line-gold);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: var(--container);
  min-height: 56px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  transition: min-height 220ms var(--ease);
}

@media (min-width: 1024px) {
  .header-inner { gap: 24px; }
}

.site-header[data-scrolled] .header-inner {
  min-height: 48px;
}

/* 字标 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: inherit;
}

.brand__mark {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid rgba(231, 183, 90, 0.45);
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--gold);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}

.brand:hover .brand__mark {
  border-color: var(--gold);
  background: rgba(231, 183, 90, 0.1);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--paper);
  max-width: none;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--mist);
  max-width: none;
}

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--mist);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms var(--ease);
}

.nav-link:hover {
  color: var(--paper);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--gold);
  background: rgba(231, 183, 90, 0.08);
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--coral);
  opacity: 0.85;
}

.nav-link[aria-current="page"] .nav-index {
  color: var(--gold);
  opacity: 1;
}

.nav-label {
  display: inline-block;
}

/* 右侧工具区 */
.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
  flex: 0 0 auto;
}

.lookup-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 107, 74, 0.55);
  background: rgba(255, 107, 74, 0.1);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition:
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    color 160ms var(--ease);
}

.lookup-link:hover {
  background: rgba(255, 107, 74, 0.24);
  border-color: var(--coral);
  color: var(--gold-light);
}

.lookup-link__dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.18);
}

/* 移动开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 107, 74, 0.55);
  background: rgba(255, 107, 74, 0.08);
  color: var(--paper);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}

.nav-toggle:hover {
  background: rgba(255, 107, 74, 0.18);
  border-color: var(--coral);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--coral);
  box-shadow: 0 -5px 0 var(--coral), 0 5px 0 var(--coral);
  transition: background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: var(--gold);
  box-shadow: 0 -5px 0 var(--gold), 0 5px 0 var(--gold);
}

.nav-toggle__text {
  display: inline-block;
}

/* 滚动进度条 */
.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  overflow: hidden;
  background: rgba(169, 184, 198, 0.12);
}

.header-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--coral) 100%);
}

/* 移动端命令栏 */
@media (max-width: 1023px) {
  .header-inner { gap: 10px; }

  .brand__mark {
    font-size: 15px;
    padding: 1px 5px;
  }

  .brand__name { font-size: 14px; }

  .brand__sub { display: none; }

  .lookup-link {
    padding: 6px 10px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }

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

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 8px var(--gutter) 20px;
    background: linear-gradient(180deg, rgba(11, 27, 43, 0.99) 0%, rgba(14, 58, 68, 0.99) 100%);
    border-bottom: 1px solid var(--line-gold);
    box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.9);
  }

  .site-nav[data-open="true"] {
    display: flex;
  }

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

  .nav-link {
    display: flex;
    justify-content: flex-start;
    padding: 14px 12px;
    font-size: 16px;
    border-radius: 10px;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-link::after {
    left: 12px;
    right: auto;
    width: 26px;
    bottom: 8px;
  }
}

/* ---------- 15. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 80px;
  color: var(--paper);
  background-color: var(--ink-deep);
  background-image: radial-gradient(120% 80% at 50% -20%, rgba(14, 58, 68, 0.7), transparent 62%);
  border-top: 1px solid var(--line-gold);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(169, 184, 198, 0.14) 1px, transparent 1px);
  background-size: 20px 20px;
}

.footer-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 56px var(--gutter) 32px;
}

@media (min-width: 640px) {
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1.4fr 0.9fr 0.9fr 1.2fr;
    gap: 40px;
  }
}

.footer-brand__mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 52px;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--gold);
  max-width: none;
}

.footer-brand__name {
  margin-top: 10px;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.footer-brand__note {
  margin-top: 8px;
  max-width: 24em;
  font-size: 13px;
  line-height: 1.7;
  color: var(--mist);
}

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

.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-link {
  display: inline-block;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  font-size: 14px;
  color: rgba(245, 240, 230, 0.78);
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

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

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

.footer-contact__row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(169, 184, 198, 0.16);
}

.footer-contact__row:last-child { border-bottom: 0; }

.footer-contact__label {
  flex: 0 0 auto;
  min-width: 44px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--mist);
}

.footer-contact__value {
  flex: 1 1 12em;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-legal {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 16px var(--gutter) 28px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.footer-legal__icp,
.footer-legal__copy {
  max-width: none;
  margin: 0;
  color: var(--mist);
}

/* ---------- 16. 降级动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover { transform: none; }

  .nav-link:hover::after,
  .nav-link[aria-current="page"]::after {
    transform: scaleX(1);
  }
}
