:root {
  /* Refined Color Palette */
  --bg-base: #050508;
  --bg-surface: #0a0a0f;
  --bg-surface-light: #13131a;
  --bg-glass: rgba(19, 19, 26, 0.6);
  --border-color: #272732;
  --border-glow: rgba(107, 76, 222, 0.3);
  
  --text-main: #ffffff;
  --text-muted: #8b8b99;
  --text-dark: #4a4a5e;
  
  --accent-purple: #8165e8;
  --accent-purple-glow: rgba(129, 101, 232, 0.2);
  --accent-indigo: #4f46e5;
  
  --status-green: #22c55e;
  --status-green-dim: rgba(34, 197, 94, 0.15);
  
  --font-main: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --container-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Utilities & Animations --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient {
  background: linear-gradient(135deg, #c4b5fd, #8165e8, #4f46e5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 var(--accent-purple-glow); }
  70% { box-shadow: 0 0 0 15px rgba(129, 101, 232, 0); }
  100% { box-shadow: 0 0 0 0 rgba(129, 101, 232, 0); }
}

.animate-fade-up { animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-indigo));
  color: white;
  box-shadow: 0 4px 15px var(--accent-purple-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-purple-glow);
}

.btn-secondary {
  background-color: var(--bg-surface-light);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: #1a1a24;
  border-color: var(--text-muted);
}

/* --- Header --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(5, 5, 8, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo svg { color: var(--accent-purple); }

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text-main); }

.nav-actions { display: flex; gap: 12px; }
.nav-actions .btn { padding: 8px 18px; font-size: 0.85rem; }

/* --- Hero Section --- */
.hero {
  padding: 180px 0 120px;
  text-align: center;
  position: relative;
}

.hero-bg-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(circle, rgba(129, 101, 232, 0.15) 0%, rgba(5, 5, 8, 0) 70%);
  z-index: -1;
  border-radius: 50%;
  filter: blur(40px);
}

.hero h1 {
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 40px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* --- Advanced Dashboard Mockup --- */
.mockup-wrapper {
  margin-top: 80px;
  perspective: 1000px;
}

.dashboard-mockup {
  background: #0a0a0f;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.02);
  text-align: left;
  display: flex;
  height: 600px;
  animation: float 6s ease-in-out infinite;
  position: relative;
}

.dashboard-mockup::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(129, 101, 232, 0.5), transparent);
  z-index: 10;
}

/* Sidebar */
.mockup-sidebar {
  width: 240px;
  background: #050508;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

.sidebar-menu {
  padding: 16px 0;
  flex-grow: 1;
}

.menu-section {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dark);
  padding: 0 24px;
  margin-bottom: 8px;
  margin-top: 16px;
  font-weight: 600;
}

.menu-item {
  padding: 10px 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.menu-item.active {
  background: rgba(129, 101, 232, 0.1);
  color: var(--text-main);
  border-left: 2px solid var(--accent-purple);
}

.badge-live {
  background: rgba(129, 101, 232, 0.2);
  color: var(--accent-purple);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* Main Area */
.mockup-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #0a0a0f;
}

.mockup-topbar {
  height: 64px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 24px;
  justify-content: space-between;
}

.search-bar {
  background: #13131a;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 300px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.topbar-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.topbar-btn.primary {
  background: rgba(129, 101, 232, 0.15);
  border-color: rgba(129, 101, 232, 0.3);
  color: #c4b5fd;
}

.mockup-content {
  padding: 24px;
  flex-grow: 1;
  overflow: hidden;
}

/* Metrics Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: #13131a;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.3s;
}

.metric-card:hover { border-color: rgba(129, 101, 232, 0.5); }

.metric-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dark);
  margin-bottom: 12px;
  font-weight: 600;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
  color: var(--text-main);
}

.metric-unit { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.metric-sub { font-size: 0.8rem; color: var(--status-green); }

/* Table Area */
.table-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  background: #13131a;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--status-green);
  box-shadow: 0 0 10px var(--status-green);
}

.data-table {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #0a0a0f;
}

.tr-head {
  display: grid;
  grid-template-columns: 0.5fr 1.5fr 1.5fr 1.5fr 1.5fr 1fr 0.5fr;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.7rem;
  color: var(--text-dark);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.tr-body {
  display: grid;
  grid-template-columns: 0.5fr 1.5fr 1.5fr 1.5fr 1.5fr 1fr 0.5fr;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  align-items: center;
  font-family: var(--font-mono);
}
.tr-body:last-child { border-bottom: none; }
.tr-body:hover { background: rgba(255,255,255,0.01); }

.tag-green { background: var(--status-green-dim); color: var(--status-green); padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.tag-purple { background: rgba(129, 101, 232, 0.15); color: #c4b5fd; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; }
.tag-ok { background: var(--status-green-dim); color: var(--status-green); padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; }

/* --- Architecture Section --- */
.architecture {
  padding: 120px 0;
  position: relative;
}

.architecture::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-header h2 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Modern Pipeline Diagram */
.pipeline-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

/* Connecting Lines Behind */
.pipeline-track {
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border-color);
  z-index: 0;
  transform: translateY(-50%);
}

.pipeline-track::after {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 100px; height: 4px;
  background: var(--accent-purple);
  border-radius: 4px;
  box-shadow: 0 0 10px var(--accent-purple);
  animation: flowRight 3s linear infinite;
}

@keyframes flowRight {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.node-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 1;
}

.node {
  background: var(--bg-surface-light);
  border: 1px solid var(--border-color);
  padding: 16px 24px;
  border-radius: 10px;
  text-align: center;
  width: 200px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform 0.3s, border-color 0.3s;
}

.node:hover {
  transform: translateY(-5px);
  border-color: var(--text-muted);
}

.node-title { font-weight: 600; font-size: 0.95rem; color: var(--text-main); margin-bottom: 4px;}
.node-desc { font-size: 0.8rem; color: var(--text-muted); }

.node-gateway {
  width: 280px;
  background: rgba(19, 19, 26, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(129, 101, 232, 0.5);
  box-shadow: 0 0 30px rgba(129, 101, 232, 0.15), inset 0 0 20px rgba(129, 101, 232, 0.05);
  padding: 24px;
}

.node-gateway .node-title { color: #c4b5fd; font-size: 1.1rem; margin-bottom: 16px;}

.gateway-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.g-feat {
  background: rgba(0,0,0,0.3);
  border: 1px dashed rgba(255,255,255,0.1);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #d1d1d6;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Features Section --- */
.features { padding: 80px 0 120px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-surface-light);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(129, 101, 232, 0.06), transparent 40%);
  z-index: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover { border-color: rgba(129, 101, 232, 0.4); transform: translateY(-4px); }
.feature-card:hover::before { opacity: 1; }

.feature-content { position: relative; z-index: 1; }

.feature-icon {
  width: 50px; height: 50px;
  background: rgba(129, 101, 232, 0.1);
  color: #c4b5fd;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  border: 1px solid rgba(129, 101, 232, 0.2);
}

.feature-card h3 { font-size: 1.25rem; margin-bottom: 12px; font-weight: 600; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  text-align: center;
  background: #050508;
}

.footer-logo { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--text-main); font-weight: 600;}
.footer-text { color: var(--text-dark); font-size: 0.85rem; }

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .hero h1 { font-size: 3.5rem; }
  .pipeline-container { flex-direction: column; gap: 40px; }
  .pipeline-track { display: none; }
  .node-group { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .mockup-sidebar { display: none; } /* Hide sidebar on tablets */
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 140px 0 80px; }
  .hero h1 { font-size: 2.5rem; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .node-group { flex-direction: column; align-items: center; }
  .mockup-topbar { flex-direction: column; gap: 10px; height: auto; padding: 16px; }
  .search-bar { width: 100%; }
  .tr-head, .tr-body { font-size: 0.7rem; grid-template-columns: 1fr 2fr 2fr 1fr; }
  .tr-head > div:nth-child(n+5), .tr-body > div:nth-child(n+5) { display: none; } /* Hide some columns on mobile */
}