/* ========================================
   Dehkade — AI Automation Studio
   Dark Futuristic SaaS Design System
   ======================================== */

:root {
  --bg: #050505;
  --accent-purple: #a855f7;
  --accent-violet: #8b5cf6;
  --accent-cyan: #22d3ee;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  cursor: default;
}

/* Background Grid */
.bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(135deg, #a855f7 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: white;
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-weight: 500;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}

/* Navbar */
#navbar {
  background: transparent;
  backdrop-filter: blur(0px);
}

#navbar.scrolled {
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  color: #9ca3af;
  border-radius: 0.5rem;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.mobile-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #d1d5db;
  border-radius: 0.5rem;
  transition: background 0.2s;
  text-decoration: none;
}

.mobile-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

/* Glass Panel */
.glass-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

/* Hero Network Nodes */
.node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  z-index: 10;
  padding: 0.4rem 0.75rem;
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: #d1d5db;
  white-space: nowrap;
  transition: all 0.3s ease;
  animation: nodePulse 3s ease-in-out infinite;
}

.node:hover {
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
  color: white;
}

@keyframes nodePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
  50% { box-shadow: 0 0 12px 2px rgba(168, 85, 247, 0.15); }
}

/* Trust Logos */
.trust-logo {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.02em;
  transition: color 0.3s, transform 0.3s;
  cursor: default;
}

.trust-logo:hover {
  color: #a855f7;
  transform: translateY(-2px);
}

/* Problem Cards */
.problem-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.problem-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(168, 85, 247, 0.25);
  transform: translateY(-4px);
}

/* Service Cards */
.service-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  padding: 2rem;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
}

.service-card:hover {
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(168, 85, 247, 0.2);
}

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

/* Workflow Nodes */
.workflow-node {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  position: relative;
  opacity: 0.4;
  transition: all 0.5s ease;
}

.workflow-node.active {
  opacity: 1;
}

.workflow-node .node-icon {
  width: 56px;
  height: 56px;
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
  transition: all 0.4s ease;
  color: #9ca3af;
}

.workflow-node.active .node-icon {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(34, 211, 238, 0.1));
  border-color: rgba(168, 85, 247, 0.5);
  color: #a855f7;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.workflow-node .node-content {
  flex: 1;
  padding-top: 0.5rem;
}

.status-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  color: #6b7280;
  transition: all 0.3s;
}

.workflow-node.active .status-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

/* Agent Actions */
.action-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  font-size: 0.875rem;
  color: #9ca3af;
  transition: all 0.3s;
}

.action-item.active {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
  color: #d1d5db;
}

/* n8n Nodes */
.n8n-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.875rem;
  min-width: 90px;
  transition: all 0.3s;
}

.n8n-node:hover {
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -10px rgba(168, 85, 247, 0.3);
}

.n8n-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.n8n-node span {
  font-size: 0.75rem;
  font-weight: 500;
  color: #d1d5db;
}

.n8n-arrow {
  color: #4b5563;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Use Case Cards */
.usecase-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: all 0.3s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.usecase-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.usecase-card:hover::after {
  content: attr(data-flow);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: rgba(5, 5, 5, 0.95);
  font-size: 0.65rem;
  color: #a855f7;
  text-align: center;
  border-top: 1px solid rgba(168, 85, 247, 0.2);
}

/* Case Cards */
.case-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  padding: 1.75rem;
  transition: all 0.3s ease;
}

.case-card:hover {
  border-color: rgba(168, 85, 247, 0.25);
  transform: translateY(-3px);
}

.tech-tag {
  font-size: 0.7rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Tech Nodes */
.tech-node {
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  transition: all 0.3s ease;
  cursor: default;
}

.tech-node:hover,
.tech-node.highlighted {
  color: white;
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.1);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

/* Package Cards */
.package-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  padding: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.package-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.25);
}

.package-card.featured {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: 0 0 40px -10px rgba(168, 85, 247, 0.25);
}

/* FAQ */
.faq-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.875rem;
  overflow: hidden;
  transition: border-color 0.3s;
}

.faq-item.open {
  border-color: rgba(168, 85, 247, 0.3);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.25rem;
  text-align: right;
  font-weight: 500;
  color: #e5e7eb;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.faq-question:hover {
  color: white;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 1.25rem 1.25rem;
}

.faq-answer p {
  color: #9ca3af;
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* Process Steps */
.process-step .process-icon {
  transition: all 0.4s ease;
}

.process-step.active .process-icon {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.25);
  background: rgba(168, 85, 247, 0.1);
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* SVG Network Lines */
#network-svg line {
  stroke: rgba(168, 85, 247, 0.25);
  stroke-width: 1;
}

#network-svg .flow-line {
  stroke: url(#lineGradient);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  animation: flowDash 1.5s linear infinite;
}

@keyframes flowDash {
  to { stroke-dashoffset: -20; }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .node {
    font-size: 0.6rem;
    padding: 0.3rem 0.5rem;
  }
}

@media (max-width: 640px) {
  .n8n-arrow {
    display: none;
  }
  
  .n8n-node {
    min-width: 70px;
    padding: 0.75rem;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .node,
  .workflow-node,
  .btn-primary,
  .btn-secondary {
    transition: none !important;
    animation: none !important;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
}


/* Dehkade site helpers */
.nav-link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #9ca3af;
  border-radius: 0.5rem;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  color: #fff !important;
  font-weight: 600;
  transition: opacity .15s, transform .15s;
}
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
.card-glass {
  background: rgba(17, 17, 17, 0.8);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
}
#navbar.scrolled {
  background: rgba(5,5,5,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
