/* motion/polish.css — 纯 CSS 锦上添花：featured 定价卡呼吸光环、final CTA 动态渐变、页脚与品牌 hover。由动画泳道子代理实现。 */

/* -------------------------------------------------------------------------- */
/* A. featured 定价卡呼吸光环                                                     */
/* .price-card 已是 position:relative（.popular 徽标依赖它），此处只建层叠上下文， */
/* 让 ::after 光环沉在内容之下；pointer-events:none 保证不挡按钮。                 */
/* -------------------------------------------------------------------------- */

.price-card.featured {
  isolation: isolate;
}

.price-card.featured::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    0 0 0 1px rgba(185, 248, 211, 0.25),
    0 0 34px rgba(112, 233, 164, 0.1);
  opacity: 1;
  animation: polish-featured-halo 4.5s ease-in-out infinite alternate;
}

@keyframes polish-featured-halo {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

/* -------------------------------------------------------------------------- */
/* B. final CTA 光带扫过 + 主按钮箭头微移                                         */
/* .final-cta 无既有 overflow / position 依赖；::before 压在内容下，不改文字对比。 */
/* -------------------------------------------------------------------------- */

.final-cta {
  position: relative;
  overflow: hidden;
}

.final-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 200%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.16) 45%,
    rgba(112, 233, 164, 0.22) 55%,
    transparent 70%
  );
  transform: translateX(-50%);
  animation: polish-cta-sheen 9s linear infinite;
}

.final-cta .shell {
  position: relative;
  z-index: 1;
}

@keyframes polish-cta-sheen {
  from { transform: translateX(-50%); }
  to { transform: translateX(0%); }
}

.final-cta .button-primary span,
.hero-actions .button-primary span {
  transition: transform 0.2s;
}

.final-cta .button-primary:hover span,
.hero-actions .button-primary:hover span {
  transform: translateX(3px);
}

/* -------------------------------------------------------------------------- */
/* C. eyebrow 状态点 ping                                                        */
/* 只动 box-shadow；静态 5px 光环由动画帧接管，降级时回退 styles.css 原值。        */
/* -------------------------------------------------------------------------- */

.status-dot {
  animation: polish-status-ping 2.6s ease-out infinite;
}

@keyframes polish-status-ping {
  0% { box-shadow: 0 0 0 0 rgba(112, 233, 164, 0.35); }
  70% { box-shadow: 0 0 0 9px rgba(112, 233, 164, 0); }
  100% { box-shadow: 0 0 0 9px rgba(112, 233, 164, 0); }
}

/* -------------------------------------------------------------------------- */
/* D. resume-banner 滑入（site.js 去掉 hidden 后自动播放一次）                     */
/* -------------------------------------------------------------------------- */

.resume-banner:not([hidden]) {
  animation: polish-resume-in 0.4s ease-out;
}

@keyframes polish-resume-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------------------------------------------------------- */
/* E. 品牌 hover 微光 + 页脚链接下划线滑入                                        */
/* footer-links 是 grid，a 改 inline-block 不改变轨道，仅让 ::after 有定位基准。   */
/* -------------------------------------------------------------------------- */

.brand img {
  transition: box-shadow 0.25s, transform 0.25s;
}

.brand:hover img {
  box-shadow:
    0 0 0 1px rgba(185, 248, 211, 0.4),
    0 0 18px rgba(112, 233, 164, 0.25);
  transform: scale(1.04);
}

.footer-links a {
  position: relative;
  display: inline-block;
  transition: color 0.18s ease;
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  display: block;
  height: 1px;
  pointer-events: none;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}

.footer-links a:hover::after {
  transform: scaleX(1);
}

/* -------------------------------------------------------------------------- */
/* F. 主导航下划线滑入；760px 纵向卡片导航停用，避免整行下划线。                    */
/* -------------------------------------------------------------------------- */

.site-nav > a:not(.button) {
  position: relative;
}

.site-nav > a:not(.button)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  display: block;
  height: 1px;
  pointer-events: none;
  background: var(--mint);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}

.site-nav > a:not(.button):hover::after {
  transform: scaleX(1);
}

@media (max-width: 760px) {
  .site-nav > a:not(.button)::after {
    display: none;
  }
}

/* -------------------------------------------------------------------------- */
/* G. 结算弹窗支付方式：只补箭头位移，按钮整体 hover 仍由 styles.css 负责。        */
/* -------------------------------------------------------------------------- */

.payment-methods > button > .payment-chevron {
  transition: transform 0.2s;
}

.payment-methods > button:hover > .payment-chevron {
  transform: translateX(2px);
}

.payment-methods > button[disabled]:hover > .payment-chevron {
  transform: none;
}

/* -------------------------------------------------------------------------- */
/* H. 窗口栏 live-pill 呼吸                                                      */
/* -------------------------------------------------------------------------- */

.live-pill i {
  animation: polish-live-breathe 1.8s ease-in-out infinite alternate;
}

@keyframes polish-live-breathe {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* -------------------------------------------------------------------------- */
/* 显式停用无限动画（全局 prefers-reduced-motion 已压到 0.01ms；此项更干净）      */
/* -------------------------------------------------------------------------- */

html.motion-reduced .price-card.featured::after,
html.motion-reduced .final-cta::before,
html.motion-reduced .status-dot,
html.motion-reduced .resume-banner:not([hidden]),
html.motion-reduced .live-pill i {
  animation: none;
}
