/* ==========================================================================
   Hero страницы /prototype/: 3D-граф спроса
   ========================================================================== */

/* --------------------------------------------------------------------------
   Подсказка «матрица микро-интентов»
   -------------------------------------------------------------------------- */
.hint-trigger {
  position: relative;
  display: inline;
  outline: none;
}

.hint-trigger:focus-visible {
  outline: 2px solid #c4b5fd;
  outline-offset: 3px;
  border-radius: 2px;
}

.hint-popup {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(calc(-50% + var(--hint-offset-x, 0px)));
  margin-bottom: 8px;
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  background: #1e1b2e;
  color: #e2dff0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 100;
  pointer-events: none;
  text-align: left;
}

.hint-trigger.is-open .hint-popup {
  display: block;
}

@media (any-hover: hover) {
  .hint-trigger:hover .hint-popup {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   Каркас hero
   -------------------------------------------------------------------------- */
body {
  /* hero растянут на всю ширину окна из центрированного контейнера страницы */
  overflow-x: hidden;
}

.prototype-hero {
  position: relative;
  overflow: hidden;
  margin: -0.5rem calc(-50vw + 50%) 2rem;
  background: url("../images/prototype/hero-bg.jpg") center / cover no-repeat;
}

.prototype-hero__shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

/* --------------------------------------------------------------------------
   Граф
   -------------------------------------------------------------------------- */
.prototype-hero__graph {
  position: relative;
  height: 320px;
  z-index: 1;
}

.prototype-hero__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
  outline: none;
  background:
    radial-gradient(72% 64% at 50% 45%, rgba(124, 58, 237, 0.14), rgba(17, 24, 39, 0) 68%),
    radial-gradient(52% 52% at 84% 82%, rgba(34, 211, 238, 0.07), rgba(17, 24, 39, 0) 70%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%);
}

.prototype-hero__canvas.is-dragging {
  cursor: grabbing;
}

.prototype-hero__zoom {
  position: absolute;
  right: 14px;
  top: 12px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.prototype-hero__zoom-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(17, 24, 39, 0.55);
  color: #9ca3af;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.prototype-hero__zoom-btn:hover {
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(30, 27, 46, 0.8);
}

/* --------------------------------------------------------------------------
   Текстовая часть
   -------------------------------------------------------------------------- */
.prototype-hero__content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 1.25rem;
  pointer-events: none;
}

.prototype-hero__copy {
  max-width: 32rem;
  margin: 0 auto;
  text-align: center;
  pointer-events: auto;
}

.prototype-hero__title {
  display: flex;
  flex-direction: column;
  gap: 0.12em;
  margin: 0 0 1.5rem;
  color: #fff;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.08;
}

.prototype-hero__title-main {
  font-size: 1em;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.prototype-hero__title-sub {
  color: #fff;
  font-size: 1em;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.prototype-hero__lead {
  margin: 0 0 2.5rem;
  color: #d1d5db;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.6;
}

.prototype-hero__term {
  color: #d8b4fe;
  border-bottom: 1px dashed #a78bfa;
  cursor: help;
}

.prototype-hero__flow {
  display: flex;
  align-items: center;
  justify-content: center;
}

.prototype-hero__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0.75rem;
}

.prototype-hero__step-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.5rem;
  color: #a78bfa;
}

.prototype-hero__step-label {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}

.prototype-hero__arrow {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0 0.5rem;
  color: #6b7280;
}

/* --------------------------------------------------------------------------
   Тултип узла графа
   -------------------------------------------------------------------------- */
.prototype-hero__tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 99999;
  max-width: 296px;
  padding: 12px 14px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 10px;
  background: rgba(30, 27, 46, 0.97);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.62);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  pointer-events: none;
}

.prototype-hero__tip.is-visible {
  opacity: 1;
  transform: none;
}

.prototype-hero__tip-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: #a79fc0;
  font-size: 8.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.prototype-hero__tip-kicker i {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}

.prototype-hero__tip-title {
  color: #f3f0ff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.prototype-hero__tip-meta {
  margin-top: 5px;
  color: #a79fc0;
  font-size: 10.5px;
}

.prototype-hero__tip-query {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(167, 139, 250, 0.2);
  color: #8b8598;
  font-size: 10.5px;
}

/* --------------------------------------------------------------------------
   Адаптив
   -------------------------------------------------------------------------- */
@media (max-width: 359px) {
  .prototype-hero__title {
    font-size: 1.5rem;
  }
}

@media (min-width: 640px) {
  .prototype-hero__graph {
    height: 360px;
  }

  .prototype-hero__content {
    padding: 2rem 2rem 1.25rem;
  }

  .prototype-hero__title {
    font-size: 2.75rem;
  }

  .prototype-hero__lead {
    font-size: 1.25rem;
  }
}

@media (max-width: 1023px) {
  .prototype-hero {
    padding-bottom: 1rem;
  }
}

@media (max-width: 640px) {
  .prototype-hero__zoom {
    right: 10px;
    top: 10px;
  }
}

@media (min-width: 1024px) {
  .prototype-hero {
    display: block;
    height: clamp(520px, calc(100vh - 180px), 680px);
  }

  .prototype-hero__graph {
    position: absolute;
    inset: 0;
    height: auto;
  }

  .prototype-hero__content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 2rem;
  }

  .prototype-hero__copy {
    margin: 0;
    text-align: left;
  }

  .prototype-hero__flow {
    justify-content: flex-start;
  }

  .prototype-hero__canvas {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 50%);
    mask-image: linear-gradient(to right, transparent 0, #000 50%);
  }
}
