/* ==========================================================================
   澳门新京葡指南 · 共享样式 /assets/site.css
   01 变量与重置  02 中文排版  03 通用组件  04 头部轨道  05 页脚  06 偏好与响应式
   ========================================================================== */

/* ---------- 01 变量与重置 ---------- */
:root {
  --ink-deep: #0B1F1A;
  --ink-black: #06110E;
  --paper: #F4EEE3;
  --gold: #C9A227;
  --gold-sand: #E7D6A4;
  --magenta: #E8368F;
  --cyan: #39E1D6;
  --muted: #8A9A93;
  --card: #123028;

  --rail-w: 232px;
  --content-max: 1160px;
  --gutter: 18px;

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", system-ui, serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", "Courier New", monospace;

  --ease: 180ms ease;
  --rule: 1px solid rgba(231, 214, 164, .16);
  --rule-strong: 1px solid rgba(231, 214, 164, .34);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink-deep);
  background-image:
    radial-gradient(900px 520px at 88% -6%, rgba(57, 225, 214, .07), transparent 62%),
    radial-gradient(760px 460px at -8% 102%, rgba(232, 54, 143, .06), transparent 62%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

p, figure, blockquote, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
p { text-wrap: pretty; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 14px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 2px;
  background: var(--cyan);
  color: var(--ink-black);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .04em;
  transition: top var(--ease);
}
.skip-link:focus { top: 14px; }

/* ---------- 02 中文排版 ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose { max-width: 36em; }
.prose p + p { margin-top: .9em; }

.lede {
  max-width: 36em;
  font-size: 17.5px;
  line-height: 1.8;
  color: rgba(244, 238, 227, .86);
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-sand);
}

.meta {
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--muted);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-bottom: 18px;
}

.section-title { font-size: clamp(22px, 3vw, 30px); }

.hairline {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, rgba(201, 162, 39, .55), rgba(201, 162, 39, 0));
}

/* ---------- 03 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 13.5px;
  line-height: 1.4;
  letter-spacing: .05em;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.btn--gold { background: var(--gold); color: var(--ink-black); font-weight: 600; }
.btn--gold:hover,
.btn--gold:focus-visible { background: var(--gold-sand); }
.btn--ghost { border-color: rgba(57, 225, 214, .45); color: var(--cyan); }
.btn--ghost:hover,
.btn--ghost:focus-visible { border-color: var(--cyan); background: rgba(57, 225, 214, .1); }
.btn--quiet { border-color: rgba(231, 214, 164, .3); color: var(--gold-sand); }
.btn--quiet:hover,
.btn--quiet:focus-visible { border-color: var(--gold-sand); color: var(--paper); }
.btn.is-flashing { border-color: var(--magenta); color: var(--magenta); background: rgba(232, 54, 143, .12); }

.card {
  position: relative;
  padding: 22px;
  border: var(--rule);
  border-radius: 4px;
  background: var(--card);
  transition: border-color var(--ease), background var(--ease);
}
.card:hover { border-color: rgba(201, 162, 39, .5); }
.card__title { margin-bottom: 8px; font-size: 17px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(231, 214, 164, .3);
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: .14em;
  color: var(--gold-sand);
  white-space: nowrap;
}
.tag--hot { border-color: rgba(232, 54, 143, .55); color: #FF86C4; }
.tag--live { border-color: rgba(57, 225, 214, .5); color: var(--cyan); }
.tag--quiet { border-color: rgba(138, 154, 147, .35); color: var(--muted); }

/* 图像容器：页面阶段把 <img class="media-frame__img"> 或内联 SVG 放进来 */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: var(--rule);
  border-radius: 6px;
  background: linear-gradient(155deg, #123028 0%, #06110E 78%);
}
.media-frame__img,
.media-frame__inner {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 17, 14, 0) 42%, rgba(6, 17, 14, .74) 100%);
  pointer-events: none;
}
.media-frame--placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(201, 162, 39, .1) 0 1px, transparent 1px 11px),
    radial-gradient(60% 60% at 30% 24%, rgba(57, 225, 214, .1), transparent 70%);
}
.media-frame__tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(57, 225, 214, .4);
  border-radius: 2px;
  background: rgba(6, 17, 14, .74);
  color: var(--cyan);
  font-size: 11.5px;
  letter-spacing: .14em;
}
.media-frame__tag--hot { border-color: rgba(232, 54, 143, .6); color: #FF86C4; }
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--band { aspect-ratio: 21 / 9; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--muted);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: rgba(138, 154, 147, .5); }
.breadcrumb a { transition: color var(--ease); }
.breadcrumb a:hover,
.breadcrumb a:focus-visible { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--gold-sand); }

/* 滚动淡入 */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].is-visible { opacity: 1; transition: opacity 520ms ease; }

/* ---------- 04 头部轨道 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink-black);
  border-bottom: var(--rule);
}

.rail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 12px;
  padding: 14px var(--gutter) 16px;
}

.rail__brand { grid-column: 1; min-width: 0; }

.rail__note {
  margin-top: 10px;
  max-width: 34ch;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
@media (max-width: 639px) { .rail__note { display: none; } }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 2px;
}
.brand__seal {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 46% 54% 48% 52% / 52% 46% 54% 48%;
  background: radial-gradient(60% 60% at 32% 28%, rgba(201, 162, 39, .18), transparent 72%);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  transition: border-color var(--ease), color var(--ease);
}
.brand:hover .brand__seal,
.brand:focus-visible .brand__seal { border-color: var(--gold-sand); color: var(--gold-sand); }
.brand__stack { display: flex; flex-direction: column; min-width: 0; }
.brand__name {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.35;
  color: var(--paper);
}
.brand__sub {
  font-size: 11px;
  letter-spacing: .14em;
  line-height: 1.5;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 6px 12px 6px 10px;
  border: 1px solid rgba(232, 54, 143, .4);
  border-radius: 999px;
  background: rgba(232, 54, 143, .08);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--paper);
  transition: border-color var(--ease), background var(--ease);
}
.status-pill:hover,
.status-pill:focus-visible { border-color: var(--magenta); background: rgba(232, 54, 143, .16); }
.status-pill__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--magenta);
  animation: pulse 3s ease-in-out infinite;
}
.status-pill__text { white-space: nowrap; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 54, 143, .55); opacity: 1; }
  50% { box-shadow: 0 0 0 6px rgba(232, 54, 143, 0); opacity: .65; }
}

.nav-toggle {
  grid-column: 2;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(57, 225, 214, .4);
  border-radius: 2px;
  color: var(--cyan);
  font-size: 12.5px;
  letter-spacing: .14em;
  transition: border-color var(--ease), background var(--ease);
}
.nav-toggle:hover,
.nav-toggle:focus-visible { border-color: var(--cyan); background: rgba(57, 225, 214, .1); }
.nav-toggle__label { line-height: 1; }
.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 3px; width: 16px; }
.nav-toggle__bars i {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform var(--ease), opacity var(--ease);
}
.site-header[data-open] .nav-toggle__bars i:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle__bars i:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

.rail-nav {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: max-height var(--ease), visibility var(--ease);
}
.site-header[data-open] .rail-nav {
  max-height: 70vh;
  overflow-y: auto;
  visibility: visible;
}

.rail-nav__list { position: relative; padding-left: 20px; }
.rail-nav__list::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, rgba(201, 162, 39, .9), rgba(201, 162, 39, .12));
}
.rail-nav__item { position: relative; }

.rail-nav__link { position: relative; display: block; padding: 9px 8px 9px 0; }
.rail-nav__link::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 16px;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(231, 214, 164, .45);
  border-radius: 50%;
  background: var(--ink-black);
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.rail-nav__link:hover::before,
.rail-nav__link:focus-visible::before { border-color: var(--cyan); background: var(--cyan); }

.rail-nav__index {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  line-height: 1.5;
  color: var(--muted);
}
.rail-nav__label {
  display: block;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.42;
  color: var(--paper);
  transition: color var(--ease);
}
.rail-nav__link:hover .rail-nav__label,
.rail-nav__link:focus-visible .rail-nav__label { color: var(--cyan); }

.rail-nav__hint {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.rail-nav__link[aria-current="page"] .rail-nav__label { color: var(--gold); }
.rail-nav__link[aria-current="page"] .rail-nav__index { color: var(--gold-sand); }
.rail-nav__link[aria-current="page"]::before {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, .16);
}

.rail-nav__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dotted rgba(231, 214, 164, .22);
}
.rail-nav__key { font-size: 11.5px; letter-spacing: .06em; color: var(--muted); }
.rail-nav__key kbd {
  margin-inline: 2px;
  padding: 1px 5px;
  border: 1px solid rgba(231, 214, 164, .28);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-sand);
}

.rail-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  transition: width 90ms linear;
  pointer-events: none;
}

/* ---------- 05 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 9vw, 104px);
  overflow: hidden;
  background: var(--ink-black);
  border-top: var(--rule);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px 260px at 82% 0%, rgba(57, 225, 214, .07), transparent 66%);
  pointer-events: none;
}

.footer__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: clamp(36px, 6vw, 56px) var(--gutter) 30px;
}
.footer__col { min-width: 0; }
.footer__col--brand { grid-column: 1 / -1; }

.footer__brand {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.35;
  color: var(--paper);
}
.footer__tagline {
  margin-top: 8px;
  max-width: 26ch;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}
.footer__line {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--gold-sand);
}

.footer__title {
  margin-bottom: 12px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--gold-sand);
}

.footer__list { display: grid; gap: 7px; }
.footer__list a {
  display: inline-block;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  font-size: 13.5px;
  color: rgba(244, 238, 227, .76);
  transition: color var(--ease), border-color var(--ease);
}
.footer__list a:hover,
.footer__list a:focus-visible { color: var(--cyan); border-bottom-color: rgba(57, 225, 214, .6); }
.footer__list--plain li { font-size: 12.5px; line-height: 1.7; color: var(--muted); }

.footer__bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 18px var(--gutter) 26px;
  border-top: 1px dotted rgba(231, 214, 164, .22);
}
.footer__legal-wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.footer__legal { font-size: 12px; letter-spacing: .06em; color: var(--gold-sand); }
.footer__copy { font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.footer__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.footer__actions .btn { padding: 8px 14px; font-size: 12.5px; }

/* ---------- 06 响应式与动效偏好 ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__col--brand { grid-column: 1 / -1; }
}

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

  body { padding-left: var(--rail-w); }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--rail-w);
    overflow-x: hidden;
    overflow-y: auto;
    border-bottom: 0;
    border-right: var(--rule);
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 162, 39, .35) transparent;
  }

  .rail {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 100%;
    padding: 26px 18px 18px;
  }
  .rail__brand { width: 100%; }
  .rail__note { max-width: none; }
  .nav-toggle { display: none; }

  .rail-nav {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 24px;
    max-height: none;
    overflow: visible;
    visibility: visible;
    transition: none;
  }
  .rail-nav__hint {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height var(--ease), opacity var(--ease), margin-top var(--ease);
  }
  .rail-nav__link:hover .rail-nav__hint,
  .rail-nav__link:focus-visible .rail-nav__hint,
  .rail-nav__link[aria-current="page"] .rail-nav__hint {
    max-height: 3.4em;
    margin-top: 3px;
    opacity: 1;
  }
  .rail-nav__foot { margin-top: auto; }

  .footer__inner {
    grid-template-columns: 1.5fr 1fr 1fr 1.1fr 1.3fr;
    gap: 22px;
  }
  .footer__col--brand { grid-column: auto; }

  body { background-attachment: fixed; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { opacity: 1; }
}
