/* ==========================================================================
   PinkPoint Home — 沉浸式 Three.js 首页样式
   配色：粉黑 (#f7c6d9 / #141219) · 品牌理念「坚刚不可夺其质」
   ========================================================================== */

:root {
  --c-bg: #0b0a0e;
  --c-surface: #141219;
  --c-pink: #f7c6d9;
  --c-pink-deep: #ef9fbe;
  --c-text: #f3eef2;
  --c-muted: rgba(243, 238, 242, 0.62);
  --c-line: rgba(247, 198, 217, 0.22);
  --font-sans: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, "Times New Roman", "Songti SC", serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

/* 吸附改用 JS 缓动接管（原生 snap 动画时长无法调慢），此处保留 smooth 供锚点跳转 */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- 首屏：与常规内容一起参与页面滚动，实现真实“下滑”而非叠层 ---- */
.stage {
  position: relative;
  height: 100vh;
  overflow: hidden;
  will-change: opacity; /* 由 JS 滚动驱动淡出 */
}
/* WebGL 场景容器：填满首屏，随整页滚动离开视口 */
#scene-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#scene-container canvas { display: block; }

/* ===== 顶部品牌栏 ===== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* 导航靠右，logo 独立绝对定位在左上 */
  padding: 18px clamp(20px, 4vw, 56px);
  opacity: 0;
  animation: fade-in 1s var(--ease-out) 0.9s forwards;
}
.topbar__logo {
  position: absolute;
  left: clamp(20px, 4vw, 56px);
  top: 14px;
  display: block;
  color: var(--c-text);
  text-decoration: none;
  line-height: 0;
}
.topbar__logo-img {
  height: 60px;
  width: auto;
  display: block;
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.55));
}
.topbar__nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }

/* 简约动态音乐开关：玻璃质感小圆钮 + 律动均衡条（播放时跳动、暂停时静止） */
.music-toggle {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(247, 198, 217, 0.3);
  border-radius: 50%;
  background: rgba(247, 198, 217, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--c-pink);
  cursor: pointer;
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.music-toggle:hover {
  background: rgba(247, 198, 217, 0.16);
  border-color: rgba(247, 198, 217, 0.6);
}
/* 均衡条：细柱并排，构成极简的“声律”图形 */
.music-toggle__eq {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2.5px;
  height: 14px;
}
.music-toggle__eq i {
  display: block;
  width: 2.5px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: bottom center;
}
/* 播放中：四根均衡条各自上下律动，整体泛起一圈柔和脉动辉光 */
.music-toggle.is-playing { box-shadow: 0 0 0 1px rgba(247, 198, 217, 0.2), 0 0 16px -2px rgba(247, 198, 217, 0.45); }
.music-toggle.is-playing .music-toggle__eq i { animation: eq-wave 1s ease-in-out infinite; }
.music-toggle.is-playing .music-toggle__eq i:nth-child(1) { animation-delay: 0s; }
.music-toggle.is-playing .music-toggle__eq i:nth-child(2) { animation-delay: 0.16s; }
.music-toggle.is-playing .music-toggle__eq i:nth-child(3) { animation-delay: 0.32s; }
.music-toggle.is-playing .music-toggle__eq i:nth-child(4) { animation-delay: 0.08s; }

/* 导航项基础样式 */
.topbar__item { position: relative; }
.topbar__link {
  color: var(--c-muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: color 0.3s;
  position: relative;
  cursor: pointer;
}
.topbar__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 2px;
  background: var(--c-pink);
  transition: width 0.35s var(--ease-out);
}
.topbar__link:hover,
.topbar__item:hover .topbar__link { color: var(--c-text); }
.topbar__link:hover::after,
.topbar__item:hover .topbar__link::after { width: 100%; }

/* 下拉菜单：默认隐藏，悬停父级时展开。以父级文字为中心在其正下方呈现，半透明玻璃底 */
.topbar__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  min-width: max-content;
  transform: translateX(-50%) translateY(-6px);
  padding: 6px;
  background: rgba(22, 18, 28, 0.3); /* 透明化：仅极淡底色，靠下方项目悬停高亮表达 */
  border: 1px solid rgba(247, 198, 217, 0.14);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), visibility 0.25s;
}
.topbar__item:hover .topbar__menu,
.topbar__item:focus-within .topbar__menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
/* 最靠右的“联系我们”：为避免居中后右半溢出视口，改为右缘对齐父级、在文字正下方展开 */
.topbar__item:last-child .topbar__menu {
  left: auto;
  right: 0;
  transform: translateY(-6px);
}
.topbar__item:last-child:hover .topbar__menu,
.topbar__item:last-child:focus-within .topbar__menu {
  transform: translateY(0);
}
.topbar__menu-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 7px;
  color: var(--c-muted);
  text-decoration: none;
  font-size: 0.8rem; /* 明显小于导航(0.9rem)，下拉保持从属关系 */
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.topbar__menu-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex: none;
}
.topbar__menu-svg {
  width: 17px;
  height: 17px;
  display: block;
  flex: none;
}
.topbar__menu-item:hover { color: var(--c-pink); background: rgba(247, 198, 217, 0.08); }

/* 当菜单项为 <button>（如“联系我们”邮箱复制）时，清除浏览器默认外观 */
button.topbar__menu-item {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
button.topbar__menu-copy { position: relative; }

/* ===== 中央标题区：absolute 于首屏内，随整页下滑滚走 ===== */
.hero {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(90px, 15vh, 140px) 20px 0;
  text-align: center;
  pointer-events: none;
}
.hero__title {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--c-text);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(24px);
  animation: rise-in 1.1s var(--ease-out) 0.5s forwards;
}
.hero__title em {
  font-style: normal;
  display: block;
  font-size: 0.32em;
  font-weight: 500;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  color: var(--c-pink);
  margin-top: 14px;
}
.hero__sub {
  margin: 22px 0 0;
  font-size: clamp(0.9rem, 2.4vw, 1.15rem);
  letter-spacing: 0.28em;
  color: var(--c-muted);
  opacity: 0;
  animation: fade-in 1.2s var(--ease-out) 1s forwards;
}
.hero__cta {
  /* 锚定在视口底部：标题区保持靠上，探索入口置于画面下方 */
  position: absolute;
  left: 50%;
  bottom: clamp(30px, 6vh, 60px);
  transform: translateX(-50%);
  pointer-events: auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--c-pink);
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  cursor: pointer;
  opacity: 0;
  animation: fade-in 1.2s var(--ease-out) 1.3s forwards;
}
.hero__arrow {
  display: inline-block;
  font-size: 1.3rem;
  line-height: 1;
  animation: bob 1.8s ease-in-out infinite;
}

/* ===== 加载遮罩 ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 120% at 50% 0%, #191522 0%, var(--c-bg) 70%);
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 240px;
}
.loader__logo-img {
  display: block;
  width: 110px;
  height: auto;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.55));
}
.loader__brand {
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  font-weight: 700;
  color: var(--c-pink);
}
.loader__bar {
  width: 200px;
  height: 2px;
  background: rgba(247, 198, 217, 0.18);
  border-radius: 2px;
  overflow: hidden;
}
.loader__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c-pink-deep), var(--c-pink));
  transition: width 0.3s var(--ease-out);
}
.loader__hint {
  font-size: 0.72rem;
  color: var(--c-muted);
  letter-spacing: 0.14em;
}

/* ===== 内容占位区：作为第二个整屏，滚动吸附对齐顶部 ===== */
.content {
  position: relative;
  z-index: 5;
  height: 100vh; /* 整屏吸附目标 */
  overflow-y: auto; /* 若未来内容超一屏，可在此屏内部滚动 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(20px, 6vw, 90px);
  text-align: center;
  background: var(--c-bg);
}
.content h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 5vw, 3rem);
  letter-spacing: 0.04em;
  margin: 0 0 20px;
  color: var(--c-text);
}
.content p {
  max-width: 560px;
  color: var(--c-muted);
  line-height: 2;
  letter-spacing: 0.06em;
}

/* ===== 整屏占位面板：开场 / 产品 / 文化 / 开发者（复用 .content 的整屏容器） ===== */
.panel { gap: clamp(18px, 4vh, 44px); }
/* 各屏背景上方各有一抹淡淡的环境光晕，让整屏不再千篇一律的纯黑 */
.panel::before {
  content: "";
  position: absolute;
  top: -12%; left: 50%;
  width: min(1200px, 160%);
  aspect-ratio: 2.2 / 1;
  transform: translateX(-50%);
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
}
#products::before { background: radial-gradient(closest-side, rgba(247, 198, 217, 0.16), transparent 72%); }
#org::before     { background: radial-gradient(closest-side, rgba(158, 154, 224, 0.14), transparent 72%); }
#community::before { background: radial-gradient(closest-side, rgba(247, 198, 217, 0.1), transparent 72%); }
.panel__head { text-align: center; position: relative; z-index: 1; }
.panel__row { position: relative; z-index: 1; }
.panel__tag {
  display: inline-flex;
  padding: 4px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: rgba(247, 198, 217, 0.05);
  color: var(--c-pink);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}
/* 提高特异性以覆盖 `.content h2` 的默认样式 */
.panel .panel__title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 6vw, 3.4rem);
  letter-spacing: 0.06em;
  margin: 0 0 10px;
  color: var(--c-text);
}
.panel .panel__desc {
  margin: 0;
  max-width: 620px;
  color: var(--c-muted);
  font-size: 0.95rem;
  line-height: 1.9;
  letter-spacing: 0.06em;
}
.panel__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: clamp(14px, 3vw, 28px);
  max-width: 1180px;
}

/* 通用占位卡 */
.ph-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: clamp(200px, 24vw, 300px);
  padding: 16px 16px 24px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 18px;
  text-align: center;
}
/* 图片 / 模型占位区：父卡浮现后二次进场 —— 缩放+轻微失焦复原，并带扫光掠过 */
.ph-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  border: 1px dashed var(--c-line);
  background:
    linear-gradient(135deg, rgba(247, 198, 217, 0.12), rgba(20, 18, 25, 0) 62%),
    var(--c-bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  /* 二次递进：先隐藏，待父卡进入后拉开 */
  opacity: 0;
  transform: scale(0.9);
  filter: blur(6px);
  transition: transform 0.9s var(--ease-out) 0.18s, filter 0.9s var(--ease-out) 0.18s, opacity 0.9s var(--ease-out) 0.18s;
}
.ph-card.is-in .ph-card__media { transform: scale(1); filter: blur(0); opacity: 1; }
/* 扫光：media 出现后一条亮带自左上向右下掠过 */
.ph-card__media::before {
  content: "";
  position: absolute;
  top: -40%; left: -30%;
  width: 45%;
  height: 180%;
  background: linear-gradient(105deg, transparent, rgba(247, 198, 217, 0.22), transparent);
  transform: translateX(-80%) rotate(6deg);
  opacity: 0;
}
.ph-card.is-in .ph-card__media::before {
  animation: sweep 1.1s var(--ease-out) 0.55s forwards;
}
.ph-card__media::after,
.ph-card__icon::after,
.ph-avatar::after {
  content: attr(data-placeholder);
  color: var(--c-muted);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  opacity: 0.75;
}

/* 文化屏图标占位：旋转 + 缩小后弹出 */
.ph-card__icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  border: 1px dashed var(--c-line);
  background: rgba(247, 198, 217, 0.06);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: rotate(-14deg) scale(0.4);
  transition: transform 0.7s var(--ease-spring), opacity 0.6s ease;
}
.ph-pillar.is-in .ph-card__icon { transform: rotate(0) scale(1); opacity: 1; }

/* 开发者屏头像占位：整体弹出，头像做“亮相” + 一圈粉色光环由内向外交替扩散 */
.ph-person { width: clamp(150px, 18vw, 210px); }
.ph-person.is-in .ph-avatar {
  transform: translateY(0) scale(1);
  opacity: 1;
  animation: halo 1.1s ease-out 0.5s;
  box-shadow: 0 0 0 1px rgba(247, 198, 217, 0.4), 0 0 30px -6px rgba(247, 198, 217, 0.45);
}
.ph-avatar {
  width: clamp(64px, 10vw, 92px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  background:
    radial-gradient(circle at 30% 26%, rgba(247, 198, 217, 0.32), transparent 58%),
    var(--c-bg);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(10px) scale(0.5);
  transition: transform 0.7s var(--ease-spring), opacity 0.55s ease, box-shadow 0.7s ease;
}

/* 占位文字条：默认宽度收敛为 0，父卡进入后各自展开（产品屏左→右、文化屏中心→两侧、开发者屏短条依次延后） */
.ph-line {
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(247, 198, 217, 0.28), rgba(247, 198, 217, 0.08));
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0.9;
  transition: transform 1s var(--ease-out), opacity 0.6s ease;
}
.ph-card.is-in .ph-line { transform: scaleX(1); }
.ph-card__media + .ph-line { transition-delay: 0.7s; }
.ph-card__icon ~ .ph-line:nth-of-type(1) { transform-origin: center; transition-delay: 0.5s; }
.ph-card__icon ~ .ph-line:nth-of-type(2) { transform-origin: center; transition-delay: 0.72s; }
.ph-avatar ~ .ph-line:nth-of-type(1) { transform-origin: center; transition-delay: 0.55s; }
.ph-avatar ~ .ph-line:nth-of-type(2) { transform-origin: center; transition-delay: 0.78s; }

/* ===== 真实产品卡：复用 ph-card 皮肤，替换占位内容为实物 ===== */
.product-card { gap: 12px; }
.product-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(247, 198, 217, 0.12), rgba(20, 18, 25, 0) 62%),
    var(--c-bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.9);
  filter: blur(6px);
  transition: transform 0.9s var(--ease-out) 0.18s, filter 0.9s var(--ease-out) 0.18s, opacity 0.9s var(--ease-out) 0.18s;
}
.ph-card.is-in .product-card__media { transform: scale(1); filter: blur(0); opacity: 1; }
.product-card__img {
  max-width: 78%;
  max-height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.4));
}
.product-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-text);
}
.product-card__desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--c-muted);
}
.product-card__link {
  margin-top: 4px;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--c-pink);
  text-decoration: none;
  border: 1px solid rgba(247, 198, 217, 0.4);
  background: rgba(247, 198, 217, 0.08);
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.product-card__link:hover {
  background: var(--c-pink);
  color: #201320;
  transform: translateY(-2px);
}

/* ===== 品牌文化卡：pipo 形象 + 音乐封面（方形大相框，贴合方形封面） ===== */
.brand-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px dashed var(--c-line);
  background:
    linear-gradient(135deg, rgba(247, 198, 217, 0.12), rgba(20, 18, 25, 0) 62%),
    var(--c-bg);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.9);
  filter: blur(6px);
  transition: transform 0.9s var(--ease-out) 0.18s, filter 0.9s var(--ease-out) 0.18s, opacity 0.9s var(--ease-out) 0.18s;
}
.ph-card.is-in .brand-card__media { transform: scale(1); filter: blur(0); opacity: 1; }
/* 品牌文化区仅两张卡，相框放大（宽度加大，配合方形媒体区更具分量感） */
.brand-model-card,
.brand-music-card { width: clamp(260px, 30vw, 400px); }
.brand-card__media--model {
  border: none;
  background: linear-gradient(135deg, rgba(247, 198, 217, 0.1), rgba(20, 18, 25, 0) 62%), var(--c-bg);
}
/* pipo 插画铺满媒体区，作为静态形象展示 */
.brand-card__pipo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out), filter 0.5s var(--ease-out);
}
/* 悬停：插画轻微放大并泛起一圈粉色辉光，保持“活”的反馈 */
@media (hover: hover) {
  .brand-model-card.is-in:hover .brand-card__pipo {
    transform: scale(1.04);
  }
  .brand-model-card.is-in:hover .brand-card__media--model {
    box-shadow: 0 0 0 1px rgba(247, 198, 217, 0.35), 0 0 30px -6px rgba(247, 198, 217, 0.5);
  }
}
/* 封面区：图片铺满、留出正面视觉 */
.brand-card__media--cover { border: none; }
.brand-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.brand-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-text);
}
.brand-card__name-zh {
  margin-left: 6px;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--c-pink);
}
.brand-card__desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--c-muted);
}
/* 音乐卡：普通卡片展示，仅“点击进入”按钮可跳转（仿产品卡胶囊按钮） */
.music-card__link {
  margin-top: 2px;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--c-pink);
  text-decoration: none;
  border: 1px solid rgba(247, 198, 217, 0.4);
  background: rgba(247, 198, 217, 0.08);
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.music-card__link:hover {
  background: var(--c-pink);
  color: #201320;
  transform: translateY(-2px);
}

/* ===== “敬请期待”占位卡 ===== */
.coming-card { justify-content: center; }
.coming-card__media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  border: 1px dashed var(--c-line);
  background:
    linear-gradient(135deg, rgba(247, 198, 217, 0.1), rgba(20, 18, 25, 0) 62%),
    var(--c-bg);
  opacity: 0;
  transform: scale(0.9);
  filter: blur(6px);
  transition: transform 0.9s var(--ease-out) 0.18s, filter 0.9s var(--ease-out) 0.18s, opacity 0.9s var(--ease-out) 0.18s;
}
.ph-card.is-in .coming-card__media { transform: scale(1); filter: blur(0); opacity: 1; }
.coming-card__icon { opacity: 0.85; }
.coming-card__text {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  color: var(--c-muted);
  white-space: nowrap;
}

/* ===== 开发者 arena：中央开发者为核心，连线辐射四周代码流 ===== */
/* team 行在标题下方撑满整屏可用区，作为开发舞台 */
#community .panel__row.team {
  flex: 1;
  width: 100%;
  max-width: 100%;
  align-items: center;
  align-content: center;
  margin: 0;
}
.dev-arena {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  /* flex 仅用于把中央开发者卡锚定在中轴；四周 code-rain 为 absolute，散布在核心外侧 */
  display: flex;
  align-items: center;
  justify-content: center;
  /* 内边距给连线与代码流留出相对屏边缘的缓冲 */
  padding: clamp(20px, 4vh, 48px) clamp(10px, 2.4vw, 30px);
}

/* —— 中央开发者（核心）：沉稳缓重地“锻造成型”—— */
.dev-card {
  position: relative;
  z-index: 3; /* 高于连线与文字流 */
  width: clamp(220px, 24vw, 300px);
  gap: 18px;
}
.dev-card__avatar {
  position: relative;
  width: clamp(148px, 17vw, 196px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-bg);
  /* 核心：起步为细小的暗点，经 arena 浮现缓慢放大、打亮、聚焦 */
  border: 1px solid rgba(247, 198, 217, 0.12);
  opacity: 0;
  transform: translateY(6px) scale(0.55);
  filter: blur(8px) brightness(0.6);
  transition: transform 1.6s var(--ease-out), opacity 1.1s var(--ease-out),
    filter 1.4s var(--ease-out), border-color 1s var(--ease-out), box-shadow 1.4s var(--ease-out);
}
.dev-arena.is-in .dev-card__avatar {
  transform: translateY(0) scale(1);
  opacity: 1;
  filter: blur(0) brightness(1);
  border-color: rgba(247, 198, 217, 0.5);
  box-shadow: 0 0 0 1px rgba(247, 198, 217, 0.28),
    0 0 42px -8px rgba(247, 198, 217, 0.5),
    inset 0 0 0 1px rgba(247, 198, 217, 0.1);
}
/* 核心成型后，一道柔和光环缓缓由内向外扩散一次，凝滞而沉静 */
.dev-arena.is-in .dev-card__avatar::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid rgba(247, 198, 217, 0.55);
  opacity: 0;
  animation: core-halo 2.4s var(--ease-out) 0.9s;
}
.dev-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dev-card__lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dev-card__cmd {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: var(--c-text);
}
.dev-card__prompt { color: var(--c-pink); margin-right: 2px; }
/* 职业头衔（Full Stack Engineer）：小一号的典雅副标，清晰可见但不抢名字行 */
.dev-card__cmd--role {
  color: var(--c-pink);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

/* —— 代码流：去边框去外壳，化作四组纯文字，散布于核心四方 —— */
.code-rain {
  position: absolute;
  z-index: 1;
  width: clamp(220px, 21vw, 300px);
  font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.75;
  text-align: left;
  /* 无背景、无边框：仅靠文字本身的颜色与柔和光晕在暗场上浮现 */
  color: #b7f0c3;
  text-shadow: 0 0 14px rgba(125, 226, 224, 0.16);
  /* 出场前：处于核心处最外侧、微糊且暗淡，随 arena 浮现缓慢移动到归属点并点亮 */
  opacity: 0;
  transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(var(--sc, 0.96));
  filter: blur(5px) brightness(0.5);
  transition: opacity 1s var(--ease-out), transform 1.7s var(--ease-out),
    filter 1.4s var(--ease-out);
  pointer-events: none;
  will-change: opacity, transform, filter;
}
/* 四组代码流各归位于核心四周 —— 其“初始位置”贴近连线起点，营造由中轴流出的方向感 */
.code-rain--tl {
  --dx: -150px; --dy: -130px; --sc: 0.9;
  top: 13%; left: 5%;
}
.code-rain--tr {
  --dx: 150px;  --dy: -130px; --sc: 0.9;
  top: 13%; right: 5%;
}
.code-rain--bl {
  --dx: -150px; --dy: 130px; --sc: 0.9;
  bottom: 15%; left: 5%;
}
.code-rain--br {
  --dx: 150px;  --dy: 130px; --sc: 0.9;
  bottom: 15%; right: 5%;
}
/* arena 浮现后：代码流各自归位、清晰并点亮 */
/* 具体点亮时刻由 JS 依对角线巡回错峰添加 .is-lit */
.code-rain.is-lit {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  filter: blur(0) brightness(1);
}
.code-rain__body { margin: 0; white-space: pre-wrap; word-break: break-word; }
.code-rain__body .cr { display: block; min-height: 1em; }
.code-rain__body .cr--dim { opacity: 0.62; }
/* 注释/输出用更淡的粉紫，营造“手稿批注”般的克制 */
.cr--dim  { color: #9a8fa8; }
.cr--hi   { color: #d6f6b0; }
.cr--prompt { color: #ffc3d9; }
.cr--cyan { color: #8fe3e0; }
.cr--gold { color: #ffd27f; }
.cr--org  { color: #ffa07a; }
.code-rain__cursor {
  display: inline-block;
  width: 0.5em;
  height: 1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: blink 1.2s steps(1) infinite;
  opacity: 0.9;
}
@keyframes blink { 0%, 49% { opacity: 0.9; } 50%, 100% { opacity: 0; } }
/* 中央开发者成型后，光环由内向外缓慢扩散一次 */
@keyframes core-halo {
  0%   { transform: scale(0.72); opacity: 0; }
  30%  { opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}
/* ===== 动画 ===== */
@keyframes fade-in { to { opacity: 1; } }
@keyframes rise-in { to { opacity: 1; transform: translateY(0); } }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
/* media 二次进场的扫光掠过 */
@keyframes sweep {
  0% { transform: translateX(-80%) rotate(6deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateX(340%) rotate(6deg); opacity: 0; }
}
/* 音乐开关均衡条上下律动 */
@keyframes eq-wave {
  0%, 100% { height: 4px; }
  50% { height: 13px; }
}
/* 开发者头像“亮相”时外扩发散的光环 */
@keyframes halo {
  0% { box-shadow: 0 0 0 0 rgba(247, 198, 217, 0); }
  45% { box-shadow: 0 0 0 14px rgba(247, 198, 217, 0.12); }
  100% { box-shadow: 0 0 0 26px rgba(247, 198, 217, 0); }
}


/* ==========================================================================
   入场动效体系
   —— 把「同屏元素同步淡入上移」重构为：
     1) 模块整体错峰(stagger)：同一屏内每个 .reveal 依序登场；
     2) 整屏卡片样式分层(reveal-class)，使 标题/卡片/次级细节 视觉各异；
     3) 卡片内部“二次递进”：父级浮现后，media/icon/avatar/line 再逐层展开，
        从而让图片位、图标等内部细节不再与整卡同步出现，层次更丰富。
   ========================================================================== */

/* 通用：任何被观察元素默认隐藏，进入视口(is-in)后按各自曲线过渡 */
.reveal,
.ph-card,
.ph-person,
.ph-pillar {
  opacity: 0;
  will-change: opacity, transform, filter;
}
.reveal.is-in,
.ph-card.is-in,
.ph-person.is-in,
.ph-pillar.is-in { opacity: 1; }

/* —— 标题 / 描述 / 标签的柔和上移（各屏通用，靠 tag/title 各自 delay 错开） —— */
.reveal { transform: translateY(30px); transition: transform 1.1s var(--ease-out), opacity 1.1s var(--ease-out); }
.reveal.is-in { transform: translateY(0); }

/* —— 标签：横向胶囊由细到宽 + 上浮，营造“徽章盖印”感（先登场） —— */
.reveal.reveal--tag {
  transform: translateY(12px) scaleX(0.4);
  opacity: 0;
  transition: transform 0.9s var(--ease-out), opacity 0.9s var(--ease-out);
}
.reveal.reveal--tag.is-in { transform: translateY(0) scaleX(1); opacity: 1; }

/* —— 标题：上移 + 轻微垂直放大，像从纸面“立起来”，稍后于标签 —— */
.reveal.reveal--title {
  transform: translateY(44px) scaleY(1.06);
  opacity: 0;
  transition: transform 1.15s var(--ease-out) 0.1s, opacity 1.15s var(--ease-out) 0.1s;
}
.reveal.reveal--title.is-in { transform: translateY(0) scaleY(1); opacity: 1; }

/* —— 描述：上移距离比标题短、再晚入场，形成“标签→标题→描述”的前后纵深 —— */
.reveal.reveal--desc {
  transform: translateY(20px);
  opacity: 0;
  transition: transform 1.1s var(--ease-out) 0.22s, opacity 1.1s var(--ease-out) 0.22s;
}
.reveal.reveal--desc.is-in { transform: translateY(0); opacity: 1; }

/* 卡片行内每张卡再递增错峰，形成“一排卡片依次浮现”而非整排同时出现 */
.panel .ph-card {
  transition: transform 1s var(--ease-out), opacity 1s var(--ease-out), background 0.6s, border-color 0.6s, box-shadow 0.6s;
  opacity: 0;
}
/* 产品屏：从下方上浮，边距明显，像从版面下方“浮出水面” */
#products .ph-card { transform: translateY(58px); }
#products .ph-card.is-in { transform: translateY(0); opacity: 1; }
/* 文化屏：两张卡分别自两侧错位汇聚到中轴，营造“聚拢成章”的序列感 */
/* 品牌卡的子元素类型不同（<article> 与 <a>），故用 first/last-child 而非 nth-of-type 区分左右 */
#org .ph-card:first-child { transform: translateX(-44px) translateY(20px); transition-delay: 0.05s; }
#org .ph-card:last-child { transform: translateX(44px) translateY(20px); transition-delay: 0.18s; }
#org .ph-card.is-in { transform: translate(0, 0); opacity: 1; }
/* 开发者屏：头像类卡片上浮量更大，逐位“落位” */
#community .ph-card { transform: translateY(46px); }
#community .ph-card.is-in { transform: translateY(0); opacity: 1; }

/* 卡入场后缓慢由暗面提亮，增强“实体浮现”的光泽感 */
#products .ph-card.is-in,
#community .ph-card.is-in { box-shadow: 0 18px 44px -22px rgba(247, 198, 217, 0.28), inset 0 0 0 1px rgba(247, 198, 217, 0.04); }
.panel__row .ph-card:nth-of-type(1) { transition-delay: 0.05s; }
.panel__row .ph-card:nth-of-type(2) { transition-delay: 0.18s; }
.panel__row .ph-card:nth-of-type(3) { transition-delay: 0.31s; }
.panel__row .ph-card:nth-of-type(4) { transition-delay: 0.44s; }

/* ===== 3) 悬停反馈：让每张卡在被注视时“活”起来（仅在浮现完成后生效） ===== */
.ph-card.is-in { transition-timing-function: var(--ease-out); }
@media (hover: hover) {
  :is(#products, #org, #community, #about) .ph-card.is-in:hover {
    transform: translateY(-8px);
    border-color: rgba(247, 198, 217, 0.45);
    box-shadow: 0 24px 50px -24px rgba(247, 198, 217, 0.4), inset 0 0 0 1px rgba(247, 198, 217, 0.08);
  }
  .ph-card.is-in:hover .ph-card__media,
  .ph-card.is-in:hover .product-card__media,
  .ph-card.is-in:hover .coming-card__media { transform: scale(1.035); filter: none; transition-delay: 0s; }
  .ph-person:hover .ph-avatar { box-shadow: 0 0 0 1px var(--c-pink), 0 0 26px -4px rgba(247, 198, 217, 0.6); }
}
/* 卡片的延迟仅用于“进场那次”；悬停/光效的 transition 与延迟互不干扰 */
.ph-card.is-in:hover .ph-line { transform: scaleX(1); }

/* ===== 无障碍 / 动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__title, .hero__sub { animation: none; opacity: 1; transform: none; }
  .hero__cta { animation: none; opacity: 1; } /* 保留 translateX(-50%) 定位 */
  .topbar { animation: none; opacity: 1; }
  .hero__arrow { animation: none; }
  /* 减弱动效：所有入场元素直接显示到位，不做位移/缩放/扫光 */
  .reveal,
  .reveal.reveal--tag,
  .reveal.reveal--title,
  .reveal.reveal--desc,
  .ph-card,
  .ph-pillar,
  .ph-person { transition: none; opacity: 1; transform: none; filter: none; }
  .ph-card__media,
  .product-card__media,
  .coming-card__media,
  .dev-card__avatar,
  .ph-card__icon,
  .ph-avatar,
  .ph-line { transition: none; opacity: 1; transform: none; }
  .ph-card__media::before { display: none; }
  .ph-person.is-in .ph-avatar { animation: none; box-shadow: none; }
  .panel .reveal, .panel__row .ph-card { transition-delay: 0s !important; }
  .code-rain, .code-rain.is-lit { transition: none; opacity: 1; transform: none; filter: none; }
  .code-rain__cursor { animation: none; }
  .music-toggle.is-playing .music-toggle__eq i { animation: none; height: 8px; }
  .dev-card__avatar::after { display: none; }
  .dev-card__avatar { box-shadow: none; }
}

/* ===== 响应式：代码雨始终显示，不再受窄屏隐藏限制 ===== */
/* 中等及更窄宽度下，四角代码雨按视口宽收缩字号并适度内收，保证显示且不与中央头像重叠 */
@media (max-width: 1200px) {
  .code-rain { width: clamp(150px, 17vw, 220px); font-size: 0.6rem; }
}
@media (max-width: 700px) {
  .code-rain { width: clamp(120px, 32vw, 190px); font-size: 0.52rem; }
}
