/* ============================================================
   万豪斗地主电 · 全站共享样式  /assets/site.css
   牌桌墨绿 + 烫金 + 米白纸底，模块化 Bento 与翻牌动效
   ============================================================ */

/* ---------- 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, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul, ol { padding: 0; }

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

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

a { color: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  --table-green: #0E3A2C;
  --table-green-2: #14493A;
  --table-deep: #08281E;
  --gold: #C8A038;
  --gold-hi: #E8CE7A;
  --gold-dark: #8F6E20;
  --vermilion: #B7332A;
  --vermilion-hi: #C93E33;
  --paper: #F6F0E2;
  --cream: #EDE1C8;
  --ink: #241C14;
  --ink-green: #1C3B2E;
  --sage: #7C8C81;
  --gold-line: #D8C193;

  --font-display: "STZhongsong", "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-index: "Barlow Condensed", "Oswald", "DIN Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;

  --radius-l: 28px;
  --radius-m: 18px;
  --radius-s: 12px;
  --pill: 999px;

  --ease-flip: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow-plate: 0 18px 40px -26px rgba(8, 40, 30, 0.6);

  --rail: 1240px;
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(36, 28, 20, 0.016) 0 1px,
    transparent 1px 5px
  );
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  overflow-wrap: break-word;
  word-break: normal;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink-green);
  line-height: 1.16;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }

p { max-width: 72ch; }

::selection {
  background: var(--gold-hi);
  color: #1B1409;
}

:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 4. 通用容器与版式件 ---------- */
.wrap {
  width: 100%;
  max-width: var(--rail);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 44px);
}

.wrap--narrow { max-width: 820px; }

.section { padding-block: clamp(52px, 7vw, 104px); }
.section--tight { padding-block: clamp(30px, 4vw, 58px); }
.section--dark { background: var(--table-green); color: var(--paper); }
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--paper); }
.section--cream { background: var(--cream); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 28px;
  padding-bottom: 14px;
  margin-bottom: clamp(22px, 3.4vw, 42px);
  border-bottom: 1px solid var(--gold-line);
}

.section-head__title { font-family: var(--font-display); }
.section-head__note {
  font-size: 14px;
  color: var(--sage);
  max-width: 46ch;
}
.section--dark .section-head { border-bottom-color: rgba(216, 193, 147, 0.45); }
.section--dark .section-head__note { color: rgba(246, 240, 226, 0.66); }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: inherit;
}

.lead {
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
  line-height: 1.8;
  max-width: 62ch;
}
.section--dark .lead { color: rgba(246, 240, 226, 0.86); }

.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.4em; }

.stack { display: grid; gap: clamp(14px, 2vw, 24px); }

.eyebrow,
.idx {
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  display: inline-block;
}
.idx { color: var(--gold); }
.section--dark .eyebrow { color: rgba(246, 240, 226, 0.6); }

.num {
  font-family: var(--font-index);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.rule-gold {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--gold), rgba(200, 160, 56, 0));
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-family: var(--font-index);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.22s var(--ease-flip), color 0.22s var(--ease-flip),
    border-color 0.22s var(--ease-flip), transform 0.22s var(--ease-flip);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--rush {
  background: var(--vermilion);
  color: #FFF3E4;
  border-color: rgba(255, 255, 255, 0.18);
}
.btn--rush:hover { background: var(--vermilion-hi); }

.btn--gold {
  background: linear-gradient(160deg, var(--gold-hi), var(--gold) 55%, var(--gold-dark));
  color: #12291F;
  border-color: var(--gold-hi);
}
.btn--gold:hover { filter: brightness(1.06); }

.btn--ghost {
  background: transparent;
  color: var(--gold-hi);
  border-color: var(--gold);
}
.btn--ghost:hover { background: rgba(200, 160, 56, 0.14); }

.btn--quiet {
  background: transparent;
  color: currentColor;
  border-color: var(--gold-line);
}
.btn--quiet:hover { border-color: var(--gold); color: var(--gold-hi); }

.btn--sm { padding: 8px 15px; font-size: 12px; letter-spacing: 0.12em; }

/* ---------- 6. skip link ---------- */
.skip-link {
  position: fixed;
  left: clamp(12px, 3vw, 32px);
  top: -120px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--gold-hi);
  color: #1B1409;
  font-size: 14px;
  text-decoration: none;
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  transition: top 0.2s var(--ease-flip);
}
.skip-link:focus { top: 0; }

/* ---------- 7. 头部命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--table-green);
  color: var(--paper);
  border-bottom: 1px solid rgba(200, 160, 56, 0.32);
  transition: background-color 0.3s var(--ease-flip), border-color 0.3s var(--ease-flip);
}

.site-header[data-scrolled] {
  background: rgba(14, 58, 44, 0.97);
  border-bottom-color: var(--gold);
}

.header-rail {
  max-width: var(--rail);
  margin-inline: auto;
  padding: 12px clamp(16px, 3.4vw, 40px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  transition: padding 0.3s var(--ease-flip);
}

.site-header[data-scrolled] .header-rail { padding-block: 7px; }

/* 品牌标牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}

.brand__plate {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-s);
  background: linear-gradient(160deg, var(--gold-hi), var(--gold) 55%, var(--gold-dark));
  color: #12291F;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), var(--shadow-plate);
  transition: transform 0.3s var(--ease-flip);
}
.brand:hover .brand__plate { transform: rotateY(165deg); }

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

.brand__line {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.04em;
  color: #F6F0E2;
}

.brand__sub {
  font-family: var(--font-index);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  transition: opacity 0.3s var(--ease-flip);
}
.site-header[data-scrolled] .brand__sub { opacity: 0.7; }

/* 命令栏导航 */
.cmd-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cmd-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.8vw, 12px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.cmd-nav__item { margin: 0; }

.cmd-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 10px 13px;
  border-radius: 10px;
  color: rgba(246, 240, 226, 0.82);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s var(--ease-flip), background-color 0.2s var(--ease-flip);
}

.cmd-nav__link:hover {
  color: var(--gold-hi);
  background: rgba(200, 160, 56, 0.1);
}

.cmd-nav__idx {
  font-family: var(--font-index);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.cmd-nav__label { white-space: nowrap; }

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

.cmd-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-hi));
}

.cmd-nav__cta { display: none; }

/* 右侧动作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* 移动开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: var(--pill);
  color: var(--gold-hi);
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.2s var(--ease-flip);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease-flip);
}
.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 { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 阅读进度金线 */
.scroll-meter {
  height: 2px;
  background: rgba(216, 193, 147, 0.18);
}

.scroll-meter__fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-hi));
  transition: width 0.12s linear;
}

.header-rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(200, 160, 56, 0), rgba(200, 160, 56, 0.7), rgba(200, 160, 56, 0));
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  background: var(--table-green);
  color: var(--paper);
  border-top: 1px solid var(--gold);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(230px, 1.05fr) minmax(0, 1.7fr) minmax(215px, 0.95fr);
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(40px, 5.6vw, 72px) 32px;
  align-items: start;
}

.footer-brand { display: grid; gap: 12px; justify-items: start; }

.footer-brand__plate {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--gold-hi), var(--gold) 55%, var(--gold-dark));
  color: #12291F;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32), var(--shadow-plate);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: 0.04em;
  color: #F6F0E2;
}

.footer-brand__note {
  font-size: 14px;
  line-height: 1.75;
  max-width: 30ch;
  color: rgba(246, 240, 226, 0.7);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 34px);
}

.footer-col__heading {
  font-family: var(--font-index);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.footer-col__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-col__link {
  font-size: 15px;
  color: rgba(246, 240, 226, 0.86);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease-flip), border-color 0.2s var(--ease-flip);
}
.footer-col__link:hover {
  color: var(--gold-hi);
  border-bottom-color: var(--gold);
}

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

.footer-contact__line {
  display: grid;
  gap: 2px;
  font-size: 14px;
  line-height: 1.6;
  max-width: none;
  color: rgba(246, 240, 226, 0.86);
}

.footer-contact__label {
  font-family: var(--font-index);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
}

.footer-contact__mail {
  font-family: var(--font-index);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--gold-hi);
  word-break: break-all;
}

.footer-contact__addr { color: rgba(246, 240, 226, 0.8); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 26px;
  padding-block: 18px 26px;
  border-top: 1px solid rgba(216, 193, 147, 0.26);
}

.footer-legal {
  margin: 0;
  max-width: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gold);
  opacity: 0.72;
}

.footer-legal--dim { opacity: 0.5; }

/* ---------- 9. 网格 / Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}

.bento__cell { grid-column: span 12; min-width: 0; }
.bento__cell--3 { grid-column: span 3; }
.bento__cell--4 { grid-column: span 4; }
.bento__cell--6 { grid-column: span 6; }
.bento__cell--8 { grid-column: span 8; }

.grid {
  display: grid;
  gap: clamp(14px, 2vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

/* ---------- 10. 图片容器（页面阶段放图） ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-m);
  border: 1px solid var(--gold-line);
  background:
    radial-gradient(120% 90% at 18% 12%, rgba(200, 160, 56, 0.22), transparent 60%),
    linear-gradient(150deg, var(--table-green-2), var(--table-green) 52%, var(--table-deep));
}

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

.media-frame--card { aspect-ratio: 5 / 7; border-radius: var(--radius-s); }
.media-frame--band { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame__caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  right: 14px;
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-hi);
}

/* ---------- 11. 翻牌组件 ---------- */
.flip-card {
  perspective: 1000px;
  display: block;
  text-decoration: none;
  color: inherit;
}

.flip-card__inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease-flip);
}

.flip-card:hover .flip-card__inner,
.flip-card:focus-visible .flip-card__inner,
.flip-card:focus-within .flip-card__inner { transform: rotateY(180deg); }

.flip-card__face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-m);
  overflow: hidden;
}

.flip-card__face--back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  background: linear-gradient(160deg, var(--table-green-2), var(--table-deep));
  color: var(--paper);
  border: 1px solid var(--gold);
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 8px;
}

/* ---------- 12. 标签 ---------- */
.tagbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--pill);
  border: 1px solid var(--gold-line);
  background: rgba(28, 59, 46, 0.05);
  color: var(--ink-green);
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-flip), color 0.2s var(--ease-flip),
    border-color 0.2s var(--ease-flip);
}

.tag:hover { border-color: var(--gold); color: var(--gold-dark); }

.tag--on,
.tag[aria-pressed="true"] {
  background: var(--table-green);
  color: var(--gold-hi);
  border-color: var(--gold);
}

.section--dark .tag {
  background: rgba(246, 240, 226, 0.06);
  border-color: rgba(216, 193, 147, 0.4);
  color: rgba(246, 240, 226, 0.86);
}

/* ---------- 13. 面包屑 ---------- */
.crumbs { padding-block: 16px 0; }

.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
}

.crumbs__item { display: inline-flex; align-items: center; gap: 6px; }
.crumbs__item::after { content: "/"; color: var(--gold-line); }
.crumbs__item:last-child::after { content: ""; }

.crumbs__link {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s var(--ease-flip);
}
.crumbs__link:hover { color: var(--gold-dark); }

/* ---------- 14. 滚动显现 ---------- */
[data-js="on"] [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-flip), transform 0.6s var(--ease-flip);
}

[data-js="on"] [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1180px) {
  .header-actions .btn--ghost { display: none; }
}

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }

  .cmd-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    padding: 6px clamp(16px, 4vw, 34px) 22px;
    background: var(--table-green);
    border-top: 1px solid rgba(200, 160, 56, 0.4);
    border-bottom: 1px solid var(--gold);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s var(--ease-flip), transform 0.25s var(--ease-flip),
      visibility 0.25s var(--ease-flip);
  }

  .cmd-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .cmd-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .cmd-nav__item + .cmd-nav__item { border-top: 1px solid rgba(216, 193, 147, 0.18); }

  .cmd-nav__link {
    width: 100%;
    padding: 15px 4px;
    border-radius: 0;
    font-size: 16px;
  }

  .cmd-nav__link[aria-current="page"]::after { left: 4px; right: auto; width: 32px; bottom: 8px; }

  .cmd-nav__cta {
    display: inline-flex;
    margin-top: 18px;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }

  .footer-contact { grid-column: 1 / -1; }
  .footer-contact { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

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

  .bento__cell--3,
  .bento__cell--4 { grid-column: span 6; }

  .bento__cell--8 { grid-column: span 12; }

  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-bottom { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .header-actions .btn--rush { display: none; }
  .brand__sub { display: none; }
  .bento__cell--3,
  .bento__cell--4,
  .bento__cell--6 { grid-column: span 12; }
  .footer-cols { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 16. 动效降级 ---------- */
@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;
  }

  [data-js="on"] [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .flip-card:hover .flip-card__inner,
  .flip-card:focus-visible .flip-card__inner,
  .flip-card:focus-within .flip-card__inner { transform: none; }

  .btn:hover,
  .brand:hover .brand__plate { transform: none; }
}
