/* 科技感增强样式 */

:root {
  --color-bg: #020617;
  --color-bg-elevated: #0a0f1e;
  --color-bg-card: rgba(10, 18, 36, 0.72);
  --color-border: rgba(56, 189, 248, 0.14);
  --color-primary: #0ea5e9;
  --color-primary-light: #38bdf8;
  --color-accent: #22d3ee;
  --color-neon: #00e5ff;
  --color-accent-glow: rgba(0, 229, 255, 0.22);
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
  --glow-sm: 0 0 20px rgba(14, 165, 233, 0.25);
  --glow-md: 0 0 40px rgba(14, 165, 233, 0.35), 0 0 80px rgba(34, 211, 238, 0.12);
}

/* 全局背景 */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(14, 165, 233, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 50%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 0% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    var(--color-bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.04;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
}

/* 粒子画布 */
.tech-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
}

/* Hero 科技层 */
.hero {
  isolation: isolate;
}

.hero-grid {
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridDrift 24s linear infinite;
}

@keyframes gridDrift {
  0% { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

.hero-glow {
  background:
    radial-gradient(ellipse 50% 45% at 75% 25%, rgba(0, 229, 255, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 20% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
}

.hero-scanline {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 229, 255, 0.03) 50%,
    transparent 100%
  );
  background-size: 100% 6px;
  animation: scanMove 8s linear infinite;
  opacity: 0.5;
}

@keyframes scanMove {
  0% { background-position: 0 -100%; }
  100% { background-position: 0 100%; }
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.hero-orb-1 {
  width: 320px;
  height: 320px;
  top: 10%;
  right: 5%;
  background: rgba(14, 165, 233, 0.25);
  animation: orbFloat 10s ease-in-out infinite;
}

.hero-orb-2 {
  width: 240px;
  height: 240px;
  bottom: 15%;
  left: 8%;
  background: rgba(34, 211, 238, 0.18);
  animation: orbFloat 12s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -24px) scale(1.08); }
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

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

/* Hero 徽章 */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neon);
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.06);
  padding: 8px 16px;
  border-radius: 4px;
  box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.08);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-neon);
  box-shadow: 0 0 12px var(--color-neon);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title-accent {
  background: linear-gradient(135deg, #7dd3fc 0%, #22d3ee 40%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(34, 211, 238, 0.35));
}

/* Hero 右侧视觉 */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.hero-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.hero-ring-outer {
  width: min(340px, 80vw);
  height: min(340px, 80vw);
  animation: ringRotate 20s linear infinite;
  border-style: dashed;
  opacity: 0.6;
}

.hero-ring-inner {
  width: min(260px, 65vw);
  height: min(260px, 65vw);
  animation: ringRotate 14s linear infinite reverse;
  border-color: rgba(34, 211, 238, 0.4);
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-hex {
  position: absolute;
  width: min(300px, 75vw);
  height: min(300px, 75vw);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cpath fill='none' stroke='%230ea5e9' stroke-opacity='0.15' stroke-width='1' d='M100 10 L175 55 L175 145 L100 190 L25 145 L25 55 Z'/%3E%3Cpath fill='none' stroke='%2322d3ee' stroke-opacity='0.1' stroke-width='1' d='M100 35 L150 65 L150 135 L100 165 L50 135 L50 65 Z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: hexPulse 4s ease-in-out infinite;
}

@keyframes hexPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

.hero-logo-float {
  position: relative;
  z-index: 2;
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(14, 165, 233, 0.5));
  animation: logoFloat 5s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-float-tags {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-float-tags span {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(6, 24, 48, 0.8);
  border-radius: 4px;
  backdrop-filter: blur(8px);
  animation: tagFloat 6s ease-in-out infinite;
}

.hero-float-tags span:nth-child(1) { top: 8%; left: 5%; animation-delay: 0s; }
.hero-float-tags span:nth-child(2) { top: 20%; right: 0; animation-delay: 1s; }
.hero-float-tags span:nth-child(3) { bottom: 25%; left: 0; animation-delay: 2s; }
.hero-float-tags span:nth-child(4) { bottom: 10%; right: 8%; animation-delay: 0.5s; }

@keyframes tagFloat {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50% { transform: translateY(-8px); opacity: 1; }
}

/* 区块分隔线 */
.section-divider {
  display: flex;
  justify-content: center;
  padding: 0 24px;
  margin: -1px 0;
}

.section-divider span {
  display: block;
  width: min(200px, 40%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-neon), transparent);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

/* 导航栏科技风 */
.header {
  background: rgba(2, 6, 23, 0.75);
  border-bottom-color: rgba(56, 189, 248, 0.12);
}

.header.is-scrolled {
  background: rgba(2, 6, 23, 0.92);
  border-bottom-color: rgba(0, 229, 255, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 229, 255, 0.3);
}

.logo-text {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.logo-img {
  filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.45));
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.nav-cta {
  position: relative;
  overflow: hidden;
  box-shadow: var(--glow-sm) !important;
}

.nav-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.nav-cta:hover::before {
  transform: translateX(100%);
}

/* 区块标签 */
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--color-neon);
  padding: 4px 12px;
  border-left: 2px solid var(--color-neon);
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.08), transparent);
}

.section-header-center .section-tag {
  border-left: none;
  border-bottom: 2px solid var(--color-neon);
  padding: 0 0 8px;
  background: none;
}

/* 玻璃拟态卡片 */
.about-card,
.service-card,
.contact-card,
.stat {
  background: var(--color-bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(56, 189, 248, 0.15);
  position: relative;
  overflow: hidden;
}

.about-card::before,
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.about-card:hover::before,
.service-card:hover::before {
  opacity: 1;
}

.about-card:hover,
.service-card:hover {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: var(--glow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.service-card:hover {
  box-shadow: var(--glow-md);
}

.service-icon {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.06);
}

.service-tags li {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.stat {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.stat:hover {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: var(--glow-sm);
}

.stat-value {
  font-family: var(--font-mono);
  color: var(--color-neon);
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

/* 按钮 */
.btn-primary {
  position: relative;
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  border: 1px solid rgba(0, 229, 255, 0.4);
  box-shadow: var(--glow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.25) 50%, transparent 65%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}

.btn-primary:hover::after {
  transform: translateX(100%);
}

.btn-outline {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  border-color: rgba(0, 229, 255, 0.35);
  color: var(--color-accent);
}

.btn-outline:hover {
  border-color: var(--color-neon);
  background: rgba(0, 229, 255, 0.08);
  box-shadow: var(--glow-sm);
  color: var(--color-neon);
}

/* 优势列表 */
.advantage-num {
  font-family: var(--font-mono);
  color: var(--color-neon);
  opacity: 0.9;
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
}

.code-window {
  border-color: rgba(0, 229, 255, 0.2);
  box-shadow: var(--glow-md), inset 0 0 60px rgba(0, 229, 255, 0.03);
}

.code-window-content {
  font-family: var(--font-mono);
}

/* 表单 */
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--color-neon);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12), var(--glow-sm);
}

.lang-select {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-color: rgba(0, 229, 255, 0.2);
}

/* 页脚 */
.footer {
  border-top-color: rgba(0, 229, 255, 0.12);
  background: linear-gradient(180deg, var(--color-bg-elevated), var(--color-bg));
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

/* 响应式 */
@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-subtitle {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    margin-inline: auto;
  }

  .hero-visual {
    min-height: 280px;
    margin-top: 24px;
  }
}

@media (max-width: 768px) {
  .hero-visual {
    display: none;
  }

  .tech-canvas {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-grid,
  .hero-scanline,
  .hero-orb,
  .hero-ring,
  .hero-hex,
  .hero-logo-float,
  .hero-float-tags span,
  .hero-badge-dot {
    animation: none !important;
  }
}
