/* =========================================================
   澳门新葡萄官网 · 共享样式 /assets/site.css
   结构：Reset → 变量 → 基础排版 → 焦点与可达性
        → 头部 → 页脚 → 通用组件 → 图片容器 → 响应式
   ========================================================= */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

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

a { color: inherit; text-decoration: none; }

/* ---------- 变量 ---------- */
:root {
  /* 品牌色 */
  --violet-deep: #2E1450;
  --violet: #5B2E96;
  --violet-mist: #EDE6F6;
  --vine: #2C6B4A;
  --vine-light: #63A87C;
  --gold: #D99A2B;
  --porcelain: #F7F4EE;
  --ink: #17121F;
  --mauve: #B4A3C9;

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

  /* 八级字号 */
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-17: 1.0625rem;
  --fs-22: 1.375rem;
  --fs-30: 1.875rem;
  --fs-40: 2.5rem;
  --fs-53: 3.3125rem;
  --fs-71: 4.4375rem;

  /* 粗野主义形状 */
  --shadow-soft: 3px 3px 0 var(--ink);
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-lift: 10px 10px 0 var(--ink);

  /* 节奏 */
  --header-h: 76px;
  --maxw: 1440px;
  --edge: clamp(18px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-17);
  line-height: 1.75;
  color: var(--ink);
  background: var(--porcelain);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--violet-deep);
}

h1 { font-size: clamp(2.6rem, 5vw, 5.2rem); font-weight: 900; }
h2 { font-size: var(--fs-40); }
h3 { font-size: var(--fs-22); }

strong { font-weight: 700; }

#main-content {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ---------- 焦点与可达性 ---------- */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--ink);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  transform: translateY(-220%);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--gold);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-sans);
  font-size: var(--fs-13);
  font-weight: 700;
  transition: transform .18s var(--ease);
}

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

/* =========================================================
   头部 · 紧凑命令栏
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--porcelain);
  border-bottom: 2px solid var(--ink);
  transition: box-shadow .22s var(--ease);
}

.site-header[data-scrolled] {
  box-shadow: 0 3px 0 0 var(--gold);
}

.header-bar {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--edge);
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  transition: min-height .22s var(--ease);
}

.site-header[data-scrolled] .header-bar {
  min-height: 56px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.brand-mark {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--violet-deep);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--gold);
}

.brand-mark::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--porcelain);
  box-shadow: 8px 8px 0 -2px var(--vine-light), -6px 7px 0 -3px var(--gold);
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 2px;
  height: 9px;
  background: var(--gold);
  transform: translateX(-50%) rotate(16deg);
}

.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--violet-deep);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.1em;
  color: var(--violet);
}

/* 移动端折叠按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  background: var(--porcelain);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}

.nav-toggle:hover {
  box-shadow: 5px 5px 0 var(--ink);
  transform: translate(-1px, -1px);
}

.nav-toggle-bars {
  position: relative;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background .18s var(--ease);
}

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

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

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

.nav-toggle-label { white-space: nowrap; }

/* 导航面板 */
.header-panel { display: contents; }

.primary-nav { min-width: 0; }

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.nav-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 44px;
  padding: 0 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  border: 2px solid transparent;
  white-space: nowrap;
  transition: background-color .18s var(--ease),
              color .18s var(--ease),
              border-color .18s var(--ease),
              box-shadow .18s var(--ease);
}

.nav-idx {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--mauve);
  transition: color .18s var(--ease);
}

.nav-list a:hover {
  background: var(--violet-mist);
  border-color: var(--ink);
}

.nav-list a:hover .nav-idx { color: var(--vine); }

.nav-list a[aria-current="page"] {
  background: var(--violet);
  color: var(--porcelain);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.nav-list a[aria-current="page"] .nav-idx { color: var(--gold); }

/* 工具区 */
.header-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.06em;
  color: var(--vine);
  border-bottom: 2px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.tool-link:hover {
  color: var(--violet);
  border-bottom-color: var(--violet);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-left: 8px;
  padding: 0 18px;
  background: var(--violet);
  color: var(--porcelain);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .18s var(--ease),
              box-shadow .18s var(--ease),
              transform .18s var(--ease);
}

.header-cta:hover {
  background: var(--violet-deep);
  box-shadow: 7px 7px 0 var(--ink);
  transform: translate(-2px, -2px);
}

.header-cta:active {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(0, 0);
}

/* 阅读进度 */
.header-progress {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--vine), var(--vine-light) 48%, var(--gold));
  pointer-events: none;
}

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  background: var(--violet-deep);
  color: var(--porcelain);
  border-top: 4px solid var(--gold);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--edge) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 40px);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 20px;
}

.site-footer .brand-mark {
  background: var(--violet);
  border-color: var(--porcelain);
  box-shadow: 3px 3px 0 var(--gold);
}

.site-footer .brand-name {
  color: var(--porcelain);
  font-size: 1.25rem;
}

.footer-summary {
  max-width: 34ch;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: rgba(247, 244, 238, 0.78);
}

.footer-meta {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  color: var(--mauve);
}

.footer-col-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.6;
  color: var(--gold);
}

.footer-col-title::after {
  content: "";
  flex: 1 1 auto;
  height: 2px;
  background: rgba(217, 154, 43, 0.32);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-col li a {
  display: inline-block;
  padding: 7px 0;
  font-size: 0.9375rem;
  color: rgba(247, 244, 238, 0.86);
  border-bottom: 2px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer-col li a:hover {
  color: var(--porcelain);
  border-bottom-color: var(--gold);
}

.footer-contact {
  gap: 10px;
}

.contact-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-value {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  letter-spacing: 0.04em;
  color: rgba(247, 244, 238, 0.92);
  word-break: break-all;
}

.contact-address {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(247, 244, 238, 0.82);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 56px;
  padding: 0 12px;
  background: transparent;
  color: var(--vine-light);
  border: 2px solid rgba(99, 168, 124, 0.65);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color .18s var(--ease),
              color .18s var(--ease),
              border-color .18s var(--ease);
}

.copy-btn:hover {
  background: var(--vine);
  color: var(--porcelain);
  border-color: var(--vine);
}

.copy-btn[data-copied] {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.footer-note {
  margin-top: 16px;
  font-size: var(--fs-12);
  line-height: 1.8;
  color: var(--mauve);
}

.footer-legal {
  max-width: var(--maxw);
  margin: clamp(36px, 5vw, 56px) auto 0;
  padding: 20px var(--edge) 30px;
  border-top: 2px solid rgba(180, 163, 201, 0.28);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.06em;
  color: var(--mauve);
}

.legal-dot { opacity: 0.6; }

.footer-top {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  background: transparent;
  color: var(--porcelain);
  border: 2px solid rgba(247, 244, 238, 0.45);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color .18s var(--ease),
              color .18s var(--ease),
              border-color .18s var(--ease);
}

.footer-top:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

/* =========================================================
   通用组件
   ========================================================= */
.container,
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--edge);
}

/* 面包屑 */
.breadcrumb {
  padding-block: 20px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.06em;
  color: var(--violet);
}

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

.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--mauve);
}

.breadcrumb a {
  border-bottom: 1px solid currentColor;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.breadcrumb a:hover {
  color: var(--vine);
  border-bottom-color: var(--vine);
}

.breadcrumb [aria-current="page"] { color: var(--ink); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s var(--ease),
              box-shadow .18s var(--ease),
              background-color .18s var(--ease),
              color .18s var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard);
}

.btn:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn--primary { background: var(--violet); color: var(--porcelain); }
.btn--primary:hover { background: var(--violet-deep); }
.btn--vine { background: var(--vine); color: var(--porcelain); }
.btn--vine:hover { background: #235740; }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--violet-mist); }
.btn--block { width: 100%; }

/* 卡片 */
.card {
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--porcelain);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lift);
}

/* 正文 */
.prose {
  max-width: 68ch;
}

.prose p { margin-bottom: 1.2em; }
.prose p:last-child { margin-bottom: 0; }

.prose h2 {
  margin: 1.6em 0 0.6em;
  font-size: var(--fs-30);
}

.prose h3 {
  margin: 1.4em 0 0.5em;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-22);
  color: var(--violet-deep);
}

.prose ul { margin-bottom: 1.2em; }

.prose ul li {
  position: relative;
  margin-bottom: 0.5em;
  padding-left: 1.6em;
}

.prose ul li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border: 2px solid var(--ink);
}

.prose a {
  color: var(--vine);
  border-bottom: 2px solid var(--vine-light);
}

.prose a:hover {
  color: var(--violet);
  border-bottom-color: var(--violet);
}

/* 栅格 */
.grid {
  display: grid;
  gap: clamp(20px, 2.5vw, 32px);
}

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

/* 标注与强调 */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.14em;
  color: var(--vine);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  letter-spacing: 0.08em;
  color: var(--violet);
}

.hl {
  background: linear-gradient(transparent 62%, rgba(217, 154, 43, 0.42) 62%);
}

.section-band {
  background: var(--violet-mist);
  border-block: 2px solid var(--ink);
}

/* =========================================================
   图片容器（供页面阶段放置图片）
   ========================================================= */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  background: linear-gradient(135deg, var(--violet-mist) 0%, #FFFFFF 55%, var(--violet-mist) 100%);
}

.img-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame:empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(46, 20, 80, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(46, 20, 80, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.img-frame--16x10 { aspect-ratio: 16 / 10; }
.img-frame--3x2  { aspect-ratio: 3 / 2; }
.img-frame--1x1  { aspect-ratio: 1 / 1; }
.img-frame--wide { aspect-ratio: 21 / 9; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1179px) {
  :root { --header-h: 64px; }

  .header-bar {
    grid-template-columns: 1fr auto;
    padding-block: 9px;
    gap: 10px;
  }

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

  .header-panel {
    display: none;
    grid-column: 1 / -1;
  }

  .site-header[data-open] .header-panel { display: block; }

  .primary-nav {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 2px solid var(--ink);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list a {
    justify-content: flex-start;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(180, 163, 201, 0.55);
  }

  .nav-list a:hover {
    background: var(--violet-mist);
    border-color: transparent;
    border-bottom-color: var(--ink);
  }

  .nav-list a[aria-current="page"] {
    box-shadow: none;
    border-bottom-color: var(--ink);
  }

  .header-tools {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 2px solid var(--ink);
  }

  .tool-link {
    flex: 1 1 40%;
    justify-content: center;
    border: 2px solid var(--ink);
    background: var(--porcelain);
  }

  .tool-link:hover {
    background: var(--violet-mist);
    border-color: var(--ink);
    border-bottom-color: var(--ink);
  }

  .header-cta {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-lead { grid-column: 1 / -1; }
  .footer-summary { max-width: 52ch; }
}

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

@media (max-width: 680px) {
  .brand-sub { display: none; }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 40px;
  }

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

  .footer-legal {
    font-size: 0.6875rem;
    gap: 10px 14px;
  }

  .footer-top {
    margin-left: 0;
    width: 100%;
  }

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

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

  .btn { width: 100%; }
}

@media (max-width: 400px) {
  .brand-name { font-size: 1rem; }
  .brand-mark { flex-basis: 32px; width: 32px; height: 32px; }
}

/* =========================================================
   动效降级
   ========================================================= */
@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;
    scroll-behavior: auto !important;
  }
}
