/* ==========================================================================
   百利娱乐会馆 · 共享站点样式 /assets/site.css
   母题：索引长廊——深蓝基底 + 鎏金导视线 + 12px 切角面板 + 8° 斜线
   ========================================================================== */

/* ---------- 1. 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, figcaption,
blockquote, dl, dd, address {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

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

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

button {
  background: none;
  border: 0;
  cursor: pointer;
}

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

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

/* ---------- 2. Design tokens ---------- */
:root {
  color-scheme: dark;

  /* 自然矿物色 / 会馆夜色 */
  --ink: #0B1B2B;
  --ink-deep: #081220;
  --ink-2: #12293F;
  --ink-3: #1C3A54;
  --gold: #C9A227;
  --gold-soft: #E8C766;
  --coral: #E2664A;
  --celadon: #6FA98C;
  --stone: #8A8F94;
  --clay: #A9603F;
  --paper: #F2EDE4;

  --line: rgba(201, 162, 39, 0.26);
  --line-soft: rgba(242, 237, 228, 0.12);

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

  /* 6 级字号阶 */
  --fs-display: clamp(2.2rem, 5vw, 4.4rem);
  --fs-h2: clamp(1.6rem, 2.6vw, 2.125rem);
  --fs-h3: clamp(1.25rem, 1.8vw, 1.5rem);
  --fs-lg: 1.125rem;
  --fs-base: 0.9375rem;
  --fs-sm: 0.8125rem;

  /* 尺规 */
  --frame-w: 88px;
  --header-h: 60px;
  --gutter: clamp(1.15rem, 4vw, 3.5rem);
  --cut: 12px;
  --maxw: 1180px;
  --ease: cubic-bezier(.2, .7, .3, 1);

  --cut-box: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

/* ---------- 3. 中文排版基座 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(92% 58% at 100% 0, rgba(28, 58, 84, 0.70), transparent 62%),
    radial-gradient(70% 46% at 0 100%, rgba(18, 41, 63, 0.85), transparent 58%);
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

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

h1 { font-size: var(--fs-display); font-weight: 900; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { max-width: 40em; }

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

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

#main-content { display: block; }
#main-content:focus { outline: none; }

/* 桌面：为左侧常驻索引条让位 */
@media (min-width: 1024px) {
  body { padding-left: var(--frame-w); }
}

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  transform: translateY(-130%);
  padding: 0.65rem 1.15rem;
  background: var(--gold-soft);
  color: var(--ink-deep);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 0 0 8px 0;
  transition: transform 0.2s var(--ease);
}

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

/* ---------- 5. Header：框架式导航 ---------- */
.site-header {
  position: relative;
  z-index: 90;
}

.frame {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--frame-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 22px 0 18px;
  background: linear-gradient(180deg, #0A1726 0%, var(--ink) 46%, var(--ink-deep) 100%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 90;
}

.frame::-webkit-scrollbar { display: none; }

.frame::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--coral));
  pointer-events: none;
}

/* 品牌桩 */
.frame__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}

.frame__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.frame__glyph {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  background: var(--gold);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transition: background-color 0.28s var(--ease);
}

.frame__mark:hover .frame__glyph { background: var(--coral); }

.frame__name {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.9375rem;
  letter-spacing: 0.2em;
  line-height: 1;
  color: var(--paper);
}

.frame__sub {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.26em;
  color: var(--stone);
  line-height: 1;
}

/* 移动导航按钮（桌面隐藏） */
.frame__toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(201, 162, 39, 0.07);
  color: var(--paper);
  font-size: var(--fs-sm);
  letter-spacing: 0.12em;
  transition: border-color 0.28s var(--ease), color 0.28s var(--ease);
}

.frame__toggle:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
}

.frame__toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
  flex: 0 0 auto;
}

.frame__toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.site-header[data-open] .frame__toggle-bar:first-child {
  transform: translateY(3px) rotate(45deg);
}

.site-header[data-open] .frame__toggle-bar:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.frame__toggle-label {
  font-weight: 600;
  white-space: nowrap;
}

/* 主导航——桌面竖排索引刻度 */
.nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.nav__item { display: flex; }

.nav__link {
  position: relative;
  display: block;
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding: 14px 9px;
  font-size: var(--fs-base);
  letter-spacing: 0.22em;
  line-height: 1;
  color: var(--stone);
  border-radius: 2px;
  transition: color 0.28s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  right: 2px;
  width: 2px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.32s var(--ease), background-color 0.28s var(--ease);
}

.nav__link:hover { color: var(--gold-soft); }

.nav__link:hover::after {
  transform: scaleY(1);
  background: var(--celadon);
}

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

.nav__link[aria-current="page"]::after {
  transform: scaleY(1);
  background: var(--coral);
}

.nav__num { display: none; }

/* 框架底部快捷入口 */
.frame__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 62%;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  flex: 0 0 auto;
}

.frame__quick {
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding: 8px 2px;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--stone);
  transition: color 0.28s var(--ease);
}

.frame__quick:hover { color: var(--coral); }

/* 矮屏收敛 */
@media (min-width: 1024px) and (max-height: 830px) {
  .frame__sub { display: none; }
  .nav__link { padding: 11px 8px; font-size: 0.875rem; }
}

@media (min-width: 1024px) and (max-height: 700px) {
  .frame__foot { display: none; }
}

/* ---------- 6. Header 移动端 ---------- */
@media (max-width: 1023px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 90;
  }

  .frame {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    width: 100%;
    height: var(--header-h);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 var(--gutter);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: #0A1726;
    overflow: visible;
  }

  .frame::before {
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
  }

  .frame__brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .frame__mark {
    flex-direction: row;
    align-items: center;
    gap: 9px;
  }

  .frame__name {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-size: 0.9375rem;
    letter-spacing: 0.12em;
  }

  .frame__sub {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
    padding-left: 10px;
    border-left: 1px solid var(--line);
    color: var(--stone);
  }

  .frame__toggle { display: flex; }

  .frame__foot { display: none; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: block;
    flex: none;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 8px var(--gutter) 26px;
    background: linear-gradient(180deg, #0A1726 0%, #081220 100%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 52px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition:
      opacity 0.3s var(--ease),
      transform 0.3s var(--ease),
      visibility 0.3s var(--ease);
    z-index: 89;
  }

  .site-header[data-open] .nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

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

  .nav__item { display: block; }

  .nav__link {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 15px 2px;
    font-size: 1.0625rem;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    color: rgba(242, 237, 228, 0.86);
  }

  .nav__link::after { display: none; }

  .nav__link:hover { color: var(--gold-soft); }

  .nav__num {
    display: inline;
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--celadon);
    transition: color 0.28s var(--ease);
  }

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

  .nav__link[aria-current="page"] .nav__num { color: var(--coral); }

  .nav__txt { display: inline; }
}

@media (max-width: 520px) {
  .frame__sub { display: none; }
}

/* ---------- 7. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 7vw, 6.5rem);
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--gutter) 0;
  background: linear-gradient(180deg, #0A1522 0%, #060E18 100%);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(38%, 320px);
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--coral));
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(120px, 26vw, 360px);
  height: 100%;
  background: linear-gradient(150deg, rgba(28, 58, 84, 0.55), transparent 72%);
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.footer__mast { min-width: 0; }

.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.footer__kicker {
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.26em;
  color: var(--gold);
  line-height: 1.6;
}

.footer__note {
  margin-top: 1.1rem;
  max-width: 24em;
  font-size: var(--fs-sm);
  line-height: 1.9;
  color: var(--stone);
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  min-width: 0;
}

.footer__col { min-width: 0; }

.footer__col-title {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.4;
  color: var(--gold-soft);
  padding-bottom: 0.7rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid var(--line);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer__link {
  display: inline-block;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: rgba(242, 237, 228, 0.82);
  transition: color 0.24s var(--ease), text-decoration-color 0.24s var(--ease);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}

a.footer__link:hover {
  color: var(--gold-soft);
  text-decoration-color: var(--coral);
}

.footer__contact { min-width: 0; }

.footer__hours,
.footer__addr {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--stone);
}

.footer__hours { margin-top: 1rem; }

.footer__addr { margin-top: 0.3rem; }

.footer__base {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.2rem 0 1.7rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--stone);
}

.footer__legal { max-width: none; }

.footer__meta { max-width: none; }

@media (max-width: 900px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .site-footer::after { width: 62%; opacity: 0.55; }
}

@media (max-width: 560px) {
  .footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 1rem;
  }
  .footer__base {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 8. 通用布局与组件 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h2);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--paper);
  max-width: 22em;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  line-height: 1.6;
  color: var(--gold);
}

.kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--gold);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
  transition:
    background-color 0.28s var(--ease),
    color 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

.btn--primary {
  background: var(--coral);
  color: #120D08;
}

.btn--primary:hover {
  background: var(--gold-soft);
  color: var(--ink-deep);
}

.btn--ghost {
  background: rgba(28, 58, 84, 0.35);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn--ghost:hover {
  color: var(--gold-soft);
  box-shadow: inset 0 0 0 1px var(--gold);
}

/* 面包屑 */
.breadcrumb {
  padding-block: 1.1rem;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: var(--fs-sm);
  color: var(--stone);
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.6;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: rgba(138, 143, 148, 0.6);
}

.breadcrumb__link {
  color: var(--stone);
  transition: color 0.24s var(--ease);
}

.breadcrumb__link:hover { color: var(--gold-soft); }

.breadcrumb__current { color: var(--paper); }

/* 切角面板 */
.panel {
  position: relative;
  background: var(--ink-2);
  padding: clamp(1.25rem, 2.6vw, 2rem);
  clip-path: var(--cut-box);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  pointer-events: none;
}

.panel--raised {
  background: var(--ink-3);
}

/* 图片容器基础规则（页面阶段放 <img class="figure__img">） */
.figure {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-3);
  clip-path: polygon(
    14px 0,
    100% 0,
    100% calc(100% - 14px),
    calc(100% - 14px) 100%,
    0 100%,
    0 14px
  );
}

.figure--wide { aspect-ratio: 21 / 9; }
.figure--tall { aspect-ratio: 4 / 5; }

.figure__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.04);
}

.figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 27, 43, 0.18);
  pointer-events: none;
}

.figure__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.55rem 0.9rem;
  background: rgba(8, 18, 32, 0.8);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  line-height: 1.5;
  color: var(--gold-soft);
}

/* 细分割线 */
.rule {
  height: 1px;
  border: 0;
  margin-block: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--line-soft);
}

/* ---------- 9. 滚动显现（JS 驱动） ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}

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

/* ---------- 10. 滚动进度尺（JS 注入） ---------- */
.scroll-meter {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(201, 162, 39, 0.12);
  z-index: 200;
  pointer-events: none;
}

.scroll-meter__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--coral));
}

@media (min-width: 1024px) {
  .scroll-meter { left: var(--frame-w); }
}

/* ---------- 11. 降级：prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .skip-link,
  .frame__toggle,
  .frame__toggle-bar,
  .frame__glyph,
  .nav,
  .nav__link,
  .nav__link::after,
  .frame__quick,
  .footer__link,
  .btn,
  .scroll-meter__bar {
    transition: none;
  }

  .frame__toggle-bar {
    transition: transform 0.01ms;
  }
}
