/* =====================================================================
   四喜娱乐免费入口 · 共享样式 /assets/site.css
   堆叠画板 / 粗野主义描边 / 宣纸颗粒 / 朱红-鎏金-青玉绿
   ===================================================================== */

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

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

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dt, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 设计变量 ---------- */
:root {
  --red: #C4231C;
  --red-deep: #8A1810;
  --gold: #C9922A;
  --gold-light: #F2DFAE;
  --jade: #16655A;
  --jade-light: #D8E8E2;
  --paper: #F7F1E3;
  --ink: #17110F;
  --muted: #6E635B;
  --line: #E7DFCE;

  --stroke: 3px;
  --sh-1: 6px 6px 0 var(--ink);
  --sh-2: 8px 8px 0 var(--red-deep);
  --sh-3: 4px 4px 0 var(--ink);

  --ease: cubic-bezier(0.16, 0.84, 0.31, 1);
  --header-h: 78px;
  --w-max: 1240px;
  --w-narrow: 820px;

  --font-display: 'Source Han Serif SC', 'Songti SC', 'Noto Serif SC', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-num: 'DIN Alternate', 'Barlow Condensed', 'SF Mono', monospace;
}

/* ---------- 3. 基础排版与纸张颗粒 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(23, 17, 15, 0.055) 1px, transparent 1.2px);
  background-size: 5px 5px;
  min-height: 100%;
  overflow-x: clip;
}

#main-content { display: block; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.24; }

::selection { background: var(--red); color: #fff; }

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

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  background: var(--ink);
  border: 3px solid var(--gold);
  box-shadow: 4px 4px 0 var(--red-deep);
  transform: translateY(-200%);
  transition: transform 0.24s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(247, 241, 227, 0);
  border-bottom: 3px solid transparent;
  transition: background 0.32s var(--ease), border-color 0.32s var(--ease), box-shadow 0.32s var(--ease);
}

.site-header[data-scrolled] {
  background: rgba(247, 241, 227, 0.97);
  border-bottom-color: var(--ink);
  box-shadow: 0 6px 0 rgba(23, 17, 15, 0.07);
}

.header-inner {
  width: 100%;
  max-width: var(--w-max);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-seal {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--paper);
  background: var(--red);
  border: var(--stroke) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.brand:hover .brand-seal { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

.brand-text { display: flex; flex-direction: column; gap: 3px; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.04rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.brand-sub {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1;
  color: var(--muted);
}

/* 主导航 */
.site-nav { margin-left: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-block;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink);
  border-bottom: 3px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
              background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.nav-link:hover { color: var(--red); border-bottom-color: var(--gold); }

.nav-link[aria-current="page"] {
  color: #fff;
  background: var(--red);
  border-bottom-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

/* 常驻行动按钮 */
.header-cta {
  flex: 0 0 auto;
  padding: 11px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--gold-light);
  border: var(--stroke) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}
.header-cta:hover { background: var(--gold); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  flex: none;
  place-items: center;
  margin-left: auto;
  background: var(--paper);
  border: var(--stroke) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.nav-toggle-bars {
  display: block;
  position: relative;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: background 0.2s var(--ease);
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.28s var(--ease), top 0.28s var(--ease);
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

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

/* ---------- 6. 页脚 ---------- */
.site-footer {
  margin-top: 96px;
  position: relative;
  color: var(--paper);
  background: var(--red-deep);
  border-top: 6px solid var(--ink);
}
.site-footer::before {
  content: "";
  display: block;
  height: 8px;
  background: var(--gold);
}

.footer-main {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 52px 24px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: 48px;
}

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

.footer-seal {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  color: var(--red-deep);
  background: var(--gold-light);
  border: 3px solid var(--paper);
  box-shadow: 5px 5px 0 rgba(23, 17, 15, 0.6);
}

.footer-identity {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--gold-light);
  max-width: 34ch;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  line-height: 1.7;
  max-width: 40ch;
}
.footer-contact li { display: flex; align-items: baseline; gap: 10px; }

.footer-label {
  flex: none;
  padding: 1px 7px;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold);
  border: 1px solid rgba(201, 146, 42, 0.6);
}

.footer-value { color: rgba(247, 241, 227, 0.85); word-break: break-word; }

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

.footer-col-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold);
  padding-bottom: 9px;
  margin-bottom: 12px;
  border-bottom: 1px dashed rgba(201, 146, 42, 0.55);
}

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

.footer-link {
  display: inline-block;
  padding: 5px 0;
  font-size: 0.88rem;
  color: rgba(247, 241, 227, 0.86);
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer-link:hover { color: var(--gold-light); border-bottom-color: var(--gold); }

.footer-legal {
  background: rgba(23, 17, 15, 0.2);
  border-top: 3px solid rgba(247, 241, 227, 0.16);
}

.footer-legal-inner {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-legal-line { font-size: 0.78rem; letter-spacing: 0.04em; line-height: 1.8; color: rgba(247, 241, 227, 0.8); }
.footer-note { font-size: 0.76rem; line-height: 1.8; color: rgba(242, 223, 174, 0.76); }
.footer-copy { font-size: 0.7rem; letter-spacing: 0.14em; color: rgba(247, 241, 227, 0.52); }

/* ---------- 7. 版心与堆叠画板 ---------- */
.container {
  width: 100%;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: var(--w-narrow); }

.panel {
  position: relative;
  padding: clamp(24px, 4vw, 48px);
  background: var(--paper);
  border: var(--stroke) solid var(--ink);
  box-shadow: var(--sh-1);
}
.panel--gold { background: var(--gold-light); }
.panel--jade { background: var(--jade-light); }
.panel--red { background: var(--red); color: #fff; }
.panel--red .section-title,
.panel--red .prose { color: #fff; }
.panel--deep { background: var(--red-deep); color: var(--paper); }

.panel-stack {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
}

@media (min-width: 900px) {
  .panel-stack > .panel:nth-child(3n + 2) { margin-left: 48px; }
  .panel-stack > .panel:nth-child(3n + 3) { margin-right: 48px; }
}

/* ---------- 8. 章节头与文字组件 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 18px;
}

.section-index {
  display: inline-block;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #fff;
  background: var(--red);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  letter-spacing: -0.01em;
}

.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--jade);
}

.display-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lede {
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  line-height: 1.85;
  color: var(--muted);
  max-width: 56ch;
}

.prose {
  font-size: 16.5px;
  line-height: 1.85;
  max-width: 64ch;
}
.prose p + p { margin-top: 14px; }
.prose strong { font-weight: 600; color: var(--red-deep); }

/* ---------- 9. 数字与比例 ---------- */
.num-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
}

.num-block {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  background: var(--gold-light);
  border: var(--stroke) solid var(--ink);
  box-shadow: var(--sh-3);
}
.num-block--jade { background: var(--jade-light); }
.num-block--jade .num-figure { color: var(--jade); }

.num-figure {
  font-family: var(--font-num);
  font-weight: 800;
  font-size: clamp(3rem, 6vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--red-deep);
}

.num-caption {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* ---------- 10. 标签与按钮 ---------- */
.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  background: var(--paper);
  border: 2px solid var(--ink);
}
.tag--gold { background: var(--gold); color: var(--ink); }
.tag--jade { background: var(--jade); color: #fff; }
.tag--red { background: var(--red); color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--paper);
  border: var(--stroke) solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}
.btn:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn--primary { background: var(--red); color: #fff; }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--ghost { background: transparent; box-shadow: none; }
.btn--ghost:hover { background: var(--gold-light); transform: none; box-shadow: none; }

/* ---------- 11. 面包屑与旁注 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.breadcrumb a {
  color: var(--jade);
  padding-bottom: 1px;
  border-bottom: 2px solid var(--jade-light);
  transition: border-color 0.2s var(--ease);
}
.breadcrumb a:hover { border-bottom-color: var(--jade); }
.breadcrumb-sep { color: var(--gold); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

.note-panel {
  padding: 20px 22px;
  background: var(--jade-light);
  border-top: var(--stroke) solid var(--ink);
  border-right: var(--stroke) solid var(--ink);
  border-bottom: var(--stroke) solid var(--ink);
  border-left: 8px solid var(--jade);
  box-shadow: var(--sh-3);
}

.note-title {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--jade);
  margin-bottom: 8px;
}

.rule-list { display: grid; gap: 12px; }
.rule-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  line-height: 1.8;
}
.rule-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.rule-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 0.55em;
  background: var(--gold);
  border: 2px solid var(--ink);
}

/* ---------- 12. 图片容器基础规则 ---------- */
.figure-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--gold-light);
  border: var(--stroke) solid var(--ink);
  box-shadow: var(--sh-2);
}
.figure-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure-frame--wide { aspect-ratio: 16 / 9; }
.figure-frame--tall { aspect-ratio: 3 / 4; }
.figure-frame--empty {
  background-image: repeating-linear-gradient(
    45deg,
    var(--line) 0 10px,
    transparent 10px 20px
  );
}
.figure-caption {
  margin-top: 10px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- 13. 网格 ---------- */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}
.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-12 { grid-column: span 12; }
.col-start-2 { grid-column-start: 2; }
.col-start-6 { grid-column-start: 6; }

@media (max-width: 900px) {
  .grid-12 > [class*="col-"] { grid-column: 1 / -1; }
}

.divider { height: 3px; background: var(--ink); width: 100%; }
.divider--dashed { height: 0; border-top: 3px dashed var(--line); background: none; }

/* ---------- 14. 显现动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}
[data-reveal][data-visible] { opacity: 1; transform: none; }

/* ---------- 15. 运行时注入组件 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  z-index: 120;
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(23, 17, 15, 0.35);
  transition: width 0.12s linear;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--gold-light);
  background: var(--ink);
  border: 3px solid var(--gold-light);
  box-shadow: 4px 4px 0 var(--red-deep);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s var(--ease);
}
.back-to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.back-to-top:hover { background: var(--red-deep); }

/* ---------- 16. 响应式：平板 ---------- */
@media (max-width: 1040px) {
  :root { --header-h: 70px; }

  .nav-toggle { display: grid; }
  .nav-link { font-size: 0.82rem; padding: 8px 10px; }
  .header-cta { padding: 10px 13px; font-size: 0.74rem; }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 90;
    width: min(84vw, 344px);
    height: 100dvh;
    padding: 104px 24px 32px;
    background: var(--paper);
    background-image: radial-gradient(rgba(23, 17, 15, 0.055) 1px, transparent 1.2px);
    background-size: 5px 5px;
    border-left: var(--stroke) solid var(--ink);
    box-shadow: -8px 0 0 var(--red-deep);
    overflow-y: auto;
    transform: translateX(106%);
    transition: transform 0.38s var(--ease);
  }
  .site-nav[data-open] { transform: translateX(0); }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .nav-link {
    display: block;
    padding: 14px 12px;
    font-size: 1rem;
    border-bottom: 3px solid var(--line);
  }
  .nav-link:hover { border-bottom-color: var(--gold); }
  .nav-link[aria-current="page"] {
    border-bottom-color: var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
  }

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

/* ---------- 17. 响应式：手机 ---------- */
@media (max-width: 620px) {
  .container { padding: 0 16px; }
  .header-inner { padding: 9px 16px; gap: 12px; }
  .brand { gap: 10px; }
  .brand-seal { width: 42px; height: 42px; font-size: 0.88rem; }
  .brand-name { font-size: 0.92rem; }
  .brand-sub { display: none; }
  .header-cta { padding: 9px 10px; font-size: 0.68rem; letter-spacing: 0.02em; box-shadow: 3px 3px 0 var(--ink); }
  .nav-toggle { width: 42px; height: 42px; }

  .footer-main { padding: 40px 16px 32px; }
  .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-legal-inner { padding: 20px 16px; }
  .site-footer { margin-top: 64px; }

  .num-block { padding: 12px 14px; }
  .back-to-top { right: 14px; bottom: 14px; }
}

@media (max-width: 380px) {
  .footer-columns { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 18. 降低动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .site-header,
  .site-nav,
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after,
  .scroll-progress,
  .back-to-top,
  .brand-seal,
  .header-cta,
  .btn,
  .footer-link,
  .nav-link {
    transition: none !important;
  }
  .brand:hover .brand-seal,
  .header-cta:hover,
  .btn:hover { transform: none; }
}
