/* ============================================
   动效系统样式层
   聚光灯 / 3D倾斜 / 逐字浮现 / 计数 / 呼吸光环 / 浮动预览
   ============================================ */

/* ================= 聚光灯卡片 ================= */
.spot {
  position: relative;
  overflow: hidden;
}

.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 50%),
    rgba(129, 136, 255, 0.13),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  z-index: 0;
}

.spot:hover::before {
  opacity: 1;
}

/* 聚光灯描边（光标处亮边） */
.spot::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(167, 139, 250, 0.65),
    transparent 70%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  z-index: 2;
}

.spot:hover::after {
  opacity: 1;
}

.spot > * {
  position: relative;
  z-index: 1;
}

/* ================= 3D 倾斜媒体 ================= */
.tilt-wrap {
  perspective: 1100px;
}

.tilt {
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-out);
  will-change: transform;
}

.tilt .tilt-pop {
  transform: translateZ(38px);
  transition: transform 0.5s var(--ease-out);
}

/* ================= 逐字浮现标题 ================= */
.split-line {
  display: block;
  overflow: hidden;
}

.split-unit {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.85em) rotate(4deg);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-spring);
  transition-delay: var(--sd, 0s);
}

.split-unit.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .split-unit {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ================= 数字滚动 ================= */
.count {
  font-variant-numeric: tabular-nums;
}

/* ================= 呼吸光环（联系页） ================= */
.glow-ring {
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(109, 114, 255, 0.22) 70deg,
    transparent 140deg,
    transparent 200deg,
    rgba(255, 138, 92, 0.16) 290deg,
    transparent 360deg
  );
  filter: blur(48px);
  animation: ringSpin 14s linear infinite;
  pointer-events: none;
}

@keyframes ringSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ================= 浮动预览图（服务目录） ================= */
.float-view {
  position: fixed;
  width: 300px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-l);
  border: 1px solid var(--line-strong);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85) rotate(-3deg);
  transition:
    opacity 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
  z-index: 60;
  background: var(--bg-3);
}

.float-view.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(-2deg);
}

.float-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: none) {
  .float-view {
    display: none;
  }
}

/* ================= 模块大字标题（实体 + 空心混排） ================= */
.bigword-head {
  margin-bottom: clamp(2.2rem, 5vw, 3.6rem);
  padding-top: clamp(0.5rem, 2vw, 1.5rem);
}

.bigword-title {
  display: flex;
  align-items: baseline;
  justify-content: center; /* 居中：flex 主轴，text-align 无效 */
  gap: clamp(0.6rem, 1.6vw, 1.2rem);
  line-height: 1;
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  font-weight: 800;
  letter-spacing: 0.01em;
}

/* 实体：品牌渐变 */
.bigword-title .bw-solid .split-line,
.bigword-title.bigword-solid .split-line {
  background: linear-gradient(120deg, #7d82ff 0%, #a78bfa 62%, #ff8a5c 108%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 26px rgba(109, 114, 255, 0.32));
}

/* 空心：描边 + 呼吸 */
.bigword-title .bw-hollow .split-line {
  color: transparent;
  -webkit-text-stroke: 2px rgba(167, 139, 250, 0.72);
  text-shadow: 0 0 22px rgba(124, 101, 242, 0.32);
  animation: bwBreath 3.6s ease-in-out infinite;
}

@keyframes bwBreath {
  0%, 100% {
    text-shadow: 0 0 18px rgba(124, 101, 242, 0.25);
    -webkit-text-stroke-color: rgba(167, 139, 250, 0.65);
  }
  50% {
    text-shadow: 0 0 34px rgba(124, 101, 242, 0.5);
    -webkit-text-stroke-color: rgba(196, 181, 253, 0.92);
  }
}

.bigword-title .bw-hollow:hover .split-line {
  -webkit-text-stroke-color: rgba(238, 240, 255, 0.85);
}

@media (prefers-reduced-motion: reduce) {
  .bigword-title .bw-hollow .split-line {
    animation: none;
  }
}

@media (max-width: 640px) {
  .bigword-title {
    font-size: clamp(2.4rem, 11vw, 3.4rem);
  }
  .bigword-title .bw-hollow .split-line {
    -webkit-text-stroke-width: 1.5px;
  }
}

/* ================= 跑马灯（通用） ================= */
.marquee-band {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.6rem;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee-track.reverse {
  animation-direction: reverse;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .glow-ring {
    animation: none;
  }
}
