/* ============================================================
   澳门指南 · 共享样式 /assets/site.css
   夜游指南 × 版本档案室
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
  --sea: #071C33;
  --mid: #0E2A4A;
  --rose: #FF2E7E;
  --gold: #F5B84B;
  --tile: #7FD8D3;
  --porcelain: #F4F1E8;
  --mint: #63E6A8;
  --ink: #0A0A0C;
  --mist: #A9B4C2;
  --azu: #1E5AA8;

  --font-heading: "PingFang SC", "Heiti SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  --font-body: "Songti SC", "SimSun", "Source Han Serif SC", "Noto Serif SC", "PingFang SC", serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Consolas", "Menlo", "Courier New", monospace;

  --w-page: 1180px;
  --shadow-hard: 6px 6px 0 var(--ink);
  --t: 260ms cubic-bezier(.2, .7, .3, 1);
  --t-fast: 180ms ease;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sea);
  color: var(--porcelain);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, picture { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; }
a { color: var(--tile); text-underline-offset: 3px; }

::selection { background: var(--rose); color: #fff; }

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

#main-content { scroll-margin-top: 120px; }

/* ---------- 中文排版基座 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.18;
}

.h1, h1 { font-size: clamp(36px, 5.4vw, 68px); }
.h2, h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: .02em; }
.h3, h3 { font-size: clamp(19px, 2.1vw, 25px); font-weight: 700; }

.mono {
  font-family: var(--font-mono);
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}

.lead {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.8;
  color: var(--porcelain);
}

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

/* ---------- 通用容器 ---------- */
.page-shell {
  width: 100%;
  max-width: var(--w-page);
  margin: 0 auto;
  padding-inline: 24px;
}

.section { padding-block: clamp(48px, 7vw, 96px); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.rule {
  height: 2px;
  border: 0;
  background: linear-gradient(90deg, var(--rose), var(--gold) 48%, var(--tile));
  opacity: .9;
}

/* ---------- 索引与标语 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--rose);
  flex: 0 0 auto;
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(127, 216, 211, .42);
  background: rgba(127, 216, 211, .08);
  color: var(--tile);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.6;
  white-space: nowrap;
}

.tag-rose { color: var(--rose); border-color: rgba(255, 46, 126, .45); background: rgba(255, 46, 126, .1); }
.tag-gold { color: var(--gold); border-color: rgba(245, 184, 75, .45); background: rgba(245, 184, 75, .1); }
.tag-mint { color: var(--mint); border-color: rgba(99, 230, 168, .45); background: rgba(99, 230, 168, .1); }

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--mist);
  list-style: none;
  margin: 0;
}

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

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(169, 180, 194, .55);
}

.breadcrumbs a {
  color: var(--tile);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.breadcrumbs a:hover { color: #fff; border-bottom-color: var(--tile); }

/* ---------- 长文排版 ---------- */
.prose { max-width: 72ch; }

.prose > * + * { margin-top: 1.05em; }

.prose h2 {
  margin-top: 2.2em;
  margin-bottom: .7em;
  font-size: clamp(24px, 2.8vw, 32px);
}

.prose h3 {
  margin-top: 1.8em;
  margin-bottom: .55em;
  color: var(--tile);
}

.prose ul, .prose ol { padding-left: 1.35em; display: grid; gap: .45em; }
.prose li::marker { color: var(--rose); }

.prose strong { color: var(--gold); font-weight: 700; }

.prose a {
  color: var(--tile);
  text-decoration: none;
  border-bottom: 1px solid rgba(127, 216, 211, .5);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.prose a:hover { color: #fff; border-bottom-color: var(--rose); }

.prose blockquote {
  border-left: 3px solid var(--rose);
  padding: 4px 0 4px 20px;
  color: var(--mist);
}

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--mid);
  box-shadow: 6px 6px 0 rgba(255, 46, 126, .32);
}

.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t), border-color var(--t);
}

.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translateY(1px); box-shadow: 1px 1px 0 var(--ink); }

.btn-rose {
  background: var(--rose);
  color: #fff;
  border-color: var(--ink);
}

.btn-rose:hover { background: #ff4a92; }

.btn-ghost {
  background: transparent;
  color: var(--porcelain);
  border-color: rgba(244, 241, 232, .38);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(244, 241, 232, .1);
  border-color: var(--tile);
  color: #fff;
  box-shadow: none;
  transform: translateY(-1px);
}

.btn-ghost:active { transform: translateY(1px); box-shadow: none; }

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 18px;
  z-index: 300;
  padding: 10px 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition: top var(--t);
}

.skip-link:focus,
.skip-link:focus-visible { top: 14px; }

/* ============================================================
   头部 · 悬浮胶囊浮岛
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 18px 24px 0;
  transition: padding var(--t);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(7, 28, 51, .94) 12%, rgba(7, 28, 51, 0) 100%);
  pointer-events: none;
}

.site-header.is-condensed { padding-top: 8px; }

.header-shell {
  position: relative;
  max-width: var(--w-page);
  margin: 0 auto;
}

.nav-capsule {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 10px 8px 16px;
  border: 2px solid rgba(127, 216, 211, .3);
  border-radius: 999px;
  background: rgba(14, 42, 74, .94);
  box-shadow: 6px 6px 0 rgba(255, 46, 126, .3), 0 20px 44px -24px rgba(0, 0, 0, .95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: padding var(--t), border-radius var(--t), background var(--t), box-shadow var(--t);
}

.site-header.is-condensed .nav-capsule {
  padding: 4px 8px 4px 12px;
  background: rgba(7, 28, 51, .98);
  box-shadow: 3px 3px 0 rgba(255, 46, 126, .55);
}

/* 品牌 */
.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--porcelain);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--rose), var(--gold));
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  transform: rotate(-4deg);
  transition: transform var(--t);
}

.brand:hover .brand-mark { transform: rotate(4deg); }

.brand-name {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
}

.brand-version {
  padding: 2px 8px;
  border: 1px solid rgba(245, 184, 75, .55);
  border-radius: 999px;
  background: rgba(245, 184, 75, .1);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  line-height: 1.6;
  white-space: nowrap;
}

/* 导航 */
.primary-nav { flex: 1 1 auto; min-width: 0; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.nav-list::-webkit-scrollbar { display: none; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--porcelain);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background var(--t), color var(--t), transform var(--t);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--tile);
  opacity: .7;
  line-height: 1;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(127, 216, 211, .14);
  color: #fff;
  transform: translateY(-1px);
}

.nav-link[aria-current="page"] {
  background: var(--porcelain);
  color: var(--sea);
}

.nav-link[aria-current="page"]:hover { color: var(--sea); transform: none; }
.nav-link[aria-current="page"] .nav-index { color: var(--rose); opacity: 1; }

/* 行动按钮 */
.header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions .btn { padding: 9px 16px; font-size: 13px; }

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 15px;
  border: 2px solid rgba(244, 241, 232, .34);
  border-radius: 999px;
  background: transparent;
  color: var(--porcelain);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}

.nav-toggle:hover { border-color: var(--tile); background: rgba(127, 216, 211, .12); }

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

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t), opacity var(--t);
}

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

.site-header[data-open="true"] .nav-toggle-bars { background: transparent; }
.site-header[data-open="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ============================================================
   页脚 · 档案底板
   ============================================================ */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding: 56px 24px 28px;
  border-top: 2px solid var(--gold);
  background: var(--sea);
  color: var(--porcelain);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .75;
  background-image:
    radial-gradient(circle at 12px 12px, rgba(127, 216, 211, .16) 2px, transparent 2.6px),
    radial-gradient(circle at 36px 36px, rgba(255, 46, 126, .14) 2px, transparent 2.6px);
  background-size: 48px 48px;
}

.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose), var(--gold), var(--tile), transparent);
  opacity: .7;
}

.footer-shell {
  position: relative;
  max-width: var(--w-page);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 36px 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(244, 241, 232, .14);
}

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

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--porcelain);
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  line-height: 1.2;
}

.footer-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--tile), var(--azu));
  color: var(--sea);
  font-size: 17px;
  font-weight: 800;
  transform: rotate(-4deg);
  transition: transform var(--t);
}

.footer-brand-link:hover .footer-mark { transform: rotate(4deg); }

.footer-tagline {
  margin-top: 14px;
  max-width: 28ch;
  color: var(--mist);
  font-size: 14px;
  line-height: 1.8;
}

.footer-version {
  display: inline-block;
  margin-top: 16px;
  padding: 3px 12px;
  border: 1px dashed rgba(245, 184, 75, .55);
  border-radius: 999px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1.7;
}

.footer-col-title {
  margin-bottom: 16px;
  color: var(--tile);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--porcelain);
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}

.footer-link::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--rose);
  opacity: .55;
  transition: opacity var(--t-fast), background var(--t-fast);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--gold);
  border-bottom-color: rgba(245, 184, 75, .55);
  transform: translateX(2px);
}

.footer-link:hover::before { background: var(--gold); opacity: 1; }

.footer-contact { font-size: 14px; }

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 10px;
  color: var(--mist);
  font-size: 13.5px;
  line-height: 1.7;
}

.contact-label {
  flex: 0 0 auto;
  color: var(--tile);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
}

.contact-value {
  color: var(--porcelain);
  word-break: break-word;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 15px;
  border: 1px solid rgba(127, 216, 211, .45);
  border-radius: 999px;
  background: rgba(244, 241, 232, .06);
  color: var(--tile);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.4;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.copy-btn:hover { background: rgba(127, 216, 211, .18); color: #fff; border-color: var(--tile); }

.copy-btn[data-copied="true"] {
  border-color: var(--mint);
  background: rgba(99, 230, 168, .16);
  color: var(--mint);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 26px;
  padding-top: 22px;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  line-height: 1.7;
}

.footer-meta-line { margin: 0; }

/* ============================================================
   滚动显现
   ============================================================ */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 360ms ease,
    transform 420ms cubic-bezier(.2, .7, .3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

html.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1000px) {
  .site-header { padding: 12px 16px 0; }
  .site-header.is-condensed { padding-top: 8px; }

  .nav-capsule {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }

  .site-header.is-condensed .nav-capsule { padding: 8px 12px; }

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

  .primary-nav {
    order: 3;
    flex: 1 1 100%;
    display: none;
    min-width: 0;
  }

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

  .nav-list {
    gap: 6px;
    padding: 6px 2px 4px;
  }

  .nav-link {
    border: 1px solid rgba(127, 216, 211, .24);
    font-size: 13.5px;
    padding: 8px 13px;
  }

  .nav-link[aria-current="page"] { border-color: var(--porcelain); }

  .header-actions {
    order: 4;
    flex: 1 1 100%;
    display: none;
    gap: 10px;
    padding: 2px 2px 4px;
  }

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

  .header-actions .btn { flex: 1 1 0; padding: 10px 12px; font-size: 13px; }

  .site-header[data-open="true"] .nav-capsule { border-radius: 26px; }

  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-3 { grid-column: span 3; }
  .col-4,
  .col-5,
  .col-6,
  .col-7,
  .col-8,
  .col-9,
  .col-12 { grid-column: span 6; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px 28px; }
}

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

  .page-shell { padding-inline: 18px; }

  .site-footer { padding: 44px 18px 24px; }

  .footer-top { grid-template-columns: 1fr; gap: 28px; }

  .footer-tagline { max-width: none; }

  .footer-meta { font-size: 11px; gap: 6px 18px; }
}

@media (max-width: 560px) {
  .site-header { padding: 10px 12px 0; }

  .brand-version { display: none; }

  .brand-name { font-size: 15px; letter-spacing: .06em; }

  .brand-mark { width: 30px; height: 30px; font-size: 14px; border-radius: 9px; }

  .nav-toggle { padding: 8px 12px; font-size: 12px; }

  .header-actions { flex-direction: column; }

  .header-actions .btn { width: 100%; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

  .col-3,
  .col-4,
  .col-5,
  .col-6,
  .col-7,
  .col-8,
  .col-9,
  .col-12 { grid-column: span 2; }

  .contact-line { flex-direction: column; gap: 2px; }
}

/* ============================================================
   动效降级
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .btn:active,
  .nav-link:hover,
  .footer-link:hover,
  .brand:hover .brand-mark,
  .footer-brand-link:hover .footer-mark {
    transform: none;
  }

  html.js-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: opacity 200ms linear;
    transition-delay: 0ms;
  }
}
