/* ============================================================
   星河沉浮 · XINGHE — 深空科技风
   ============================================================ */

:root {
  --bg-0: #04060f;
  --bg-1: #0a0f22;
  --ink: #eaf2ff;
  --ink-dim: rgba(234, 242, 255, 0.55);
  --ink-faint: rgba(234, 242, 255, 0.32);
  --cyan: #7dd3fc;
  --violet: #a78bfa;
  --pink: #f0abfc;
  --stroke: rgba(255, 255, 255, 0.09);
  --glass: rgba(13, 20, 40, 0.5);
  --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", "SF Mono", Consolas, monospace;
}

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

html { scrollbar-color: rgba(167, 139, 250, 0.4) transparent; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.35), rgba(167, 139, 250, 0.45));
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.6), rgba(167, 139, 250, 0.7));
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, var(--bg-1) 0%, transparent 60%),
    var(--bg-0);
  color: var(--ink);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: rgba(167, 139, 250, 0.35); color: #fff; }

/* ---------- 背景层 ---------- */

#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.nebula {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.nebula-a {
  width: 55vmax; height: 55vmax;
  left: -18vmax; top: -22vmax;
  background: radial-gradient(circle, rgba(56, 130, 246, 0.34), transparent 65%);
  animation: nebula-drift 26s ease-in-out infinite alternate;
}
.nebula-b {
  width: 48vmax; height: 48vmax;
  right: -16vmax; top: 10vmax;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 65%);
  animation: nebula-drift 32s ease-in-out -8s infinite alternate-reverse;
}
.nebula-c {
  width: 42vmax; height: 42vmax;
  left: 28vmax; bottom: -26vmax;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.18), transparent 65%);
  animation: nebula-drift 38s ease-in-out -18s infinite alternate;
}

@keyframes nebula-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 4vmax, 0) scale(1.15); }
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 42%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 42%, #000 20%, transparent 75%);
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 导航 ---------- */

.nav {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: min(1080px, calc(100% - 40px));
  animation: drop-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 8px 40px rgba(2, 6, 23, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  user-select: none;
}

.logo-mark {
  font-size: 18px;
  color: var(--cyan);
  filter: drop-shadow(0 0 10px rgba(125, 211, 252, 0.8));
  animation: spin-slow 12s linear infinite;
}

.logo-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.22em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.logo-text small {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--ink-faint);
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes spin-slow { to { transform: rotate(360deg); } }

/* ---------- 主视觉 ---------- */

.hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(96px, 13vh, 150px) 24px clamp(40px, 7vh, 90px);
  will-change: transform;
}

.orbit-system {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  z-index: 1;
  pointer-events: none;
}
.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transform: translate(-50%, -50%);
  animation: orbit-rotate linear infinite;
}
.orbit-1 { width: 62vmin; height: 62vmin; animation-duration: 36s; }
.orbit-2 { width: 84vmin; height: 84vmin; border-style: dashed; border-color: rgba(255, 255, 255, 0.05); animation-duration: 56s; animation-direction: reverse; }
.orbit-3 { width: 108vmin; height: 108vmin; animation-duration: 88s; }

.orbit-dot {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px 3px rgba(125, 211, 252, 0.65);
}
.orbit-2 .orbit-dot {
  background: var(--violet);
  box-shadow: 0 0 14px 3px rgba(167, 139, 250, 0.6);
}
.orbit-3 .orbit-dot {
  background: var(--pink);
  box-shadow: 0 0 14px 3px rgba(240, 171, 252, 0.55);
  width: 6px;
  height: 6px;
}

@keyframes orbit-rotate { to { transform: translate(-50%, -50%) rotate(360deg); } }

.overline {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.4vw, 12.5px);
  letter-spacing: 0.5em;
  color: var(--ink-faint);
  text-indent: 0.5em;
  margin-bottom: 30px;
  animation: rise-in 1s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.title {
  font-size: clamp(64px, 15vw, 168px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.08em;
  background: linear-gradient(115deg, #bae6fd 8%, #a78bfa 42%, #f0abfc 68%, #bae6fd 96%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(139, 92, 246, 0.35));
  animation: gradient-flow 9s ease-in-out infinite;
}

.title span {
  display: inline-block;
  animation: char-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.title span:nth-child(1) { animation-delay: 0.35s; }
.title span:nth-child(2) { animation-delay: 0.47s; }
.title span:nth-child(3) { animation-delay: 0.59s; }
.title span:nth-child(4) { animation-delay: 0.71s; }

@keyframes char-in {
  from { opacity: 0; transform: translateY(46px) rotateX(40deg); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

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

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 34px 0 26px;
  animation: rise-in 1s 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.divider .line {
  width: clamp(70px, 12vw, 150px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.7));
}
.divider .line:last-child {
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.7), transparent);
}
.divider .diamond {
  font-size: 11px;
  color: var(--violet);
  filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.9));
  animation: spin-slow 14s linear infinite;
}

.tagline {
  font-size: clamp(15px, 2.2vw, 19px);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--ink-dim);
  animation: rise-in 1s 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tagline-en {
  font-family: var(--font-mono);
  font-size: clamp(9px, 1.3vw, 11px);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--ink-faint);
  margin-top: 14px;
  animation: rise-in 1s 1.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes drop-in {
  from { opacity: 0; transform: translate(-50%, -24px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 页脚 ---------- */

.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--stroke);
  background: rgba(4, 6, 15, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: footer-in 1s 1.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 从上方淡入落定，避免入场时向下撑出滚动区域 */
@keyframes footer-in {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.copyright { white-space: nowrap; }

.icp {
  color: var(--ink-faint);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 999px;
  transition: color 0.25s, background 0.25s;
  white-space: nowrap;
}
.icp:hover {
  color: var(--cyan);
  background: rgba(125, 211, 252, 0.08);
}

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
  .footer-inner { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .status-text { display: none; }
  .nav { top: 14px; width: calc(100% - 28px); }
  .nav-inner { gap: 16px; padding: 10px 18px; }
  .logo-text { font-size: 15px; }
  .overline { font-size: 9px; letter-spacing: 0.32em; text-indent: 0.32em; }
  .tagline { letter-spacing: 0.22em; text-indent: 0.22em; }
  .tagline-en { font-size: 9px; letter-spacing: 0.26em; text-indent: 0.26em; }
  .footer-inner { font-size: 10px; }
}

/* 手机横屏等矮屏：压缩纵向留白 */
@media (max-height: 520px) {
  .hero { padding-top: 68px; padding-bottom: 18px; }
  .title { font-size: clamp(48px, 19vh, 110px); }
  .overline { margin-bottom: 16px; }
  .divider { margin: 18px 0 14px; }
  .tagline-en { margin-top: 10px; }
}

/* ---------- 动效降级 ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
