/* =========================================================
   /assets/site.css — 澳门新萄京主站 共享外壳样式
   深夜休息厅秩序 / 左侧轨道 / 粗野主义刻度
   ========================================================= */

/* ---------- 1. 变量 ---------- */
:root {
  --ink: #0B1F1A;
  --ink-deep: #071512;
  --surface: #12302A;
  --gold: #C9A227;
  --gold-soft: #E7C766;
  --cream: #F2EDE3;
  --brick: #8C4A3C;
  --mint: #3FD0B0;
  --mute: #6E7F78;
  --brass: #6B5518;

  --line: #17322B;
  --line-soft: #1D3D34;

  --rail-w: 88px;
  --bar-h: 56px;
  --shell-max: 1280px;
  --gutter: 24px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-hover: 120ms;
  --t-fold: 220ms;
  --t-seg: 260ms;
  --t-rail: 180ms;

  --font-display: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "STSong", Georgia, "Times New Roman", serif;
  --font-body: "Archivo Narrow", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

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

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

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(90deg, rgba(110, 127, 120, 0.06) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(110, 127, 120, 0.045) 0 1px, transparent 1px 96px);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

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

ul, ol { margin: 0; padding: 0; }

a { color: var(--mint); text-underline-offset: 3px; }
a:hover { color: var(--gold-soft); }

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

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

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

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

/* ---------- 3. 焦点与可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
  box-shadow: inset 0 0 0 1px var(--ink-deep);
}

.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;
}

.skip-link {
  position: absolute;
  top: 0; left: 0;
  z-index: 300;
  transform: translateY(-140%);
  background: var(--gold);
  color: var(--ink-deep);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 2px solid var(--ink-deep);
  transition: transform var(--t-hover) var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  color: var(--ink-deep);
}

/* ---------- 4. 滚动进度 ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(110, 127, 120, 0.16);
  z-index: 140;
  pointer-events: none;
}
.scroll-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 45%, var(--mint) 100%);
  transition: width 120ms linear;
}

/* ---------- 5. 侧边轨道 / 头部 ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  background: var(--ink-deep);
  border-right: 2px solid var(--line);
  z-index: 120;
  display: flex;
  flex-direction: column;
}
.site-header::after {
  content: "";
  position: absolute;
  top: 0; right: -2px; bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--brass) 0 12px, transparent 12px 24px);
  pointer-events: none;
}

.rail-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 16px 0 14px;
}

/* 品牌 */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 6px 16px;
  margin: 0 8px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--cream);
}
.brand:hover { color: var(--gold-soft); }
.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
  text-orientation: upright;
  color: inherit;
  transition: color var(--t-hover) var(--ease);
}
.brand-sub {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mute);
}

/* 抽屉按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: transparent;
  border: 2px solid var(--brass);
  border-radius: 2px;
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.nav-toggle:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.nav-toggle[aria-expanded="true"] { border-color: var(--mint); color: var(--mint); }

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}
.nav-toggle-bars i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform var(--t-fold) var(--ease), opacity var(--t-fold) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 栏目导航 */
.rail-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 0 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--brass) transparent;
}
.rail-nav::-webkit-scrollbar { width: 4px; }
.rail-nav::-webkit-scrollbar-thumb { background: var(--brass); }

.rail-label {
  margin: 0 0 10px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--brass);
  text-align: center;
}

.rail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.rail-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px;
  text-decoration: none;
  color: var(--mute);
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  transition:
    color var(--t-rail) var(--ease),
    background var(--t-rail) var(--ease),
    border-color var(--t-rail) var(--ease);
}
.rail-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  color: var(--brass);
  transition: color var(--t-rail) var(--ease);
}
.rail-name {
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.rail-link:hover {
  color: var(--gold-soft);
  background: rgba(201, 162, 39, 0.07);
  border-left-color: var(--brass);
}
.rail-link:hover .rail-code { color: var(--gold-soft); }

.rail-link[aria-current="page"] {
  color: var(--cream);
  background: rgba(201, 162, 39, 0.13);
  border-right-color: var(--gold);
}
.rail-link[aria-current="page"] .rail-code { color: var(--gold); }

/* 轨道出口 */
.rail-foot {
  flex: 0 0 auto;
  margin: 12px 8px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.rail-foot-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--brass);
}
.rail-cta {
  display: block;
  text-align: center;
  padding: 9px 6px;
  border: 2px solid var(--gold);
  border-radius: 2px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.rail-cta:hover {
  background: var(--gold);
  color: var(--ink-deep);
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 10;
  background: var(--ink-deep);
  border-top: 3px solid var(--brass);
  margin-top: clamp(48px, 8vw, 104px);
}
.site-footer::before {
  content: "";
  display: block;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 24px, transparent 24px 48px);
  opacity: 0.5;
}

.footer-grid {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: clamp(36px, 5vw, 60px) var(--gutter) clamp(24px, 3vw, 40px);
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr 1fr;
  gap: 32px 28px;
}

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

.footer-title {
  position: relative;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.footer-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 30px; height: 2px;
  background: var(--gold-soft);
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.footer-list a {
  display: inline-block;
  color: var(--mute);
  font-size: 15px;
  line-height: 1.5;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  word-break: break-word;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.footer-list a:hover {
  color: var(--gold-soft);
  border-bottom-color: var(--gold-soft);
}

.footer-col--contact {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--brass);
  padding: 20px 18px 18px;
  box-shadow: 6px 6px 0 0 rgba(7, 21, 18, 0.55);
}
.footer-col--contact::before {
  content: "";
  position: absolute;
  top: -2px; left: -2px;
  width: 42px; height: 3px;
  background: var(--gold);
}
.footer-col--contact .footer-title {
  color: var(--gold-soft);
  border-bottom-color: rgba(107, 85, 24, 0.6);
}
.footer-col--contact .footer-list a { font-size: 14px; }

.footer-note {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(107, 85, 24, 0.75);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--mute);
}

.footer-base {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 20px var(--gutter) 34px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cream);
}
.footer-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.footer-meta--mono { color: var(--brass); }

/* ---------- 7. 布局容器与网格 ---------- */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: clamp(40px, 6vw, 88px) 0; }
.section--tight { padding: clamp(28px, 4vw, 56px) 0; }
.section--loose { padding: clamp(64px, 9vw, 132px) 0; }

.grid {
  display: grid;
  gap: 24px;
}
.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)); }

/* ---------- 8. 基础组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  background: var(--gold);
}

.card {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--line-soft);
  box-shadow: 6px 6px 0 0 rgba(7, 21, 18, 0.55);
  padding: 22px;
}
.card--gold { border-color: var(--gold); }
.card--brick { border-color: var(--brick); }
.card--flat { box-shadow: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 2px solid var(--gold);
  border-radius: 2px;
  background: transparent;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--t-hover) var(--ease),
    color var(--t-hover) var(--ease),
    border-color var(--t-hover) var(--ease);
}
.btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink-deep);
}
.btn--solid {
  background: var(--gold);
  color: var(--ink-deep);
}
.btn--solid:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}
.btn--ghost {
  border-color: var(--mute);
  color: var(--cream);
}
.btn--ghost:hover {
  background: transparent;
  border-color: var(--mint);
  color: var(--mint);
}

.chip {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--brick);
  border-radius: 2px;
  background: rgba(140, 74, 60, 0.22);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.chip--gold { border-color: var(--gold); background: rgba(201, 162, 39, 0.16); color: var(--gold-soft); }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.text-mute { color: var(--mute); }
.text-gold { color: var(--gold); }
.text-mint { color: var(--mint); }

.rule-scale {
  height: 10px;
  border-top: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, var(--brass) 0 1px, transparent 1px 16px);
  background-position: 0 0;
  background-size: 16px 6px;
  background-repeat: repeat-x;
  opacity: 0.85;
}

/* 面包屑 */
.breadcrumb {
  padding: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before {
  content: "/";
  color: var(--brass);
  margin-right: 6px;
}
.breadcrumb a {
  color: var(--mute);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--gold-soft); }
.breadcrumb [aria-current="page"] { color: var(--cream); }

/* 分段切换（标签页） */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  border: 2px solid var(--line-soft);
  background: var(--ink-deep);
}
.segmented [role="tab"] {
  appearance: none;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line-soft);
  color: var(--mute);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 11px 18px;
  cursor: pointer;
  transition:
    color var(--t-seg) var(--ease),
    background var(--t-seg) var(--ease),
    box-shadow var(--t-seg) var(--ease);
}
.segmented [role="tab"]:last-child { border-right: 0; }
.segmented [role="tab"]:hover { color: var(--cream); }
.segmented [role="tab"][aria-selected="true"] {
  background: rgba(201, 162, 39, 0.14);
  color: var(--gold-soft);
  box-shadow: inset 0 -2px 0 0 var(--gold);
}

/* 图片容器基础规则 */
.media-frame {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--brass);
  background: var(--ink-deep);
  aspect-ratio: 16 / 10;
}
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.06) brightness(0.92);
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(200deg, rgba(201, 162, 39, 0.14) 0%, transparent 46%);
}
.media-frame__cap {
  position: absolute;
  left: 0; bottom: 0;
  max-width: 100%;
  padding: 8px 12px;
  background: rgba(7, 21, 18, 0.88);
  border-top: 2px solid var(--gold);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* ---------- 9. 显现动效 ---------- */
[data-reveal] { opacity: 1; transform: none; }
html.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
html.js-ready [data-reveal][data-revealed="true"] {
  opacity: 1;
  transform: none;
}

/* ---------- 10. 响应式 ---------- */
@media (min-width: 901px) {
  body { padding-left: var(--rail-w); }
  .scroll-progress { left: var(--rail-w); }
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --gutter: 18px; }

  body { padding-top: var(--bar-h); }

  .site-header {
    left: 0; right: 0; bottom: auto;
    width: auto;
    height: var(--bar-h);
    border-right: 0;
    border-bottom: 2px solid var(--line);
    flex-direction: row;
    overflow: visible;
  }
  .site-header::after { display: none; }

  .rail-shell {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: var(--bar-h);
    padding: 0 14px;
  }

  .brand {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    padding: 0;
    margin: 0;
    border-bottom: 0;
  }
  .brand-mark {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-size: 17px;
    letter-spacing: 0.08em;
  }
  .brand-sub {
    display: block;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

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

  .rail-nav {
    position: fixed;
    top: var(--bar-h);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--bar-h));
    overflow-y: auto;
    padding: 12px 14px 22px;
    background: var(--ink-deep);
    border-bottom: 2px solid var(--brass);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    z-index: 110;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-14px);
    transition:
      transform var(--t-fold) var(--ease),
      opacity var(--t-fold) var(--ease),
      visibility var(--t-fold) var(--ease);
  }
  .site-header[data-open="true"] .rail-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .rail-label {
    text-align: left;
    padding: 0 2px;
    margin-bottom: 12px;
  }

  .rail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .rail-link {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 13px 12px;
    border: 1px solid var(--line-soft);
    border-left: 3px solid transparent;
    background: var(--surface);
  }
  .rail-name { white-space: normal; font-size: 14px; }
  .rail-link[aria-current="page"] { border-left-color: var(--gold); border-right-color: var(--line-soft); }

  .rail-foot {
    margin: 16px 0 0;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .rail-cta { padding: 10px 18px; font-size: 13px; }

  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }

  body { font-size: 15px; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .footer-col--contact { box-shadow: 4px 4px 0 0 rgba(7, 21, 18, 0.55); }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .card { padding: 18px; box-shadow: 4px 4px 0 0 rgba(7, 21, 18, 0.55); }

  .segmented { width: 100%; }
  .segmented [role="tab"] { flex: 1 1 auto; padding: 10px 12px; text-align: center; }
}

/* ---------- 11. 减弱动效 ---------- */
@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;
    transition-delay: 0ms !important;
  }

  html.js-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .scroll-progress > span { transition: none !important; }

  .rail-nav {
    transform: none !important;
    transition: none !important;
  }
}
