/* ==========================================================================
   华悦棋牌 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

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

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

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

a {
  color: var(--silver-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--cinnabar);
}

:root {
  /* 色彩体系 */
  --cream: #F6EEDF;
  --ink: #2A1C18;
  --ink-mute: #6B5A50;
  --ink-soft: #5A4A42;
  --silver-blue: #1E5A7A;
  --silver-blue-deep: #164459;
  --cinnabar: #B83A2D;
  --cinnabar-deep: #9C2F24;
  --indigo: #103B52;
  --gold: #C9943F;
  --silver-grey: #D9D2C3;
  --mist: #FBF7EF;
  --bamboo: #4F6B57;
  --grad-indigo: linear-gradient(135deg, #0F3A50 0%, #1B6B86 100%);

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

  /* 布局 */
  --gutter: clamp(18px, 4vw, 48px);
  --shell-max: 1240px;
  --cut: 2px 22px 2px 22px;
  --cut-sm: 2px 12px 2px 12px;
  --line: 1px solid var(--silver-grey);
  --ease: cubic-bezier(.22, .7, .3, 1);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--cinnabar);
  color: var(--mist);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: .03em;
  font-weight: 800;
}

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

#main-content:focus-visible {
  outline: 3px solid var(--cinnabar);
  outline-offset: 6px;
}

/* --------------------------------------------------------------------------
   1. 跳跃链接
   -------------------------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  transform: translateY(-180%);
  background: var(--ink);
  color: var(--mist);
  padding: 11px 20px;
  border-radius: var(--cut-sm);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  transition: transform .22s var(--ease);
}

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

/* --------------------------------------------------------------------------
   2. 通用容器
   -------------------------------------------------------------------------- */
.header-shell,
.footer-shell,
.page-shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page-shell--narrow {
  max-width: 840px;
}

/* --------------------------------------------------------------------------
   3. 头部
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--cream);
}

/* 3.1 上层品牌轨道 —— 苗银蓝 */
.header-top {
  background: var(--silver-blue);
  color: var(--mist);
  border-bottom: 1px solid var(--silver-blue-deep);
}

.header-top .header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--mist);
}

.brand:hover {
  color: var(--mist);
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  background: var(--cinnabar);
  color: var(--mist);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  border-radius: 4px 16px 4px 16px;
  border: 1px solid rgba(251, 247, 239, .45);
  transition: transform .3s var(--ease);
}

.brand:hover .brand-seal {
  transform: rotate(-6deg);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.2;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(251, 247, 239, .78);
}

.header-facts {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.fact-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px;
  border: 1px solid rgba(201, 148, 63, .7);
  border-radius: var(--cut-sm);
  background: rgba(251, 247, 239, .08);
}

.fact-pill--ghost {
  border-color: rgba(251, 247, 239, .34);
  background: transparent;
}

.fact-key {
  font-size: 11px;
  letter-spacing: .18em;
  color: rgba(251, 247, 239, .82);
}

.fact-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--mist);
}

/* 3.2 下层栏目轨道 —— 奶油底 */
.header-bar {
  position: relative;
  background: var(--cream);
  border-bottom: 1px solid var(--silver-grey);
}

.header-bar > .header-shell {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 58px;
}

.header-note {
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--ink-mute);
  white-space: nowrap;
}

.primary-nav {
  margin-left: auto;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 12px 11px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink);
  text-decoration: none;
  transition: color .2s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--cinnabar);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .26s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--silver-blue);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

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

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

.nav-index {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--ink-mute);
}

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

.nav-label {
  line-height: 1;
}

/* 3.3 滚动进度 */
.nav-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: rgba(42, 28, 24, .07);
  overflow: hidden;
}

.nav-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cinnabar) 0%, var(--gold) 100%);
}

/* 3.4 移动端栏目按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: var(--cut-sm);
  background: var(--indigo);
  color: var(--mist);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  cursor: pointer;
  transition: background-color .2s var(--ease);
}

.nav-toggle:hover {
  background: var(--silver-blue);
}

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

.nav-toggle-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 12px;
}

.nav-toggle-line {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
}

.nav-toggle-text {
  line-height: 1;
}

/* --------------------------------------------------------------------------
   4. 页脚 —— 靛青深牌桌边缘
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--indigo);
  color: var(--mist);
  border-top: 4px solid var(--cinnabar);
}

.site-footer a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid rgba(251, 247, 239, .28);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
}

.site-footer :focus-visible {
  outline-color: var(--gold);
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(230px, 1.35fr) minmax(140px, .65fr) minmax(240px, 1fr);
  gap: clamp(26px, 4vw, 60px);
  padding-block: clamp(42px, 6vw, 76px) clamp(26px, 4vw, 44px);
}

.footer-brand {
  max-width: 34ch;
}

.footer-seal {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--cinnabar);
  color: var(--mist);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  border-radius: 4px 16px 4px 16px;
  margin-bottom: 14px;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.25;
}

.footer-line {
  margin-top: 6px;
  font-size: 14px;
  letter-spacing: .06em;
  color: rgba(251, 247, 239, .82);
}

.footer-note {
  margin-top: 14px;
  padding-left: 12px;
  border-left: 2px solid var(--gold);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(251, 247, 239, .78);
}

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
  letter-spacing: .04em;
}

.footer-links a {
  display: inline-block;
  padding: 2px 0;
  border-bottom: none;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 13.5px;
  line-height: 1.65;
}

.footer-contact-list li {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 10px;
  align-items: start;
}

.contact-key {
  font-size: 11.5px;
  letter-spacing: .14em;
  color: rgba(251, 247, 239, .62);
  padding-top: 2px;
}

.contact-value {
  color: var(--mist);
  overflow-wrap: anywhere;
}

.footer-bottom {
  border-top: 1px solid rgba(251, 247, 239, .16);
  background: rgba(15, 58, 80, .55);
}

.footer-bottom .footer-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 18px;
}

.footer-shell--tight {
  padding-block: 0;
}

.footer-copy {
  font-size: 13px;
  letter-spacing: .06em;
  color: rgba(251, 247, 239, .82);
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: rgba(251, 247, 239, .68);
}

/* --------------------------------------------------------------------------
   5. 通用排版件
   -------------------------------------------------------------------------- */
.section {
  margin-block: clamp(32px, 5vw, 64px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--silver-blue);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--cinnabar);
}

.display-title {
  font-size: clamp(32px, 5.4vw, 54px);
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1.1;
}

.section-title {
  font-size: clamp(23px, 2.8vw, 32px);
  font-weight: 800;
  letter-spacing: .04em;
}

.lede {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.85;
  color: var(--ink-soft);
}

.prose p {
  margin-block: 0 1em;
  max-width: 68ch;
}

.prose p:last-child {
  margin-bottom: 0;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: .02em;
}

.stat-mono {
  font-family: var(--font-mono);
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--cinnabar);
}

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

/* --------------------------------------------------------------------------
   6. 按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--cut-sm);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease);
}

.btn--primary {
  background: var(--cinnabar);
  color: var(--mist);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--cinnabar-deep);
  color: var(--mist);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--silver-blue);
  border-color: var(--silver-blue);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--silver-blue);
  color: var(--mist);
  transform: translateY(-2px);
}

.btn--quiet {
  background: var(--silver-grey);
  color: var(--ink);
}

.btn--quiet:hover,
.btn--quiet:focus-visible {
  background: #CDC5B3;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   7. 标签 / 面板 / 图片容器
   -------------------------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 2px 8px 2px 8px;
  background: var(--silver-grey);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.6;
}

.tag--cinnabar {
  background: rgba(184, 58, 45, .13);
  color: #8F2C21;
}

.tag--bamboo {
  background: rgba(79, 107, 87, .16);
  color: #38503D;
}

.tag--gold {
  background: rgba(201, 148, 63, .2);
  color: #7A5520;
}

.cut-card {
  position: relative;
  padding: clamp(18px, 2.6vw, 30px);
  background: var(--mist);
  border: var(--line);
  border-radius: var(--cut);
  box-shadow: 0 10px 0 -6px rgba(42, 28, 24, .07);
}

.cut-card--dark {
  background: var(--grad-indigo);
  border-color: rgba(251, 247, 239, .22);
  color: var(--mist);
}

.cut-card--dark .lede,
.cut-card--dark p {
  color: rgba(251, 247, 239, .86);
}

.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 2px 24px 2px 24px;
  background: var(--grad-indigo);
  border: 1px solid rgba(42, 28, 24, .1);
}

.media-frame--wide {
  aspect-ratio: 21 / 9;
}

.media-frame--tall {
  aspect-ratio: 3 / 4;
}

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

.media-caption {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: .03em;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   8. 面包屑
   -------------------------------------------------------------------------- */
.crumbs {
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--ink-mute);
}

.crumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.crumbs-list a {
  color: var(--silver-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.crumbs-list a:hover,
.crumbs-list a:focus-visible {
  color: var(--cinnabar);
  border-color: var(--cinnabar);
}

.crumbs-sep {
  color: var(--gold);
}

.crumbs-current {
  color: var(--ink);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   9. 分段标签页（可访问）
   -------------------------------------------------------------------------- */
.seg-tablist {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--silver-grey);
  border-radius: var(--cut-sm);
}

.seg-tab {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 9px 20px;
  background: transparent;
  color: #4A3A34;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  border-radius: var(--cut-sm);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}

.seg-tab:hover {
  color: var(--silver-blue);
}

.seg-tab[aria-selected="true"] {
  background: var(--mist);
  color: var(--cinnabar);
  box-shadow: 0 2px 0 rgba(42, 28, 24, .14);
}

.seg-panel {
  padding-top: 20px;
}

.seg-panel[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   10. 网格工具
   -------------------------------------------------------------------------- */
.grid-auto {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* --------------------------------------------------------------------------
   11. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .footer-shell {
    grid-template-columns: minmax(220px, 1.2fr) minmax(140px, .8fr);
  }

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

@media (max-width: 899px) {
  html {
    scroll-padding-top: 128px;
  }

  .header-top .header-shell {
    min-height: 58px;
    gap: 12px;
    padding-block: 9px;
  }

  .brand-name {
    font-size: 17px;
    letter-spacing: .12em;
  }

  .brand-tag {
    display: none;
  }

  .brand-seal {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 16px;
  }

  .header-facts {
    gap: 6px;
  }

  .fact-pill--ghost {
    display: none;
  }

  .fact-key {
    font-size: 10px;
    letter-spacing: .12em;
  }

  .fact-mono {
    font-size: 12px;
  }

  .header-bar > .header-shell {
    flex-wrap: wrap;
    gap: 10px;
    min-height: 56px;
    padding-block: 9px;
  }

  .header-note {
    font-size: 12px;
    letter-spacing: .1em;
    white-space: normal;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    order: 5;
    flex-basis: 100%;
    margin-left: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .34s var(--ease);
  }

  .primary-nav[data-open="false"] {
    max-height: 0;
  }

  .primary-nav[data-open="true"] {
    max-height: 70vh;
    overflow-y: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-block: 10px 14px;
    border-top: 1px solid var(--silver-grey);
  }

  .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 13px 10px;
    font-size: 15.5px;
    border-radius: 2px 12px 2px 12px;
  }

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

  .nav-link:hover {
    background: rgba(30, 90, 122, .08);
  }

  .nav-link[aria-current="page"] {
    background: rgba(184, 58, 45, .1);
  }

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

  .footer-contact {
    grid-column: auto;
  }

  .footer-bottom .footer-shell {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .footer-contact-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .contact-key {
    padding-top: 0;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .btn--primary:hover,
  .btn--ghost:hover,
  .nav-link:hover::after,
  .brand:hover .brand-seal {
    transform: none;
  }
}
