/* ========================================
   NEXUS · 连接，无限可能
   深色科幻风格主页样式
   ======================================== */

/* --- 本地字体 --- */
@font-face {
  font-family: 'Orbitron';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/orbitron-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Orbitron';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('fonts/orbitron-bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Orbitron';
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  src: url('fonts/orbitron-black.woff2') format('woff2');
}

/* --- CSS 变量 --- */
:root {
  --c-bg: #03060b;
  --c-surface: #0a0f1a;
  --c-border: rgba(0, 195, 255, 0.12);
  --c-cyan: #00e5ff;
  --c-cyan-dim: #00a0b2;
  --c-blue: #2979ff;
  --c-purple: #7c4dff;
  --c-magenta: #e040fb;
  --c-text: #c8d6e5;
  --c-text-dim: #5a6a7a;
  --c-glow: rgba(0, 229, 255, 0.35);
  --c-glow-purple: rgba(124, 77, 255, 0.25);

  --font-display: 'Orbitron', 'Courier New', 'Menlo', monospace;
  --font-body: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 全局重置 --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.15) var(--c-bg);
}

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* --- 粒子画布 --- */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- 扫描线 --- */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ========================================
   左上角 LOGO
   ======================================== */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 24px 32px;
  opacity: 0;
  animation: fadeIn 1s ease 0.5s forwards;
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--c-text);
  transition: opacity 0.3s ease;
}

.top-brand:hover {
  opacity: 0.8;
}

.top-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.top-logo svg {
  width: 100%;
  height: 100%;
}

.top-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--c-cyan);
  opacity: 0.9;
}

/* ========================================
   主视觉区域
   ======================================== */
.hero {
  position: relative;
  z-index: 2;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  scroll-snap-align: start;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(
    circle,
    var(--c-glow) 0%,
    var(--c-glow-purple) 30%,
    transparent 70%
  );
  opacity: 0.4;
  filter: blur(80px);
  animation: pulseGlow 6s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0%   { opacity: 0.3; transform: translate(-50%, -50%) scale(0.9); }
  100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 3;
}

/* --- 品牌标志 --- */
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
}

.brand-line {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-cyan));
  opacity: 0;
  transform-origin: right center;
  animation: lineReveal 1.2s var(--ease-out-expo) 0.6s forwards;
}

.brand-line-right {
  background: linear-gradient(90deg, var(--c-cyan), transparent);
  transform-origin: left center;
}

@keyframes lineReveal {
  0%   { opacity: 0; transform: scaleX(0); }
  100% { opacity: 1; transform: scaleX(1); }
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.5rem, 12vw, 9rem);
  letter-spacing: 0.25em;
  color: transparent;
  background: linear-gradient(
    135deg,
    var(--c-cyan) 0%,
    var(--c-blue) 40%,
    var(--c-purple) 70%,
    var(--c-magenta) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  opacity: 0;
  animation: brandIn 1s var(--ease-out-expo) 0.2s forwards;
  text-shadow: none;
  filter: drop-shadow(0 0 40px var(--c-glow)) drop-shadow(0 0 80px var(--c-glow-purple));
}

/* 故障效果伪元素 */
.brand-name::before,
.brand-name::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-name::before {
  animation: glitch1 4s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.brand-name::after {
  animation: glitch2 4s infinite;
  clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
  0%, 92%  { transform: translate(0); }
  93%      { transform: translate(-4px, -1px); }
  94%      { transform: translate(4px, 1px); }
  95%      { transform: translate(-2px, 0); }
  96%, 100% { transform: translate(0); }
}

@keyframes glitch2 {
  0%, 94%  { transform: translate(0); }
  95%      { transform: translate(3px, 1px); }
  96%      { transform: translate(-3px, -1px); }
  97%      { transform: translate(2px, 0); }
  98%, 100% { transform: translate(0); }
}

@keyframes brandIn {
  0%   { opacity: 0; transform: translateY(30px) scale(0.95); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: drop-shadow(0 0 40px var(--c-glow)) drop-shadow(0 0 80px var(--c-glow-purple)); }
}

/* --- 标语 --- */
.tagline-wrapper {
  overflow: hidden;
  padding: 8px 0;
}

.tagline {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1.2rem, 3.5vw, 2.4rem);
  letter-spacing: 0.8em;
  color: var(--c-text);
  display: flex;
  justify-content: center;
  gap: 4px;
}

.tagline-char,
.tagline-divider {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: charIn 0.6s var(--ease-out-expo) forwards;
  animation-delay: calc(1s + var(--i) * 0.1s);
}

.tagline-divider {
  margin: 0 0.15em;
  color: var(--c-cyan-dim);
}

@keyframes charIn {
  0%   { opacity: 0; transform: translateY(40px); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* --- 滚动提示 --- */
.scroll-hint {
  margin-top: 80px;
  display: flex;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 1s ease 2.2s forwards;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, var(--c-cyan), transparent);
  transform-origin: top center;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.67); }
  50%      { opacity: 1; transform: scaleY(1); }
}

@keyframes fadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* ========================================
   科技图标 + 联系我们（合并页）
   ======================================== */
.techcontact {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  scroll-snap-align: start;
  overflow: hidden;
}

.techcontact-inner {
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.techgrid-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tech-cell {
  aspect-ratio: 1;
  background: linear-gradient(
    160deg,
    rgba(0, 229, 255, 0.02) 0%,
    rgba(124, 77, 255, 0.01) 100%
  );
  border: 1px solid rgba(0, 195, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.6s var(--ease-out-expo),
              transform 0.6s var(--ease-out-expo),
              border-color 0.6s var(--ease-out-expo),
              box-shadow 0.6s var(--ease-out-expo);
}

.tech-cell.is-visible {
  opacity: 1;
  transform: scale(1);
}

.tech-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(0, 229, 255, 0.04),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
}

.tech-cell:hover::before {
  opacity: 1;
}

.tech-cell:hover {
  border-color: rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 50px rgba(0, 229, 255, 0.05);
  transform: scale(1.03);
}

.tech-cell svg {
  width: 100%;
  height: 100%;
}

/* --- 联系栏（嵌入合并页底部） --- */
.contact-bar {
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo);
}

.contact-bar.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 1.6vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--c-cyan-dim);
  text-align: center;
  margin-bottom: 28px;
}

.title-decoration {
  color: var(--c-purple);
  font-weight: 700;
  margin: 0 8px;
}

.contact-email-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 40px;
  background: linear-gradient(
    135deg,
    rgba(0, 229, 255, 0.03) 0%,
    rgba(124, 77, 255, 0.02) 100%
  );
  border: 1px solid var(--c-border);
  border-radius: 12px;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.contact-email-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(0, 229, 255, 0.06),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
}

.contact-email-wrapper:hover::before {
  opacity: 1;
}

.contact-email-wrapper:hover {
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.06);
}

.contact-email-wrapper .contact-icon {
  width: 24px;
  height: 24px;
  color: var(--c-cyan);
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}

.contact-email-wrapper:hover .contact-icon {
  opacity: 1;
}

.contact-email-wrapper .contact-icon svg {
  width: 100%;
  height: 100%;
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--c-text);
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

a.contact-value:hover {
  color: var(--c-cyan);
}

/* ========================================
   底部备案
   ======================================== */
.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  padding: 24px 24px calc(20px + env(safe-area-inset-bottom, 0px));
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.footer-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-border), transparent);
  margin: 0 auto 32px;
}

.icp {
  font-size: 0.75rem;
  color: var(--c-text-dim);
  letter-spacing: 0.08em;
  line-height: 2;
}

.icp a {
  color: var(--c-text-dim);
  transition: color 0.3s ease;
}

.icp a:hover {
  color: var(--c-cyan-dim);
}

.icp-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--c-text-dim);
  letter-spacing: 0.08em;
  line-height: 1.4;
  margin-top: 6px;
}

.icp-row a {
  color: var(--c-text-dim);
  transition: color 0.3s ease;
}

.icp-row a:hover {
  color: var(--c-cyan-dim);
}

.icp-divider {
  opacity: 0.3;
  margin: 0 2px;
}

.gongan-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.4;
}

.gongan-icon {
  width: 14px;
  height: 14px;
  opacity: 0.5;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 768px) {
  .techcontact {
    padding: 0 16px;
  }

  .techcontact-inner {
    gap: 48px;
  }

  .techgrid-inner {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .tech-cell {
    padding: 12px;
    border-radius: 12px;
  }

  .contact-email-wrapper {
    padding: 22px 24px;
    gap: 12px;
  }

  .section-title {
    margin-bottom: 20px;
  }

  .top-bar {
    padding: 16px 20px;
  }

  .top-logo {
    width: 30px;
    height: 30px;
  }

  .top-name {
    font-size: 0.75rem;
  }

  .brand-line {
    width: 40px;
  }

  .brand-mark {
    gap: 16px;
  }

  .tagline {
    letter-spacing: 0.5em;
  }

  .scroll-hint {
    margin-top: 60px;
  }
}

@media (max-width: 420px) {
  .tagline {
    letter-spacing: 0.3em;
    gap: 2px;
  }

  .brand-line {
    display: none;
  }

  .icp-row {
    flex-direction: column;
    gap: 4px;
  }

  .icp-divider {
    display: none;
  }
}

/* --- 选择文本颜色 --- */
::selection {
  background: rgba(0, 229, 255, 0.2);
  color: var(--c-cyan);
}

/* --- 滚动条 --- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--c-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.15);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.3);
}
