/* ══════════════════════════════════════════════════════
   会员套餐模块 #pricing(首页区块,插在 #about 与 .journey 之间)
   子组件:__head 标题行(星芒 + 渐变字 + Lunary 字标切图)→
          __cards 三卡(340×436 蓝湖切图卡底 + 年度 82% 徽章;
          选中 SKU 高亮环手写,点击切换,默认年度)
   购买按钮手写(用户指定零切图):粉→奶油→浅蓝渐变 + 光晕 =
   渐变自身模糊拷贝 ::before,同 hero 主按钮配方
   背景:全站固定层 .site-bg 透出(首页统一背景,不写纯色底)
   + 星云光效切图 bg-stage 叠其上铺区块底
   设计稿 1920:卡片行距标题 126,列间距 88
   ══════════════════════════════════════════════════════ */

.pricing {
  position: relative;
  overflow: hidden; /* 星云光效出血裁切 */
  padding: 104px 24px 150px; /* 上下随首页区块节奏(同 about 顶距) */
}
/* 星云光效:铺在内容层下、贴区块底 */
.pricing::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: 891px;
  background: url('../../images/pricing/bg-stage.png') 0 0 / 100% 100% no-repeat;
  pointer-events: none;
}

/* ── 标题行:星芒 + 加入 Lunary 会员 ──
   整行等比缩放:子项尺寸全用 em 挂在容器 font-size 上(基准 38px,
   括号内为 1920 设计稿 px),字号 ≥594px 视口时恒为 38px,
   往下随 6.4vw 收缩,任何宽度都不折行 */
.pricing__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4211em; /* 16 */
  font-size: clamp(20px, 6.4vw, 38px);
  white-space: nowrap;
}
.pricing__head-star { width: 1.6053em; height: 0.4474em; } /* 61×17 */
.pricing__head-logo {
  width: 3.4474em;  /* 131 */
  height: 1.1842em; /* 45 */
  margin: 0 0.1579em; /* 6 */
}
.pricing__head-text {
  font-size: 1em;
  font-weight: 500;
  line-height: 1.4211; /* 54/38 */
  color: #FCEEFF; /* 渐变兜底色 */
  background-image: linear-gradient(180deg, #FFFFFF 0%, #F4D5FF 41%, #A574FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── 三卡行(包一层 fit-content,让协议行能右对齐到年度卡下方)── */
.pricing__body {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}
.pricing__cards {
  display: flex;
  justify-content: center;
  gap: 88px;
  margin-top: 126px;
}
.pricing-card {
  position: relative; /* 82% 徽章 + 选中环定位基准 */
  width: 340px;
  height: 436px;
  text-align: center;
  cursor: pointer;
  background: url('../../images/pricing/card-month.png') 0 0 / 100% 100% no-repeat;
}
.pricing-card--quarter { background-image: url('../../images/pricing/card-quarter.png'); }

/* 选中 SKU 高亮环:点击任意卡切换 is-active(脚本在 index.html,默认年度)。
   原年度卡底烘焙的渐变描边弃用(card-year.png 不再引用)——边框烘死在图里
   挪不到别的卡上;三卡统一无边框素底 + 手写渐变环,色值采样自原烘焙边框 */
.pricing-card.is-active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px; /* 对齐卡底切图圆角 */
  padding: 1.5px; /* 环厚 */
  background: linear-gradient(180deg, #F2D3FF 0%, #C490FF 55%, #A574FF 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.pricing-card__badge {
  position: absolute;
  z-index: 1; /* 压在选中环上层(环是卡的 ::after,树序在徽章后) */
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 144px;
  height: 29px;
  line-height: 28px;
  background: url('../../images/pricing/badge-82.png') 0 0 / 100% 100% no-repeat;
  font-size: 15px;
  font-weight: 500;
  color: #000000;
}

.pricing-card__name {
  padding-top: 87px;
  font-size: 21px;
  font-weight: 600;
  line-height: 25px;
  color: #D3C5FD;
}
.pricing-card__price {
  margin-top: 47px;
  display: flex;
  justify-content: center;
  align-items: baseline;
}
.pricing-card__cur {
  font-size: 17px;
  color: #C5B8ED;
  margin-right: 5px;
}
.pricing-card__num {
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -0.7px;
  line-height: 40px;
  color: #F8ECD0;
}
.pricing-card__per {
  font-size: 15px;
  color: #C5B8ED;
  margin-left: 3px;
}
.pricing-card__was {
  margin-top: 8px;
  font-size: 13px;
  line-height: 17px;
  color: #C5B8ED;
  text-decoration: line-through;
}
.pricing-card__renew {
  margin-top: 30px;
  font-size: 12px; /* 设计稿 9px 过小,提到可读下限 */
  line-height: 16px;
  color: #A497CC;
  opacity: 0;
}
.pricing-card--year .pricing-card__renew { color: #C5B8ED; }

/* 购买按钮:手写渐变胶囊 + 光晕(渐变模糊拷贝垫下层,同 hero 主按钮) */
.pricing-card__buy {
  position: relative;
  z-index: 0; /* 自建层叠上下文,-1 光晕垫按钮下而不沉到卡底后 */
  display: block;
  width: 252px;
  height: 52px;
  margin: 19px auto 0;
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: linear-gradient(90deg,
    #FAB9BA 0%, #F9C5B3 30%, #EDD5BC 50%, #D7DAC6 70%, #CECEDC 100%);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: #16083B;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.pricing-card__buy::before {
  content: '';
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(90deg,
    #FAB9BA 0%, #F9C5B3 30%, #EDD5BC 50%, #D7DAC6 70%, #CECEDC 100%);
  filter: blur(16px);
  opacity: 0.85;
}
.pricing-card__buy:hover { filter: brightness(1.06); }

/* 下单请求中 */
.pricing-card__buy:disabled {
  opacity: 0.6;
  cursor: default;
  filter: none;
}

/* ══ 扫码支付弹窗 .pay-pop(全屏遮罩 + 玻璃卡,手写零切图)══
   玻璃底/描边与 contact-pop 同参;二维码为白底盒内 iframe(接口返回展示页),
   协议未勾选时深色遮罩置灰(同老站交互) */
.pay-pop {
  position: fixed;
  inset: 0;
  z-index: 1200; /* 压过导航与其他弹层 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 3, 29, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}
.pay-pop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.28s ease;
}
.pay-pop__card {
  position: relative;
  width: 720px;
  max-width: 100%;
  padding: 40px 44px 44px;
  background: rgba(32, 22, 70, 0.75);
  border: 1px solid rgba(197, 184, 237, 0.22);
  border-radius: 30px;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transform: translateY(16px);
  transition: transform 0.28s ease;
}
.pay-pop.is-open .pay-pop__card { transform: none; }

.pay-pop__close {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: 0;
  font-size: 20px;
  line-height: 32px;
  color: #C5B8ED;
  cursor: pointer;
}
.pay-pop__close:hover { color: #FFFFFF; }

.pay-pop__title {
  font-size: 28px;
  font-weight: 500;
  line-height: 34px;
  color: #FCEEFF;
}

.pay-pop__body {
  display: flex;
  gap: 40px;
  margin-top: 26px;
}
.pay-pop__info { flex: 1; min-width: 0; }

/* 订单信息行 */
.pay-pop__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: rgba(53, 56, 103, 0.3);
  border-radius: 10px;
  font-size: 14px;
}
.pay-pop__row + .pay-pop__row { margin-top: 10px; }
.pay-pop__row span { color: #C5B8ED; flex-shrink: 0; }
.pay-pop__row b {
  font-weight: 500;
  color: #FCEEFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 协议勾选(勾选框同登录弹窗手写样式) */
.pay-pop__agree {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 18px;
  font-size: 12px;
  line-height: 18px;
  color: #7C6EA1;
  cursor: pointer;
}
.pay-pop__agree a {
  color: #916EFF;
  text-decoration: none;
}
.pay-pop__agree a:hover { text-decoration: underline; }
.pay-pop__check {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  position: relative;
  border: 1px solid #7C6EA1;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.pay-pop__check:checked {
  background: #916EFF;
  border-color: #916EFF;
}
.pay-pop__check:checked::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* 手动检查按钮:幽灵样式 */
.pay-pop__recheck {
  margin-top: 16px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(197, 184, 237, 0.35);
  border-radius: 18px;
  font: inherit;
  font-size: 13px;
  color: #C5B8ED;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.pay-pop__recheck:hover {
  background: rgba(197, 184, 237, 0.1);
  border-color: rgba(197, 184, 237, 0.6);
}

/* 二维码区 */
.pay-pop__qr { flex-shrink: 0; text-align: center; }
.pay-pop__qr-box {
  position: relative;
  width: 255px;
  height: 255px;
  padding: 15px;
  background: #FFFFFF;
  border-radius: 16px;
}
.pay-pop__qr-box iframe {
  display: block;
  width: 225px;
  height: 225px;
  border: 0;
  border-radius: 8px;
}
.pay-pop__qr-mask {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 8, 59, 0.88);
  font-size: 14px;
  color: #C5B8ED;
}
.pay-pop__qr-mask--off { display: none; }
.pay-pop__qr-mask--ok { color: #F8ECD0; font-size: 18px; }
.pay-pop__qr-tip {
  margin-top: 12px;
  font-size: 13px;
  color: #C5B8ED;
}

/* ── 响应式 ── */
@media (max-width: 1280px) {
  .pricing__cards { gap: 48px; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .pay-pop__card { padding: 28px 24px; border-radius: 24px; }
  .pay-pop__body { flex-direction: column; gap: 24px; }
  .pay-pop__qr { align-self: center; }
}
@media (max-width: 960px) {
  .pricing { padding: 90px 24px 100px; }
  .pricing__cards { margin-top: 72px; }
}
