/* ==========================================================================
   FACIO AI LABS DESIGN SYSTEM
   ========================================================================== */

:root {
  --color-bg: #030712;
  --color-pane: rgba(17, 24, 39, 0.75);
  --color-border: rgba(255, 255, 255, 0.07);
  --color-text: #f3f4f6;
  --color-text-secondary: #9ca3af;
  --color-text-muted: #6b7280;

  /* Product-wise Colors */
  --color-primary: #06b6d4;      /* Org2Vec - Cyan */
  --color-secondary: #10b981;    /* Spine - Emerald */
  --color-tertiary: #a855f7;     /* Eigen - Purple */
  --color-accent: #f97316;       /* Locus - Orange */
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-code: 'Fira Code', monospace;
  
  --transition-speed: 0.3s;
  --border-radius: 12px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Grids & Atmospheric Lights */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  z-index: -2;
  pointer-events: none;
}

.grid-overlay::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 30%, var(--color-bg) 85%);
  pointer-events: none;
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: screen;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--color-primary);
  top: -100px;
  right: 10%;
  animation: floatOrb 25s infinite ease-in-out alternate;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--color-tertiary);
  bottom: -150px;
  left: 5%;
  animation: floatOrb 30s infinite ease-in-out alternate-reverse;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: var(--color-secondary);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.06;
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(50px) scale(1.1); }
  100% { transform: translateY(-30px) scale(0.9); }
}

/* Typography & Links */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p {
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-speed);
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 24px;
  padding-left: 24px;
}

.max-width-800 {
  max-width: 800px;
}

.max-width-600 {
  max-width: 600px;
}

.center-block {
  margin-right: auto;
  margin-left: auto;
}

.text-center {
  text-align: center;
}

.text-secondary {
  color: var(--color-text-secondary) !important;
}

.text-primary { color: var(--color-primary) !important; }
.text-secondary-theme { color: var(--color-secondary) !important; }
.text-tertiary { color: var(--color-tertiary) !important; }
.text-accent { color: var(--color-accent) !important; }

/* Grid Utilities */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2-col { grid-template-columns: repeat(2, 1fr); }
.grid-3-col { grid-template-columns: repeat(3, 1fr); }
.grid-4-col { grid-template-columns: repeat(4, 1fr); }

.align-center {
  align-items: center;
}

.gap-md { gap: 32px; }
.gap-lg { gap: 48px; }

/* Buttons & Interactive Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-text);
  color: var(--color-bg);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

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

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

.btn-tertiary {
  background-color: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.2);
}

.btn-tertiary:hover {
  background-color: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: 8px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 50px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  margin-bottom: 16px;
  color: var(--color-text-secondary);
}

.badge-primary {
  color: var(--color-primary);
  border-color: rgba(6, 182, 212, 0.2);
  background-color: rgba(6, 182, 212, 0.05);
}

.badge-secondary {
  color: var(--color-secondary);
  border-color: rgba(16, 185, 129, 0.2);
  background-color: rgba(16, 185, 129, 0.05);
}

.badge-tertiary {
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.2);
  background-color: rgba(168, 85, 247, 0.05);
}

.badge-accent {
  color: var(--color-accent);
  border-color: rgba(249, 115, 22, 0.2);
  background-color: rgba(249, 115, 22, 0.05);
}

.badge-orange {
  color: #fb923c;
  border-color: rgba(251, 146, 60, 0.2);
  background-color: rgba(251, 146, 60, 0.05);
}

/* Glassmorphism Panel */
.glass-panel {
  background-color: var(--color-pane);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 32px;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Header Styling */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  background-color: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  height: 80px;
  padding: 0 24px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-svg {
  width: 36px;
  height: 36px;
  color: var(--color-text);
  flex-shrink: 0;
}

.spinning-ring {
  transform-origin: center;
  animation: spin RingSpin 25s linear infinite;
}

@keyframes RingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.accent-text {
  color: var(--color-primary);
  font-weight: 400;
}

#nav-menu {
  display: flex;
  gap: 32px;
}

.nav-item {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  position: relative;
  padding: 8px 0;
}

.nav-item:hover, .nav-item.active {
  color: var(--color-text);
}

.nav-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transition: transform var(--transition-speed) ease;
  transform-origin: right;
}

.nav-item.active::after, .nav-item:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

#mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 18px;
  position: relative;
}

#mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  position: absolute;
  transition: all var(--transition-speed);
}

#mobile-toggle span:nth-child(1) { top: 0; }
#mobile-toggle span:nth-child(2) { top: 8px; }
#mobile-toggle span:nth-child(3) { top: 16px; }

#mobile-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#mobile-toggle.open span:nth-child(2) { opacity: 0; }
#mobile-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Main View & Page Routing */
#app-viewport {
  margin-top: 80px;
  padding-bottom: 80px;
}

.page-container {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.page-container.active {
  display: block;
  animation: pageFadeIn 0.5s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header {
  padding: 60px 0 40px;
}

.page-title {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
}

.section-divider {
  height: 1px;
  background: radial-gradient(circle, var(--color-border) 0%, transparent 80%);
  margin: 100px 0;
}

/* HOMEPAGE SPECIFIC */
/* Hero */
.hero-section {
  padding: 120px 0 80px;
  position: relative;
}

.hero-title {
  font-size: 4rem;
  line-height: 1.05;
  font-weight: 800;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtext {
  font-size: 1.35rem;
  max-width: 750px;
  margin: 0 auto 24px;
  font-weight: 400;
}

.hero-manifesto-highlight {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 650px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
}

.hero-micro-footer {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  display: inline-block;
  padding-top: 16px;
}

/* Thesis Section */
.section-title {
  font-size: 2.25rem;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  margin-bottom: 40px;
}

.thesis-grid {
  margin-top: 40px;
}

.thesis-narrative p {
  font-size: 1.15rem;
  margin-bottom: 24px;
}

.five-layers-card {
  padding: 32px;
}

.panel-header {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 12px;
  margin-bottom: 24px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.requisite-list {
  list-style: none;
}

.requisite-list li {
  margin-bottom: 20px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
  padding-bottom: 16px;
}

.requisite-list li:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.req-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.req-title .badge {
  margin-bottom: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  padding: 0;
}

.req-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  padding-left: 36px;
}

/* Core Positioning */
.bg-gradient-panel {
  background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.08), transparent 60%),
              radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.08), transparent 60%),
              rgba(17, 24, 39, 0.4);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 80px 0;
}

.section-lead-paragraph {
  font-size: 1.25rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.cybernetic-assertion {
  margin-top: 40px;
}

.assertion-box {
  display: inline-flex;
  flex-direction: column;
  padding: 20px 40px;
  border: 1px solid rgba(6, 182, 212, 0.15);
  background: rgba(6, 182, 212, 0.03);
  border-radius: 8px;
}

.assertion-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  margin-bottom: 8px;
  font-weight: 700;
}

.assertion-value {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
}

/* Stack cards */
.stack-card {
  padding: 32px;
  cursor: pointer;
}

.hover-grow {
  transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.hover-grow:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.stack-card-icon {
  margin-bottom: 20px;
}

.stack-card h3 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.stack-card-tagline {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 16px;
}

.stack-card p {
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.card-footer-tag {
  font-size: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Why Now Terminal */
.bullet-manifesto p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.thesis-emphasis {
  font-weight: 500;
  border-left: 2px solid var(--color-primary);
  padding-left: 16px;
  margin-top: 32px;
}

.manifesto-telemetry {
  padding: 0;
  overflow: hidden;
  height: 300px;
  display: flex;
  flex-direction: column;
}

.manifesto-telemetry .panel-header {
  padding: 16px 24px;
  margin-bottom: 0;
}

.terminal-body {
  flex-grow: 1;
  background-color: #020617;
  padding: 24px;
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: #a7f3d0;
  overflow-y: auto;
  line-height: 1.5;
}

.log-row {
  margin-bottom: 10px;
  white-space: pre-wrap;
}

.log-tag {
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
}

.tag-warning { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.tag-error { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.tag-primary { color: var(--color-primary); background: rgba(6, 182, 212, 0.1); }

.blink-text {
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Differentiation Section */
.bg-dark-pane {
  background-color: #050b18;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 80px 0;
}

.diff-grid {
  margin-top: 40px;
}

.diff-item {
  border-left: 1px solid var(--color-border);
  padding-left: 24px;
}

.diff-item h4 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--color-text);
}

.diff-item p {
  font-size: 0.9rem;
}

/* Research Section Preview */
.research-cards-preview {
  margin-top: 40px;
}

.research-preview-card {
  padding: 24px;
}

.research-card-meta {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.research-preview-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.research-preview-card p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.section-action-btn {
  margin-top: 40px;
}

/* Closing CTA Panel */
.main-cta-panel {
  background: radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.12), transparent 50%),
              rgba(17, 24, 39, 0.8);
  padding: 60px 40px;
}

.main-cta-panel .section-title {
  font-size: 2.75rem;
  margin-bottom: 16px;
}

.main-cta-panel .section-subtitle {
  max-width: 700px;
  margin: 0 auto 40px;
  font-size: 1.15rem;
}

.ctas-row {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* VISION PAGE SPECIFIC */
.vision-narrative-block p {
  font-size: 1.25rem;
  margin-bottom: 32px;
  line-height: 1.7;
}

.quote-card {
  padding: 40px;
  border-left: 3px solid var(--color-primary);
  margin: 48px 0;
}

.quote-card blockquote {
  font-size: 1.35rem;
  font-style: italic;
  font-family: var(--font-heading);
  line-height: 1.6;
}

.layers-listing {
  margin-top: 40px;
}

.layer-item-detailed {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 40px;
}

.layer-num {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.layer-content-detailed h3 {
  font-size: 1.65rem;
  margin-bottom: 8px;
}

.layer-content-detailed p {
  font-size: 1.05rem;
  margin-bottom: 0;
}

.vision-closing h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.vision-closing p {
  font-size: 1.15rem;
}

/* STACK PAGE SPECIFIC */
.stack-products-deep-dive {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin-top: 60px;
}

.stack-product-block {
  padding: 48px;
}

.stack-product-text h2 {
  font-size: 2.5rem;
  margin-bottom: 4px;
}

.stack-product-text h3 {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  font-weight: 400;
  margin-bottom: 20px;
}

.stack-product-text p {
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.tagline-emphasis {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  color: var(--color-text);
}

.stack-product-details h4 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.capability-list {
  list-style: none;
  margin-bottom: 32px;
}

.capability-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.capability-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-text-muted);
}

#deep-org2vec .capability-list li::before { background-color: var(--color-primary); }
#deep-spine .capability-list li::before { background-color: var(--color-secondary); }
#deep-eigen .capability-list li::before { background-color: var(--color-tertiary); }
#deep-locus .capability-list li::before { background-color: var(--color-accent); }

.stack-summary-footer {
  margin-top: 100px;
}

.stack-summary-footer h2 {
  font-size: 2.25rem;
  margin-bottom: 16px;
}

.stack-summary-footer p {
  font-size: 1.15rem;
}

/* PRODUCTS PAGE SPECIFIC */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 40px;
}

.products-grid .product-block {
  padding: 40px;
}

.products-grid .product-block h2 {
  font-size: 2.25rem;
  margin-bottom: 4px;
}

.product-tagline {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  display: block;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 16px;
}

.product-details-table {
  gap: 32px;
}

.p-details-col h5 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.p-details-col ul {
  list-style: none;
}

.p-details-col ul li {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--color-text-secondary);
  position: relative;
  padding-left: 16px;
}

.p-details-col ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-text-muted);
}

.p-details-col p {
  font-size: 0.95rem;
}

/* RESEARCH PAGE SPECIFIC */
.research-themes-grid {
  margin-top: 48px;
}

.theme-card {
  padding: 32px;
}

.theme-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.theme-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.grid-span-all {
  grid-column: 1 / -1;
}

.research-cta-panel {
  padding: 60px;
}

.research-cta-panel h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.research-cta-panel p {
  font-size: 1.15rem;
  margin-bottom: 32px;
}

/* DEMOS PAGE SPECIFIC & INTERACTIVE TERMINALS */
.demo-workspace-container {
  padding: 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 680px;
  overflow: hidden;
}

.demo-sidebar {
  border-right: 1px solid var(--color-border);
  background-color: rgba(3, 7, 18, 0.4);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  padding: 0 24px 16px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 16px;
}

.demo-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  transition: all var(--transition-speed);
  border-left: 3px solid transparent;
}

.demo-nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.demo-nav-btn.active {
  background-color: rgba(255, 255, 255, 0.04);
  border-left-color: var(--color-text);
}

.dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bg-primary { background-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-tertiary { background-color: var(--color-tertiary); }
.bg-accent { background-color: var(--color-accent); }

.demo-nav-btn .btn-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.demo-nav-btn.active .btn-text {
  color: var(--color-text);
}

.sidebar-footer {
  margin-top: auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.telemetry-bar {
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

/* Demo Stage */
.demo-stage {
  padding: 40px;
  background-color: rgba(17, 24, 39, 0.2);
  overflow-y: auto;
}

.demo-view {
  display: none;
}

.demo-view.active {
  display: block;
}

.demo-stage-header {
  margin-bottom: 32px;
}

.demo-stage-header h2 {
  font-size: 1.85rem;
  margin-bottom: 6px;
  margin-top: 8px;
}

.demo-stage-header p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.demo-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.demo-display-panel {
  display: flex;
  flex-direction: column;
  height: 400px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}

.demo-display-panel .panel-header {
  padding: 12px 16px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--color-border);
  background: rgba(2, 6, 23, 0.4);
}

/* Inputs & Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.form-input {
  background-color: rgba(2, 6, 23, 0.6);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--transition-speed);
}

.form-input:focus {
  border-color: var(--color-primary);
}

.text-area-console {
  font-family: var(--font-code);
  font-size: 0.8rem;
  background-color: rgba(2, 6, 23, 0.8);
  color: #a5f3fc;
  resize: none;
  line-height: 1.5;
}

.slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
  box-shadow: 0 0 8px var(--color-accent);
  transition: transform 0.1s;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Canvas Area */
.canvas-container {
  flex-grow: 1;
  position: relative;
  background-color: #020617;
  overflow: hidden;
}

.canvas-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  box-shadow: 0 0 8px var(--color-primary);
  opacity: 0;
  pointer-events: none;
}

.scan-line.animating {
  animation: scanning 2s linear infinite;
  opacity: 1;
}

@keyframes scanning {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.canvas-stats-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  padding: 12px;
  border-radius: 4px;
  font-family: var(--font-code);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.asset-legend {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-top: 4px;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.dot-asset { background-color: var(--color-secondary); }
.dot-high-risk { background-color: var(--color-accent); }

/* Ledger event cards */
.ledger-stream-container {
  flex-grow: 1;
  background-color: #020617;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ledger-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 14px 18px;
  animation: slideInEvent 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.ledger-card.pulse-new {
  border-color: var(--color-secondary);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

@keyframes slideInEvent {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ledger-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ledger-card-type {
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--color-secondary);
}

.ledger-card-time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.ledger-card-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-family: var(--font-code);
  margin-bottom: 6px;
}

.ledger-card-payload {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  background: rgba(0, 0, 0, 0.2);
  padding: 8px;
  border-radius: 4px;
  word-break: break-all;
}

/* Eigen status check widget */
.eigen-status-container {
  flex-grow: 1;
  background-color: #020617;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.eigen-header-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-code);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 12px;
}

.eigen-gates {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--color-border);
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.gate-status {
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 700;
}

.gate-success { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.02); color: var(--color-secondary); }
.gate-failed { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.02); color: #ef4444; }
.gate-running { border-color: rgba(6, 182, 212, 0.3); background: rgba(6, 182, 212, 0.02); color: var(--color-primary); }

.demo-cta-footer {
  margin-top: 48px;
}

/* CONTACT PAGE SPECIFIC */
.contact-layout {
  align-items: flex-start;
  margin-top: 40px;
}

.contact-form-panel {
  position: relative;
  overflow: hidden;
}

.panel-title-cyber {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--color-primary);
  margin-bottom: 24px;
}

/* Form inputs styling override for contact */
.contact-form-panel .form-group {
  margin-bottom: 20px;
}

.contact-form-panel .form-input {
  width: 100%;
}

.form-success-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #030712;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 10;
}

.form-success-overlay.active {
  display: flex;
  animation: fadeInOverlay 0.3s forwards;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.success-message-box svg {
  margin-bottom: 24px;
}

.success-message-box h2 {
  font-size: 2rem;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.success-message-box p {
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.contact-telemetry-side {
  display: flex;
  flex-direction: column;
}

.telemetry-console {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 380px;
  overflow: hidden;
}

.telemetry-console .panel-header {
  padding: 16px 24px;
  margin-bottom: 0;
}

.mb-md { margin-bottom: 24px; }

/* GLOBAL FOOTER */
#main-footer {
  border-top: 1px solid var(--color-border);
  background-color: #020612;
  padding: 80px 0 40px;
  margin-top: 120px;
  position: relative;
  z-index: 5;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand {
  max-width: 400px;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
}

.footer-links-group {
  display: flex;
  gap: 80px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col h5 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.footer-col a:hover {
  color: var(--color-text);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 32px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   PARTICLE CANVAS & FUTURISTIC QUANTUM SVGS
   ========================================================================== */

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
  background-color: transparent;
}

.inline-link {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-primary);
  transition: color var(--transition-speed), border-color var(--transition-speed);
}

.inline-link:hover {
  color: var(--color-text);
  border-bottom-style: solid;
  border-bottom-color: var(--color-text);
}

.spinning-ring-reverse {
  transform-origin: center;
  animation: spinCCW 15s linear infinite;
}

/* Layout Alignments */
.flex-title-with-icon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.stack-title-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.product-header-with-icon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 16px;
}

.product-header-with-icon .product-tagline {
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.product-header-icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

/* Quantum SVGs Styling */
.quantum-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Org2Vec Keyframes */
.svg-org2vec .node-pulse {
  animation: nodePulsing 2s infinite ease-in-out;
}
@keyframes nodePulsing {
  0%, 100% { r: 3.5; opacity: 0.8; }
  50% { r: 6; opacity: 1; filter: drop-shadow(0 0 5px var(--color-primary)); }
}

.svg-org2vec .vector-line {
  animation: strokePulse 3s infinite ease-in-out;
}
@keyframes strokePulse {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 8; }
}

.svg-org2vec .float-node-1 { animation: floatNode1 4s infinite ease-in-out; }
.svg-org2vec .float-node-2 { animation: floatNode2 5s infinite ease-in-out; }
.svg-org2vec .float-node-3 { animation: floatNode3 4.5s infinite ease-in-out; }
.svg-org2vec .float-node-4 { animation: floatNode4 6s infinite ease-in-out; }

@keyframes floatNode1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-3px, 2px); }
}
@keyframes floatNode2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(2px, -3px); }
}
@keyframes floatNode3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(3px, 3px); }
}
@keyframes floatNode4 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2px, -2px); }
}

/* Spine Keyframes */
.svg-spine .helix-strand-1 {
  stroke-dasharray: 18 4;
  animation: helixSlide1 6s linear infinite;
}
.svg-spine .helix-strand-2 {
  stroke-dasharray: 18 4;
  animation: helixSlide2 6s linear infinite;
}
@keyframes helixSlide1 {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 44; }
}
@keyframes helixSlide2 {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -44; }
}

.svg-spine .spine-block-1 { animation: blockPulse 3s infinite ease-in-out; }
.svg-spine .spine-block-2 { animation: blockPulse 3s infinite ease-in-out 1s; }
.svg-spine .spine-block-3 { animation: blockPulse 3s infinite ease-in-out 2s; }
@keyframes blockPulse {
  0%, 100% { stroke-opacity: 0.4; fill-opacity: 0.1; }
  50% { stroke-opacity: 1; fill-opacity: 0.35; }
}

/* Eigen Keyframes */
.svg-eigen .spinning-ring-1 {
  transform-origin: 50px 50px;
  animation: spinCW 20s linear infinite;
}
.svg-eigen .spinning-ring-2 {
  transform-origin: 50px 50px;
  animation: spinCCW 12s linear infinite;
}
.svg-eigen .spinning-rect {
  transform-origin: 50px 50px;
  animation: spinCW 30s linear infinite;
}
@keyframes spinCW {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes spinCCW {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

.svg-eigen .ripple-gate {
  animation: gateRipple 2.5s infinite ease-in-out;
}
@keyframes gateRipple {
  0% { r: 1.5; opacity: 0.5; }
  50% { r: 4; opacity: 1; }
  100% { r: 1.5; opacity: 0.5; }
}

/* Locus Keyframes */
.svg-locus .locus-ring-pulse-1 {
  animation: ellipticalPulse 3s infinite ease-in-out;
}
.svg-locus .locus-ring-pulse-2 {
  animation: ellipticalPulse 3s infinite ease-in-out 1.5s;
}
@keyframes ellipticalPulse {
  0%, 100% { rx: 14; ry: 7; opacity: 0.7; }
  50% { rx: 17; ry: 8.5; opacity: 1; }
}
.svg-locus .radar-line {
  transform-origin: 50px 45px;
  animation: spinCW 8s linear infinite;
}
.svg-locus .grid-center-pulse {
  animation: gridPulse 4s infinite ease-in-out;
}
@keyframes gridPulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.8; stroke-width: 1.2; }
}

/* Mathematical Text Glow Effects */
.math-text {
  animation: textGlitch 5s infinite ease-in-out;
}
.math-text-sub {
  animation: textGlitch 7s infinite ease-in-out 1s;
}
@keyframes textGlitch {
  0%, 94%, 100% { opacity: 0.5; }
  96% { opacity: 0.15; }
  98% { opacity: 0.85; }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1024px) {
  .grid-4-col {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .demo-workspace-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .demo-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    flex-direction: row;
    flex-wrap: wrap;
    padding: 16px;
    gap: 8px;
  }
  
  .sidebar-header {
    width: 100%;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 8px;
  }
  
  .demo-nav-btn {
    width: auto;
    padding: 8px 16px;
    border-left: none;
    border-radius: 4px;
    border: 1px solid var(--color-border);
  }
  
  .demo-nav-btn.active {
    border-left-color: transparent;
    background-color: rgba(255, 255, 255, 0.08);
  }
  
  .sidebar-footer {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Navigation */
  #nav-menu {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    z-index: 90;
  }
  
  #nav-menu.open {
    display: flex;
  }
  
  #mobile-toggle {
    display: block;
  }
  
  .btn-nav-cta {
    display: none;
  }

  /* Grid Layouts */
  .grid-2-col, .grid-3-col, .grid-4-col {
    grid-template-columns: 1fr;
  }
  
  .grid-span-all {
    grid-column: 1;
  }

  /* Typography */
  .hero-title {
    font-size: 2.75rem;
  }
  
  .hero-subtext {
    font-size: 1.15rem;
  }
  
  .page-title {
    font-size: 2.25rem;
  }
  
  /* Sections styling */
  .hero-section {
    padding: 60px 0 40px;
  }
  
  .section-divider {
    margin: 60px 0;
  }
  
  .quote-card {
    padding: 24px;
  }
  
  .quote-card blockquote {
    font-size: 1.15rem;
  }

  /* Components */
  .layer-item-detailed {
    flex-direction: column;
    gap: 16px;
    padding: 24px;
  }
  
  .layer-num {
    font-size: 2.25rem;
  }

  .stack-product-block {
    padding: 24px;
  }
  
  .stack-product-text h2 {
    font-size: 1.85rem;
  }
  
  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 32px;
  }
  
  .footer-links-group {
    flex-direction: column;
    gap: 32px;
  }
  
  .demo-stage {
    padding: 20px;
  }
  
  .demo-display-panel {
    height: 350px;
  }
}
