/* ===== 澳门新浦京游 · 共享样式 /assets/site.css ===== */

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

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

body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 450;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; }

/* --- 变量 --- */
:root {
  --ink: #0B1220;
  --ink-deep: #070D17;
  --glass: #121C2E;
  --cyan: #35E0D8;
  --gold: #F2B84B;
  --ember: #E0592B;
  --paper: #F4EBDD;
  --mist: #6E7F99;
  --white: #FFFFFF;
  --ok: #4FD1A5;
  --warn: #E5484D;

  --text: #D8E2EF;
  --text-dim: #93A3B8;
  --line: rgba(110, 127, 153, .22);
  --line-soft: rgba(110, 127, 153, .14);
  --line-strong: rgba(53, 224, 216, .38);

  --font-head: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  --shell: 1320px;
  --gutter: clamp(16px, 3.2vw, 36px);
  --pill: 999px;
  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-float: 0 26px 64px -36px rgba(0, 0, 0, .95);
  --glow-cyan: 0 0 0 1px rgba(53, 224, 216, .28), 0 18px 46px -26px rgba(53, 224, 216, .55);
  --glow-gold: 0 14px 34px -18px rgba(242, 184, 75, .85);
}

/* --- 环境光 --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 10% -10%, rgba(53, 224, 216, .13), transparent 68%),
    radial-gradient(760px 460px at 94% 2%, rgba(242, 184, 75, .10), transparent 70%),
    radial-gradient(780px 720px at 48% 110%, rgba(224, 89, 43, .09), transparent 70%);
}

/* --- 排版 --- */
h1, h2, h3, h4, h5 {
  margin: 0 0 .62em;
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
  color: var(--white);
}

h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.14rem, 1.9vw, 1.4rem); }
h4 { font-size: 1.02rem; letter-spacing: -.01em; }

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

strong { color: var(--white); font-weight: 700; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

code, kbd, samp, time, .mono, .idx {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.idx {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mist);
}

.lede {
  font-size: clamp(1.04rem, 1.55vw, 1.28rem);
  line-height: 1.7;
  color: #B9C7D8;
  max-width: 46ch;
}

.divider {
  height: 1px;
  margin: clamp(28px, 4vw, 56px) 0;
  background: linear-gradient(90deg, transparent, rgba(53, 224, 216, .42), rgba(242, 184, 75, .28), transparent);
}

/* --- 焦点 --- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 16px;
  z-index: 120;
  padding: 12px 20px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, #F8CE79, #E9A52B);
  color: #241703;
  font-weight: 700;
  transform: translateY(-130%);
  transition: transform .2s ease;
}

.skip-link:focus { transform: translateY(0); text-decoration: none; }

/* --- 内容宽度 --- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow { max-width: 940px; }

#main-content { display: block; scroll-margin-top: 110px; }

/* --- 网格 --- */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 30px);
}

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

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}

.split--reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* --- 面板 --- */
.panel {
  position: relative;
  padding: clamp(20px, 2.6vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--glass);
}

.panel--glass {
  background: linear-gradient(158deg, rgba(18, 28, 46, .92), rgba(11, 18, 32, .74));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-float);
}

.panel--paper {
  background: var(--paper);
  color: #2A2116;
  border-color: rgba(42, 33, 22, .16);
  box-shadow: 0 30px 70px -44px rgba(0, 0, 0, .95);
}

.panel--paper h2,
.panel--paper h3,
.panel--paper h4 { color: #1E1810; }
.panel--paper strong { color: #14100A; }
.panel--paper a { color: #A4441B; }

.panel--outline {
  background: transparent;
  border-style: dashed;
  border-color: rgba(53, 224, 216, .3);
}

/* --- 卡片 --- */
.tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(18, 28, 46, .72);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.tile:hover {
  border-color: var(--line-strong);
  background: rgba(18, 28, 46, .9);
  transform: translateY(-3px);
}

.tile__meta {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .1em;
  color: var(--mist);
}

.tile__title { margin: 0; font-size: 1.12rem; }
.tile__text { margin: 0; color: var(--text-dim); font-size: .94rem; }

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--gold {
  background: linear-gradient(180deg, #F8CE79, #E9A52B);
  color: #241703;
  box-shadow: var(--glow-gold);
}

.btn--cyan {
  background: linear-gradient(180deg, #58EDE5, #22BCB5);
  color: #04211F;
  box-shadow: 0 14px 34px -18px rgba(53, 224, 216, .9);
}

.btn--ghost {
  background: rgba(53, 224, 216, .05);
  border-color: var(--line-strong);
  color: var(--cyan);
}

.btn--ghost:hover { background: rgba(53, 224, 216, .13); }

.btn--sm { padding: 9px 17px; font-size: .85rem; }

/* --- 标签与状态 --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(110, 127, 153, .09);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: .71rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag--cyan { color: var(--cyan); border-color: rgba(53, 224, 216, .42); background: rgba(53, 224, 216, .09); }
.tag--gold { color: var(--gold); border-color: rgba(242, 184, 75, .44); background: rgba(242, 184, 75, .1); }
.tag--ember { color: #F08A63; border-color: rgba(224, 89, 43, .46); background: rgba(224, 89, 43, .12); }
.tag--ok { color: var(--ok); border-color: rgba(79, 209, 165, .42); background: rgba(79, 209, 165, .1); }

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
  flex: none;
}

/* --- 区块标题 --- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.section-head__title { margin: 0; }
.section-head__note {
  margin: 0;
  max-width: 46ch;
  color: var(--text-dim);
  font-size: .92rem;
}

/* --- 正文容器 --- */
.prose-wrap { max-width: 72ch; }
.prose-wrap p { margin-bottom: 1.15em; }
.prose-wrap h2 { margin-top: 1.9em; }
.prose-wrap h3 { margin-top: 1.6em; }
.prose-wrap ul,
.prose-wrap ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose-wrap li { margin-bottom: .5em; }

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

.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li::after { content: "/"; margin-left: 8px; color: rgba(110, 127, 153, .55); }
.breadcrumbs li:last-child::after { content: ""; margin: 0; }
.breadcrumbs a { color: #A9BACD; }
.breadcrumbs a:hover { color: var(--cyan); text-decoration: none; }
.breadcrumbs [aria-current="page"] { color: var(--cyan); }

/* --- 图片容器 --- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(152deg, #16233A, #0B1220 72%);
  box-shadow: var(--shadow-float);
}

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

.media-frame--portrait { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--cinema { aspect-ratio: 21 / 9; }
.media-frame--wide { aspect-ratio: 16 / 10; }

.media-frame--device {
  border-color: var(--line-strong);
  box-shadow: var(--glow-cyan);
}

.media-frame--device::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(53, 224, 216, .09) 0 1px, transparent 1px 4px);
  opacity: .55;
}

.media-frame__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(147, 163, 184, .8);
}

.media-frame__caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  padding: 7px 11px;
  border: 1px solid rgba(53, 224, 216, .22);
  border-radius: 9px;
  background: rgba(7, 13, 23, .74);
  color: #DCE6F2;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
}

/* ===== 头部 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 14px clamp(14px, 3vw, 30px);
  background: linear-gradient(180deg, rgba(11, 18, 32, .94), rgba(11, 18, 32, .6) 72%, rgba(11, 18, 32, 0));
}

.header-pulse {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, rgba(53, 224, 216, 0), var(--cyan) 16%, var(--gold) 84%, rgba(242, 184, 75, 0));
  opacity: .85;
  pointer-events: none;
}

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--shell);
  margin-inline: auto;
}

/* 品牌浮岛 */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 9px 18px 9px 12px;
  border: 1px solid rgba(53, 224, 216, .24);
  border-radius: var(--pill);
  background: rgba(18, 28, 46, .84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 36px -26px rgba(53, 224, 216, .9);
  color: var(--white);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}

.brand-lockup:hover {
  text-decoration: none;
  border-color: rgba(53, 224, 216, .55);
  transform: translateY(-1px);
}

.brand-lockup--footer { background: rgba(18, 28, 46, .6); border-color: rgba(53, 224, 216, .16); }

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: none;
  border: 1px solid rgba(53, 224, 216, .5);
  border-radius: 9px;
  background: linear-gradient(140deg, #12314A, #0C1727);
}

.brand-mark__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: brandPulse 3s ease-in-out infinite;
}

@keyframes brandPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--cyan); }
  50% { opacity: .55; box-shadow: 0 0 4px var(--cyan); }
}

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

.brand-text__name {
  font-family: var(--font-head);
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--white);
}

.brand-text__sub {
  font-family: var(--font-mono);
  font-size: .63rem;
  letter-spacing: .16em;
  color: var(--mist);
}

/* 导航胶囊 */
.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 1px solid rgba(110, 127, 153, .24);
  border-radius: var(--pill);
  background: rgba(18, 28, 46, .8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-float);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.site-nav__list a {
  display: block;
  padding: 9px 15px;
  border-radius: var(--pill);
  color: #C9D5E4;
  font-size: .92rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.site-nav__list a:hover {
  background: rgba(53, 224, 216, .12);
  color: var(--white);
  text-decoration: none;
}

.site-nav__list a[aria-current="page"] {
  background: rgba(53, 224, 216, .16);
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(53, 224, 216, .45);
}

.site-nav__cta { flex: none; margin-left: 4px; }

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 17px;
  border: 1px solid rgba(53, 224, 216, .32);
  border-radius: var(--pill);
  background: rgba(18, 28, 46, .88);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .14em;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

.nav-toggle:hover { border-color: rgba(53, 224, 216, .7); background: rgba(24, 38, 60, .95); }

.nav-toggle__bars {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s ease;
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ===== 页脚 ===== */
.site-footer {
  margin-top: clamp(48px, 8vw, 110px);
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(700px 300px at 8% 0%, rgba(53, 224, 216, .08), transparent 70%),
    linear-gradient(180deg, rgba(18, 28, 46, .78), #070D17 62%);
  color: var(--text-dim);
  font-size: .9rem;
}

.footer-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 66px) var(--gutter) clamp(22px, 3vw, 34px);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2.2fr;
  gap: clamp(28px, 4vw, 64px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer-tagline {
  margin: 0;
  max-width: 34ch;
  color: var(--text-dim);
  font-size: .92rem;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 42px);
}

.footer-col__title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.footer-col__list a {
  color: #B4C3D6;
  text-decoration: none;
  transition: color .18s ease;
}

.footer-col__list a:hover { color: var(--cyan); text-decoration: none; }

.footer-col__list--plain li {
  color: var(--text-dim);
  font-size: .86rem;
  line-height: 1.6;
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  margin-top: clamp(28px, 4vw, 50px);
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .06em;
}

.footer-legal,
.footer-copy { margin: 0; }

/* --- 显现 --- */
[data-reveal-ready] [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal-ready] [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* --- 目录高亮 --- */
.toc__link.is-active,
[data-toc-link].is-active {
  color: var(--cyan);
  box-shadow: inset 2px 0 0 var(--cyan);
}

/* ===== 响应式 ===== */
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 12px);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
    border-radius: 22px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: max-height .3s ease, opacity .25s ease, transform .25s ease, visibility .25s;
  }

  .site-nav[data-open] {
    max-height: 74vh;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .site-nav__list a {
    padding: 12px 15px;
    border-radius: 14px;
    font-size: .96rem;
  }

  .site-nav__cta { margin: 4px 0 0; width: 100%; }
}

@media (max-width: 960px) {
  .col-3, .col-4, .col-5 { grid-column: span 6; }
  .col-7, .col-8, .col-9 { grid-column: span 12; }
  .split,
  .split--reverse,
  .split--even { grid-template-columns: minmax(0, 1fr); }
}

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

@media (max-width: 640px) {
  body { font-size: 15.5px; }

  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9 { grid-column: span 12; }
  .footer-nav { grid-template-columns: minmax(0, 1fr); }
  .brand-text__sub { display: none; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .media-frame__caption { left: 10px; right: 10px; bottom: 10px; font-size: .68rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .brand-mark__dot { animation: none; }
}
