/* ============================================================
   斗地主棋牌 · 全站共享样式 /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, h5, h6,
p, ul, ol, li, figure, figcaption,
blockquote, dl, dt, dd { margin: 0; padding: 0; }

ul, ol { list-style: none; }

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

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

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

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

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

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --ink: #08130E;
  --felt: #10251B;
  --lift: #1A3628;
  --stone: #5D6B67;
  --gold: #D8A84E;
  --gold-hi: #F3CF7A;
  --gold-deep: #9B6A24;
  --wine: #8A3342;
  --paper: #EFE7D7;
  --mute: #A9B8AE;

  --line-soft: rgba(93, 107, 103, 0.35);
  --line-gold: rgba(216, 168, 78, 0.45);

  --shadow-hard: 8px 8px 0 rgba(0, 0, 0, 0.42);
  --shadow-hard-sm: 4px 4px 0 rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 26px 52px -34px #000;

  /* 字体 */
  --font-display: "Noto Serif SC", "Songti SC", STSong, serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", SFMono-Regular, Consolas, monospace;

  /* 字号阶梯 */
  --step-display: clamp(56px, 11vw, 168px);
  --step-h1: clamp(38px, 6vw, 84px);
  --step-h2: clamp(26px, 3.4vw, 48px);
  --step-h3: 20px;
  --step-body: 16px;
  --step-small: 13px;
  --step-micro: 11px;

  /* 宽度 */
  --shell-max: 1280px;
  --header-max: 1440px;
  --gutter: clamp(16px, 4vw, 48px);
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.78;
  letter-spacing: 0.012em;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 560px at 88% -12%, rgba(216, 168, 78, 0.10), transparent 68%),
    radial-gradient(820px 520px at 4% 6%, rgba(26, 54, 40, 0.92), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); }

p { line-height: 1.85; }

strong, b { font-weight: 700; color: var(--gold-hi); }

em { font-style: normal; color: var(--mute); }

code, kbd, samp, time, .u-mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: 0.04em;
}

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

/* ---------- 4. 无障碍 ---------- */
:focus-visible {
  outline: 3px solid var(--gold-hi);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 12px 20px;
  transform: translateY(-220%);
  background: linear-gradient(160deg, var(--gold-hi), var(--gold) 55%, var(--gold-deep));
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  border: 2px solid var(--gold-deep);
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.18s ease;
}

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

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

/* ---------- 5. 布局 ---------- */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page-main {
  display: block;
  position: relative;
}

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

.section--tight {
  padding-block: clamp(26px, 4vw, 60px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 32px);
}

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

.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-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 28px;
  padding-bottom: clamp(18px, 2.4vw, 32px);
  border-bottom: 2px solid var(--line-soft);
  margin-bottom: clamp(22px, 3vw, 44px);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--step-micro);
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-title {
  font-size: var(--step-h2);
  font-weight: 300;
  letter-spacing: 0.03em;
}

.section-title strong {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.section-sub {
  max-width: 46ch;
  font-size: var(--step-small);
  line-height: 1.9;
  color: var(--mute);
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: var(--step-small);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-align: center;
  border: 2px solid var(--gold-deep);
  background: transparent;
  color: var(--paper);
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.55);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.btn--gold {
  background: linear-gradient(160deg, var(--gold-hi), var(--gold) 54%, var(--gold-deep) 100%);
  color: var(--ink);
  border-color: var(--gold-deep);
  font-weight: 700;
}

.btn--gold:hover {
  filter: saturate(1.08) brightness(1.04);
}

.btn--ghost {
  background: rgba(26, 54, 40, 0.5);
  color: var(--paper);
  border-color: var(--stone);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
}

/* ---------- 7. 面包屑 ---------- */
.breadcrumb {
  padding-block: 22px 0;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--step-micro);
  letter-spacing: 0.14em;
  color: var(--stone);
}

.breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.breadcrumb-list li + li::before {
  content: "/";
  color: var(--gold-deep);
}

.breadcrumb-link {
  color: var(--mute);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.breadcrumb-link:hover {
  color: var(--gold-hi);
  border-bottom-color: var(--gold);
}

.breadcrumb-current {
  color: var(--paper);
}

/* ---------- 8. 卡片 ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 30px);
  background: var(--felt);
  border: 2px solid var(--line-soft);
  box-shadow: var(--shadow-hard);
}

.card--lift {
  background: var(--lift);
  border-color: var(--line-gold);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--step-h3);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--paper);
}

/* ---------- 9. 可复用图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  background:
    radial-gradient(circle at 26% 18%, rgba(216, 168, 78, 0.14), transparent 62%),
    linear-gradient(150deg, #12291E 0%, #0B1A13 100%);
  border: 2px solid var(--line-soft);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.38);
}

.media-frame > img,
.media-frame > picture,
.media-frame > picture > img,
.media-frame > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(239, 231, 215, 0.035) 0 1px, transparent 1px 4px);
  mix-blend-mode: soft-light;
}

.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--micro { aspect-ratio: 4 / 3; }

.media-frame__ph {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 160px;
  padding: 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--step-micro);
  letter-spacing: 0.2em;
  line-height: 1.7;
  color: var(--stone);
  background-image:
    radial-gradient(circle at 30% 20%, rgba(216, 168, 78, 0.16), transparent 62%),
    repeating-linear-gradient(135deg, rgba(93, 107, 103, 0.16) 0 2px, transparent 2px 9px);
}

.media-frame__label {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 8px 14px;
  background: rgba(8, 19, 14, 0.86);
  border-top: 2px solid var(--gold-deep);
  border-right: 2px solid var(--gold-deep);
  font-family: var(--font-mono);
  font-size: var(--step-micro);
  letter-spacing: 0.16em;
  color: var(--gold);
}

/* ---------- 10. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: linear-gradient(180deg, #0C1E15 0%, #08130E 100%);
  border-bottom: 1px solid rgba(216, 168, 78, 0.25);
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  pointer-events: none;
  opacity: 0.55;
  background: linear-gradient(90deg,
    rgba(155, 106, 36, 0) 0%,
    var(--gold-deep) 20%,
    var(--gold) 50%,
    var(--gold-deep) 80%,
    rgba(155, 106, 36, 0) 100%);
}

.site-header[data-scrolled] {
  border-bottom-color: rgba(216, 168, 78, 0.55);
  box-shadow: var(--shadow-soft);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 32px);
  width: 100%;
  max-width: var(--header-max);
  margin-inline: auto;
  padding: 14px var(--gutter);
}

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

.brand-tile {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 52px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: #0B1A13;
  background: linear-gradient(160deg, var(--gold-hi), var(--gold) 56%, var(--gold-deep));
  border: 2px solid var(--gold-deep);
  border-radius: 5px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(11, 26, 19, 0.16);
  transition: filter 0.18s ease;
}

.brand-mark:hover .brand-tile {
  filter: brightness(1.08);
}

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

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.2;
  color: var(--paper);
  white-space: nowrap;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  color: var(--stone);
  white-space: nowrap;
}

.brand-mark--footer .brand-name {
  font-size: 19px;
}

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 24px);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 0;
  font-size: var(--step-small);
  letter-spacing: 0.1em;
  color: var(--mute);
  transition: color 0.18s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-hi));
  transition: transform 0.22s ease;
}

.nav-link:hover { color: var(--paper); }
.nav-link:hover::after { transform: scaleX(1); }

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

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--stone);
  transition: color 0.18s ease;
}

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

.nav-label { white-space: nowrap; }

.nav-aside {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-note {
  max-width: 12ch;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--stone);
}

.nav-cta {
  padding: 10px 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* 移动端按钮（桌面隐藏） */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  background: var(--lift);
  color: var(--paper);
  border: 2px solid var(--line-gold);
  box-shadow: var(--shadow-hard-sm);
  font-family: var(--font-mono);
  font-size: var(--step-micro);
  letter-spacing: 0.14em;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-toggle:hover { background: #21402F; }

.nav-toggle[aria-expanded="true"] {
  background: linear-gradient(160deg, var(--gold-hi), var(--gold) 60%, var(--gold-deep));
  color: var(--ink);
  border-color: var(--gold-deep);
}

.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: var(--gold);
  transition: background-color 0.18s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span {
  background: var(--ink);
}

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 120px);
  padding-top: clamp(40px, 6vw, 80px);
  background: linear-gradient(180deg, #0C1E15 0%, #08130E 56%, #060E0A 100%);
  border-top: 2px solid var(--gold-deep);
  color: var(--mute);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  opacity: 0.28;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--gold-deep) 0 14px, transparent 14px 28px);
}

.footer-inner {
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: clamp(24px, 3.4vw, 56px);
  align-items: start;
}

.footer-brand { min-width: 0; }

.footer-blurb {
  margin-top: 18px;
  max-width: 34ch;
  font-size: var(--step-small);
  line-height: 1.9;
  color: var(--mute);
}

.footer-group-title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: var(--step-micro);
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--gold);
}

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

.footer-link {
  display: inline-block;
  padding: 6px 0;
  font-size: var(--step-small);
  letter-spacing: 0.05em;
  color: var(--paper);
  opacity: 0.84;
  border-bottom: 1px solid transparent;
  transition: opacity 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.footer-link:hover {
  opacity: 1;
  color: var(--gold-hi);
  border-bottom-color: var(--gold);
}

.footer-contact { min-width: 0; }

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

.footer-contact-item { min-width: 0; }

.footer-contact-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--stone);
}

.footer-contact-val {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: var(--step-small);
  letter-spacing: 0.03em;
  line-height: 1.6;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-note {
  margin-top: 16px;
  max-width: 36ch;
  font-size: 12px;
  line-height: 1.85;
  color: var(--stone);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(30px, 5vw, 60px);
  padding-block: 18px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: var(--step-micro);
  letter-spacing: 0.1em;
  color: var(--stone);
}

.footer-copy { line-height: 1.7; }

.footer-legal-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
}

.footer-legal-link {
  color: var(--mute);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.footer-legal-link:hover {
  color: var(--gold-hi);
  border-bottom-color: var(--gold);
}

/* ---------- 12. 滚动进度 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 55%, var(--gold-hi));
}

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 95;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px var(--gutter) 26px;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    background: linear-gradient(180deg, #0C1E15 0%, #08130E 100%);
    border-bottom: 2px solid var(--gold-deep);
    box-shadow: 0 28px 52px -30px #000;
  }

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

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

  .nav-item {
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-item:last-child {
    border-bottom: 0;
  }

  .nav-link {
    display: flex;
    width: 100%;
    padding: 14px 2px;
    font-size: 15px;
    letter-spacing: 0.12em;
  }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"] {
    padding-left: 8px;
    border-left: 3px solid var(--gold);
  }

  .nav-aside {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-top: 20px;
  }

  .nav-note {
    max-width: none;
    font-size: var(--step-micro);
  }

  .nav-cta {
    width: 100%;
    padding: 13px 18px;
    font-size: var(--step-small);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand { grid-column: 1 / -1; }

  .col-3, .col-4, .col-5 { grid-column: span 6; }
  .col-6, .col-7, .col-8, .col-9 { grid-column: span 12; }
}

@media (max-width: 640px) {
  body { line-height: 1.76; }

  .header-inner { padding-block: 12px; }

  .brand-tile {
    width: 36px;
    height: 44px;
    font-size: 20px;
  }

  .brand-tagline { display: none; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

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

  .col-3, .col-4, .col-5, .col-6,
  .col-7, .col-8, .col-9, .col-12 {
    grid-column: span 12;
  }

  .btn { width: 100%; }
  .nav-cta { width: 100%; }
  .btn--inline { width: auto; }
}

/* ---------- 14. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover,
  .btn:active {
    transform: none;
  }

  .nav-link::after {
    transform: scaleX(1);
    transition: none;
  }
}
