/* ==========================================================================
   Nomad but Digital — Interactive Digital Journal Visual
   "Ideas -> Content -> Visibility -> Growth"
   ========================================================================== */

.nbd-jv {
  position: relative;
  width: 100%;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nbd-jv__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 254, 254, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 254, 254, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  border-radius: 16px;
  pointer-events: none;
}

.nbd-jv-window {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #FFFEFE;
  color: #1A1B17;
  border-radius: 14px;
  border: 1px solid rgba(255, 254, 254, 0.16);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  will-change: transform, opacity, filter;
  transition: translate 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}

.nbd-jv-window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f4f6f8;
  border-bottom: 1px solid rgba(26, 27, 23, 0.08);
}

.nbd-jv-dots {
  display: flex;
  gap: 4px;
}
.nbd-jv-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.nbd-jv-dots span:nth-child(1) { background: #FF0587; }
.nbd-jv-dots span:nth-child(2) { background: #FFBB02; }
.nbd-jv-dots span:nth-child(3) { background: #9DE8FF; }

.nbd-jv-window__label {
  font-size: 0.66rem;
  font-weight: 700;
  color: rgba(26, 27, 23, 0.56);
  margin-right: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nbd-jv-stage-pill {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #1A1B17;
  color: #FFBB02;
  flex-shrink: 0;
}

.nbd-jv-window__body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Stage A: Search */
.nbd-jv-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1.5px solid rgba(26, 27, 23, 0.14);
  background: #FFFEFE;
  transition: border-color 0.25s ease;
}
.nbd-jv-search.is-active {
  border-color: #9DE8FF;
}
.nbd-jv-search__icon {
  width: 13px;
  height: 13px;
  color: #FF0587;
  flex-shrink: 0;
}
.nbd-jv-search__query {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1A1B17;
  white-space: nowrap;
  overflow: hidden;
  min-height: 1.25em;
  line-height: 1.25;
}
.nbd-jv-cursor {
  display: inline-block;
  width: 2px;
  height: 13px;
  background: #FF0587;
  margin-left: -4px;
  animation: nbd-jv-blink 0.8s steps(2, start) infinite;
}
.nbd-jv-cursor--sm {
  height: 12px;
  margin-left: 2px;
}
.nbd-jv-cursor.is-done {
  display: none;
}
.nbd-jv-pulse {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FFBB02;
  opacity: 0;
  flex-shrink: 0;
}

/* Stage B: Content Brief */
.nbd-jv-brief {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(157, 232, 255, 0.16);
  border: 1px solid rgba(26, 27, 23, 0.08);
}
.nbd-jv-brief__thumb {
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(145deg, #1A1B17, #34362f);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nbd-jv-brief__badge {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: #FFBB02;
  color: #1A1B17;
}
.nbd-jv-brief__headline {
  display: flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #1A1B17;
  margin-bottom: 5px;
  min-height: 1.25em;
  line-height: 1.25;
}
.nbd-jv-brief__blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.nbd-jv-b-pill {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: #FFFEFE;
  border: 1px solid rgba(26, 27, 23, 0.1);
  color: #1A1B17;
}

/* Stage C: Distribution Nodes */
.nbd-jv-dist {
  position: relative;
  padding: 4px 0;
}
.nbd-jv-dist__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.nbd-jv-nodes {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.nbd-jv-node {
  text-align: center;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 5px 4px;
  border-radius: 8px;
  background: #FFFEFE;
  border: 1px solid rgba(26, 27, 23, 0.14);
  color: rgba(26, 27, 23, 0.55);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.nbd-jv-node.is-lit[data-jv-node="seo"] { background: #9DE8FF; color: #1A1B17; border-color: #9DE8FF; }
.nbd-jv-node.is-lit[data-jv-node="social"] { background: #FF0587; color: #FFFEFE; border-color: #FF0587; }
.nbd-jv-node.is-lit[data-jv-node="content"] { background: #FFBB02; color: #1A1B17; border-color: #FFBB02; }
.nbd-jv-node.is-lit[data-jv-node="ads"] { background: #1A1B17; color: #FFFEFE; border-color: #1A1B17; }

/* Stage D: Growth Curve */
.nbd-jv-growth {
  padding: 9px 11px;
  border-radius: 10px;
  background: #f8fafb;
  border: 1px solid rgba(26, 27, 23, 0.08);
}
.nbd-jv-growth__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.nbd-jv-growth__title {
  font-size: 0.66rem;
  font-weight: 800;
  color: #1A1B17;
}
.nbd-jv-growth__signal {
  font-size: 0.6rem;
  font-weight: 800;
  color: #FF0587;
}
.nbd-jv-growth__svg {
  width: 100%;
  height: 40px;
  display: block;
}

@keyframes nbd-jv-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Desktop Pointer Interaction */
@media (hover: hover) and (pointer: fine) {
  .nbd-jv:hover .nbd-jv-window {
    translate: 0 -4px;
    border-color: rgba(255, 187, 2, 0.55);
  }
}

@media (max-width: 640px) {
  .nbd-jv {
    padding: 4px;
  }
  .nbd-jv-window__body {
    padding: 11px;
  }
  .nbd-jv-brief {
    grid-template-columns: 46px 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nbd-jv-cursor {
    display: none;
  }
  .nbd-jv-window,
  .nbd-jv-node {
    transition: none !important;
  }
}
