/* --------------------------------------------------
 * LAN Innovations - Enterprise Design System Tokens
 * Aesthetic: Dark-mode Enterprise B2B Infrastructure
 * Inspired by Linear, Vercel, and Stripe Dev tools
 * -------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Core Palette Tokens */
  --color-dark-slate: #0B0F19;
  --color-surface-slate: #0F172A;
  --color-surface-elevated: #151F36;
  --color-border-slate: #1E293B;
  --color-border-subtle: #334155;
  --color-accent-sky: #0284C7;
  --color-accent-sky-bright: #38BDF8;
  --color-accent-emerald: #10B981;
  --color-accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --color-text-primary: #F8FAFC;
  --color-text-secondary: #CBD5E1;
  --color-text-muted: #94A3B8;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Ambient Glows & Lighting */
  --glow-sky-subtle: rgba(2, 132, 199, 0.18);
  --glow-sky-intense: rgba(56, 189, 248, 0.35);
  --card-glass-bg: rgba(15, 23, 42, 0.75);
  --card-glass-border: rgba(51, 65, 85, 0.65);
}

/* Base resets & typography */
html {
  font-family: var(--font-sans);
  background-color: var(--color-dark-slate);
  color: var(--color-text-primary);
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-dark-slate);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-dark-slate);
}
::-webkit-scrollbar-thumb {
  background: var(--color-border-subtle);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Ambient Radial Glow Gradients */
.radial-glow-hero {
  background: radial-gradient(1100px circle at 50% -10%, rgba(2, 132, 199, 0.28) 0%, rgba(14, 165, 233, 0.08) 45%, rgba(15, 23, 42, 0) 75%);
}

.radial-glow-ai {
  background: radial-gradient(850px circle at 50% 30%, rgba(14, 165, 233, 0.16) 0%, rgba(16, 185, 129, 0.08) 50%, rgba(15, 23, 42, 0) 80%);
}

.radial-glow-architecture {
  background: radial-gradient(900px circle at 50% 20%, rgba(2, 132, 199, 0.18) 0%, rgba(15, 23, 42, 0) 70%);
}

.radial-glow-accent {
  position: absolute;
  pointer-events: none;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.14) 0%, rgba(2, 132, 199, 0) 70%);
  filter: blur(60px);
  z-index: 0;
}

/* Subtle Technical Grid Overlay */
.bg-grid-mesh {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at 50% 0%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 40%, transparent 80%);
}

/* Frosted Glassmorphism Containers */
.glass-nav {
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--color-border-slate);
}

.glass-card {
  position: relative;
  background: var(--card-glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-border-slate);
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.glass-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.55), 0 0 24px -2px rgba(2, 132, 199, 0.2);
}

/* Interactive Spotlight Card (Linear-style mouse tracking highlight) */
.spotlight-card {
  position: relative;
  background: var(--color-surface-slate);
  border: 1px solid var(--color-border-slate);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, transform 0.3s ease;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  top: var(--mouse-y, -1000px);
  left: var(--mouse-x, -1000px);
  transform: translate(-50%, -50%);
  width: 440px;
  height: 440px;
  background: radial-gradient(circle closest-side, rgba(56, 189, 248, 0.16), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

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

.spotlight-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.5), 0 0 20px -3px rgba(2, 132, 199, 0.22);
  transform: translateY(-2px);
}

/* Active Navigation Link Highlight */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link.active {
  color: #38BDF8 !important;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #0284C7, #38BDF8);
  border-radius: 2px;
  box-shadow: 0 0 8px #38BDF8;
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34D399;
}

.status-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent-emerald);
  position: relative;
}

.status-dot-pulse::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 1.5px solid var(--color-accent-emerald);
  animation: pulse-ring 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(2.0); opacity: 0; }
  100% { transform: scale(2.0); opacity: 0; }
}

/* Gradient typography */
.text-gradient-sky {
  background: linear-gradient(135deg, #FFFFFF 30%, #38BDF8 80%, #0284C7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-silver {
  background: linear-gradient(180deg, #FFFFFF 0%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(180deg, #0284C7 0%, #0369A1 100%);
  border: 1px solid #38BDF8;
  color: #FFFFFF;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #0369A1 0%, #0284C7 100%);
  border-color: #7DD3FC;
  box-shadow: 0 0 18px rgba(2, 132, 199, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--color-border-slate);
  color: var(--color-text-secondary);
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary:hover {
  background: var(--color-surface-elevated);
  border-color: rgba(56, 189, 248, 0.5);
  color: #FFFFFF;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.15);
  transform: translateY(-1px);
}

/* Code badge / mono */
.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--color-border-slate);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #38BDF8;
}

/* --------------------------------------------------
 * Interactive Architecture Flowchart Components
 * -------------------------------------------------- */

.arch-node {
  position: relative;
  background: var(--color-surface-slate);
  border: 1px solid var(--color-border-slate);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}

.arch-node:hover, .arch-node.selected {
  border-color: #38BDF8;
  background: #151F36;
  box-shadow: 0 0 24px -2px rgba(56, 189, 248, 0.35);
  transform: translateY(-3px);
}

.arch-node.selected .node-indicator {
  background-color: #38BDF8;
  box-shadow: 0 0 10px #38BDF8;
}

/* Flowchart Connector Lines & Animated Data Pulses */
.connector-h-line {
  position: relative;
  height: 2px;
  background: #1E293B;
  overflow: hidden;
}

.connector-h-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #38BDF8, transparent);
  animation: flow-packet 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes flow-packet {
  0% { left: -50%; }
  100% { left: 150%; }
}

.connector-v-pulse {
  position: relative;
  width: 2px;
  background: #1E293B;
  overflow: hidden;
}

.connector-v-pulse::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(180deg, transparent, #10B981, transparent);
  animation: flow-packet-v 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes flow-packet-v {
  0% { top: -50%; }
  100% { top: 150%; }
}

/* Simulation Packet Highlight */
.packet-active {
  animation: pulse-ring 0.6s ease-out;
}
