/**
 * Trust & Governance - hero flow stage (Roles → Trust → Controls).
 */

/* ---- Hero stage ---- */
.linkle-tg-hero-stage {
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(15, 108, 189, 0.18), transparent 70%),
    linear-gradient(180deg, #0d1526 0%, #0b1220 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  box-shadow: 0 1.25rem 3rem rgba(11, 18, 32, 0.35);
}

.linkle-tg-hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Flow diagram ---- */
.linkle-tg-flow {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 440px;
  padding: 2.5rem 2rem;
}

.linkle-tg-flow__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.linkle-tg-flow__svg path {
  fill: none;
  stroke: #3d9aef;
  stroke-width: 2;
  stroke-dasharray: 5 8;
  opacity: 0.55;
}

.linkle-tg-flow__svg .linkle-tg-dot {
  fill: #7ec4ff;
  filter: drop-shadow(0 0 6px rgba(126, 196, 255, 0.9));
}

.linkle-tg-flow__layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(200px, 1.15fr) auto minmax(200px, 1.15fr);
  gap: 2rem 3rem;
  align-items: center;
  min-height: 400px;
}

.linkle-tg-flow__panel {
  position: relative;
  background: rgba(18, 28, 48, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.15rem;
  padding: 1.15rem 1.1rem 1.25rem;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.35);
}

.linkle-tg-flow__panel-label {
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.linkle-tg-flow__hub {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
  padding: 0 0.5rem;
}

.linkle-tg-flow__hub-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 1.15rem;
  background: linear-gradient(160deg, #152238 0%, #0f1a2e 100%);
  border: 2px solid #0f6cbd;
  box-shadow:
    0 0 0 8px rgba(15, 108, 189, 0.15),
    0 0 40px rgba(15, 108, 189, 0.45),
    0 0.75rem 2rem rgba(0, 0, 0, 0.4);
  animation: linkle-tg-hub-pulse 3.4s ease-in-out infinite;
}

.linkle-tg-flow__hub-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.linkle-tg-flow__hub-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: #7ec4ff;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.2;
}

.linkle-tg-flow__dests {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.linkle-tg-flow__pills {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.linkle-tg-flow__pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.linkle-tg-flow__pill i {
  font-size: 1.05rem;
}

.linkle-tg-flow__anchor {
  position: absolute;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  opacity: 0;
  pointer-events: none;
}

.linkle-tg-flow__panel--roles .linkle-tg-flow__anchor {
  top: 50%;
  right: 0;
}

.linkle-tg-flow__anchor--hub-in {
  top: 50%;
  left: 0;
}

.linkle-tg-flow__anchor--hub-out {
  top: 50%;
  right: 0;
}

.linkle-tg-flow__dests > .linkle-tg-flow__anchor {
  top: 50%;
  left: 0;
}

@keyframes linkle-tg-hub-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 8px rgba(15, 108, 189, 0.12),
      0 0 36px rgba(15, 108, 189, 0.35),
      0 0.75rem 2rem rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 14px rgba(15, 108, 189, 0.22),
      0 0 56px rgba(15, 108, 189, 0.55),
      0 0.85rem 2.25rem rgba(0, 0, 0, 0.45);
  }
}

@media (max-width: 991.98px) {
  .linkle-tg-flow {
    min-height: 380px;
    padding: 1.75rem 1.25rem;
  }

  .linkle-tg-flow__layout {
    gap: 1.25rem 1.5rem;
    min-height: 340px;
  }

  .linkle-tg-flow__hub-card {
    width: 5.75rem;
    height: 5.75rem;
  }

  .linkle-tg-flow__hub-card img {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 767.98px) {
  .linkle-tg-flow {
    min-height: 0;
    padding: 1.25rem 1rem;
  }

  .linkle-tg-flow__layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: 0;
  }

  .linkle-tg-flow__hub {
    order: -1;
  }

  .linkle-tg-flow__svg {
    display: none;
  }

  .linkle-tg-flow__dests,
  .linkle-tg-flow__panel--roles {
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .linkle-tg-flow__hub-card {
    animation: none;
  }

  .linkle-tg-flow__svg .linkle-tg-dot {
    display: none !important;
  }
}
