/* =========================================================
   百利娱乐会馆 — /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 页头 / 页脚 /
   按钮 / 面包屑 / 通用网格与基础组件
   ========================================================= */

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

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

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

ul, ol { padding: 0; list-style: none; }

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

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

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

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-night: #0E2B24;
  --hall-green: #14382E;
  --moss: #1E4A3C;
  --gold: #C9A227;
  --amber: #E3B660;
  --stone: #6E8B86;
  --rice: #F4EFE4;
  --paper: #E8DFCB;
  --brass: #9C8A6A;
  --ink: #2A2320;

  --line-dark: rgba(201, 162, 39, 0.26);
  --line-stone: rgba(110, 139, 134, 0.26);
  --line-light: rgba(42, 35, 32, 0.14);

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

  --gutter: clamp(18px, 4vw, 48px);
  --wrap: 1180px;
  --axis: 48px;
  --cut: 16px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 基础排版 ---------- */
html {
  scroll-padding-top: 24px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--rice);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.012em;
}

strong { font-weight: 700; }

::selection {
  background: var(--gold);
  color: var(--ink-night);
}

/* ---------- 4. 布局容器 ---------- */
.wrap,
.site-header__inner,
.site-footer__inner,
.footer-base {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.section { padding-block: clamp(44px, 7vw, 92px); }

.stack > * + * { margin-top: 1.1em; }

.measure { max-width: 34em; }

.rule {
  height: 1px;
  border: 0;
  background: var(--line-light);
}

.zone-dark .rule { background: var(--line-dark); }

/* ---------- 5. 网格（非对称切分） ---------- */
.grid {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
}

.grid--5-7 { grid-template-columns: 5fr 7fr; }
.grid--4-8 { grid-template-columns: 4fr 8fr; }
.grid--3-6-3 { grid-template-columns: 3fr 6fr 3fr; }

@media (max-width: 900px) {
  .grid--5-7,
  .grid--4-8,
  .grid--3-6-3 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 6. 文字组件 ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9em;
}

.page-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.14;
  letter-spacing: -0.018em;
}

.lede {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.8;
  color: rgba(42, 35, 32, 0.78);
}

.zone-dark .lede { color: rgba(244, 239, 228, 0.78); }

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.note-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--stone);
}

/* ---------- 7. 分区 ---------- */
.zone-dark {
  background-color: var(--ink-night);
  background-image: repeating-linear-gradient(
    115deg,
    rgba(201, 162, 39, 0.045) 0 1px,
    transparent 1px 9px
  );
  color: var(--rice);
}

.zone-paper {
  background-color: var(--paper);
  color: var(--ink);
}

/* ---------- 8. 按钮与标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 44px;
  padding: 10px 26px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  border: 1px solid transparent;
  cursor: pointer;
  clip-path: polygon(
    10px 0, 100% 0,
    100% calc(100% - 10px), calc(100% - 10px) 100%,
    0 100%, 0 10px
  );
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease);
}

.btn--gold {
  background: var(--gold);
  color: var(--ink-night);
}

.btn--gold:hover,
.btn--gold:focus-visible {
  background: var(--amber);
}

.btn--ghost {
  border-color: rgba(201, 162, 39, 0.55);
  color: var(--gold);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(227, 182, 96, 0.08);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 28px;
  padding: 2px 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--stone);
  border: 1px solid var(--line-stone);
}

/* ---------- 9. 面板与切角卡片 ---------- */
.panel {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-light);
  padding: clamp(18px, 3vw, 30px);
}

.card-cut {
  position: relative;
  display: block;
  padding: clamp(18px, 3vw, 28px);
  background: linear-gradient(160deg, var(--hall-green), var(--ink-night) 80%);
  color: var(--rice);
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut)
  );
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.22);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.card-cut::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--amber));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease);
}

.card-cut:hover,
.card-cut:focus-within {
  box-shadow: inset 0 0 0 1px var(--gold);
  transform: translateY(-2px);
}

.card-cut:hover::before,
.card-cut:focus-within::before {
  transform: scaleX(1);
}

/* ---------- 10. 影像容器 ---------- */
.figure {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--hall-green), var(--ink-night) 62%, #101a17);
  border: 1px solid var(--line-dark);
}

.figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    115deg,
    rgba(244, 239, 228, 0.06) 0 1px,
    transparent 1px 10px
  );
}

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

.figure--wide { aspect-ratio: 16 / 9; }
.figure--tall { aspect-ratio: 3 / 4; }
.figure--square { aspect-ratio: 1 / 1; }
.figure--band { aspect-ratio: 21 / 9; }

.figure-caption {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--stone);
}

.zone-dark .figure-caption { color: var(--brass); }

/* ---------- 11. 编号章节 ---------- */
.chapter {
  position: relative;
  display: grid;
  grid-template-columns: var(--axis) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 32px);
  padding-block: clamp(28px, 4vw, 52px);
  border-top: 1px solid var(--line-light);
}

.zone-dark .chapter { border-top-color: var(--line-dark); }

.chapter__num {
  font-family: var(--mono);
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--stone);
  transition: color 0.5s var(--ease);
}

.chapter.is-active .chapter__num { color: var(--gold); }

.chapter__title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.3;
  margin-bottom: 0.6em;
}

.chapter__body { min-width: 0; }

@media (max-width: 620px) {
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .chapter__num { font-size: 28px; }
}

/* ---------- 12. 显现动效 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ---------- 13. 跳至正文 + 阅读进度 ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--gold);
  color: var(--ink-night);
  padding: 12px 20px;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.skip-link:focus,
.skip-link:focus-visible {
  left: 12px;
  top: 12px;
}

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 150;
  pointer-events: none;
}

.read-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--amber));
  transition: width 0.12s linear;
}

/* ---------- 14. 页头 ---------- */
.site-header {
  position: relative;
  z-index: 30;
  background-color: var(--ink-night);
  background-image: repeating-linear-gradient(
    115deg,
    rgba(201, 162, 39, 0.05) 0 1px,
    transparent 1px 9px
  );
  color: var(--rice);
  border-bottom: 1px solid var(--line-dark);
}

.site-header__inner { padding-bottom: 12px; }

.masthead {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 3vw, 36px);
  padding-block: clamp(18px, 3vw, 30px) clamp(10px, 2vw, 16px);
}

.masthead__note {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--stone);
  white-space: nowrap;
}

.masthead__note--left { justify-self: start; }
.masthead__note--right { justify-self: end; }

.masthead__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 4px 10px;
  min-height: 44px;
  justify-content: center;
}

.masthead__cn {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(30px, 5.2vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--rice);
  transition: color 0.35s var(--ease);
}

.masthead__brand:hover .masthead__cn,
.masthead__brand:focus-visible .masthead__cn { color: var(--amber); }

.masthead__en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(201, 162, 39, 0.42);
  color: var(--rice);
  font-size: 12px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.nav-toggle:hover { border-color: var(--amber); color: var(--amber); }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
}

.nav-toggle__bars span {
  display: block;
  height: 1px;
  background: var(--gold);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* 主导航 */
.site-nav { display: block; }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 3.4vw, 46px);
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  letter-spacing: 0.14em;
  color: rgba(244, 239, 228, 0.82);
  transition: color 0.3s var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease);
}

.site-nav__link:hover { color: var(--amber); }
.site-nav__link:hover::after { transform: scaleX(1); }

.site-nav__link[aria-current="page"] { color: var(--gold); }
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* 活动周期节奏带 */
.period-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px clamp(16px, 3.4vw, 44px);
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(201, 162, 39, 0.2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(244, 239, 228, 0.62);
}

.period-band__item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
}

.period-band__key {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.2em;
}

/* ---------- 15. 页脚 ---------- */
.site-footer {
  background-color: var(--ink-night);
  background-image: repeating-linear-gradient(
    115deg,
    rgba(201, 162, 39, 0.04) 0 1px,
    transparent 1px 11px
  );
  color: var(--rice);
  border-top: 1px solid rgba(201, 162, 39, 0.35);
}

.site-footer__inner { padding-block: clamp(40px, 6vw, 74px); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 0.9fr 1.3fr;
  gap: clamp(22px, 3.5vw, 44px);
}

.footer-col {
  border-left: 1px solid var(--line-stone);
  padding-left: clamp(14px, 2vw, 26px);
}

.footer-col--brand,
.footer-col--contact { border-left: 0; padding-left: 0; }

.footer-brand__cn {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--rice);
}

.footer-brand__en {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-brand__meta {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.9;
  color: rgba(244, 239, 228, 0.66);
}

.footer-brand__icp {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--stone);
}

.footer-col__title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.footer-list { display: grid; gap: 2px; }

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 228, 0.8);
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--amber);
  transform: translateX(3px);
}

.footer-line {
  font-size: 13.5px;
  line-height: 1.85;
  color: rgba(244, 239, 228, 0.78);
}

.footer-line + .footer-line { margin-top: 8px; }

.footer-line--mono {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.footer-line--dim {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--stone);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 16px 28px;
  border-top: 1px solid var(--line-stone);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--stone);
}

.footer-base__hours { max-width: 62ch; }

.footer-base__copy { white-space: nowrap; }

/* ---------- 16. 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6em;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--stone);
}

.breadcrumbs a {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  transition: color 0.25s var(--ease);
}

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

.breadcrumbs__sep { color: var(--brass); }

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

.zone-dark .breadcrumbs { color: var(--brass); }

/* ---------- 17. 焦点与动效偏好 ---------- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .card-cut:hover,
  .card-cut:focus-within {
    transform: none;
  }
}

/* ---------- 18. 响应式 ---------- */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col--brand { grid-column: 1 / -1; }
  .footer-col { border-left: 0; padding-left: 0; }
}

@media (max-width: 860px) {
  .masthead {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    padding-block: clamp(18px, 4vw, 26px) 12px;
  }

  .masthead__note { display: none; }

  .nav-toggle {
    display: inline-flex;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  .site-nav { display: none; padding: 0; }

  .site-nav[data-open] {
    display: block;
    animation: nav-in 0.28s var(--ease) both;
  }

  .site-nav__list {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: 4px 0 10px;
  }

  .site-nav__item { border-top: 1px solid rgba(201, 162, 39, 0.14); }
  .site-nav__item:first-child { border-top: 0; }

  .site-nav__link {
    width: 100%;
    padding: 12px 0;
    letter-spacing: 0.1em;
  }

  .site-nav__link::after {
    right: auto;
    width: 26px;
    bottom: 12px;
  }

  .period-band {
    justify-content: flex-start;
    font-size: 11.5px;
    gap: 4px 18px;
  }
}

@keyframes nav-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }

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

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-base__copy { white-space: normal; }

  .period-band__item { font-size: 11px; }
}
