/*
 * 畅学村 — Hero 3D 教师卡片墙
 * 动画由 hero-orbit.js 用 rAF 写 transform / opacity；这里只定义外观、景深档位与降级。
 * v2：卡片 = 真人肖像照片卡（照片为主体，底部叠姓名，右上绿点 = 在线），近大远小、远的略暗；
 *     首页右侧主卡（.cxc-maincard，main.css）压在这面墙之上。
 */

.cxc-orbit {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  perspective: 1300px;
  pointer-events: none;
}

.cxc-orbit__group {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

/* 照片卡 */
.cxc-float-card {
  position: absolute;
  left: -50px;
  top: -50px;
  width: 100px;
  border-radius: 16px;
  overflow: hidden;
  background: #0C1824;
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), 0 0 14px rgba(120, 200, 255, 0.08);
  color: #fff;
  opacity: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transition: filter 0.45s ease, box-shadow 0.45s ease;
}

.cxc-float-card__photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: #16263A;
}

.cxc-float-card__photo img,
.cxc-float-card__photo svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cxc-float-card__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px 8px 6px;
  background: linear-gradient(0deg, rgba(0, 12, 24, 0.78), rgba(0, 12, 24, 0));
}

.cxc-float-card__name {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

/* 绿色只用于在线 */
.cxc-float-card__status.is-online {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1EC87A;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

/* 重点卡：更大、暖色亮框（仍明显小于首页主卡） */
.cxc-float-card.is-feature {
  left: -62px;
  top: -62px;
  width: 124px;
  border: 1.5px solid rgba(250, 159, 87, 0.9);
  box-shadow: 0 0 24px rgba(250, 159, 87, 0.4), 0 14px 32px rgba(0, 0, 0, 0.5);
}

/* 景深三档：只在跨阈值时切 class，不逐帧改 filter */
.cxc-float-card.is-near {
  filter: none;
  border-color: rgba(255, 255, 255, 0.5);
}

.cxc-float-card.is-near.is-feature { border-color: rgba(250, 159, 87, 1); }

.cxc-float-card.is-mid { filter: brightness(0.92); }

.cxc-float-card.is-far {
  filter: blur(1.6px) brightness(0.62) saturate(0.75);
  box-shadow: none;
}

/* 平板 / 手机：更小卡片，关掉 blur */
.cxc-orbit.is-md .cxc-float-card { left: -40px; top: -40px; width: 80px; border-radius: 14px; }
.cxc-orbit.is-sm .cxc-float-card { left: -31px; top: -31px; width: 62px; border-radius: 12px; }
.cxc-orbit.is-md .cxc-float-card.is-feature { left: -48px; top: -48px; width: 96px; }
.cxc-orbit.is-sm .cxc-float-card.is-feature { left: -37px; top: -37px; width: 74px; }

.cxc-orbit.is-md .cxc-float-card__name,
.cxc-orbit.is-sm .cxc-float-card__name { font-size: 10px; }

.cxc-orbit.is-sm .cxc-float-card__meta { padding: 10px 5px 4px; }
.cxc-orbit.is-sm .cxc-float-card__name { display: none; }

.cxc-orbit.is-md .cxc-float-card__status.is-online { top: 6px; right: 6px; width: 8px; height: 8px; }
.cxc-orbit.is-sm .cxc-float-card__status.is-online { top: 5px; right: 5px; width: 7px; height: 7px; }

.cxc-orbit.is-md .cxc-float-card,
.cxc-orbit.is-sm .cxc-float-card { filter: none; }

/* reduced-motion：静态多层散落 */
.cxc-orbit.is-static .cxc-float-card { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .cxc-float-card { transition: none; }
}

/* 文案遮罩：让标题与 CTA 永远清晰可点 */
.cxc-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 12, 24, 0.95) 0%, rgba(0, 12, 24, 0.84) 32%, rgba(0, 12, 24, 0.3) 56%, rgba(0, 12, 24, 0) 70%),
    linear-gradient(0deg, rgba(0, 12, 24, 0.9) 0%, rgba(0, 12, 24, 0) 22%);
}

.cxc-hero__shade--center {
  background:
    radial-gradient(ellipse 52% 46% at 50% 50%, rgba(0, 12, 24, 0.9) 0%, rgba(0, 12, 24, 0.7) 45%, rgba(0, 12, 24, 0) 100%),
    linear-gradient(0deg, rgba(0, 12, 24, 0.95) 0%, rgba(0, 12, 24, 0) 26%);
}

[data-cxc-hero] {
  touch-action: pan-y;
}

/* v2.0.1：桌面上卡片墙只占文案右侧，不压口号 / 文案；首页底部给功能条留出位置并柔化边缘。
 * hero-orbit.js 按 .cxc-orbit 自身宽高算半径，并把 data-center-x/-y（相对 Hero）换算成墙内坐标。 */
@media (min-width: 1024px) {
  .cxc-hero--home .cxc-orbit {
    left: 46%;
    bottom: 150px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%), linear-gradient(180deg, #000 calc(100% - 72px), transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0, #000 12%), linear-gradient(180deg, #000 calc(100% - 72px), transparent);
    mask-composite: intersect;
  }

  .cxc-hero--teachers .cxc-orbit {
    left: 42%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14%);
  }
}

@media (max-width: 1023px) {
  .cxc-hero__shade,
  .cxc-hero__shade--center {
    background: linear-gradient(180deg, rgba(0, 12, 24, 0) 0, rgba(0, 12, 24, 0.15) 200px, rgba(0, 12, 24, 0.92) 330px, #000C18 100%);
  }
}

@media (max-width: 639px) {
  .cxc-hero__shade,
  .cxc-hero__shade--center {
    background: linear-gradient(180deg, rgba(0, 12, 24, 0) 0, rgba(0, 12, 24, 0.15) 150px, rgba(0, 12, 24, 0.92) 235px, #000C18 100%);
  }
}
