/* ============================================================
   contact.css — 第二屏:联系我们 + 二维码悬停弹层
   背景使用 lxwm.png,浮一块水墨描金玻璃卡
   ============================================================ */

.contact {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  scroll-snap-align: start;
  padding: 110px 20px 70px;

  /* 背景原画 lxwm.png */
  background: url("../assets/lxwm.png") center / cover no-repeat fixed;
}

/* 墨色压暗:四周渐暗、中心微透,既能读字又留住原画 */
.contact__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(80% 70% at 50% 50%, rgba(13, 11, 8, .25) 0%, rgba(13, 11, 8, .72) 100%),
    linear-gradient(180deg, rgba(13, 11, 8, .78) 0%, rgba(13, 11, 8, .35) 28%, rgba(13, 11, 8, .35) 64%, rgba(13, 11, 8, .9) 100%);
}

/* ---------- 联系卡片 ---------- */
.contact__card {
  position: relative;
  z-index: 2;
  width: min(760px, 94vw);
  padding: clamp(34px, 5vw, 56px) clamp(24px, 5vw, 60px);
  text-align: center;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-line);
  border-radius: 22px;
  box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255, 255, 255, .06);
}
/* 描金双线边角 */
.contact__card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(200, 164, 92, .26);
  border-radius: 15px;
  pointer-events: none;
}

.contact__seal {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 8px;
  color: var(--ink-900);
  background: var(--grad-gold);
  padding: 6px 18px;
  border-radius: 6px;
  margin-bottom: 18px;
  box-shadow: var(--glow-gold);
}

.contact__title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: 6px;
  background: linear-gradient(180deg, #fbf2d4, #c8a45c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.contact__desc {
  margin: 16px auto 0;
  max-width: 460px;
  font-size: 15px;
  color: var(--paper-soft);
  letter-spacing: .5px;
}

/* ---------- 三个渠道 ---------- */
.channels {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(16px, 4vw, 40px);
  margin-top: 38px;
}

.channel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 130px;
  padding: 22px 10px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(13, 11, 8, .35);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .35s, background .35s, box-shadow .35s;
  outline: none;
}
.channel:hover,
.channel:focus-visible,
.channel.is-open {
  transform: translateY(-6px);
  border-color: var(--gold-400);
  background: rgba(13, 11, 8, .6);
  box-shadow: var(--glow-gold);
}

.channel__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--glass-line);
  transition: transform .35s;
}
.channel:hover .channel__icon { transform: scale(1.08); }
.channel__icon svg,
.channel__icon img { width: 38px; height: 38px; }

.channel__label {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--paper);
}
.channel__hint {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--paper-faint);
}

/* 抖音 chromatic 偏移 */
.dy { transform-box: fill-box; }
.dy--cyan  { fill: #25F4EE; transform: translate(-1.1px, -1.1px); }
.dy--red   { fill: #FE2C55; transform: translate(1.1px, 1.1px); }
.dy--white { fill: #ffffff; }

/* ---------- 二维码弹层 ---------- */
.qrpop {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  transform: translateX(-50%) translateY(10px) scale(.92);
  transform-origin: bottom center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(.2, .7, .2, 1), visibility .3s;
  z-index: 5;
}
/* 悬停 / 键盘聚焦 / 触屏点击 均可弹出 */
.channel:hover .qrpop,
.channel:focus-within .qrpop,
.channel.is-open .qrpop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.qrpop__card {
  position: relative;
  width: 176px;
  padding: 14px 14px 12px;
  background: #fbf7ee;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
  border: 2px solid var(--gold-400);
}
/* 小尖角 */
.qrpop__card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 16px;
  height: 16px;
  background: #fbf7ee;
  border-right: 2px solid var(--gold-400);
  border-bottom: 2px solid var(--gold-400);
  transform: translateX(-50%) rotate(45deg);
}

.qrpop__imgbox {
  width: 148px;
  height: 148px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: grid;
  place-items: center;
}
.qrpop__img { width: 100%; height: 100%; object-fit: contain; }

/* 图片缺失时的占位(由 contact.js 切换) */
.qrpop__imgbox.is-missing {
  background:
    repeating-linear-gradient(45deg, #efe7d4 0 8px, #e6dcc4 8px 16px);
}
.qrpop__placeholder {
  padding: 10px;
  font-size: 11px;
  line-height: 1.6;
  color: #6b5a32;
  text-align: center;
}
.qrpop__placeholder b { display: block; font-size: 13px; margin-bottom: 4px; color: #4a3c1c; }

.qrpop__cap {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 1px;
  color: #4a3c1c;
  text-align: center;
}
.qrpop__cap b { color: #1a1206; }

/* ---------- QQ 号 + 复制 ---------- */
.contact__qq {
  margin-top: 34px;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--paper-soft);
}
.contact__qq b {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--gold-300);
}
.copy-btn {
  margin-left: 10px;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--gold-300);
  background: transparent;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  transition: background .3s, color .3s, border-color .3s;
}
.copy-btn:hover {
  background: var(--grad-gold);
  color: var(--ink-900);
  border-color: transparent;
}
.copy-btn.is-done {
  background: #2f7d4f;
  color: #fff;
  border-color: transparent;
}
