/* ============================================================================
   AXIOM AI 1.0 — "The Singularity" Main Layout
   Container · Header · Stage · Footer · Grid
   ============================================================================ */

/* ============================================================================
   SINGULARITY CONTAINER
   Full viewport, flex column, the universe that holds everything
   ============================================================================ */
.singularity-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-deep-space);
}

/* ============================================================================
   GRID OVERLAY
   Subtle coordinate lines — the fabric of digital space-time
   ============================================================================ */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-grid);
  pointer-events: none;
  opacity: 0.03;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      rgba(0, 212, 255, 0.4) 59px,
      rgba(0, 212, 255, 0.4) 60px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 59px,
      rgba(0, 212, 255, 0.4) 59px,
      rgba(0, 212, 255, 0.4) 60px
    );
  animation: grid-pulse 8s ease-in-out infinite;
}

.grid-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 50% 50%,
      transparent 30%,
      var(--bg-deep-space) 80%
    );
  pointer-events: none;
}

/* ============================================================================
   HEADER
   Fixed top navigation — glass panel floating in the void
   ============================================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-xl);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid rgba(var(--accent-primary-rgb), 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  transition: all var(--transition-base);
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(var(--accent-primary-rgb), 0.3) 50%,
    transparent 100%
  );
}

/* --- Logo ---------------------------------------------------------------- */
.header .logo {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-base);
  user-select: none;
}

.header .logo:hover {
  color: var(--accent-primary);
  text-shadow:
    0 0 10px rgba(var(--accent-primary-rgb), 0.5),
    0 0 30px rgba(var(--accent-primary-rgb), 0.2),
    0 0 50px rgba(var(--accent-primary-rgb), 0.1);
}

.header .logo::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  border-radius: var(--radius-pill);
  transition: width var(--transition-base);
  box-shadow: 0 0 8px rgba(var(--accent-primary-rgb), 0.4);
}

.header .logo:hover::before {
  width: 100%;
}

.header .logo-version {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-left: var(--space-sm);
  vertical-align: super;
}

/* --- Mode Selector ------------------------------------------------------- */
.header .mode-selector {
  display: flex;
  align-items: center;
  background: rgba(var(--accent-primary-rgb), 0.06);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.15);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
  position: relative;
}

.header .mode-selector__option {
  position: relative;
  z-index: 2;
  padding: 6px 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  background: none;
  white-space: nowrap;
}

.header .mode-selector__option:hover {
  color: var(--text-secondary);
}

.header .mode-selector__option.active {
  color: var(--bg-deep-space);
  font-weight: 600;
}

.header .mode-selector__indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: var(--radius-pill);
  background: var(--accent-primary);
  box-shadow:
    0 0 12px rgba(var(--accent-primary-rgb), 0.4),
    0 0 24px rgba(var(--accent-primary-rgb), 0.15);
  transition: all 0.35s var(--ease-spring);
  z-index: 1;
}

/* Position states controlled via JS or data attributes */
.header .mode-selector[data-mode="expert"] .mode-selector__indicator {
  left: 3px;
  width: calc(50% - 4px);
}

.header .mode-selector[data-mode="research"] .mode-selector__indicator {
  left: calc(50% + 1px);
  width: calc(50% - 4px);
}

/* ============================================================================
   MAIN STAGE
   The central arena — where the portal lives
   ============================================================================ */
.main-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: 72px;   /* header clearance */
  padding-bottom: 64px; /* footer clearance */
  width: 100%;
}

/* --- Neural Canvas (background layer) ------------------------------------ */
.neural-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-canvas);
  pointer-events: none;
  overflow: hidden;
}

.neural-canvas__node {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: var(--radius-circle);
  background: rgba(var(--accent-primary-rgb), 0.8);
  box-shadow: 0 0 8px rgba(var(--accent-primary-rgb), 0.5);
}

.neural-canvas__node.active {
  animation: node-activate 2s ease-in-out infinite;
}

.neural-canvas__connection {
  position: absolute;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--accent-primary-rgb), 0.08),
    transparent
  );
  transform-origin: left center;
}

/* Ambient radial glow behind the portal */
.neural-canvas::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: var(--radius-circle);
  background: radial-gradient(
    circle,
    rgba(var(--accent-primary-rgb), 0.06) 0%,
    rgba(var(--accent-primary-rgb), 0.02) 30%,
    transparent 70%
  );
  animation: breathe 6s ease-in-out infinite;
}

/* --- Content Wrapper ----------------------------------------------------- */
.content-wrapper {
  position: relative;
  z-index: var(--z-content);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  padding: var(--space-lg);
  transition: all 0.6s var(--ease-decel);
}

/* When results are visible, shrink portal and allow scrolling */
.content-wrapper.has-results {
  justify-content: flex-start;
  padding-bottom: 0;
  overflow: hidden;
  max-height: calc(100vh - 72px);
  min-height: calc(100vh - 72px);
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.content-wrapper.has-results .truth-portal {
  order: 2;
  background: var(--bg-primary);
  width: 100%;
  padding-top: var(--space-md);
  padding-bottom: 0;
  flex-shrink: 0;
}

.content-wrapper.has-results .results-container {
  order: 1;
  width: 100%;
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--space-xl);
  position: relative;
  z-index: 10;
}

/* portal-flare no longer shrinks */

.content-wrapper.has-results .demo-hints {
  display: none;
}

/* --- Logo Parts ---------------------------------------------------------- */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.logo-icon {
  color: var(--accent-primary);
  font-size: var(--fs-lg);
  text-shadow: 0 0 12px rgba(var(--accent-primary-rgb), 0.6);
}

.logo-text {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  transition: all var(--transition-base);
}

.logo-accent {
  color: var(--accent-primary);
  text-shadow: 0 0 10px rgba(var(--accent-primary-rgb), 0.4);
}

.logo:hover .logo-text {
  text-shadow: 0 0 20px rgba(var(--accent-primary-rgb), 0.3);
}

/* --- Mode Buttons (index.html uses .mode-btn not .mode-selector__option) - */
.mode-btn {
  position: relative;
  z-index: 2;
  padding: 6px 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  background: none;
  white-space: nowrap;
}

.mode-btn:hover {
  color: var(--text-secondary);
}

.mode-btn.active {
  color: var(--bg-deep-space);
  font-weight: 600;
  background: var(--accent-primary);
  box-shadow: 0 0 12px rgba(var(--accent-primary-rgb), 0.4);
}

.mode-icon {
  margin-right: 4px;
}

/* --- Footer Badge Dots --------------------------------------------------- */
.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-circle);
  background: var(--verification-green);
  box-shadow: 0 0 6px var(--verification-green);
  display: inline-block;
  margin-right: 4px;
}

.badge-wolfram .badge-dot {
  background: var(--warning-amber);
  box-shadow: 0 0 6px var(--warning-amber);
}

.badge-rom .badge-dot {
  background: var(--accent-secondary);
  box-shadow: 0 0 6px var(--accent-secondary);
}

.badge-internet .badge-dot {
  background: var(--verification-green);
  box-shadow: 0 0 6px var(--verification-green);
}

/* --- Demo Hints ---------------------------------------------------------- */
.demo-hints {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  justify-content: center;
}

.demo-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(var(--accent-primary-rgb), 0.06);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.12);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-base);
}

.demo-hint:hover {
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.12);
  border-color: rgba(var(--accent-primary-rgb), 0.3);
  box-shadow: 0 0 15px rgba(var(--accent-primary-rgb), 0.1);
}

.hint-icon {
  font-size: var(--fs-sm);
}

/* --- Result Block Wrapper (from results.js) ------------------------------ */
.axiom-result-block {
  width: 100%;
}

/* ============================================================================
   FOOTER
   Fixed bottom — status badges + mystical slogan
   ============================================================================ */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-footer);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-xl);
  background: linear-gradient(
    to top,
    rgba(5, 5, 16, 0.95),
    rgba(5, 5, 16, 0.6)
  );
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(var(--accent-primary-rgb), 0.05);
  transition: all var(--transition-base);
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(var(--accent-primary-rgb), 0.15) 50%,
    transparent 100%
  );
}

/* --- Footer Badges ------------------------------------------------------- */
.footer .footer-badges {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.footer .badge {
  font-size: 10px;
  padding: 3px 8px;
}

.footer .badge__dot {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-circle);
  background: var(--verification-green);
  box-shadow: 0 0 6px var(--verification-green);
  flex-shrink: 0;
  animation: status-pulse 2s ease-in-out infinite;
}

/* --- Footer Slogan ------------------------------------------------------- */
.footer .slogan {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-align: center;
  animation: glow-pulse 4s ease-in-out infinite;
  flex-shrink: 0;
  white-space: nowrap;
}

/* --- Footer Right Section ------------------------------------------------ */
.footer .footer-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* ── Tablet (≤ 1024px) ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .header {
    padding: var(--space-md) var(--space-lg);
  }

  .content-wrapper {
    max-width: 90%;
    padding: var(--space-md);
  }

  .footer {
    padding: var(--space-sm) var(--space-lg);
  }
}

/* ── Mobile (≤ 768px) ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header {
    padding: var(--space-sm) var(--space-md);
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .header .logo {
    font-size: var(--fs-md);
    letter-spacing: 0.1em;
  }

  .header .logo-version {
    display: none;
  }

  .header .mode-selector__option {
    padding: 5px 12px;
    font-size: 10px;
  }

  .main-stage {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .content-wrapper {
    max-width: 100%;
    padding: var(--space-sm);
  }

  .footer {
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    text-align: center;
  }

  .footer .footer-badges {
    order: 2;
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer .slogan {
    order: 1;
    font-size: 10px;
    white-space: normal;
    line-height: 1.4;
  }

  .footer .footer-right {
    order: 3;
    justify-content: center;
  }

  .neural-canvas::after {
    width: 300px;
    height: 300px;
  }
}

/* ── Small Mobile (≤ 480px) ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --fs-base: 14px;
  }

  .header .logo {
    font-size: var(--fs-base);
  }

  .header .mode-selector {
    width: 100%;
    justify-content: center;
  }

  .grid-overlay {
    display: none;
  }
}

/* ── Large Screens (≥ 1440px) ────────────────────────────────────────────── */
@media (min-width: 1440px) {
  .content-wrapper {
    max-width: 1200px;
  }

  .header {
    padding: var(--space-md) var(--space-3xl);
  }

  .footer {
    padding: var(--space-md) var(--space-3xl);
  }
}









.content-wrapper.has-results .portal-flare {
  position: fixed;
  top: 40vh;
  left: 50vw;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  width: 200px;
  height: 100px;
}

