/* Keyframe Animations & 3D Workspace Effects */

/* Hero 3D Interactive Illusion Canvas */
.hero-3d-wrapper {
  position: relative;
  width: 100%;
  height: 440px;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-3d-stage {
  width: 320px;
  height: 320px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(20deg) rotateY(-15deg);
  transition: transform 0.2s ease-out;
}

/* Central DigitalAInest Core */
.ai-core-node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110px;
  height: 110px;
  margin-top: -55px;
  margin-left: -55px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-purple) 0%, rgba(11,15,25,0.9) 75%);
  box-shadow: 0 0 40px var(--accent-purple-glow), inset 0 0 20px #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 10;
  border: 2px solid var(--accent-purple);
  animation: corePulse 3s infinite ease-in-out;
}

.ai-core-node span {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
}

/* Floating Glass Cards */
.glass-card {
  position: absolute;
  padding: 0.65rem 1rem;
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.825rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  white-space: nowrap;
  animation: floatCard 6s infinite ease-in-out;
}

.glass-card.card-1 { top: 0; left: 10%; animation-delay: 0s; }
.glass-card.card-2 { top: 25%; right: -10%; animation-delay: 1.2s; }
.glass-card.card-3 { bottom: 15%; right: 5%; animation-delay: 2.4s; }
.glass-card.card-4 { bottom: 5%; left: 0%; animation-delay: 3.6s; }
.glass-card.card-5 { top: 20%; left: -15%; animation-delay: 4.8s; }

/* Connecting Node Lines */
.connecting-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
  height: 2px;
  z-index: 1;
  opacity: 0.6;
  transform-origin: left center;
}

/* Workflow Chain Preview */
.hero-workflow-chain {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-slate-canvas);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-full);
}

.workflow-node-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}

.workflow-node-pill.trigger { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }
.workflow-node-pill.agent { background: var(--status-ai-bg); color: var(--status-ai); }
.workflow-node-pill.analyze { background: rgba(245, 158, 11, 0.2); color: #FBBF24; }
.workflow-node-pill.action { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.workflow-node-pill.result { background: rgba(236, 72, 153, 0.2); color: #F472B6; }

.workflow-arrow {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Keyframes */
@keyframes corePulse {
  0%, 100% {
    box-shadow: 0 0 30px var(--accent-purple-glow), inset 0 0 15px rgba(255,255,255,0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 60px var(--accent-purple-glow), inset 0 0 30px rgba(255,255,255,0.9);
    transform: scale(1.05);
  }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px) translateZ(10px); }
  50% { transform: translateY(-12px) translateZ(30px); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Respect Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .hero-3d-stage, .ai-core-node, .glass-card, .toast {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}
