/* ============================================================
   ZCubix · hero.css  —  首屏 Hero + 3D 立方体
   ============================================================ */

/* ---------- Hero 容器 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

/* ---------- 左侧文案 ---------- */
.hero-copy { position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--fg-1);
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--glass-bd);
  background: var(--glass-bg);
  margin-bottom: 28px;
  animation: badgePulse 3s ease-in-out infinite;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-neon);
  box-shadow: 0 0 10px var(--c-neon);
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 255, 126, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(16, 255, 126, 0); }
}

.hero-title {
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.hero-title .word {
  display: inline-block;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradShift 8s ease infinite;
}

@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.hero-title .z-mark {
  position: relative;
  display: inline-block;
  color: var(--fg-0);
  -webkit-text-fill-color: var(--fg-0);
  margin-right: 0.04em;
}
.hero-title .z-mark::after {
  content: "";
  position: absolute;
  left: -6px; right: -6px; bottom: 6px;
  height: 14px;
  background: var(--grad-main);
  z-index: -1;
  border-radius: 4px;
  filter: blur(2px);
  opacity: 0.7;
}

.hero-subtitle {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--fg-1);
  margin-bottom: 24px;
  font-weight: 500;
}
.hero-subtitle .sep { color: var(--c-violet); }
.hero-subtitle .en { font-family: var(--font-mono); color: var(--fg-2); font-size: 0.85em; }

/* 打字机 slogan */
.hero-tagline {
  font-size: 1.08rem;
  color: var(--fg-1);
  min-height: 1.6em;
  margin-bottom: 36px;
  max-width: 480px;
}
.hero-tagline .cursor-bar {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--c-cyan);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* CTA */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

/* 指标条 */
.hero-stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.hero-stat .num {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--grad-cool);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stat .lbl { font-size: 0.82rem; color: var(--fg-2); letter-spacing: 0.05em; }

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  z-index: 2;
}
.scroll-hint .mouse {
  width: 22px; height: 36px;
  border: 2px solid var(--fg-2);
  border-radius: 12px;
  position: relative;
}
.scroll-hint .mouse::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 7px;
  background: var(--c-cyan);
  border-radius: 2px;
  animation: scrollWheel 1.8s ease-in-out infinite;
}
@keyframes scrollWheel {
  0% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 12px); }
}

/* ============================================================
   3D 立方体（Hero 中心视觉）
   ============================================================ */
.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  perspective: 1400px;
  z-index: 2;
}

/* 立方体下方光晕底盘 */
.hero-stage::before {
  content: "";
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 260px; height: 40px;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.55), transparent 70%);
  filter: blur(8px);
  z-index: 0;
}

/* 环绕装饰圈 */
.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(139, 92, 246, 0.25);
  pointer-events: none;
  animation: orbitSpin 30s linear infinite;
}
.orbit.o1 { width: 380px; height: 380px; }
.orbit.o2 { width: 460px; height: 460px; border-color: rgba(6, 182, 212, 0.18); animation-duration: 50s; animation-direction: reverse; }
@keyframes orbitSpin { to { transform: rotate(360deg); } }

.cube-scene {
  width: 220px;
  height: 220px;
  position: relative;
  transform-style: preserve-3d;
  cursor: grab;
  touch-action: none;
}
.cube-scene:active { cursor: grabbing; }

.cube {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.face {
  position: absolute;
  width: 220px;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
  text-align: center;
  user-select: none;
  overflow: hidden;
}

/* 每个面的渐变 + 字符 */
.face .glyph {
  font-size: 5rem;
  line-height: 1;
  text-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.face .label {
  position: absolute;
  bottom: 16px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  opacity: 0.85;
  text-transform: uppercase;
}

.face::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.25), transparent 55%);
  pointer-events: none;
}

.face-front  { transform: translateZ(110px);  background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.face-back   { transform: rotateY(180deg) translateZ(110px); background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.face-right  { transform: rotateY(90deg)  translateZ(110px); background: linear-gradient(135deg, #06b6d4, #6366f1); }
.face-left   { transform: rotateY(-90deg) translateZ(110px); background: linear-gradient(135deg, #10ff7e, #06b6d4); }
.face-top    { transform: rotateX(90deg)  translateZ(110px); background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.face-bottom { transform: rotateX(-90deg) translateZ(110px); background: linear-gradient(135deg, #1e1b4b, #6366f1); }

/* 提示文字 */
.cube-tip {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-2);
  letter-spacing: 0.15em;
  white-space: nowrap;
  z-index: 3;
}

/* ============================================================
   名字释义板块 — 第二个立方体（可点切换轴）
   ============================================================ */
.meaning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.meaning-text { min-height: 340px; }

.meaning-panel { display: none; animation: panelIn 0.5s var(--ease); }
.meaning-panel.active { display: block; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.meaning-panel .axis {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--c-cyan);
  margin-bottom: 14px;
}
.meaning-panel .axis .ax-dot { width: 10px; height: 10px; border-radius: 2px; }

.meaning-panel h3 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}
.meaning-panel h3 .accent {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.meaning-panel p {
  color: var(--fg-1);
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.meaning-tabs {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.meaning-tab {
  padding: 10px 18px;
  border-radius: 100px;
  border: 1px solid var(--glass-bd);
  background: var(--glass-bg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--fg-1);
  transition: all 0.25s var(--ease);
}
.meaning-tab:hover { color: var(--fg-0); border-color: var(--c-violet); }
.meaning-tab.active {
  color: #fff;
  border-color: transparent;
  background: var(--grad-main);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

/* 释义板块的立方体（稍小） */
.meaning-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 380px;
  perspective: 1200px;
}
.meaning-stage .cube-scene { width: 180px; height: 180px; }
.meaning-stage .cube-scene .face { width: 180px; height: 180px; border-radius: 18px; }
.meaning-stage .face .glyph { font-size: 4rem; }
.meaning-stage .face-front  { transform: translateZ(90px); }
.meaning-stage .face-back   { transform: rotateY(180deg) translateZ(90px); }
.meaning-stage .face-right  { transform: rotateY(90deg)  translateZ(90px); }
.meaning-stage .face-left   { transform: rotateY(-90deg) translateZ(90px); }
.meaning-stage .face-top    { transform: rotateX(90deg)  translateZ(90px); }
.meaning-stage .face-bottom { transform: rotateX(-90deg) translateZ(90px); }

.meaning-stage::before {
  content: "";
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px; height: 34px;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.5), transparent 70%);
  filter: blur(8px);
}

/* Z → 立方体 升维示意图 */
.upgrade-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.upgrade-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-2);
}
.upgrade-step .shape {
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 700;
}
.upgrade-step .shape.line {
  border: 2px solid var(--c-cyan);
  border-radius: 0;
  width: 56px; height: 8px;
  color: transparent;
  box-shadow: 0 0 14px var(--c-cyan);
}
.upgrade-step .shape.square {
  border: 2px solid var(--c-violet);
  border-radius: 8px;
  color: var(--c-violet);
}
.upgrade-step .shape.cube {
  background: var(--grad-main);
  border-radius: 10px;
  color: #fff;
  transform: rotate(-8deg);
  box-shadow: 4px 4px 0 rgba(236, 72, 153, 0.5);
}
.upgrade-arrow { color: var(--fg-2); font-size: 1.4rem; }
