/* ============================================================
   家乐牌局 · 共享样式 /assets/site.css
   牌桌结构 + 牌面阅读 + 差异高亮
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body { margin: 0; }

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

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

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

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

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:root {
  --red-600: #B3361F;
  --red-300: #E0795F;
  --green-900: #1E3A31;
  --green-600: #2F5D4C;
  --ivory: #F6F1E6;
  --cream: #EDE4D3;
  --amber: #C9902B;
  --celadon: #2C6E8F;
  --celadon-100: #DCE9EF;
  --grey: #6B6560;
  --ink: #241F1C;

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

  --shell: 1180px;
  --u: 8px;
  --r-card: 18px 6px 18px 6px;
  --r-chip: 12px 4px 12px 4px;
  --shadow-soft: 0 18px 40px -28px rgba(30, 58, 49, 0.55);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

body {
  background-color: var(--ivory);
  background-image:
    radial-gradient(1100px 560px at 8% -12%, rgba(201, 144, 43, 0.10), transparent 62%),
    radial-gradient(900px 520px at 102% -4%, rgba(47, 93, 76, 0.09), transparent 58%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 布局基元 ---------- */

.shell {
  width: min(100% - clamp(1.5rem, 5vw, 3.4rem), var(--shell));
  margin-inline: auto;
}

.section { padding: clamp(40px, 6vw, 76px) 0; }

.section--tight { padding: clamp(24px, 3.5vw, 44px) 0; }

main { display: block; }

/* ---------- 中文排版 ---------- */

.display-xl {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.display-l {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.8vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.display-m {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(23px, 2.8vw, 34px);
  line-height: 1.24;
  letter-spacing: -0.01em;
}

.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.72;
  color: #3b342f;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-600);
}

.eyebrow::before {
  content: "";
  width: 14px;
  height: 3px;
  background: var(--red-600);
  border-radius: 2px;
  flex: none;
}

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

/* ---------- 跳转链接 ---------- */

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--green-900);
  color: var(--ivory);
  font-weight: 700;
  font-size: 15px;
  border-radius: 0 0 14px 4px;
  transition: top 0.18s var(--ease);
}

.skip-link:focus {
  top: 0;
}

/* ============================================================
   头部：牌面层 + 桌沿层
   ============================================================ */

.site-header { position: relative; z-index: 80; }

.header-top {
  background: linear-gradient(180deg, #FBF7EE 0%, #F6F1E6 100%);
  border-bottom: 1px solid rgba(30, 58, 49, 0.12);
}

.header-top__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
  padding: 16px 0 15px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.brand__mark {
  position: relative;
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--green-900);
  border-radius: 16px 4px 16px 4px;
  box-shadow: inset 0 0 0 1px rgba(246, 241, 230, 0.20);
  transition: transform 0.2s var(--ease);
}

.brand__mark::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 6px;
  width: 7px;
  height: 7px;
  background: var(--amber);
  transform: rotate(45deg);
  border-radius: 1px;
}

.brand:hover .brand__mark { transform: translateY(-2px) rotate(-2deg); }

.brand__pip {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--red-600);
  box-shadow: 0 0 0 3px rgba(179, 54, 31, 0.18);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 23px;
  letter-spacing: 0.01em;
  color: var(--green-900);
}

.brand__line {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--grey);
}

.header-top__tagline {
  justify-self: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--grey);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.header-top__tagline::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}

.search-launch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(370px, 100%);
  padding: 9px 12px 9px 14px;
  background: #FBF7EE;
  border: 1px solid rgba(30, 58, 49, 0.18);
  border-left: 3px solid var(--red-600);
  border-radius: var(--r-chip);
  color: var(--grey);
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.search-launch:hover {
  background: #ffffff;
  border-color: rgba(179, 54, 31, 0.42);
  border-left-color: var(--red-600);
  transform: translateY(-1px);
}

.search-launch__icon {
  position: relative;
  width: 13px;
  height: 13px;
  flex: none;
  border: 2px solid var(--green-600);
  border-radius: 50%;
}

.search-launch__icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -5px;
  width: 2px;
  height: 7px;
  background: var(--green-600);
  border-radius: 2px;
  transform: rotate(-45deg);
}

.search-launch__text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-launch__key {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ivory);
  background: var(--green-600);
  padding: 3px 8px;
  border-radius: 8px 3px 8px 3px;
}

/* 桌沿层：墨绿常驻导航 */

.header-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--green-900);
  color: var(--ivory);
  border-top: 1px solid rgba(246, 241, 230, 0.10);
  box-shadow: 0 14px 30px -26px rgba(0, 0, 0, 0.85);
}

.header-bar__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 7px 0;
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--red-600), var(--amber));
  transition: width 0.12s linear;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border: 1px solid rgba(246, 241, 230, 0.28);
  border-radius: var(--r-chip);
  color: var(--ivory);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav-toggle__bars {
  display: grid;
  gap: 4px;
}

.nav-toggle__bars i {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--amber);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  flex-wrap: wrap;
}

.site-nav__item { display: block; }

.site-nav__link {
  display: block;
  padding: 9px 13px;
  border-radius: var(--r-chip);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(246, 241, 230, 0.86);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.site-nav__link:hover {
  background: rgba(246, 241, 230, 0.12);
  color: #ffffff;
}

.site-nav__link[aria-current="page"] {
  background: var(--cream);
  color: var(--green-900);
  box-shadow: inset 0 -3px 0 var(--red-600);
}

.site-nav__cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--r-chip);
  background: var(--red-600);
  color: var(--ivory);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 22px -14px rgba(179, 54, 31, 0.95);
  transition: background-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.site-nav__cta:hover {
  background: #C8452B;
  transform: translateY(-1px);
}

.site-nav :focus-visible,
.nav-toggle:focus-visible {
  outline-color: var(--amber);
}

/* ============================================================
   页脚：墨绿深色分区
   ============================================================ */

.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--green-900);
  color: var(--ivory);
}

.footer__corner {
  position: absolute;
  right: 0;
  top: 0;
  width: 220px;
  height: 220px;
  background: linear-gradient(225deg, rgba(201, 144, 43, 0.22), rgba(201, 144, 43, 0) 72%);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  pointer-events: none;
}

.footer__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 2.3fr;
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(40px, 5vw, 60px) 0 clamp(28px, 3vw, 36px);
}

.footer__brand { display: block; }

.footer__mark {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.01em;
  color: var(--ivory);
  border-bottom: 3px solid var(--red-600);
  padding-bottom: 4px;
}

.footer__mark:hover { color: var(--amber); }

.footer__line {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(246, 241, 230, 0.70);
}

.footer__note {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(246, 241, 230, 0.78);
  max-width: 26em;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}

.footer__col { min-width: 0; }

.footer__title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}

.footer__links { display: grid; gap: 2px; }

.footer__links a {
  display: inline-block;
  padding: 4px 0;
  font-size: 15px;
  color: rgba(246, 241, 230, 0.82);
  transition: color 0.16s var(--ease), transform 0.16s var(--ease);
}

.footer__links a:hover {
  color: var(--amber);
  transform: translateX(3px);
}

.footer__contact-item {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(246, 241, 230, 0.78);
  margin-bottom: 6px;
}

.footer__key {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--amber);
}

.footer__val { min-width: 0; word-break: break-word; }

.footer__legal {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 28px;
  padding: 16px 0 clamp(24px, 3vw, 34px);
  border-top: 1px solid rgba(246, 241, 230, 0.14);
  font-size: 13px;
  color: rgba(246, 241, 230, 0.66);
}

.footer__legal-line {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  line-height: 1.8;
}

.footer__legal-line--muted {
  font-family: var(--font-body);
  font-size: 13px;
  max-width: 52em;
  color: rgba(246, 241, 230, 0.58);
}

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

/* ============================================================
   通用组件
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 14px 4px 14px 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn--primary {
  background: var(--red-600);
  color: var(--ivory);
  box-shadow: 0 14px 26px -18px rgba(179, 54, 31, 0.95);
}

.btn--primary:hover { background: #9C2D1A; transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  color: var(--green-900);
  border-color: rgba(30, 58, 49, 0.35);
}

.btn--ghost:hover {
  background: var(--green-900);
  border-color: var(--green-900);
  color: var(--ivory);
  transform: translateY(-2px);
}

.btn--quiet {
  background: var(--cream);
  color: var(--green-900);
}

.btn--quiet:hover { background: #E4D8C1; transform: translateY(-2px); }

.grid-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}

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

.panel {
  background: #FBF7EE;
  border: 1px solid rgba(30, 58, 49, 0.12);
  border-radius: var(--r-card);
  padding: clamp(20px, 2.4vw, 32px);
  box-shadow: var(--shadow-soft);
}

.panel--cream {
  background: var(--cream);
  border-color: rgba(107, 101, 96, 0.20);
}

.panel--green {
  background: var(--green-900);
  border-color: transparent;
  color: var(--ivory);
}

.panel--green a { color: var(--ivory); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--green-900);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.tag--amber { background: rgba(201, 144, 43, 0.18); color: #8A6114; }
.tag--celadon { background: var(--celadon-100); color: #1D4C63; }
.tag--red { background: rgba(179, 54, 31, 0.12); color: var(--red-600); }

.stat__num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  color: var(--red-600);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--grey);
}

.panel--green .stat__num { color: var(--amber); }
.panel--green .stat__label { color: rgba(246, 241, 230, 0.72); }

.breadcrumb { padding: 16px 0 0; }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--grey);
}

.breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: rgba(107, 101, 96, 0.55);
}

.breadcrumb__item a { color: var(--grey); }
.breadcrumb__item a:hover { color: var(--red-600); }

.breadcrumb__current { color: var(--green-900); }

/* 图片容器基础规则（页面阶段放置占位） */

.figure { display: block; margin: 0; }

.figure__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-card);
  background-color: var(--green-900);
  background-image:
    linear-gradient(135deg, var(--green-600) 0%, var(--green-900) 68%),
    linear-gradient(0deg, var(--cream), var(--cream));
  box-shadow: var(--shadow-soft);
}

.figure__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(140px 140px at 76% 22%, rgba(201, 144, 43, 0.34), transparent 70%);
  pointer-events: none;
}

.figure__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--grey);
}

.figure.figure--wide .figure__media { aspect-ratio: 16 / 9; }
.figure.figure--portrait .figure__media { aspect-ratio: 3 / 4; }
.figure.figure--card .figure__media { aspect-ratio: 1 / 1; }

/* 分段切换（可访问标签页） */

.tabset { display: block; }

.tabset__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid rgba(30, 58, 49, 0.16);
}

.tabset__tab {
  padding: 10px 16px;
  border-radius: 12px 4px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--grey);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.tabset__tab:hover { background: rgba(237, 228, 211, 0.55); color: var(--green-900); }

.tabset__tab[aria-selected="true"] {
  background: var(--cream);
  color: var(--green-900);
  box-shadow: inset 0 -3px 0 var(--red-600);
}

.tabset__panel { padding: 22px 0 0; }
.tabset__panel[hidden] { display: none; }

/* 显现动效 */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

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

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 1080px) {
  .header-top__tagline { display: none; }
  .header-top__inner { grid-template-columns: auto 1fr; }
  .search-launch { min-width: 0; justify-self: end; }
}

@media (max-width: 980px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .header-top__inner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 0;
  }

  .search-launch { justify-self: stretch; width: 100%; }

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

  .header-bar__inner { min-height: 56px; }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 20px;
    background: var(--green-900);
    border-top: 1px solid rgba(246, 241, 230, 0.14);
    box-shadow: 0 26px 44px -26px rgba(0, 0, 0, 0.75);
  }

  .site-nav[data-open="true"] {
    display: flex;
    animation: nav-drop 0.2s var(--ease) both;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .site-nav__link {
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 10px 4px 10px 4px;
  }

  .site-nav__cta {
    margin-top: 12px;
    width: 100%;
    padding: 12px 18px;
  }

  @keyframes nav-drop {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
  }
}

@media (max-width: 820px) {
  .grid-bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9 { grid-column: span 6; }
  .span-12 { grid-column: span 6; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

  .brand__mark { width: 40px; height: 40px; border-radius: 14px 4px 14px 4px; }
  .brand__name { font-size: 20px; }
  .brand__line { font-size: 10px; }

  .footer__cols { grid-template-columns: 1fr; }
  .footer__legal { flex-direction: column; }
  .footer__legal-line--muted { max-width: none; }

  .tabset__list { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabset__tab { white-space: nowrap; }
}

@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;
    scroll-behavior: auto !important;
  }

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