/* SynapFuse Landing — Decision Replay Visual Proof */

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

.drd-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: 4;
}

.drd-container {
  max-width: 1040px;
  width: 100%;
}

/* -----------------------------------------------------------------------
   Two-column grid
   ----------------------------------------------------------------------- */

.drd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sf-space-xl);
  align-items: center;
}

/* -----------------------------------------------------------------------
   Left column — text content
   ----------------------------------------------------------------------- */

.drd-text {
  display: flex;
  flex-direction: column;
}

.drd-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);
}

.drd-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);
}

/* -----------------------------------------------------------------------
   Decision timeline
   ----------------------------------------------------------------------- */

.drd-timeline {
  position: relative;
  padding-left: 28px;
  margin-bottom: var(--sf-space-xl);
}

/* Vertical connector line */
.drd-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(
    180deg,
    var(--sf-node-ce) 0%,
    var(--sf-node-belief) 33%,
    var(--sf-node-decision) 66%,
    var(--sf-node-trajectory) 100%
  );
  opacity: 0.4;
}

.drd-timeline-step {
  position: relative;
  padding-bottom: var(--sf-space-md);
}

.drd-timeline-step:last-child {
  padding-bottom: 0;
}

/* Dot marker */
.drd-timeline-step::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.drd-timeline-step--ce::before {
  background: var(--sf-node-ce);
  box-shadow: 0 0 8px var(--sf-node-ce);
}

.drd-timeline-step--belief::before {
  background: var(--sf-node-belief);
  box-shadow: 0 0 8px var(--sf-node-belief);
}

.drd-timeline-step--decision::before {
  background: var(--sf-node-decision);
  box-shadow: 0 0 8px var(--sf-node-decision);
}

.drd-timeline-step--outcome::before {
  background: var(--sf-node-trajectory);
  box-shadow: 0 0 8px var(--sf-node-trajectory);
}

.drd-timeline-label {
  font-family: var(--sf-font-mono);
  font-size: var(--sf-text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.drd-timeline-step--ce .drd-timeline-label { color: var(--sf-node-ce); }
.drd-timeline-step--belief .drd-timeline-label { color: var(--sf-node-belief); }
.drd-timeline-step--decision .drd-timeline-label { color: var(--sf-node-decision); }
.drd-timeline-step--outcome .drd-timeline-label { color: var(--sf-node-trajectory); }

.drd-timeline-value {
  font-family: var(--sf-font-primary);
  font-size: var(--sf-text-sm);
  line-height: 1.5;
  color: var(--sf-text);
}

/* -----------------------------------------------------------------------
   Why-Trace tags
   ----------------------------------------------------------------------- */

.drd-why-trace {
  display: flex;
  flex-direction: column;
  gap: var(--sf-space-sm);
}

.drd-why-trace-label {
  font-family: var(--sf-font-mono);
  font-size: var(--sf-text-xs);
  color: var(--sf-text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.drd-why-trace-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drd-tag {
  display: inline-block;
  font-family: var(--sf-font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 4px;
}

.drd-tag--belief {
  background: rgba(0, 194, 255, 0.1);
  color: var(--sf-node-belief);
  border: 1px solid rgba(0, 194, 255, 0.18);
}

.drd-tag--pattern {
  background: rgba(155, 92, 255, 0.1);
  color: var(--sf-node-pattern);
  border: 1px solid rgba(155, 92, 255, 0.18);
}

.drd-tag--decision {
  background: rgba(245, 165, 36, 0.1);
  color: var(--sf-node-decision);
  border: 1px solid rgba(245, 165, 36, 0.18);
}

.drd-tag--ce {
  background: rgba(142, 142, 147, 0.1);
  color: var(--sf-node-ce);
  border: 1px solid rgba(142, 142, 147, 0.18);
}

/* -----------------------------------------------------------------------
   Right column — graph panel
   ----------------------------------------------------------------------- */

.drd-graph-panel {
  height: 440px;
  border-radius: var(--sf-radius-lg);
  overflow: hidden;
  backdrop-filter: var(--sf-glass-blur);
  -webkit-backdrop-filter: var(--sf-glass-blur);
}

/* -----------------------------------------------------------------------
   Replay Graph Preview — React Flow overrides
   ----------------------------------------------------------------------- */

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

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

.rgp-container .react-flow__handle {
  opacity: 0;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  border: none;
  pointer-events: none;
}

/* Shared node base */
.rgp-container .react-flow__node-default {
  font-family: var(--sf-font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px 18px;
  min-width: 0;
  border-radius: var(--sf-radius-sm);
}

/* Belief node — cyan */
.rgp-belief.react-flow__node-default {
  background: rgba(0, 194, 255, 0.06);
  border: 1px solid rgba(0, 194, 255, 0.35);
  color: var(--sf-node-belief);
  box-shadow: 0 0 14px rgba(0, 194, 255, 0.1);
}

/* Decision node — amber */
.rgp-decision.react-flow__node-default {
  background: rgba(245, 165, 36, 0.06);
  border: 1px solid rgba(245, 165, 36, 0.35);
  color: var(--sf-node-decision);
  box-shadow: 0 0 14px rgba(245, 165, 36, 0.1);
}

/* Outcome node — emerald */
.rgp-outcome.react-flow__node-default {
  background: rgba(34, 227, 164, 0.06);
  border: 1px solid rgba(34, 227, 164, 0.35);
  color: var(--sf-node-trajectory);
  box-shadow: 0 0 14px rgba(34, 227, 164, 0.1);
}

/* Edge glow animation */
.rgp-edge .react-flow__edge-path {
  stroke: rgba(79, 227, 193, 0.3);
  stroke-width: 1.8;
  animation: rgp-edge-pulse 3s ease-in-out infinite;
}

@keyframes rgp-edge-pulse {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(79, 227, 193, 0.15)); stroke-opacity: 0.6; }
  50%      { filter: drop-shadow(0 0 8px rgba(79, 227, 193, 0.35)); stroke-opacity: 1; }
}

/* Node entrance */
.rgp-animate-0 { animation: rgp-fade-in 0.5s var(--sf-ease-out) 0.1s both; }
.rgp-animate-1 { animation: rgp-fade-in 0.5s var(--sf-ease-out) 0.3s both; }
.rgp-animate-2 { animation: rgp-fade-in 0.5s var(--sf-ease-out) 0.5s both; }

@keyframes rgp-fade-in {
  from { opacity: 0; transform: scale(0.85) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* MiniMap + Controls */
.rgp-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);
}

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

.rgp-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);
}

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

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

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

@media (max-width: 768px) {
  .drd-grid {
    grid-template-columns: 1fr;
  }
  .drd-graph-panel {
    height: 340px;
  }
  .drd-headline {
    font-size: var(--sf-text-xl);
  }
}
