/* ============================================================
   澳门新京葡萄城 · 共享 Site Kit
   坐标手册体系 / 葡萄紫 · 青提绿 · 暖沙 · 琥珀金
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 132px;
}

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

ul, ol { list-style: none; }

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

/* ---------- 2. 设计令牌 ---------- */
:root {
  --purple: #5B2C6F;
  --ink-purple: #3B1B47;
  --green: #A8D5BA;
  --amber: #D4A017;
  --sand: #F4E9DA;
  --paper: #FBF8F3;
  --ink: #1E1A20;
  --muted: #8C7A94;
  --vine: #6E8B74;
  --lilac: #E7DDEB;

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

  --wrap: 1240px;
  --gutter: 24px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(59, 27, 71, .06), 0 10px 26px -14px rgba(59, 27, 71, .26);
  --shadow-2: 0 4px 10px rgba(59, 27, 71, .08), 0 26px 48px -22px rgba(59, 27, 71, .34);
}

/* ---------- 3. 纸张底色与中文排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--sand);
  background-image:
    repeating-linear-gradient(0deg, rgba(110, 139, 116, .055) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(110, 139, 116, .055) 0 1px, transparent 1px 40px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--purple);
  color: var(--paper);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: .02em;
  color: var(--ink-purple);
}

p { max-width: 38em; }

/* ---------- 4. 通用容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page-main { display: block; }

.section { padding-block: clamp(40px, 6vw, 72px); }

/* ---------- 5. 焦点与无障碍 ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--ink-purple);
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  transform: translateY(-180%);
  transition: transform .2s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: 4px;
}

/* ---------- 6. 页头：版本带 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--paper);
  border-bottom: 1px solid var(--lilac);
}

.header-band {
  max-height: 46px;
  overflow: hidden;
  background: var(--purple);
  color: var(--sand);
  transition: max-height .26s ease, opacity .2s ease;
}

.site-header[data-compact] .header-band {
  max-height: 0;
  opacity: 0;
}

.header-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .14em;
}

.header-band__label { color: var(--green); }

.header-band__utils {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-band__link {
  position: relative;
  padding-bottom: 2px;
  color: rgba(244, 233, 218, .82);
  transition: color .18s ease;
}

.header-band__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--amber);
  transition: right .2s ease;
}

.header-band__link:hover { color: var(--sand); }
.header-band__link:hover::after { right: 0; }

/* ---------- 7. 刊头主体 ---------- */
.masthead {
  background: var(--paper);
  transition: box-shadow .24s ease;
}

.site-header[data-compact] .masthead {
  box-shadow: 0 12px 26px -22px rgba(59, 27, 71, .55);
}

.masthead__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    ". brand entry"
    "nav nav nav";
  align-items: center;
  gap: 4px 24px;
  padding-block: 18px 14px;
  transition: padding .24s ease;
}

.site-header[data-compact] .masthead__inner { padding-block: 10px 8px; }

/* 品牌字标 */
.brand {
  grid-area: brand;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 3px;
  border-radius: 16px;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--purple);
  color: var(--sand);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(212, 160, 23, .4);
  transition: transform .2s ease, background-color .2s ease;
}

.brand:hover .brand__mark { transform: rotate(-6deg); }

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--ink-purple);
}

.brand__edition {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--muted);
}

/* ---------- 8. 主导航 ---------- */
.site-nav { grid-area: nav; justify-self: center; display: none; }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.site-nav__link {
  position: relative;
  display: block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: .03em;
  color: var(--ink-purple);
  transition: background-color .18s ease, color .18s ease;
}

.site-nav__link:hover { background: var(--lilac); }

.site-nav__link[aria-current="page"] {
  background: var(--purple);
  color: var(--paper);
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
  transform: translateX(-50%);
}

/* ---------- 9. 移动导航按钮 ---------- */
.nav-toggle {
  grid-area: toggle;
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--lilac);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--ink-purple);
  transition: border-color .18s ease, background-color .18s ease;
}

.nav-toggle:hover { border-color: var(--green); background: rgba(168, 213, 186, .22); }

.nav-toggle__bars {
  position: relative;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background-color .2s ease;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: top .2s ease, 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 { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- 10. 两步入口 ---------- */
.entry {
  grid-area: entry;
  justify-self: end;
  position: relative;
}

.entry-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--green);
  color: var(--ink-purple);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .04em;
  transition: background-color .18s ease, box-shadow .18s ease;
}

.entry-pill:hover {
  background: #BCE2CC;
  box-shadow: 0 10px 22px -14px rgba(59, 27, 71, .55);
}

.entry-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, .24);
}

.entry__panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 90;
  width: min(288px, calc(100vw - 40px));
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--lilac);
  border-radius: 22px;
  box-shadow: var(--shadow-2);
}

.entry__panel[data-open="false"] { display: none; }

.entry__hint {
  padding: 2px 10px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .1em;
  color: var(--muted);
  border-bottom: 1px dashed var(--lilac);
  margin-bottom: 8px;
  max-width: none;
}

.entry__list { display: grid; gap: 2px; }

.entry__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--ink-purple);
  transition: background-color .16s ease, color .16s ease;
}

.entry__link span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
}

.entry__link:hover { background: var(--lilac); }
.entry__link:hover span { color: var(--amber); }

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 96px;
  background: var(--ink-purple);
  color: var(--sand);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(244, 233, 218, .05) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(244, 233, 218, .05) 0 1px, transparent 1px 34px);
}

.footer__inner {
  position: relative;
  z-index: 1;
  padding-block: 64px 28px;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(244, 233, 218, .18);
}

.footer__name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--paper);
  max-width: none;
}

.footer__motto {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--green);
  max-width: 20em;
}

.footer__desc {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(244, 233, 218, .6);
  max-width: 32em;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer__col { min-width: 0; }

.footer__col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .18em;
  color: var(--green);
  max-width: none;
}

.footer__links { display: grid; gap: 2px; }

.footer__link {
  display: inline-block;
  padding-block: 5px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(244, 233, 218, .78);
  transition: color .16s ease, transform .16s ease;
}

.footer__link:hover {
  color: var(--amber);
  transform: translateX(3px);
}

.footer__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  padding-block: 26px;
  border-bottom: 1px solid rgba(244, 233, 218, .18);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: .05em;
  color: rgba(244, 233, 218, .74);
}

.footer__contact-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  max-width: none;
}

.footer__contact-item--wide { flex: 1 1 100%; }

.footer__label {
  flex: none;
  color: var(--green);
  letter-spacing: .16em;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .07em;
  color: rgba(244, 233, 218, .55);
}

.footer__legal,
.footer__sig { max-width: none; }

.footer__sig { color: rgba(168, 213, 186, .78); letter-spacing: .16em; }

/* ---------- 12. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .03em;
  transition: transform .18s ease, box-shadow .18s ease,
              background-color .18s ease, color .18s ease, border-color .18s ease;
}

.btn--primary {
  background: var(--purple);
  color: var(--paper);
  box-shadow: var(--shadow-1);
}

.btn--primary:hover {
  transform: translateY(-3px);
  background: var(--ink-purple);
  box-shadow: var(--shadow-2);
}

.btn--ghost {
  background: transparent;
  border-color: var(--purple);
  color: var(--purple);
}

.btn--ghost:hover {
  transform: translateY(-3px);
  background: var(--purple);
  color: var(--paper);
}

/* ---------- 13. 通用卡片 / 标签 / 眉标 ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--lilac);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: rgba(212, 160, 23, .48);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .2em;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--amber);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: var(--green);
  color: var(--ink-purple);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .12em;
}

/* ---------- 14. 步骤卡（技能树底盘） ---------- */
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  width: 100%;
  padding: 20px 22px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--lilac);
  border-radius: 20px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: var(--green);
}

.step__num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: .04em;
}

/* ---------- 15. 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .1em;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}

.breadcrumbs a:hover {
  color: var(--purple);
  border-bottom-color: var(--amber);
}

.breadcrumbs span[aria-hidden="true"] { color: var(--lilac); }

/* ---------- 16. 响应式图片容器 ---------- */
.figure { margin: 0; }

.figure__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 27, 71, .08);
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--lilac) 0%, var(--green) 55%, var(--sand) 100%);
}

.figure__frame--tall { aspect-ratio: 4 / 5; }

.figure__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.7) contrast(.95);
}

.figure__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(59, 27, 71, .06) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(59, 27, 71, .06) 0 1px, transparent 1px 28px);
}

.figure__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .08em;
  color: var(--muted);
  max-width: none;
}

/* ---------- 17. 滚动显现协议 ---------- */
html[data-reveal-ready] [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
}

html[data-reveal-ready] [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* ---------- 18. 平板 ---------- */
@media (max-width: 1080px) {
  .masthead__inner { gap: 4px 18px; }
  .site-nav__link { padding: 8px 13px; font-size: 14px; }
  .footer__top { grid-template-columns: 1fr; gap: 36px; }
  .footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 19. 移动端 ---------- */
@media (max-width: 920px) {
  html { scroll-padding-top: 104px; }

  .header-band__inner {
    font-size: 10px;
    letter-spacing: .1em;
    padding-block: 7px;
  }

  .header-band__utils { gap: 16px; }

  .masthead__inner {
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "brand entry toggle"
      "nav nav nav";
    gap: 10px;
    padding-block: 12px;
  }

  .site-header[data-compact] .masthead__inner { padding-block: 9px; }

  .brand { grid-area: brand; justify-self: start; gap: 10px; }
  .brand__mark { width: 38px; height: 38px; border-radius: 12px; font-size: 17px; }
  .brand__name { font-size: 18px; letter-spacing: .03em; }
  .brand__edition { font-size: 9px; letter-spacing: .14em; margin-top: 3px; }

  .entry { grid-area: entry; justify-self: end; }
  .entry-pill { padding: 9px 15px; font-size: 13px; gap: 7px; }

  .nav-toggle {
    grid-area: toggle;
    display: inline-flex;
    justify-self: end;
    padding: 9px 14px;
  }

  .site-nav {
    grid-area: nav;
    justify-self: stretch;
    display: none;
    margin-top: 4px;
    padding: 12px;
    background: var(--paper);
    border: 1px solid var(--lilac);
    border-radius: 22px;
    box-shadow: 0 20px 40px -26px rgba(59, 27, 71, .6);
  }

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

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

  .site-nav__link { padding: 12px 16px; border-radius: 14px; font-size: 16px; }
  .site-nav__link:hover { background: var(--lilac); }

  .site-nav__link[aria-current="page"]::after {
    left: auto;
    right: 18px;
    bottom: 50%;
    transform: translateY(50%);
  }

  .site-footer { margin-top: 64px; border-radius: 22px 22px 0 0; }
  .footer__inner { padding-block: 44px 24px; }

  .footer__contact { flex-direction: column; gap: 10px; }
  .footer__contact-item--wide { flex: 1 1 auto; }

  .footer__bottom { justify-content: flex-start; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; --radius-lg: 20px; }

  body { font-size: 16px; }

  .header-band__utils { gap: 14px; }
  .header-band__link { font-size: 10px; }

  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
  .footer__name { font-size: 22px; }
  .footer__motto { font-size: 15px; }

  .entry__panel { right: -4px; }
}

@media (max-width: 400px) {
  .brand__edition { display: none; }
  .nav-toggle__label { display: none; }
  .nav-toggle { padding: 10px 12px; }
}

/* ---------- 20. 降低动态偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

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