/**
 * Dark Cyber-Minimal — Deep-8bit-Neo-Dubstep Edition
 * 
 * Core concepts visualized:
 * - Z₃³: 27-node cognitive network
 * - Φ (Phi): Golden attractor at (1,0,1)
 * - Γ (Gamma): Geometry/topology
 * - O₂: Transcendent observer singularity
 * - Networks, flows, alignment
 * 
 * Color Palette:
 * - Void: #050508
 * - Surface: #0A0A0F
 * - Elevated: #111118
 * - Amber/Neon: #C9A227 (Φ-attractor)
 * - Matrix Green: #00C853 (data flows)
 * - Cyan: #00BCD4 (network edges)
 * - Purple: #9C27B0 (O₂ singularity)
 * - Text: #E8E6E1
 */

:root {
  /* Core Void */
  --void: #050508;
  --surface: #0A0A0F;
  --elevated: #111118;
  --higher: #181820;
  
  /* Neon Accents */
  --phi-amber: #C9A227;
  --phi-glow: rgba(201, 162, 39, 0.5);
  --matrix-green: #00C853;
  --matrix-dim: rgba(0, 200, 83, 0.3);
  --network-cyan: #00BCD4;
  --network-dim: rgba(0, 188, 212, 0.2);
  --o2-purple: #9C27B0;
  --o2-glow: rgba(156, 39, 176, 0.4);
  
  /* Data Grays - улучшена читаемость */
  --text-primary: #E8E6E1;
  --text-secondary: #A8A6A1;  /* было #8A8885 */
  --text-muted: #8A8895;      /* было #6B6B75 */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-active: rgba(201, 162, 39, 0.3);
  
  /* Typography */
  --font-mono: 'Space Grotesk', 'SF Mono', 'Consolas', monospace;
  --tracking-tech: 0.08em;
}

/* ============================================
   COMPLETE CSS RESET FOR ALL COMPONENTS
   ============================================ */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--void) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-mono) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Force override any other backgrounds */
body {
  background-color: var(--void) !important;
  background-image: none !important;
}

/* ============================================
   BACKGROUND CANVAS (Network Topology)
   ============================================ */

.starfield,
#starfield {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -1 !important;
  pointer-events: none !important;
  background: transparent !important;
}

/* Remove all gradients from cosmic.css */
.hero-cosmic,
section,
.container,
main {
  background-image: none !important;
}

/* ============================================
   NAVIGATION — CLEAN & MINIMAL
   ============================================ */

.main-nav {
  background: rgba(5, 5, 8, 0.95) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  backdrop-filter: blur(20px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 60px;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo .phi {
  font-size: 1.5rem;
  color: var(--phi-amber);
  text-shadow: 0 0 20px var(--phi-glow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--tracking-tech);
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

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

.nav-link:hover,
.nav-link.active {
  color: #00E5FF;
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.7);
}

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

.lang-switcher {
  flex-shrink: 0;
  margin-left: 1rem;
}

.lang-switcher a {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-block;
}

.lang-switcher a:hover {
  color: var(--phi-amber);
  border-color: var(--border-active);
  background: rgba(201, 162, 39, 0.05);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

main#main-content {
  padding-top: 60px;
}

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

/* ============================================
   HERO SECTION
   ============================================ */

.hero-cosmic {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-content {
    max-width: 100%;
    margin: 0 auto;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .hero-ctas {
    justify-content: center;
  }
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-active);
  color: var(--phi-amber);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.title-line {
  display: block;
}

.title-line.highlight {
  color: var(--phi-amber);
  text-shadow: 0 0 40px var(--phi-glow);
}

.title-line.formula {
  font-size: 0.5em;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.07em;
  margin-top: 0.5rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   HERO STATS — CLEAN NUMBERS
   ============================================ */

.hero-stats,
.hero-content .hero-stats,
div.hero-stats {
  display: flex !important;
  gap: 2.5rem !important;
  margin-bottom: 2.5rem !important;
  flex-wrap: wrap !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

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

/* AGGRESSIVE OVERRIDE for ghost boxes */
.stat-item,
.hero-stats .stat-item,
.hero-content .stat-item,
div.stat-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.25rem !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: static !important;
  padding: 0 !important;
  margin: 0 !important;
}

.stat-number,
.stat-item .stat-number,
.hero-stats .stat-number,
.hero-content .stat-number,
span.stat-number {
  font-size: 2.5rem !important;
  font-weight: 600 !important;
  color: #C9A227 !important;
  line-height: 1 !important;
  text-shadow: 0 0 30px rgba(201, 162, 39, 0.5) !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: #C9A227 !important;
  background-clip: initial !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
}

.stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================
   BUTTONS
   ============================================ */

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-verifications {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.verify-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted, rgba(224, 224, 255, 0.6));
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--phi-amber);
  color: var(--void);
  box-shadow: 0 4px 20px rgba(201, 162, 39, 0.3);
}

.btn-primary:hover {
  background: #D4AA2F;
  box-shadow: 0 4px 20px rgba(201, 162, 39, 0.3);
  /* Subtle hover - no transform */
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--phi-amber);
  color: var(--text-primary);
  background: rgba(201, 162, 39, 0.08);
  /* Subtle hover - no transform */
}

/* ============================================
   HERO VISUAL — CUBE
   ============================================ */

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.c4-cube-container {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: relative;
  width: 480px;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#c4-cube-canvas {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
}

#c4-cube-canvas {
  width: 100%;
  height: 100%;
}

.cube-labels {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.cube-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cube-label::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--phi-amber);
  flex-shrink: 0;
}

.cube-label:nth-child(2)::before {
  background: var(--network-cyan);
}

.cube-label:nth-child(3)::before {
  background: var(--o2-purple);
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.scroll-indicator:hover {
  color: var(--phi-amber);
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ============================================
   APPLICATIONS SECTION
   ============================================ */

.applications-section {
  padding: 6rem 0;
}

.section-title {
  margin-bottom: 3rem;
}

.section-title .title-eyebrow {
  display: block;
  color: var(--phi-amber);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.applications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.app-card:hover {
  border-color: var(--border-active);
  background: var(--elevated);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  /* Subtle hover - no transform */
}

.app-icon {
  width: 48px;
  height: 48px;
  background: var(--elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--phi-amber);
}

.app-icon svg {
  width: 24px;
  height: 24px;
}

.app-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.app-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.app-description strong {
  color: var(--phi-amber);
  font-weight: 500;
}

.app-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
}

.app-features li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.app-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--phi-amber);
}

.app-link {
  color: var(--phi-amber);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.app-link:hover {
  opacity: 0.8;
}

/* ============================================
   NAVIGATOR SECTION
   ============================================ */

.navigator-section {
  padding: 6rem 0;
  position: relative;
}

.navigator-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.state-display {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.state-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.state-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.state-coordinates {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--phi-amber);
}

.state-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.state-description strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.5rem;
}

.state-metrics {
  display: flex;
  gap: 1.5rem;
  padding: 1rem;
  background: var(--elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

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

.metric-label {
  font-size: 0.625rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.metric-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   FOOTER
   ============================================ */

.main-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand .phi {
  font-size: 2rem;
  color: var(--phi-amber);
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 3rem;
  justify-content: flex-end;
}

.footer-column h4 {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: 0.5rem;
}

.footer-column a {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--phi-amber);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
}

/* ============================================
   AUDIENCE SELECTOR
   ============================================ */

.audience-selector {
  display: flex;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.25rem;
  margin-bottom: 2rem;
  width: fit-content;
}

.audience-tab {
  padding: 0.625rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.audience-tab:hover {
  background: var(--elevated);
  color: var(--text-primary);
}

.audience-tab.active {
  background: var(--phi-amber);
  color: var(--void);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-content {
    max-width: 100%;
    order: 1;
  }
  
  .hero-visual {
    order: 0;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .hero-ctas {
    justify-content: center;
  }
  
  .c4-cube-container {
    width: 320px;
    height: 340px;
  }
  
  .navigator-container {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--void);
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .hero-cosmic {
    min-height: auto;
    padding: 3rem 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-stats {
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
    background: transparent !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: var(--phi-amber) !important;
    filter: none !important;
  }
  
  .c4-cube-container {
    width: 280px;
    height: 300px;
  }
  
  .applications-grid {
    grid-template-columns: 1fr;
  }
  
  .audience-selector {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-amber { color: var(--phi-amber); }
.text-cyan { color: var(--network-cyan); }
.text-purple { color: var(--o2-purple); }
.text-muted { color: var(--text-muted); }

.hidden {
  display: none !important;
}

/* ============================================
   ULTRA-AGGRESSIVE RESET FOR GHOST BOXES
   ============================================ */

/* Kill ALL backgrounds and effects on stat elements */
.hero-stats *,
.stat-item *,
.stat-number,
.stat-label {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
  text-shadow: none !important;
  -webkit-text-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Preserve only our intended text shadow on numbers */
.stat-number {
  text-shadow: 0 0 30px rgba(201, 162, 39, 0.5) !important;
  color: #C9A227 !important;
  -webkit-text-fill-color: #C9A227 !important;
}

/* Kill pseudo-elements that might create boxes */
.stat-item::before,
.stat-item::after,
.stat-number::before,
.stat-number::after,
.hero-stats::before,
.hero-stats::after {
  display: none !important;
  content: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}


/* ============================================
   UCOS PAGE FIXES
   ============================================ */

.ucos-hero {
  padding-top: calc(64px + 4rem) !important;
  padding-bottom: 4rem;
  text-align: center;
}

.ucos-hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.ucos-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid var(--border-active);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: var(--phi-amber);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.ucos-hero .hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 0;
  color: var(--text-primary);
}

.ucos-hero .hero-title .subtitle {
  display: block;
  font-size: 0.5em;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

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

.ucos-hero .hero-description strong {
  color: var(--text-primary);
}

.layer-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.layer-mini {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.3s ease;
}

.layer-mini:hover {
  border-color: var(--border-active);
  /* Subtle hover - no transform */
}

.layer-mini .layer-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--phi-amber);
  letter-spacing: 0.1em;
}

.layer-mini .layer-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.layer-mini .layer-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.layer-arrow {
  color: var(--phi-amber);
  font-size: 1.25rem;
}

/* ============================================
   SUBPAGE UNIFICATION
   ============================================ */

/* Common hero styles for all subpages */
.page-hero {
  padding-top: calc(64px + 4rem) !important;
  padding-bottom: 4rem;
  text-align: center;
}

.page-hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.page-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid var(--border-active);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: var(--phi-amber);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.page-hero .subtitle {
  display: block;
  font-size: 0.5em;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.page-hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0;
  line-height: 1.6;
}

.page-hero p strong {
  color: var(--text-primary);
}


/* ============================================
   EINSTEIN PAGE FIXES
   ============================================ */

.implications-section {
  padding: 4rem 0 !important;
  background: var(--surface) !important;
}

.implications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.implication-card {
  background: var(--elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
}

.implication-card h4 {
  color: var(--phi-amber);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.implication-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

/* ============================================
   ECOSYSTEM PAGE FIXES
   ============================================ */

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Eco Cards - Three Pillars */
.eco-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.3s ease;
}

.eco-card:hover {
  border-color: var(--border-active);
  background: var(--elevated);
}

.eco-card.theory {
  border-left: 3px solid #C9A227;
}

.eco-card.impl {
  border-left: 3px solid #00BCD4;
}

.eco-card.validation {
  border-left: 3px solid #9C27B0;
}

.eco-card .card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.eco-card .card-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--elevated);
  border-radius: 8px;
}

.eco-card .card-title-group {
  flex: 1;
}

.eco-card .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.eco-card .card-type {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.eco-card .card-status {
  font-size: 0.7rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  background: rgba(201, 162, 39, 0.15);
  color: #C9A227;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.eco-card .card-status.dev {
  background: rgba(0, 188, 212, 0.15);
  color: #00BCD4;
}

.eco-card .card-status.planned {
  background: rgba(156, 39, 176, 0.15);
  color: #9C27B0;
}

.eco-card .card-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.eco-card .card-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.eco-card .card-features li {
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding-left: 1.25rem;
  position: relative;
}

.eco-card .card-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--phi-amber);
}

.eco-card .card-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.eco-card .card-link {
  color: var(--phi-amber);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.eco-card .card-link:hover {
  opacity: 0.8;
}

.repo-card-large {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.repo-card-large:hover {
  border-color: var(--border-active);
  /* Subtle hover - no transform */
}

/* ============================================
   FUNCTORS PAGE FIXES
   ============================================ */

.state-functors-section {
  padding: 4rem 0 !important;
}

.state-functors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

/* ============================================
   UCOS PAGE ADDITIONAL FIXES
   ============================================ */

.architecture-viz,
.kernels-section,
.integration-section {
  padding: 4rem 0 !important;
}

.layers-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 3rem;
}

.layer-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
}

/* ============================================
   GLOBAL SECTION FIXES
   ============================================ */

section {
  padding: 4rem 0;
}

section .container {
  width: 100%;
}

/* Ensure all sections have proper spacing */
main section:first-of-type {
  padding-top: calc(64px + 3rem);
}


/* ============================================
   OUT OF THE BOX POLISH - ALL HEROES
   ============================================ */

/* Universal hero styles for ALL subpages */
.composer-hero,
.ecosystem-hero,
.einstein-hero,
.fra-hero,
.functors-hero,
.iso-hero,
.oaxis-hero,
.safety-hero,
.therapy-hero,
.ucos-hero {
  padding-top: calc(64px + 4rem) !important;
  padding-bottom: 4rem;
  text-align: center;
}

.composer-hero .container,
.ecosystem-hero .container,
.einstein-hero .container,
.fra-hero .container,
.functors-hero .container,
.iso-hero .container,
.oaxis-hero .container,
.safety-hero .container,
.therapy-hero .container,
.ucos-hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Hero badges */
.composer-hero .hero-badge,
.ecosystem-hero .hero-badge,
.einstein-hero .hero-badge,
.fra-hero .hero-badge,
.functors-hero .hero-badge,
.iso-hero .hero-badge,
.oaxis-hero .hero-badge,
.safety-hero .hero-badge,
.therapy-hero .hero-badge,
.ucos-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid var(--border-active);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: var(--phi-amber);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Hero titles */
.composer-hero .hero-title,
.ecosystem-hero .hero-title,
.einstein-hero .hero-title,
.fra-hero .hero-title,
.functors-hero .hero-title,
.iso-hero .hero-title,
.oaxis-hero .hero-title,
.safety-hero .hero-title,
.therapy-hero .hero-title,
.ucos-hero .hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.composer-hero .hero-title .subtitle,
.ecosystem-hero .hero-title .subtitle,
.einstein-hero .hero-title .subtitle,
.fra-hero .hero-title .subtitle,
.functors-hero .hero-title .subtitle,
.iso-hero .hero-title .subtitle,
.oaxis-hero .hero-title .subtitle,
.safety-hero .hero-title .subtitle,
.therapy-hero .hero-title .subtitle,
.ucos-hero .hero-title .subtitle {
  display: block;
  font-size: 0.5em;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Hero descriptions */
.composer-hero .hero-description,
.ecosystem-hero .hero-description,
.einstein-hero .hero-description,
.fra-hero .hero-description,
.functors-hero .hero-description,
.iso-hero .hero-description,
.oaxis-hero .hero-description,
.safety-hero .hero-description,
.therapy-hero .hero-description,
.ucos-hero .hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0;
  line-height: 1.6;
}

.composer-hero .hero-description strong,
.ecosystem-hero .hero-description strong,
.einstein-hero .hero-description strong,
.fra-hero .hero-description strong,
.functors-hero .hero-description strong,
.iso-hero .hero-description strong,
.oaxis-hero .hero-description strong,
.safety-hero .hero-description strong,
.therapy-hero .hero-description strong,
.ucos-hero .hero-description strong {
  color: var(--text-primary);
}

/* Hero subtitles */
.ecosystem-hero .hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0;
}

/* ============================================
   FIX FOR UCOS LAYER PREVIEW
   ============================================ */

.ucos-hero .layer-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  flex-wrap: nowrap;
}

.ucos-hero .layer-arrow {
  color: var(--phi-amber);
  font-size: 1.25rem;
  opacity: 0.6;
}

@media (max-width: 900px) {
  .ucos-hero .layer-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .ucos-hero .layer-arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .ucos-hero .layer-preview {
    grid-template-columns: 1fr;
  }
}

.ucos-hero .layer-mini {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.3s ease;
}

.ucos-hero .layer-mini:hover {
  border-color: var(--border-active);
  /* Subtle hover - no transform */
}

.ucos-hero .layer-mini .layer-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--phi-amber);
  letter-spacing: 0.1em;
}

.ucos-hero .layer-mini .layer-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.ucos-hero .layer-mini .layer-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ucos-hero .layer-arrow {
  color: var(--phi-amber);
  font-size: 1.25rem;
}

/* ============================================
   NAVIGATOR PATH DISPLAY
   ============================================ */

.path-display {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
}

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

.path-header {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--phi-amber);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.path-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.path-step {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border-radius: 6px;
  border-left: 2px solid var(--phi-amber);
}

.path-step strong {
  color: var(--phi-amber);
}

/* ============================================
   CDI DIAGRAM FIXES
   ============================================ */

.cdi-diagram {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 3rem auto 0;
}

.cdi-step {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  width: 150px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-number {
  width: 36px;
  height: 36px;
  background: var(--phi-amber);
  color: var(--void);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.cdi-step[data-step="5"] {
  border-color: #9C27B0;
  background: rgba(156, 39, 176, 0.1);
}

.cdi-step[data-step="5"] .step-number {
  background: #9C27B0;
  color: white;
}

.cdi-step .step-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.cdi-step h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.cdi-step p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.cdi-arrow {
  font-size: 1.5rem;
  color: var(--phi-amber);
  opacity: 0.6;
  display: flex;
  align-items: center;
  align-self: center;
}

@media (max-width: 1100px) {
  .cdi-diagram {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  
  .cdi-step {
    width: 100%;
  }
  
  .cdi-arrow {
    display: none;
  }
}

@media (max-width: 768px) {
  .cdi-diagram {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   BERT-C4 CLASSIFIER SECTION
   ============================================ */

.bert-section {
  padding: 4rem 0;
  background: linear-gradient(180deg, var(--void) 0%, rgba(201, 162, 39, 0.03) 50%, var(--void) 100%);
}

.bert-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.bert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--phi-amber), transparent);
}

.bert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.badge-icon {
  font-size: 1.25rem;
}

.badge-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #FFD700;
  letter-spacing: 0.05em;
}

.bert-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.bert-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.bert-accuracy {
  color: var(--phi-amber);
  font-weight: 600;
}

.bert-model {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.model-name {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--phi-amber);
  background: var(--elevated);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

@media (max-width: 640px) {
  .bert-card {
    padding: 1.5rem;
  }
  
  .bert-title {
    font-size: 1.5rem;
  }
}

.bert-demo {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--elevated);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.demo-input {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.demo-input textarea {
  width: 100%;
  padding: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  resize: vertical;
  min-height: 60px;
}

.demo-input textarea:focus {
  outline: none;
  border-color: var(--phi-amber);
}

.demo-result {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 8px;
  border-left: 3px solid var(--phi-amber);
  text-align: left;
  animation: fadeIn 0.3s ease;
}

.result-state {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--phi-amber);
  margin-bottom: 0.25rem;
}

.result-desc {
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.result-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.result-confidence {
  color: var(--matrix-green);
}

.result-source {
  font-style: italic;
}

/* ============================================
   AGENTS OF ORDER VISUALIZATION
   ============================================ */

.aor-section {
  padding: 5rem 0;
  background: linear-gradient(180deg, var(--void) 0%, rgba(156, 39, 176, 0.03) 50%, var(--void) 100%);
}

.aor-viz {
  max-width: 900px;
  margin: 2rem auto;
  text-align: center;
}

#aor-canvas {
  width: 100%;
  max-width: 800px;
  height: auto;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.aor-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

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

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.normal { background: #00BCD4; }
.legend-dot.chaos { background: #FF5722; animation: pulse-dot 2s infinite; }
.legend-dot.firewall { background: #C9A227; box-shadow: 0 0 10px var(--phi-amber); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.aor-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

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

.aor-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--phi-amber);
  font-family: var(--font-mono);
}

.aor-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   UCOS AXIS LABELS FIX
   ============================================ */

.layer-axes {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  margin: 1.5rem 0;
}

.axis-def {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.axis-def .axis-label {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--phi-amber);
  color: var(--void);
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 8px;
  order: 1;
}

.axis-def .axis-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  order: 2;
  margin-top: 0.25rem;
}

.axis-def .axis-values {
  font-size: 0.8125rem;
  color: var(--text-muted);
  order: 3;
}

/* ============================================
   O-AXIS AWARENESS RINGS FIX
   ============================================ */

.level-detailed .awareness-ring {
  --radius: 80px;
}

.level-detailed[data-level="0"] .awareness-ring { --radius: 60px; }
.level-detailed[data-level="1"] .awareness-ring { --radius: 80px; }
.level-detailed[data-level="2"] .awareness-ring { --radius: 100px; }

@media (max-width: 768px) {
  .level-detailed .awareness-ring {
    --radius: 50px;
  }
}
