/* A.L.E.A interaction layer — loaded only on the A.L.E.A page */

.aleaLive {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(16, 197, 160, .35);
  background: linear-gradient(90deg, rgba(16, 197, 160, .14), rgba(0, 121, 194, .1));
  box-shadow: 0 0 24px rgba(16, 197, 160, .08);
}

.aleaLiveDot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: #10C5A0;
  box-shadow: 0 0 0 0 rgba(16, 197, 160, .65);
  animation: aleaLivePulse 1.8s ease-out infinite;
}

.aleaLiveText {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
  color: rgba(255, 255, 255, .92);
}

@keyframes aleaLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 197, 160, .55); }
  70% { box-shadow: 0 0 0 8px rgba(16, 197, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 197, 160, 0); }
}

.aleaInfographicFigure {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
}

.aleaInfographicFigure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .16) 50%, transparent 62%);
  transform: translateX(-120%);
  animation: aleaSweep 6.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes aleaSweep {
  0%, 62% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.aleaPacket {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 3px rgba(16, 197, 160, .95), 0 0 16px rgba(0, 121, 194, .75);
  pointer-events: none;
}

.aleaNode .aleaPacket {
  left: 50%;
  top: -22px;
  margin-left: -4px;
  animation: aleaPacketDown 1.6s linear infinite;
}

.aleaFramework > li .aleaPacket {
  left: 24px;
  bottom: -22px;
  animation: aleaPacketDown 1.6s linear infinite;
}

@keyframes aleaPacketDown {
  0% { transform: translateY(0); opacity: 0; }
  18% { opacity: 1; }
  82% { opacity: 1; }
  100% { transform: translateY(16px); opacity: 0; }
}

@media (min-width: 900px) {
  .aleaFramework > li .aleaPacket { display: none; }

  /* Center the track on the stage number and icon (40px row, 18px padding, 1px border). */
  .aleaFramework::before {
    top: 38px;
  }

  .aleaFramework > li:not(:last-child)::before {
    top: 37px;
  }

  .aleaFramework > li:not(:last-child)::after {
    top: 31px;
  }

  .aleaFramework::after,
  .aleaJourney::after {
    content: "";
    position: absolute;
    top: 31px;
    left: 8%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 12px 3px rgba(16, 197, 160, .9);
    animation: aleaTravel 3.6s linear infinite;
    z-index: 2;
    pointer-events: none;
  }

  .aleaFramework::after { top: 34px; }

  .aleaJourney {
    position: relative;
  }

  .aleaJourney::before {
    content: "";
    position: absolute;
    top: 36px;
    left: 6%;
    right: 6%;
    height: 2px;
    background: linear-gradient(90deg, rgba(16, 197, 160, .2), var(--accent), rgba(0, 121, 194, .35));
    z-index: 0;
  }

  .aleaJourney li { position: relative; z-index: 1; }

  .aleaJourney::after { top: 31px; }
}

@keyframes aleaTravel {
  from { left: 8%; opacity: .2; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  to { left: 88%; opacity: .2; }
}

.aleaNode,
.aleaFramework > li,
.aleaJourney > li,
.aleaCard,
.aleaCompareCard,
.aleaWhyList li,
.aleaOutcome {
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, opacity .25s ease;
}

.aleaNode:hover,
.aleaNode:focus-visible,
.aleaNode.is-lit,
.aleaFramework > li:hover,
.aleaFramework > li:focus-visible,
.aleaFramework > li.is-lit,
.aleaJourney > li:hover,
.aleaJourney > li:focus-visible,
.aleaJourney > li.is-lit,
.aleaCard:hover,
.aleaCard:focus-visible,
.aleaCard.is-lit,
.aleaCompareCard:hover,
.aleaCompareCard:focus-visible,
.aleaCompareCard.is-lit,
.aleaWhyList li:hover,
.aleaWhyList li:focus-visible,
.aleaWhyList li.is-lit,
.aleaOutcome:hover,
.aleaOutcome:focus-visible,
.aleaOutcome.is-lit {
  transform: translateY(-2px);
  border-color: rgba(16, 197, 160, .7);
  box-shadow: 0 0 0 1px rgba(16, 197, 160, .28), 0 12px 28px rgba(0, 0, 0, .22);
  outline: none;
}

.aleaFlow.is-focused .aleaNode,
.aleaFramework.is-focused > li,
.aleaJourney.is-focused > li,
.aleaCardGrid.is-focused .aleaCard,
.aleaCompare.is-focused .aleaCompareCard,
.aleaWhyList.is-focused li {
  opacity: .42;
}

.aleaFlow.is-focused .is-hot,
.aleaFlow.is-focused .is-lit,
.aleaFramework.is-focused > li.is-hot,
.aleaFramework.is-focused > li.is-lit,
.aleaJourney.is-focused > li.is-hot,
.aleaJourney.is-focused > li.is-lit,
.aleaCardGrid.is-focused .aleaCard.is-lit,
.aleaCompare.is-focused .aleaCompareCard.is-lit,
.aleaWhyList.is-focused li.is-lit {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .aleaLiveDot,
  .aleaInfographicFigure::after,
  .aleaPacket,
  .aleaFramework::after,
  .aleaJourney::after {
    animation: none !important;
    display: none;
  }

  .aleaNode,
  .aleaFramework > li,
  .aleaJourney > li,
  .aleaCard,
  .aleaCompareCard,
  .aleaWhyList li,
  .aleaOutcome {
    animation: none !important;
    transition: none !important;
  }
}
