/* ============================================================
   财神棋牌到 / assets/site.css
   共享外壳：reset、变量、中文排版、页头、页脚、通用组件
   ============================================================ */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd, button, input { margin: 0; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; cursor: pointer; }
img, svg { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #1A1A1A;
  --ink-deep: #0F0F12;
  --graphite: #2A2A30;
  --red: #C8102E;
  --red-deep: #7A0A1B;
  --gold: #F2C14E;
  --gold-soft: #FFE3A3;
  --jade: #0E7C6B;
  --cyan: #3DD6B0;
  --bone: #E8E4DC;
  --mist: #9A9AA5;
  --dim: #6F6F7A;

  --shell-w: 1200px;
  --gutter: clamp(18px, 4.5vw, 52px);
  --r-lg: 28px;
  --r-md: 18px;
  --r-pill: 999px;

  --font-display: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-body: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "DejaVu Sans Mono", Consolas, "Courier New", monospace;

  --shadow-card: 0 18px 44px -26px rgba(0, 0, 0, 0.95);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --hair: rgba(242, 193, 78, 0.18);
  --hair-strong: rgba(242, 193, 78, 0.42);
}

/* ---------- 3. 中文排版与页面基调 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(70rem 40rem at 88% -12%, rgba(200, 16, 46, 0.20), transparent 62%),
    radial-gradient(52rem 30rem at -12% 16%, rgba(242, 193, 78, 0.10), transparent 62%),
    radial-gradient(46rem 38rem at 46% 118%, rgba(14, 124, 107, 0.15), transparent 66%);
  background-attachment: fixed;
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#main-content { display: block; }
::selection { background: var(--red); color: var(--gold-soft); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(15, 15, 18, 0.92);
}

/* ---------- 4. 布局工具 ---------- */
.shell {
  width: min(calc(100% - var(--gutter) * 2), var(--shell-w));
  margin-inline: auto;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: var(--gutter); top: -120px; z-index: 200;
  padding: 0.55rem 1.1rem; border-radius: 0 0 16px 16px;
  background: linear-gradient(120deg, var(--gold), #D09A2C);
  color: #231A05; font-weight: 800; font-size: 0.9rem; letter-spacing: 0.08em;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }
.grid { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.grid--split { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); align-items: start; }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.divider { height: 1px; border: 0; background: linear-gradient(90deg, var(--hair-strong), rgba(242, 193, 78, 0)); }
.rule { height: 1px; border: 0; background: linear-gradient(90deg, var(--hair-strong), rgba(242, 193, 78, 0)); }

/* ---------- 5. 通用组件 ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--gold);
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.72rem 1.35rem; border-radius: var(--r-pill);
  border: 1px solid transparent; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.06em;
  transition: transform 0.18s var(--ease), background 0.2s var(--ease),
              border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn--red {
  background: linear-gradient(120deg, var(--red), var(--red-deep));
  color: var(--gold-soft); box-shadow: 0 16px 32px -20px rgba(200, 16, 46, 0.95);
}
.btn--red:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -18px rgba(200, 16, 46, 0.95); }
.btn--gold { background: linear-gradient(120deg, var(--gold), #D09A2C); color: #231A05; }
.btn--gold:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; border-color: var(--hair-strong); color: var(--gold-soft); }
.btn--ghost:hover { background: rgba(242, 193, 78, 0.1); transform: translateY(-2px); }
.btn--sm { padding: 0.45rem 0.9rem; font-size: 0.84rem; }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.24rem 0.7rem; border-radius: var(--r-pill);
  font-size: 0.76rem; letter-spacing: 0.08em;
  border: 1px solid var(--hair-strong); color: var(--gold); background: rgba(242, 193, 78, 0.06);
}
.chip--jade { border-color: rgba(14, 124, 107, 0.55); color: var(--cyan); background: rgba(14, 124, 107, 0.14); }
.tag {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--cyan); background: rgba(61, 214, 176, 0.1); border: 1px solid rgba(61, 214, 176, 0.3);
}

.section { padding-block: clamp(48px, 6vw, 88px); position: relative; }
.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 14px 28px; margin-bottom: clamp(22px, 3vw, 38px);
}
.section-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: 0.02em; color: var(--bone);
}
.section-note { max-width: 38ch; color: var(--mist); font-size: 0.92rem; line-height: 1.85; }

.card {
  position: relative; padding: clamp(20px, 2.4vw, 30px);
  border-radius: var(--r-lg); border: 1px solid var(--hair);
  background: linear-gradient(160deg, var(--graphite), #202024 88%);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: rgba(242, 193, 78, 0.55); }
.card__title { font-size: 1.12rem; font-weight: 800; color: var(--gold-soft); margin-bottom: 8px; }
.panel {
  padding: clamp(16px, 2vw, 24px); border-radius: var(--r-md);
  border: 1px solid rgba(242, 193, 78, 0.14); background: rgba(42, 42, 48, 0.55);
}

.fold {
  border: 1px solid var(--hair); border-radius: var(--r-md);
  background: rgba(42, 42, 48, 0.5); padding: 0.15rem 1.1rem; margin-bottom: 12px;
}
.fold summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 0.85rem 0; cursor: pointer; list-style: none;
  font-weight: 700; color: var(--gold-soft);
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "＋"; font-family: var(--font-mono); color: var(--gold); }
.fold[open] summary::after { content: "－"; }
.fold__body { padding-bottom: 1rem; color: var(--mist); font-size: 0.95rem; }

.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  padding-block: 18px; font-family: var(--font-mono);
  font-size: 0.76rem; letter-spacing: 0.12em; color: var(--mist);
}
.breadcrumb li { display: flex; align-items: center; gap: 0.5rem; }
.breadcrumb li + li::before { content: "／"; color: rgba(242, 193, 78, 0.5); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb [aria-current="page"] { color: var(--gold-soft); }

.prose { max-width: 38em; color: rgba(232, 228, 220, 0.9); }
.prose p { margin-bottom: 1.1em; }
.prose h2 { font-size: 1.35rem; color: var(--gold-soft); margin: 1.6em 0 0.6em; }
.prose h3 { font-size: 1.1rem; color: var(--bone); margin: 1.3em 0 0.5em; }
.prose a { color: var(--cyan); border-bottom: 1px solid rgba(61, 214, 176, 0.4); }
.lede { max-width: 34em; font-size: 1.08rem; color: var(--gold-soft); }
.aside-note {
  padding-left: 14px; border-left: 2px solid var(--hair-strong);
  color: var(--mist); font-size: 0.82rem; line-height: 1.85;
}
.list-plain { display: flex; flex-direction: column; gap: 0.6rem; color: var(--mist); font-size: 0.95rem; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__num { font-family: var(--font-mono); font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--gold); letter-spacing: 0.04em; }
.stat__label { font-size: 0.78rem; letter-spacing: 0.14em; color: var(--mist); }

/* 图片容器基类：页面阶段在 __frame 内放 img 即可 */
.figure {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  border: 1px solid var(--hair); background: linear-gradient(150deg, #22222A, #120A0E 72%);
}
.figure__frame {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background-image:
    repeating-linear-gradient(135deg, rgba(242, 193, 78, 0.06) 0 14px, transparent 14px 28px),
    radial-gradient(62% 72% at 30% 18%, rgba(200, 16, 46, 0.3), transparent 72%);
}
.figure__frame img { width: 100%; height: 100%; object-fit: cover; }
.figure__cap {
  padding: 0.75rem 1.1rem; border-top: 1px solid var(--hair);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--mist);
}
.figure--wide .figure__frame { aspect-ratio: 21 / 9; }
.figure--tall .figure__frame { aspect-ratio: 4 / 5; }

/* ---------- 6. 页头 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(15, 15, 18, 0.94);
  backdrop-filter: blur(12px);
}
.scroll-meter {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  z-index: 6; pointer-events: none; background: rgba(242, 193, 78, 0.08);
}
.scroll-meter__bar {
  display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--red), var(--gold) 55%, var(--cyan));
}

.header-lid {
  position: relative; display: grid; grid-template-rows: 1fr;
  border-bottom: 1px solid rgba(242, 193, 78, 0.16);
  background:
    linear-gradient(100deg, #0F0F12 0%, #1A1A1A 46%, #230B12 100%);
  transition: grid-template-rows 0.3s var(--ease);
}
.header-lid::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: min(280px, 34%); height: 3px;
  background: linear-gradient(90deg, transparent, var(--red));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 8% 100%);
}
.header-lid__fold { overflow: hidden; min-height: 0; transition: opacity 0.22s var(--ease); }
.site-header[data-condensed] .header-lid { grid-template-rows: 0fr; border-bottom-color: transparent; }
.site-header[data-condensed] .header-lid__fold { opacity: 0; }

.lid-inner {
  display: flex; align-items: center;
  gap: clamp(14px, 2.4vw, 34px); min-height: 76px; padding-block: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto;
  padding: 5px 10px 5px 5px; border-radius: var(--r-pill);
  transition: background 0.2s var(--ease);
}
.brand:hover { background: rgba(242, 193, 78, 0.08); }
.brand-mark {
  position: relative; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #FFE3A3, var(--gold) 42%, #B8862B 78%, #6E4E14 100%);
  box-shadow: 0 0 0 2px rgba(15, 15, 18, 0.9), 0 0 20px rgba(242, 193, 78, 0.35);
  transition: transform 0.25s var(--ease);
}
.brand-mark::after { content: ""; position: absolute; inset: 22%; border-radius: 50%; border: 2px solid rgba(26, 26, 26, 0.5); }
.brand-mark::before { content: ""; position: absolute; inset: 40%; border-radius: 2px; background: rgba(26, 26, 26, 0.65); }
.brand:hover .brand-mark { transform: rotate(8deg) scale(1.04); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display); font-weight: 900; font-size: 1.26rem;
  letter-spacing: 0.1em; color: var(--gold-soft);
  text-shadow: 0 0 24px rgba(242, 193, 78, 0.28);
}
.brand-note { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.3em; color: var(--dim); }

.lid-motto {
  padding-left: 18px; border-left: 1px solid var(--hair-strong);
  font-size: 0.88rem; letter-spacing: 0.14em; color: var(--mist); white-space: nowrap;
}
.lid-tools { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.lang-switch {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px;
  border-radius: var(--r-pill); background: var(--graphite); border: 1px solid var(--hair);
}
.lang-chip {
  padding: 0.28rem 0.72rem; border-radius: var(--r-pill);
  font-size: 0.78rem; letter-spacing: 0.08em; color: var(--mist);
  transition: color 0.18s var(--ease), background 0.2s var(--ease);
}
.lang-chip:hover { color: var(--gold-soft); background: rgba(242, 193, 78, 0.1); }
.lang-chip.is-current {
  background: linear-gradient(120deg, var(--red), var(--red-deep));
  color: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.4);
}

.nav-search { position: relative; display: flex; align-items: center; gap: 8px; }
.nav-search__input {
  width: clamp(140px, 17vw, 224px);
  padding: 0.5rem 0.95rem; border-radius: var(--r-pill);
  border: 1px solid rgba(242, 193, 78, 0.28); background: #141419; color: var(--bone);
  font-size: 0.86rem; letter-spacing: 0.04em;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.nav-search__input::placeholder { color: var(--dim); }
.nav-search__input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.18); }
.nav-search__clear {
  padding: 0.3rem 0.7rem; border-radius: var(--r-pill);
  border: 1px solid rgba(61, 214, 176, 0.4); background: rgba(61, 214, 176, 0.1);
  color: var(--cyan); font-size: 0.76rem; letter-spacing: 0.08em;
  transition: background 0.2s var(--ease);
}
.nav-search__clear:hover { background: rgba(61, 214, 176, 0.22); }

.nav-toggle {
  display: none; align-items: center; gap: 8px;
  padding: 0.5rem 0.95rem; border-radius: var(--r-pill);
  border: 1px solid var(--hair-strong); background: rgba(242, 193, 78, 0.08);
  color: var(--gold-soft); font-size: 0.82rem; letter-spacing: 0.12em;
  transition: background 0.2s var(--ease);
}
.nav-toggle:hover { background: rgba(242, 193, 78, 0.18); }
.nav-toggle__bars { position: relative; width: 16px; height: 2px; background: currentColor; border-radius: 2px; display: inline-block; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.header-base {
  background: linear-gradient(180deg, rgba(15, 15, 18, 0.98), rgba(26, 26, 30, 0.98));
  border-bottom: 1px solid rgba(242, 193, 78, 0.22);
}
.nav-shell { display: flex; align-items: center; gap: 18px; min-height: 56px; }
.nav-list { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; }
.nav-link {
  display: inline-block; padding: 0.45rem 1rem; border-radius: var(--r-pill);
  border: 1px solid transparent; color: var(--mist);
  font-size: 0.94rem; letter-spacing: 0.06em;
  transition: color 0.18s var(--ease), background 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.18s var(--ease);
}
.nav-link:hover {
  color: var(--gold-soft); background: rgba(242, 193, 78, 0.08);
  border-color: rgba(242, 193, 78, 0.3); transform: translateY(-2px);
}
.nav-link[aria-current="page"] {
  background: linear-gradient(120deg, var(--red), var(--red-deep));
  color: var(--gold-soft); border-color: rgba(242, 193, 78, 0.55);
  box-shadow: 0 8px 20px -12px rgba(200, 16, 46, 0.95);
}
.nav-status {
  flex: 0 0 auto; font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.08em; color: var(--cyan); white-space: nowrap;
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative; margin-top: clamp(64px, 9vw, 120px);
  border-top: 1px solid rgba(242, 193, 78, 0.22);
  background: linear-gradient(180deg, #0F0F12, #1A1A1A 58%, #150A0E 100%);
}
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 0; width: min(320px, 44%); height: 3px;
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
  background: linear-gradient(90deg, var(--red), var(--gold));
}
.footer-grid {
  display: grid; grid-template-columns: 1.45fr 1fr 1fr 1.25fr;
  gap: clamp(24px, 3vw, 48px); padding-block: clamp(44px, 6vw, 74px);
}
.footer-col { min-width: 0; }
.footer-heading {
  margin-bottom: 14px; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold);
}
.footer-list { display: flex; flex-direction: column; gap: 10px; }
.footer-link {
  color: var(--mist); font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.footer-link:hover { color: var(--gold-soft); border-bottom-color: rgba(242, 193, 78, 0.6); }
.brand--footer { padding: 0; margin-bottom: 6px; }
.brand--footer:hover { background: transparent; }
.footer-tagline { margin-top: 16px; max-width: 24ch; color: var(--bone); font-size: 0.98rem; }
.footer-legal { margin-top: 12px; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--dim); }
.footer-contact { display: flex; flex-direction: column; gap: 2px; }
.footer-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.18em; color: var(--cyan); }
.footer-value { color: var(--bone); font-family: var(--font-mono); font-size: 0.92rem; word-break: break-all; }
.footer-meta { margin-top: 16px; color: var(--mist); font-size: 0.88rem; line-height: 1.75; }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  padding-block: 18px 26px; border-top: 1px dashed rgba(242, 193, 78, 0.18);
}
.footer-copy { font-size: 0.82rem; color: var(--mist); }
.footer-copy--dim { font-family: var(--font-mono); color: var(--dim); letter-spacing: 0.06em; }

/* ---------- 8. 显现动效协议 ---------- */
.has-js [data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}
.has-js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 9. 平板 ---------- */
@media (max-width: 1024px) {
  .lid-motto { display: none; }
  .grid--split { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 10. 手机 ---------- */
@media (max-width: 760px) {
  body { font-size: 16.5px; line-height: 1.85; }

  .lid-inner {
    display: grid; grid-template-columns: 1fr auto; align-items: center;
    gap: 10px 12px; min-height: 62px; padding-block: 10px;
  }
  .brand { grid-column: 1; grid-row: 1; }
  .nav-toggle { display: inline-flex; grid-column: 2; grid-row: 1; justify-self: end; }
  .lid-tools {
    grid-column: 1 / -1; grid-row: 2; display: none;
    flex-wrap: wrap; margin-left: 0; padding-top: 10px;
    border-top: 1px dashed rgba(242, 193, 78, 0.2);
  }
  .site-header[data-open] .lid-tools { display: flex; }
  .nav-search { flex: 1 1 100%; }
  .nav-search__input { width: 100%; }
  .brand-name { font-size: 1.1rem; }
  .brand-note { letter-spacing: 0.2em; }

  .nav-shell { min-height: 50px; }
  .nav-list {
    overflow-x: auto; flex-wrap: nowrap; padding-block: 7px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-link { white-space: nowrap; font-size: 0.9rem; }
  .nav-status { display: none; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-base { justify-content: flex-start; }
}

/* ---------- 11. 降低动效偏好 ---------- */
@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;
  }
  .has-js [data-reveal] { opacity: 1; transform: none; }
  .card:hover, .btn:hover, .nav-link:hover, .brand:hover .brand-mark { transform: none; }
}
