/* =============================================
   Invortics Solutions - Custom Styles
   ============================================= */

/* CSS Custom Properties */
:root {
  --color-primary-dark: #0a0f1c;
  --color-secondary-dark: #1a1f2e;
  --color-accent: #00d4ff;
  --color-accent-glow: rgba(0, 212, 255, 0.4);
  --color-accent-subtle: rgba(0, 212, 255, 0.1);
  --color-white: #ffffff;
  --color-gray: #94a3b8;
  --color-border: #2d3748;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-primary-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* Selection Color */
::selection {
  background: var(--color-accent);
  color: var(--color-primary-dark);
}

/* =============================================
   Animated Background - Interconnected Nodes
   ============================================= */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, var(--color-accent-subtle) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 40% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 40%);
}

/* Animated Nodes */
.node {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--color-accent-glow);
  animation: pulse 3s ease-in-out infinite;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.node::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent-glow), transparent);
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  opacity: 0.6;
}

.node:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.node:nth-child(2) { top: 40%; left: 25%; animation-delay: 0.5s; }
.node:nth-child(3) { top: 60%; left: 15%; animation-delay: 1s; }
.node:nth-child(4) { top: 30%; left: 70%; animation-delay: 1.5s; }
.node:nth-child(5) { top: 70%; left: 80%; animation-delay: 2s; }
.node:nth-child(6) { top: 50%; left: 60%; animation-delay: 2.5s; }
.node:nth-child(7) { top: 15%; left: 85%; animation-delay: 0.3s; }
.node:nth-child(8) { top: 80%; left: 40%; animation-delay: 1.8s; }

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

/* Connection Lines */
.connection-lines {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.connection-lines svg {
  width: 100%;
  height: 100%;
  opacity: 0.3;
  transition: transform 0.4s ease-out;
  will-change: transform;
}

.connection-lines path {
  stroke: var(--color-accent);
  stroke-width: 1;
  fill: none;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawLine 4s ease-in-out infinite;
}

@keyframes drawLine {
  0% { stroke-dashoffset: 200; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -200; }
}

/* =============================================
   Glassmorphism Cards
   ============================================= */
.glass-card {
  background: rgba(26, 31, 46, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(26, 31, 46, 0.8);
  border-color: var(--color-accent);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px var(--color-accent-subtle);
}

/* =============================================
   Button Styles
   ============================================= */
.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), #0099cc);
  color: var(--color-primary-dark);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--color-accent-glow);
}

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

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  font-weight: 500;
  padding: 0.875rem 2rem;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: 0 0 20px var(--color-accent-subtle);
}

/* =============================================
   Navbar Styles
   ============================================= */
.navbar {
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 15, 28, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
  position: relative;
  color: var(--color-gray);
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile Menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Hamburger Icon */
.hamburger {
  width: 24px;
  height: 20px;
  position: relative;
  cursor: pointer;
}

.hamburger span {
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* =============================================
   Section Styles
   ============================================= */
.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-gray);
  max-width: 600px;
}

/* Product Badge */
.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-accent-subtle);
  border: 1px solid var(--color-accent);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
}

.coming-soon-badge {
  background: rgba(139, 92, 246, 0.1);
  border-color: #8b5cf6;
  color: #8b5cf6;
}

/* Feature Icon */
.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-subtle);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-accent);
  transition: all 0.3s ease;
}

.glass-card:hover .feature-icon {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-color: var(--color-accent);
}

/* Service Card */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), #0099cc);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* =============================================
   Form Styles
   ============================================= */
.form-input {
  width: 100%;
  padding: 1rem;
  background: var(--color-secondary-dark);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-white);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: var(--color-gray);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

/* =============================================
   Footer Styles
   ============================================= */
.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-secondary-dark);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-gray);
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-primary-dark);
  transform: translateY(-3px);
}

/* =============================================
   Utility Classes
   ============================================= */
.text-gradient {
  background: linear-gradient(135deg, var(--color-accent), #0099cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow {
  box-shadow: 0 0 30px var(--color-accent-glow);
}

/* USP Banner */
.usp-banner {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 153, 204, 0.05));
  border: 1px solid rgba(0, 212, 255, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* =============================================
   Responsive Adjustments
   ============================================= */
@media (max-width: 768px) {
  .hero-bg .node {
    display: none;
  }

  .hero-bg .node:nth-child(-n+4) {
    display: block;
  }
}
