:root {
  --bg-color: #050608;
  --grid-color: rgba(255, 255, 255, 0.03);
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --accent-cyan: #00e5ff;
  --accent-cyan-hover: #00b8cc;
  --accent-cyan-glow: rgba(0, 229, 255, 0.3);
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --card-bg: rgba(10, 12, 16, 0.6);
  --card-border: rgba(255, 255, 255, 0.05);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

section {
  scroll-margin-top: 100px;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image: 
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  pointer-events: none;
  animation: gridMove 15s linear infinite;
  transform: translateZ(0); /* Hardware acceleration */
}

@keyframes gridMove {
  0% { transform: translate(0, 0) translateZ(0); }
  100% { transform: translate(-40px, 40px) translateZ(0); }
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--grid-color);
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(5, 6, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-text {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.logo-subtext {
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding-left: 1rem;
  border-left: 1px solid var(--card-border);
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--text-primary);
  transition: color 0.2s;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(1); box-shadow: 0 0 10px var(--accent-green); }
  50% { transform: scale(1.2); box-shadow: 0 0 20px var(--accent-green); }
  100% { transform: scale(1); box-shadow: 0 0 10px var(--accent-green); }
}

.btn-primary {
  background-color: var(--accent-cyan);
  color: #000;
  padding: 0.625rem 1.25rem;
  border: none;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.btn-primary:hover {
  background-color: var(--accent-cyan-hover);
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

/* Hero Section */
.hero-section {
  display: flex;
  padding: 8rem 0;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  flex: 1;
}

.overline {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  display: block;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  animation: heroReveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

@keyframes heroReveal {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-title .glow {
  color: var(--accent-cyan);
  text-shadow: 0 0 40px var(--accent-cyan-glow), 0 0 80px var(--accent-cyan-glow);
  animation: textGlowPulse 3s ease-in-out infinite alternate;
}

@keyframes textGlowPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(0, 229, 255, 0.4), 0 0 40px rgba(0, 229, 255, 0.2); }
  50% { text-shadow: 0 0 50px rgba(0, 229, 255, 0.8), 0 0 100px rgba(0, 229, 255, 0.5); }
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 3rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 4rem;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--card-border);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background-color: rgba(255,255,255,0.05);
}

.hero-stats {
  display: flex;
  gap: 3rem;
  border-top: 1px solid var(--card-border);
  padding-top: 2rem;
}

.stat-item h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.stat-item p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-item.iso h3 {
  color: var(--accent-green);
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* Card Styles */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
}

/* Monitor Card */
.monitor-card {
  flex: 0 0 400px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.monitor-card::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 20%;
  background: linear-gradient(to bottom, transparent, rgba(0, 229, 255, 0.05), transparent);
  animation: scanline 8s linear infinite;
  pointer-events: none;
}

@keyframes scanline {
  0% { top: -20%; }
  100% { top: 120%; }
}

.monitor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.monitor-header span:last-child {
  color: var(--text-primary);
}

.monitor-bars {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--card-border);
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bar-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-family: var(--font-mono);
}

.bar-info .value {
  font-weight: 700;
}

.bar-track {
  height: 4px;
  background-color: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background-color: var(--text-primary);
  transition: width 1s ease-in-out;
}

.event-log-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.log-item strong {
  color: var(--text-primary);
}

.monitor-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}

/* Architecture Section */
.architecture-section {
  padding: 8rem 0;
  border-top: 1px solid var(--card-border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6rem;
}

.section-title h2 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-title h2 span {
  color: var(--text-secondary);
}

.section-description {
  max-width: 400px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

.architecture-diagram {
  position: relative;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.arch-node {
  position: absolute;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
  width: 260px;
  z-index: 10;
}

.arch-node.core {
  width: 300px;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 30px var(--accent-cyan-glow);
  position: relative;
  z-index: 20;
}

.arch-node-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.arch-node-header svg {
  width: 16px;
  height: 16px;
  color: var(--text-primary);
}

.arch-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.arch-stat-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}

.arch-stat-row .value {
  color: var(--text-primary);
  font-weight: 700;
}

.arch-progress {
  height: 2px;
  background-color: var(--text-secondary);
  margin-top: 0.75rem;
}

.arch-progress.green { background-color: var(--accent-green); }
.arch-progress.orange { background-color: var(--accent-orange); }

.core-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

/* Positioning Nodes */
.node-redis { top: 10%; left: 10%; }
.node-mqtt { top: 10%; right: 10%; }
.node-api { bottom: 10%; left: 10%; }
.node-s3 { bottom: 0%; left: 50%; transform: translateX(-50%); }
.node-app { bottom: 10%; right: 10%; }

/* Diagram Lines SVG container */
.diagram-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.diagram-lines line, .diagram-lines path {
  stroke: var(--card-border);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.diagram-lines .active-line {
  stroke: var(--accent-cyan);
  opacity: 0.5;
  stroke-dasharray: 8 8;
  animation: dashMove 1s linear infinite;
}

@keyframes dashMove {
  to { stroke-dashoffset: -16; }
}

.diagram-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Solutions Matrix Section */
.solutions-section {
  padding: 8rem 0;
  border-top: 1px solid var(--card-border);
}

.solutions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background-color: var(--card-border);
  border: 1px solid var(--card-border);
}

.solution-card {
  background-color: var(--card-bg);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.solution-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 255, 0.1) inset;
  z-index: 1;
}

.solution-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.solution-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.solution-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.solution-tag {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--text-secondary);
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.solution-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.solution-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.solution-widget {
  background-color: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
  margin-bottom: 2rem;
  flex: 1;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

/* Table styles for Aviation widget */
.flight-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.flight-table tr {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.flight-table tr:last-child {
  border-bottom: none;
}

.flight-table td {
  padding: 0.75rem 0;
  color: var(--text-secondary);
}

.flight-table td:first-child {
  color: var(--text-primary);
  font-weight: 700;
}

.flight-table td.status {
  text-align: right;
}

.status-badge {
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--text-secondary);
  border-radius: 2px;
  font-size: 0.625rem;
  animation: badgePulse 2.5s infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 8px rgba(255, 255, 255, 0.4); }
}

/* Fintech Widget */
.meter-container {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.circular-meter {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.25rem;
}

.circular-meter::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  border: 4px solid var(--card-border);
  border-top-color: var(--accent-orange);
  border-right-color: var(--accent-orange);
  animation: spinMeter 3s linear infinite;
}

@keyframes spinMeter {
  to { transform: rotate(360deg); }
}

.meter-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.meter-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}

.meter-row .val {
  color: var(--text-primary);
  font-weight: 700;
}

/* Trading Widget */
.chart-container {
  height: 60px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-end;
  position: relative;
}

.chart-line {
  width: 100%;
  height: 100%;
  animation: revealChart 4s ease-in-out infinite alternate;
}

@keyframes revealChart {
  0%, 10% { clip-path: polygon(0 0, 0% 0, 0% 100%, 0 100%); }
  50%, 100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}

.chart-stats {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--font-mono);
}

.stat-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.625rem;
  color: var(--text-secondary);
}

.stat-val {
  font-size: 0.875rem;
  font-weight: 700;
}

.bull-badge {
  background-color: var(--text-primary);
  color: #000;
  padding: 0.25rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Industrial Widget */
.industrial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background-color: var(--card-border);
  border: 1px solid var(--card-border);
}

.ind-box {
  background-color: var(--card-bg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}


.ind-label {
  font-size: 0.625rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.ind-val {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
}

.solution-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.view-link {
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.view-link:hover {
  text-decoration: underline;
}

/* Utilities */
.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px var(--accent-green); }
  50% { opacity: 0.8; transform: scale(1.2); box-shadow: 0 0 16px var(--accent-green); }
  100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px var(--accent-green); }
}

/* Drawer */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  max-width: 100vw;
  height: 100vh;
  background-color: var(--card-bg);
  border-left: 1px solid var(--grid-color);
  z-index: 1000;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
}
.drawer-panel.open {
  right: 0;
}

.drawer-header {
  padding: 2rem;
  border-bottom: 1px solid var(--grid-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}
.drawer-close:hover {
  color: var(--text-primary);
}

.drawer-content {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.feature-list {
  list-style: none;
}
.feature-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
}
.feature-list li:last-child {
  border-bottom: none;
}
