/* =========================================================
   苏肥美 · Su Fei Mei
   视觉效果拉满 · 粒子流体沉浸式
   ========================================================= */

:root {
  --bg: #07090f;
  --font-title: "ZCOOL XiaoWei", "Noto Serif SC", "Songti SC", serif;
  --font-sub: "Cormorant Garamond", "Times New Roman", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(30, 36, 70, 0.55), transparent 55%),
    radial-gradient(120% 90% at 85% 90%, rgba(20, 70, 70, 0.4), transparent 55%),
    var(--bg);
  color: #eef0f7;
  font-family: var(--font-title);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(111, 124, 255, 0.35);
  color: #fff;
}

/* ---------- 粒子画布 ---------- */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}

/* ---------- 氛围光斑 ---------- */
.aura {
  position: fixed;
  z-index: 1;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  pointer-events: none;
}
.aura--1 {
  width: 58vmax;
  height: 58vmax;
  top: -20vmax;
  right: -16vmax;
  background: radial-gradient(circle at center,
    rgba(111, 124, 255, 0.55), transparent 65%);
  animation: aura 24s var(--ease) infinite alternate;
}
.aura--2 {
  width: 50vmax;
  height: 50vmax;
  bottom: -18vmax;
  left: -15vmax;
  background: radial-gradient(circle at center,
    rgba(55, 208, 201, 0.42), transparent 65%);
  animation: aura 30s var(--ease) infinite alternate-reverse;
}
@keyframes aura {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-6vmax, 4vmax, 0) scale(1.18); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    transparent 40%, rgba(0, 0, 0, 0.62) 100%);
}

/* ---------- 居中舞台 ---------- */
.stage {
  position: relative;
  z-index: 3;
  height: 100%;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4vh 6vw;
}

/* 文字聚焦暗化层：中心变暗突出文字，四周保留粒子氛围 */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at center,
    rgba(3, 4, 9, 0.62) 0%,
    rgba(3, 4, 9, 0.3) 45%,
    transparent 72%);
  pointer-events: none;
}

/* 主标题：渐变光影 + 霓虹辉光呼吸 */
.stage__title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(4.5rem, 22vw, 16rem);
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-indent: 0.05em;
  background: linear-gradient(178deg,
    #ffffff 0%,
    #dbe0fa 42%,
    #9aa4d8 72%,
    #7d88c4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  cursor: default;
  transform: translateZ(0);
  position: relative;
  z-index: 1;
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
  animation: glowPulse 4.2s ease-in-out infinite;
}

/* 辉光呼吸 */
@keyframes glowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 16px rgba(111, 124, 255, 0.5))
            drop-shadow(0 2px 26px rgba(55, 208, 201, 0.22));
  }
  50% {
    filter: drop-shadow(0 0 30px rgba(111, 124, 255, 0.75))
            drop-shadow(0 2px 44px rgba(55, 208, 201, 0.4))
            drop-shadow(0 0 70px rgba(255, 126, 182, 0.22));
  }
}

/* hover：发光上浮（暂停呼吸动画，聚焦强化） */
.stage__title:hover {
  animation-play-state: paused;
  transform: translateY(-10px) scale(1.02);
  filter: drop-shadow(0 0 34px rgba(111, 124, 255, 0.9))
          drop-shadow(0 6px 64px rgba(55, 208, 201, 0.55))
          drop-shadow(0 0 100px rgba(255, 126, 182, 0.35));
}

/* 副标题：Su Fei Mei */
.stage__sub {
  font-family: var(--font-sub);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.15rem, 3vw, 1.9rem);
  letter-spacing: 0.72em;
  text-indent: 0.72em;
  color: rgba(226, 230, 242, 0.92);
  text-shadow: 0 0 16px rgba(111, 124, 255, 0.45), 0 1px 8px rgba(0, 0, 0, 0.6);
  margin-top: clamp(1.1rem, 3.5vh, 2.4rem);
  position: relative;
  z-index: 1;
}

/* 入场前隐藏，避免闪烁 */
[data-hero] {
  opacity: 0;
  transform: translateY(28px);
  will-change: opacity, transform;
}

/* 触摸设备无 hover：保留辉光即可 */
@media (hover: none) {
  .stage__title:hover {
    transform: none;
  }
}

/* 减少动态偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .aura { animation: none; }
}
