/* ==========================================================================
   OneX - Neural Trace section (homepage)
   Dark section sitting between #hero and #about. Must stay dark so the
   shape-img.svg curve on #about::before still reads as a dark -> light
   transition.
   ========================================================================== */

/* --------------------------------------------------------- seam: hero above
   #hero paints hero-bg.png with background-size: cover. Because this section
   is flat #070a16, that texture used to stop dead on the section boundary and
   read as a hard horizontal band edge. Fade the bottom of the hero out to the
   exact same colour so the two sections dissolve into each other.
   #hero::after is otherwise unused (#hero .container has its own ::before and
   ::after for the glow blobs), and .row / .hero-text sit at z-index 9, so a
   z-index 1 overlay stays behind all hero content.
   -------------------------------------------------------------------------- */
#hero {
  position: relative;
}

#hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 260px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 10, 22, 0) 0%, #070a16 92%);
}

.neural-trace {
  position: relative;
  background: #070a16;
  /* Bottom padding must clear #about::before / #about::after, which are
     absolutely positioned at bottom: 100% with height: 133px, so they overlay
     the last 133px of THIS section. 205px matches the convention already used
     by .sdlc-hero in ai-sdlc.css for the same curve. */
  padding: 96px 0 205px;
  overflow: hidden;
}

.neural-trace__head {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}

.neural-trace__head h2 {
  font-family: "Figtree", sans-serif;
  font-size: 52px;
  line-height: 1.12;
  color: #f8f8f8;
  margin: 0 0 20px;
}

.neural-trace__head p {
  font-family: "Onest", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #c6c6c6;
  margin: 0;
}

/* ------------------------------------------------------------------ stage */

.neural-trace__stage {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #070a16;
  border: 1px solid rgba(58, 133, 232, 0.16);
  line-height: 0;
}

.neural-trace__stage::after {
  /* subtle inner vignette so the canvas edge does not look cut off */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 80px rgba(7, 10, 22, 0.9);
}

#neuralTraceCanvas {
  display: block;
  width: 100%;
  cursor: crosshair;
}

.neural-trace__hint {
  /* Right-aligned: the left of the canvas is where the Tokens column sits,
     and the hint was overlapping those neurons. */
  position: absolute;
  right: 16px;
  top: 12px;
  max-width: 46%;
  text-align: right;
  z-index: 2;
  font-family: "Onest", sans-serif;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: #62637a;
  pointer-events: none;
}

/* ----------------------------------------------------------------- legend */

.neural-trace__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 40px;
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}

.neural-trace__legend li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: "Onest", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #c6c6c6;
}

.neural-trace__legend strong {
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  color: #f8f8f8;
  margin-right: 2px;
}

.neural-trace__legend .nt-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-1px);
}

.nt-dot--elam {
  background: #3a85e8;
  box-shadow: 0 0 10px rgba(58, 133, 232, 0.8);
}

.nt-dot--hsdd {
  background: #c9278c;
  box-shadow: 0 0 10px rgba(201, 39, 140, 0.8);
}

.nt-dot--pat {
  background: #00c896;
  box-shadow: 0 0 10px rgba(0, 200, 150, 0.8);
}

/* ------------------------------------------------------------ breakpoints */

@media (max-width: 1024px) {
  .neural-trace {
    /* Curve box is still 133px tall here (only its background-size scales),
       so bottom padding must stay above that. */
    padding: 76px 0 180px;
  }

  #hero::after {
    height: 200px;
  }

  .neural-trace__head h2 {
    font-size: 42px;
  }

  .neural-trace__head {
    margin-bottom: 34px;
  }
}

@media (max-width: 767px) {
  .neural-trace {
    padding: 58px 0 155px;
  }

  #hero::after {
    height: 150px;
  }

  .neural-trace__head h2 {
    font-size: 32px;
  }

  .neural-trace__head p {
    font-size: 15px;
  }

  .neural-trace__head {
    margin-bottom: 26px;
  }

  .neural-trace__stage {
    border-radius: 10px;
  }

  /* No hover on touch, so the hint would be misleading. JS auto-fires
     a forward pass instead. */
  .neural-trace__hint {
    display: none;
  }

  #neuralTraceCanvas {
    cursor: default;
  }

  .neural-trace__legend {
    gap: 12px 0;
    flex-direction: column;
    align-items: center;
    margin-top: 24px;
  }

  .neural-trace__legend li {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .neural-trace__hint {
    display: none;
  }
}
