/* 「一个账号，三种用法」产品卡 · 3D 悬停（改编自 Uiverse.io · Cornerstone-04 的 3D Hover，MIT）
   悬停 / 键盘聚焦时卡片在透视中后仰抬起，图标、标题、链接分层浮出；
   科技风：青色描边与外发光、浮现的细网格、跟随指针的光斑，卡片随指针轻微偏转。 */
.page-home .product-grid{perspective:1400px;perspective-origin:50% 30%}
.page-home .product-grid .product-card{
  --accent:#8cdcf6;--rx:0deg;--ry:0deg;--lift:0px;--mx:50%;--my:30%;--glow:0;
  position:relative;transform-style:preserve-3d;will-change:transform;
  transform:translateY(var(--lift)) rotateX(var(--rx)) rotateY(var(--ry));
  transition:opacity .6s ease,transform .55s cubic-bezier(.2,.8,.2,1),box-shadow .45s ease,border-color .3s ease;
}
.page-home .product-grid .product-card--science{--accent:#5ee0d0}
.page-home .product-grid .product-card--soon{--accent:#a3b6d6}

/* 细网格 + 指针光斑（悬停时浮现） */
.page-home .product-grid .product-card::before{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:var(--glow);transition:opacity .4s ease;
  background:
    radial-gradient(320px circle at var(--mx) var(--my),color-mix(in srgb,var(--accent) 22%,transparent),transparent 62%),
    linear-gradient(color-mix(in srgb,var(--accent) 9%,transparent) 1px,transparent 1px) 0 0/22px 22px,
    linear-gradient(90deg,color-mix(in srgb,var(--accent) 9%,transparent) 1px,transparent 1px) 0 0/22px 22px;
  -webkit-mask:linear-gradient(#000 0%,#000 55%,transparent 100%);mask:linear-gradient(#000 0%,#000 55%,transparent 100%);
}
/* 顶边扫描光线 */
.page-home .product-grid .product-card::after{
  content:"";position:absolute;left:0;right:0;top:-1px;height:2px;pointer-events:none;opacity:var(--glow);
  background:linear-gradient(90deg,transparent,var(--accent) 50%,transparent);background-size:50% 100%;background-repeat:no-repeat;
  animation:pc-scan 2.4s linear infinite;animation-play-state:paused;transition:opacity .3s ease;
}

/* 入场动画：保留原来的上滑淡入 */
.js .page-home .product-grid .product-card.reveal:not(.is-in){transform:translateY(18px)}
/* 分层：悬停时各层沿 Z 轴浮出，形成纵深（不能给卡片加 isolation / overflow 等会把 3D 压平的属性） */
.page-home .product-grid .product-card>*{transition:transform .55s cubic-bezier(.2,.8,.2,1);transform:translateZ(0)}

/* 激活状态（悬停 / 键盘聚焦） */
.page-home .product-grid .product-card.is-tilting,
.page-home .product-grid .product-card:focus-within{
  --lift:-10px;--glow:1;z-index:2;
  border-color:var(--accent);
  box-shadow:0 34px 44px -18px #000c,0 0 0 1px color-mix(in srgb,var(--accent) 35%,transparent),0 0 34px color-mix(in srgb,var(--accent) 18%,transparent);
}
.page-home .product-grid .product-card:focus-within:not(.is-tilting){--rx:9deg}
.page-home .product-grid .product-card.is-tilting::after,.page-home .product-grid .product-card:focus-within::after{animation-play-state:running}
.page-home .product-grid .product-card.is-tilting .product-icon,.page-home .product-grid .product-card:focus-within .product-icon{transform:translateZ(54px) scale(1.06)}
.page-home .product-grid .product-card.is-tilting .product-kicker,.page-home .product-grid .product-card:focus-within .product-kicker{transform:translateZ(26px)}
.page-home .product-grid .product-card.is-tilting h3,.page-home .product-grid .product-card:focus-within h3{transform:translateZ(40px)}
.page-home .product-grid .product-card.is-tilting>p:not(.product-kicker),.page-home .product-grid .product-card:focus-within>p:not(.product-kicker){transform:translateZ(18px)}
.page-home .product-grid .product-card.is-tilting .px-link,.page-home .product-grid .product-card:focus-within .px-link{transform:translateZ(34px)}
.page-home .product-grid .product-card.is-tilting .product-icon svg,.page-home .product-grid .product-card:focus-within .product-icon svg{filter:drop-shadow(0 6px 10px #000a) drop-shadow(0 0 10px color-mix(in srgb,var(--accent) 45%,transparent))}

@keyframes pc-scan{from{background-position:-50% 0}to{background-position:150% 0}}

/* 触屏设备没有悬停：保持平面，只在轻触聚焦时轻微浮起 */
@media(hover:none),(pointer:coarse){.page-home .product-grid .product-card.is-tilting{--rx:0deg!important;--ry:0deg!important}}
@media(prefers-reduced-motion:reduce){
  .page-home .product-grid .product-card,.page-home .product-grid .product-card>*{transition:none!important}
  .page-home .product-grid .product-card{transform:none!important}
  .page-home .product-grid .product-card>*{transform:none!important}
  .page-home .product-grid .product-card::after{animation:none}
}
