/* SynapFuse Landing — Playable Cmd+K Sandbox Section */

/* -----------------------------------------------------------------------
   Section layout
   ----------------------------------------------------------------------- */

.obd-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sf-space-2xl) var(--sf-space-lg);
  background: var(--sf-bg);
  z-index: 3;
}

.obd-content {
  max-width: 960px;
  width: 100%;
  text-align: center;
}

/* -----------------------------------------------------------------------
   Typography
   ----------------------------------------------------------------------- */

.obd-headline {
  font-family: var(--sf-font-primary);
  font-weight: 300;
  font-size: var(--sf-text-2xl);
  letter-spacing: -0.01em;
  color: var(--sf-text);
  margin: 0 0 var(--sf-space-md);
}

.obd-subtext {
  font-family: var(--sf-font-primary);
  font-weight: 400;
  font-size: var(--sf-text-md);
  line-height: 1.6;
  color: var(--sf-text-muted);
  margin: 0 0 var(--sf-space-xl);
}

.obd-key-hint {
  display: inline-block;
  font-family: var(--sf-font-mono);
  font-size: var(--sf-text-xs);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--sf-alignment);
  vertical-align: middle;
}

/* -----------------------------------------------------------------------
   Static trigger button — resting command bar
   ----------------------------------------------------------------------- */

.obd-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--sf-space-sm);
  padding: 12px 28px;
  border: 1px solid var(--sf-glass-border);
  border-radius: var(--sf-radius-md);
  background: var(--sf-glass-bg);
  backdrop-filter: var(--sf-glass-blur);
  -webkit-backdrop-filter: var(--sf-glass-blur);
  cursor: pointer;
  transition: border-color var(--sf-duration) var(--sf-ease),
              box-shadow var(--sf-duration) var(--sf-ease);
  margin-bottom: var(--sf-space-xl);
}

.obd-trigger:hover {
  border-color: rgba(79, 227, 193, 0.25);
  box-shadow: 0 0 20px rgba(79, 227, 193, 0.1);
}

.obd-trigger-icon {
  font-family: var(--sf-font-mono);
  font-size: var(--sf-text-xs);
  color: var(--sf-alignment);
  background: rgba(79, 227, 193, 0.08);
  border: 1px solid rgba(79, 227, 193, 0.15);
  border-radius: 4px;
  padding: 2px 6px;
}

.obd-trigger-text {
  font-family: var(--sf-font-primary);
  font-size: var(--sf-text-sm);
  color: var(--sf-text-dim);
}

/* -----------------------------------------------------------------------
   Modal backdrop + panel
   ----------------------------------------------------------------------- */

.obd-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  animation: obd-fade-in 0.15s ease-out both;
}

.obd-panel {
  width: 520px;
  max-width: 92vw;
  padding: 0;
  overflow: hidden;
  animation: obd-slide-down 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* -----------------------------------------------------------------------
   Input row
   ----------------------------------------------------------------------- */

.obd-input-row {
  display: flex;
  align-items: center;
  gap: var(--sf-space-sm);
  padding: var(--sf-space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.obd-input-icon {
  font-family: var(--sf-font-mono);
  font-size: var(--sf-text-xs);
  color: var(--sf-alignment);
  background: rgba(79, 227, 193, 0.08);
  border: 1px solid rgba(79, 227, 193, 0.15);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
}

.obd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--sf-font-primary);
  font-size: var(--sf-text-md);
  color: var(--sf-text);
  caret-color: var(--sf-alignment);
}

.obd-input::placeholder {
  color: var(--sf-text-dim);
}

/* -----------------------------------------------------------------------
   Suggestions list
   ----------------------------------------------------------------------- */

.obd-suggestions {
  padding: var(--sf-space-xs) 0;
}

.obd-suggestion {
  display: flex;
  align-items: center;
  padding: 10px var(--sf-space-md);
  cursor: pointer;
  transition: background var(--sf-duration) var(--sf-ease);
}

.obd-suggestion:hover,
.obd-suggestion--active {
  background: rgba(79, 227, 193, 0.06);
}

.obd-suggestion-cmd {
  font-family: var(--sf-font-primary);
  font-size: var(--sf-text-sm);
  color: var(--sf-text);
}

.obd-suggestion--active .obd-suggestion-cmd {
  color: var(--sf-alignment);
}

/* -----------------------------------------------------------------------
   Graph area
   ----------------------------------------------------------------------- */

.obd-graph-area {
  width: 100%;
  height: 500px;
  border-radius: var(--sf-radius-lg);
  background: var(--sf-glass-bg);
  border: 1px solid var(--sf-glass-border);
  backdrop-filter: var(--sf-glass-blur);
  -webkit-backdrop-filter: var(--sf-glass-blur);
  overflow: hidden;
  position: relative;
}

.obd-graph-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.obd-graph-placeholder-text {
  font-family: var(--sf-font-mono);
  font-size: var(--sf-text-xs);
  color: var(--sf-text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* -----------------------------------------------------------------------
   Ghost Simulation Graph — container
   ----------------------------------------------------------------------- */

.gs-container {
  width: 100%;
  height: 100%;
}

.gs-container .react-flow__attribution {
  display: none;
}

/* Hide handles */
.gs-container .react-flow__handle {
  opacity: 0;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  border: none;
  pointer-events: none;
}

/* -----------------------------------------------------------------------
   Ghost nodes — shared base
   ----------------------------------------------------------------------- */

.gs-container .react-flow__node-default {
  font-family: var(--sf-font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 14px;
  min-width: 0;
  border-radius: var(--sf-radius-sm);
}

/* -----------------------------------------------------------------------
   Origin node
   ----------------------------------------------------------------------- */

.gs-origin.react-flow__node-default {
  background: rgba(79, 227, 193, 0.08);
  border: 1px solid rgba(79, 227, 193, 0.3);
  color: var(--sf-alignment);
  box-shadow: 0 0 16px rgba(79, 227, 193, 0.12);
}

/* -----------------------------------------------------------------------
   Ghost decision — cyan dashed border
   ----------------------------------------------------------------------- */

.gs-ghost-decision.react-flow__node-default {
  background: rgba(0, 194, 255, 0.05);
  border: 1px dashed rgba(0, 194, 255, 0.4);
  color: var(--sf-node-belief);
  box-shadow: 0 0 12px rgba(0, 194, 255, 0.08);
}

/* -----------------------------------------------------------------------
   Ghost trajectory — emerald dashed border
   ----------------------------------------------------------------------- */

.gs-ghost-trajectory.react-flow__node-default {
  background: rgba(34, 227, 164, 0.05);
  border: 1px dashed rgba(34, 227, 164, 0.4);
  color: var(--sf-node-trajectory);
  box-shadow: 0 0 12px rgba(34, 227, 164, 0.08);
}

/* -----------------------------------------------------------------------
   Simulated path edges — dashed with glow
   ----------------------------------------------------------------------- */

.gs-edge-simulated .react-flow__edge-path {
  stroke: rgba(79, 227, 193, 0.3);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  filter: drop-shadow(0 0 3px rgba(79, 227, 193, 0.15));
}

/* -----------------------------------------------------------------------
   MiniMap & Controls override
   ----------------------------------------------------------------------- */

.gs-container .react-flow__minimap {
  background: rgba(10, 10, 12, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--sf-radius-sm);
}

.gs-container .react-flow__controls {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--sf-radius-sm);
  overflow: hidden;
}

.gs-container .react-flow__controls-button {
  background: rgba(14, 14, 17, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  fill: var(--sf-text-muted);
}

.gs-container .react-flow__controls-button:hover {
  background: rgba(79, 227, 193, 0.08);
  fill: var(--sf-alignment);
}

.gs-container .react-flow__background {
  opacity: 0.5;
}

/* -----------------------------------------------------------------------
   Node entrance animations — staggered spring
   ----------------------------------------------------------------------- */

.gs-animate-0 { animation: gs-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s both; }
.gs-animate-1 { animation: gs-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both; }
.gs-animate-2 { animation: gs-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s both; }
.gs-animate-3 { animation: gs-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s both; }
.gs-animate-4 { animation: gs-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s both; }
.gs-animate-5 { animation: gs-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s both; }
.gs-animate-6 { animation: gs-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.65s both; }

@keyframes gs-pop-in {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* -----------------------------------------------------------------------
   Modal entrance
   ----------------------------------------------------------------------- */

@keyframes obd-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes obd-slide-down {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* -----------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------- */

@media (max-width: 640px) {
  .obd-graph-area {
    height: 360px;
  }
  .obd-headline {
    font-size: var(--sf-text-xl);
  }
}
