/* SynapFuse Landing — Cognitive Map Preview */

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

.cmp-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 160px 0;
  background: transparent;
  z-index: 5;
}

.cmp-container {
  max-width: 1080px;
  width: 100%;
  padding: 0 var(--sf-space-lg);
}

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

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

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

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

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

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

.cmp-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sf-space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sf-space-sm);
}

.cmp-bullets li {
  position: relative;
  padding-left: 20px;
  font-family: var(--sf-font-primary);
  font-size: var(--sf-text-sm);
  line-height: 1.5;
  color: var(--sf-text-muted);
}

.cmp-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sf-alignment);
  opacity: 0.5;
}

.cmp-caption {
  font-family: var(--sf-font-mono);
  font-size: var(--sf-text-xs);
  color: var(--sf-text-dim);
  letter-spacing: 0.03em;
  margin: 0;
}

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

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

/* -----------------------------------------------------------------------
   Radial Mind Graph — container
   ----------------------------------------------------------------------- */

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

.rmg-rotate-wrapper {
  width: 100%;
  height: 100%;
  animation: rmg-slow-rotate 1080s linear infinite;
}

@keyframes rmg-slow-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

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

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

/* -----------------------------------------------------------------------
   Shared node base
   ----------------------------------------------------------------------- */

.rmg-container .react-flow__node-default {
  font-family: var(--sf-font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0;
  border: none;
  box-shadow: none;
}

/* -----------------------------------------------------------------------
   Target node — hexagon (center)
   ----------------------------------------------------------------------- */

.rmg-target.react-flow__node-default {
  width: 72px;
  height: 72px;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: rgba(34, 227, 164, 0.12);
  color: var(--sf-node-trajectory);
  filter: drop-shadow(0 0 12px rgba(34, 227, 164, 0.3));
  font-size: 8px;
}

/* -----------------------------------------------------------------------
   Belief nodes — circle (cyan)
   ----------------------------------------------------------------------- */

.rmg-belief.react-flow__node-default {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 194, 255, 0.08);
  color: var(--sf-node-belief);
  filter: drop-shadow(0 0 10px rgba(0, 194, 255, 0.25));
}

/* -----------------------------------------------------------------------
   Decision nodes — diamond (amber)
   ----------------------------------------------------------------------- */

.rmg-decision-node.react-flow__node-default {
  width: 64px;
  height: 64px;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background: rgba(245, 165, 36, 0.1);
  color: var(--sf-node-decision);
  filter: drop-shadow(0 0 10px rgba(245, 165, 36, 0.25));
  font-size: 7px;
}

/* -----------------------------------------------------------------------
   Pattern nodes — pulsating circle (purple)
   ----------------------------------------------------------------------- */

.rmg-pattern.react-flow__node-default {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(155, 92, 255, 0.08);
  color: var(--sf-node-pattern);
  font-size: 7px;
}

.rmg-pattern.react-flow__node-default::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(155, 92, 255, 0.15);
  animation: rmg-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes rmg-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50%      { transform: scale(1.15); opacity: 0.8; }
}

/* -----------------------------------------------------------------------
   CE nodes — small dots (gray)
   ----------------------------------------------------------------------- */

.rmg-ce.react-flow__node-default {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(142, 142, 147, 0.15);
  color: transparent;
  filter: drop-shadow(0 0 6px rgba(142, 142, 147, 0.2));
  font-size: 0;
  padding: 0;
}

/* -----------------------------------------------------------------------
   Edges
   ----------------------------------------------------------------------- */

.rmg-edge .react-flow__edge-path {
  stroke: rgba(79, 227, 193, 0.18);
  stroke-width: 1;
  opacity: 0;
  animation: rmg-edge-appear 0.6s ease-out 1.6s both;
}

@keyframes rmg-edge-appear {
  from { opacity: 0; }
  to   { opacity: 1; filter: drop-shadow(0 0 3px rgba(79, 227, 193, 0.15)); }
}

/* -----------------------------------------------------------------------
   Node entrance — sequential fade-in
   ----------------------------------------------------------------------- */

.rmg-animate-0  { animation: rmg-node-in 0.4s var(--sf-ease-out) 0.05s both; }
.rmg-animate-1  { animation: rmg-node-in 0.4s var(--sf-ease-out) 0.15s both; }
.rmg-animate-2  { animation: rmg-node-in 0.4s var(--sf-ease-out) 0.25s both; }
.rmg-animate-3  { animation: rmg-node-in 0.4s var(--sf-ease-out) 0.35s both; }
.rmg-animate-4  { animation: rmg-node-in 0.4s var(--sf-ease-out) 0.45s both; }
.rmg-animate-5  { animation: rmg-node-in 0.4s var(--sf-ease-out) 0.55s both; }
.rmg-animate-6  { animation: rmg-node-in 0.4s var(--sf-ease-out) 0.65s both; }
.rmg-animate-7  { animation: rmg-node-in 0.4s var(--sf-ease-out) 0.75s both; }
.rmg-animate-8  { animation: rmg-node-in 0.4s var(--sf-ease-out) 0.85s both; }
.rmg-animate-9  { animation: rmg-node-in 0.4s var(--sf-ease-out) 0.95s both; }
.rmg-animate-10 { animation: rmg-node-in 0.4s var(--sf-ease-out) 1.05s both; }
.rmg-animate-11 { animation: rmg-node-in 0.4s var(--sf-ease-out) 1.15s both; }
.rmg-animate-12 { animation: rmg-node-in 0.4s var(--sf-ease-out) 1.25s both; }

@keyframes rmg-node-in {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* -----------------------------------------------------------------------
   MiniMap + Controls
   ----------------------------------------------------------------------- */

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

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

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

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

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

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

@media (max-width: 768px) {
  .cmp-grid {
    grid-template-columns: 1fr;
  }
  .cmp-graph-panel {
    height: 380px;
  }
  .cmp-section {
    padding: 80px 0;
  }
  .cmp-headline {
    font-size: var(--sf-text-xl);
  }
}
