/* ============================================================
   葡京手机指南 · /assets/site.css
   共享外壳：框架式导轨导航 / 页脚仪表条 / 通用组件
   ============================================================ */

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

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

body, h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
main { display: block; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #07090C;
  --ink-soft: #0A0D12;
  --panel: #10141A;
  --gold: #D9B86C;
  --gold-light: #F3DCA4;
  --cyan: #37E6E6;
  --rose: #FF4F8B;
  --glass: rgba(255, 255, 255, 0.08);
  --paper: #F4F0E7;
  --muted: #A7AFB8;
  --line: #2B323C;
  --focus: #FFE9A8;

  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --rail-w: 284px;
  --radius: 14px;
  --shell-max: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. Base ---------- */
html, body { min-height: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    radial-gradient(46rem 28rem at 80% -8%, rgba(217, 184, 108, 0.10), transparent 72%),
    radial-gradient(38rem 26rem at 6% 104%, rgba(55, 230, 230, 0.075), transparent 72%),
    radial-gradient(30rem 20rem at 100% 72%, rgba(255, 79, 139, 0.055), transparent 72%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(217, 184, 108, 0.32); color: #fff; }

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

/* ---------- 4. Utility ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

.page-main {
  position: relative;
  z-index: 1;
  padding-block: clamp(20px, 3vw, 40px) clamp(28px, 4vw, 56px);
}

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--gold-light);
  color: #14100A;
  font: 700 13px/1 var(--font-sans);
  letter-spacing: 0.06em;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---------- 6. Header / rail navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 9, 12, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.site-header__rail {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px clamp(16px, 4vw, 24px);
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand__mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  padding-inline: 2px;
  flex: 0 0 auto;
}
.brand__mark span {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}
.brand__mark span:nth-child(1) { height: 11px; }
.brand__mark span:nth-child(2) { height: 18px; background: linear-gradient(180deg, var(--cyan), rgba(55, 230, 230, 0.3)); }
.brand__mark span:nth-child(3) { height: 25px; }

.brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.28; }
.brand__name {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--paper);
}
.brand__tag {
  font-size: 11px;
  letter-spacing: 0.09em;
  color: var(--muted);
  max-height: 22px;
  overflow: hidden;
  transition: opacity 0.2s var(--ease), max-height 0.2s var(--ease);
}

/* Mobile toggle */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--paper);
  font: 700 12px/1 var(--font-sans);
  letter-spacing: 0.14em;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.nav-toggle:hover { border-color: rgba(217, 184, 108, 0.55); background: rgba(217, 184, 108, 0.12); }

.nav-toggle__bars { display: flex; flex-direction: column; gap: 3px; width: 16px; }
.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-light);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.site-header[data-open] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.nav-toggle__text { font-size: 12px; }

/* Navigation */
.site-nav__list { display: flex; flex-direction: column; }
.site-nav__item { border-top: 1px solid var(--line); }
.site-nav__item:first-child { border-top: 0; }

.site-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.site-nav__link::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--line);
  transition: background-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.site-nav__link:hover { color: var(--paper); }
.site-nav__link:hover::before { background: var(--gold); transform: scale(1.4); }

.site-nav__link[aria-current="page"] {
  color: var(--gold-light);
  background: linear-gradient(90deg, rgba(217, 184, 108, 0.16), transparent 72%);
}
.site-nav__link[aria-current="page"]::before {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(55, 230, 230, 0.7);
}

/* Rail status */
.rail-status {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(55, 230, 230, 0.35);
  background: rgba(55, 230, 230, 0.08);
  color: var(--cyan);
  font: 700 11px/1.4 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.status-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(55, 230, 230, 0.16);
}

.rail-status__note {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Mobile collapsible panel */
@media (max-width: 1023.98px) {
  .site-header__panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 8px clamp(16px, 4vw, 24px) 20px;
    background: linear-gradient(180deg, #0A0D12, #07090C);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 48px rgba(0, 0, 0, 0.55);
  }
  .site-header[data-open] .site-header__panel {
    display: block;
    animation: panelIn 0.22s var(--ease) both;
  }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 7. Desktop rail ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--rail-w);
    border-bottom: 0;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(9, 11, 15, 0.98), rgba(6, 8, 11, 0.98));
  }

  .site-header__rail {
    height: 100%;
    padding: 26px 22px 22px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #2B323C transparent;
  }
  .site-header__rail::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 120px;
    background: linear-gradient(180deg, var(--gold), transparent);
    opacity: 0.85;
    pointer-events: none;
  }

  .site-header__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .nav-toggle { display: none; }

  .site-header .site-header__panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    position: static;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    animation: none;
  }

  .site-nav { margin-top: 26px; }
  .site-nav__item { border-top: 0; }
  .site-nav__link {
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 14.5px;
  }
  .site-nav__link:hover { background: rgba(255, 255, 255, 0.05); }
  .site-nav__link[aria-current="page"] { border-radius: 10px; }

  .rail-status { margin-top: auto; padding-top: 18px; }

  /* condensed state */
  .site-header.is-condensed .site-header__rail { padding-top: 18px; padding-bottom: 16px; }
  .site-header.is-condensed .site-nav { margin-top: 16px; }
  .site-header.is-condensed .brand__tag { opacity: 0; max-height: 0; }
}

/* ---------- 8. Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(44px, 7vw, 96px);
  border-top: 1px solid var(--line);
  background-image:
    radial-gradient(40rem 22rem at 86% 0%, rgba(217, 184, 108, 0.09), transparent 70%),
    radial-gradient(30rem 18rem at 0% 100%, rgba(55, 230, 230, 0.06), transparent 72%),
    linear-gradient(180deg, #0A0D12, #05070A);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 40px);
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 56px) clamp(26px, 4vw, 44px);
}

.site-footer__brand { min-width: 0; }

.footer-brand__name {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--gold-light);
}
.footer-brand__line {
  margin-top: 10px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}
.footer-brand__meta {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(217, 184, 108, 0.85);
}

.footer-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
}
.footer-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}
.footer-legend__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 2px;
}
.footer-legend__dot--cyan { background: var(--cyan); box-shadow: 0 0 8px rgba(55, 230, 230, 0.55); }
.footer-legend__dot--rose { background: var(--rose); box-shadow: 0 0 8px rgba(255, 79, 139, 0.55); }

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

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer-col__title::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.footer-col__list { display: flex; flex-direction: column; gap: 9px; }
.footer-col__list a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.16s var(--ease);
}
.footer-col__list a:hover { color: var(--gold-light); }

.footer-contact__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}
.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(217, 184, 108, 0.9);
}
.footer-contact__val {
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 22px;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 16px clamp(20px, 4vw, 56px) 28px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.footer-icp,
.footer-copy { font-family: var(--font-mono); letter-spacing: 0.08em; }
.footer-region {
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  color: var(--gold);
  opacity: 0.82;
}

@media (min-width: 640px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .site-footer__grid { grid-template-columns: 1.45fr 0.85fr 0.85fr 1.15fr; }
  .site-footer__brand { grid-column: auto; }
}

/* ---------- 9. Typography helpers ---------- */
.title-serif {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.16;
  letter-spacing: 0.005em;
  color: var(--paper);
}

.lede {
  max-width: 62ch;
  font-size: clamp(15.5px, 1.4vw, 18px);
  line-height: 1.8;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.85;
}
.eyebrow--cyan { color: var(--cyan); }
.eyebrow--rose { color: var(--rose); }

.rule {
  height: 1px;
  border: 0;
  margin-block: clamp(20px, 3vw, 36px);
  background: linear-gradient(90deg, var(--line), rgba(43, 50, 60, 0.1));
}

/* ---------- 10. Sections & grids ---------- */
.section { padding-block: clamp(26px, 4.5vw, 60px); }
.section--tight { padding-block: clamp(16px, 2.5vw, 32px); }

.grid {
  display: grid;
  gap: clamp(14px, 2.2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 3vw, 40px);
}
@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 7fr; align-items: start; }
}

/* ---------- 11. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 700 15px/1 var(--font-sans);
  letter-spacing: 0.03em;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #14100A;
}
.btn--gold:hover { background: linear-gradient(135deg, #FFE9A8, #E4C77C); }
.btn--ghost {
  background: var(--glass);
  border-color: var(--line);
  color: var(--paper);
}
.btn--ghost:hover { border-color: rgba(217, 184, 108, 0.6); color: var(--gold-light); }
.btn--sm { padding: 9px 16px; font-size: 13px; }
.btn:hover { transform: translateY(-1px); }

/* ---------- 12. Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.chip--gold {
  color: var(--gold-light);
  border-color: rgba(217, 184, 108, 0.42);
  background: rgba(217, 184, 108, 0.10);
}
.chip--cyan {
  color: var(--cyan);
  border-color: rgba(55, 230, 230, 0.42);
  background: rgba(55, 230, 230, 0.09);
}
.chip--rose {
  color: var(--rose);
  border-color: rgba(255, 79, 139, 0.42);
  background: rgba(255, 79, 139, 0.09);
}

/* ---------- 13. Breadcrumb ---------- */
.breadcrumb { font-size: 12px; }
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: var(--line);
}
.breadcrumb a {
  color: var(--muted);
  transition: color 0.16s var(--ease);
}
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb__item[aria-current="page"] { color: var(--gold-light); }

/* ---------- 14. Media frames ---------- */
.media-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--panel);
  background-image:
    radial-gradient(120% 90% at 12% 0%, rgba(55, 230, 230, 0.16), transparent 58%),
    radial-gradient(100% 90% at 92% 100%, rgba(255, 79, 139, 0.14), transparent 62%),
    radial-gradient(80% 70% at 60% 30%, rgba(217, 184, 108, 0.14), transparent 70%),
    linear-gradient(160deg, #141A21, #0A0D12);
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(130% 120% at 50% 0%, #000 20%, transparent 82%);
  mask-image: radial-gradient(130% 120% at 50% 0%, #000 20%, transparent 82%);
  pointer-events: none;
}
.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame__label {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(217, 184, 108, 0.3);
  background: rgba(7, 9, 12, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
}

/* ---------- 15. Reveal (JS protocol) ---------- */
[data-js="on"] [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.42s ease, transform 0.42s var(--ease);
  will-change: opacity, transform;
}
[data-js="on"] [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 16. Reduced motion ---------- */
@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;
  }
  [data-js="on"] [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .btn:hover,
  .site-nav__link:hover::before { transform: none; }
}
