/* TechM8 animated section labels — echoes the floating navigation underline. */
.tm8-animated-label {
  position: relative !important;
  display: inline-block !important;
  width: fit-content;
  max-width: 100%;
  border-bottom: 0 !important;
  padding-bottom: 8px !important;
  letter-spacing: .15em !important;
  transition: letter-spacing .42s cubic-bezier(.2,.75,.25,1), color .25s ease !important;
}

.tm8-animated-label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b026ff 0%, #8b42ff 48%, #13bff3 100%);
  box-shadow: 0 0 14px rgba(176, 38, 255, .18);
  transform: scaleX(.38);
  transform-origin: left center;
  transition: transform .5s cubic-bezier(.2,.75,.25,1), box-shadow .3s ease;
}

.tm8-animated-label.tm8-label-active,
.tm8-animated-label:hover,
.tm8-animated-label:focus-within {
  letter-spacing: .18em !important;
}

.tm8-animated-label.tm8-label-active {
  animation: tm8-label-tracking 3.2s cubic-bezier(.45,0,.25,1) infinite;
}

.tm8-animated-label.tm8-label-active::after {
  animation: tm8-label-breathe 3.2s cubic-bezier(.45,0,.25,1) infinite;
}

.tm8-animated-label:hover::after,
.tm8-animated-label:focus-within::after {
  animation: none;
  transform: scaleX(1);
  box-shadow: 0 0 18px rgba(176, 38, 255, .28);
}

@keyframes tm8-label-breathe {
  0%, 100% { transform: scaleX(.38); transform-origin: left center; }
  42%, 62% { transform: scaleX(1); transform-origin: left center; }
}

@keyframes tm8-label-tracking {
  0%, 100% { letter-spacing: .15em; }
  42%, 62% { letter-spacing: .18em; }
}

@media (max-width: 780px) {
  .tm8-animated-label {
    letter-spacing: .14em !important;
  }

  .tm8-animated-label.tm8-label-active,
  .tm8-animated-label:hover,
  .tm8-animated-label:focus-within {
    letter-spacing: .16em !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tm8-animated-label,
  .tm8-animated-label::after {
    transition: none !important;
    animation: none !important;
  }

  .tm8-animated-label::after {
    transform: scaleX(1);
  }
}
