/* TalentProof global navigation — tp- prefix, not body-scoped */

@keyframes logoSignal {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.85;
  }
  50% {
    transform: translateX(220%);
    opacity: 1;
  }
}

@keyframes btnGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(255, 45, 45, 0.35),
      0 2px 12px rgba(255, 45, 45, 0.2);
  }
  50% {
    box-shadow:
      0 0 18px 4px rgba(255, 45, 45, 0.35),
      0 4px 20px rgba(255, 45, 45, 0.3);
  }
}

@keyframes pillStamp {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  60% {
    transform: scale(1.04);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.tp-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--red);
  box-shadow: 0 0 8px rgba(255, 45, 45, 0.7);
  z-index: 2000;
  transition: width 0.08s linear;
  pointer-events: none;
}

.tp-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition:
    background 0.35s ease,
    backdrop-filter 0.35s ease,
    -webkit-backdrop-filter 0.35s ease,
    border-color 0.35s ease;
  font-family: var(--font-sans);
}

/* Mobile: nav scrolls with content (not sticky / fixed) */
@media (max-width: 767px) {
  .tp-nav {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
  }
}

.tp-nav.scrolled {
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tp-row {
  display: flex;
  align-items: center;
  height: 62px;
  padding: 0 var(--inset);
  gap: 0;
  transition: height 0.35s ease;
}

.tp-nav.scrolled .tp-row {
  height: 54px;
}

.tp-logo {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  position: relative;
  padding-right: clamp(20px, 3vw, 40px);
  color: inherit;
}

.tp-logo::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background: rgba(255, 45, 45, 0.3);
}

.tp-logo:hover .tp-logo-wordmark {
  opacity: 0.8;
}

.tp-logo-wordmark {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  transition: opacity 0.2s ease;
}

.tp-logo-line {
  width: 100%;
  height: 2px;
  background: rgba(255, 45, 45, 0.2);
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}

.tp-logo-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 60%;
  height: 100%;
  background: var(--red);
  border-radius: 1px;
  animation: logoSignal 2.2s ease-in-out infinite;
}

.tp-selector {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(16px, 3vw, 40px);
  min-width: 0;
}

.tp-pill-track {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 3px;
  position: relative;
  gap: 0;
}

.tp-pill-highlight {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 0;
  height: calc(100% - 6px);
  background: var(--red);
  border-radius: 5px;
  opacity: 1;
  transition:
    left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease;
  box-shadow: 0 0 16px rgba(255, 45, 45, 0.35);
  z-index: 0;
  pointer-events: none;
}

.tp-pill-highlight.tp-pill-highlight--preview-hover {
  opacity: 0.4;
  transition:
    left 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.2s ease;
}

.tp-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 18px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.25s ease;
  white-space: nowrap;
  user-select: none;
  transform-origin: center;
}

.tp-pill.stamp {
  animation: pillStamp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tp-pill:hover {
  color: rgba(255, 255, 255, 0.75);
}

.tp-pill.active {
  color: var(--white);
  font-weight: 700;
}

.tp-pill-home {
  padding: 7px 14px;
}

.tp-pill-icon {
  width: 14px;
  height: 14px;
  opacity: 0.5;
  transition: opacity 0.25s;
  flex-shrink: 0;
}

.tp-pill.active .tp-pill-icon {
  opacity: 1;
}

.tp-pill:hover .tp-pill-icon {
  opacity: 0.8;
}

.tp-sep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  margin: 0 clamp(12px, 2vw, 24px);
}

.tp-ctas {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-left: clamp(20px, 3vw, 40px);
  position: relative;
}

.tp-ctas::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background: rgba(255, 45, 45, 0.3);
}

.tp-btn-demo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  padding: 9px 18px;
  border: 1px solid rgba(255, 45, 45, 0.5);
  border-radius: 5px;
  background: rgba(255, 45, 45, 0.06);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.tp-btn-demo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

.tp-btn-demo:hover::before {
  opacity: 1;
}

.tp-btn-demo:hover {
  border-color: var(--red);
  box-shadow: 0 0 12px rgba(255, 45, 45, 0.15);
}

/* Default: same visual weight as Request Demo (outline). Solid + glow only on [aria-current]. */
.tp-btn-waitlist {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  padding: 9px 20px;
  background: rgba(255, 45, 45, 0.06);
  border: 1px solid rgba(255, 45, 45, 0.5);
  border-radius: 5px;
  transition:
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s,
    color 0.2s;
  white-space: nowrap;
  animation: none;
  box-shadow: none;
  transform: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.tp-btn-waitlist::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  border-radius: inherit;
}

.tp-btn-waitlist:hover::before {
  opacity: 1;
}

.tp-btn-waitlist:hover {
  background: rgba(255, 45, 45, 0.1);
  border-color: var(--red);
  box-shadow: 0 0 12px rgba(255, 45, 45, 0.15);
  transform: none;
}

/* Current route: one CTA stays “primary” (solid + glow), the other muted (outline). */
.tp-btn-demo[aria-current="page"],
.tp-btn-waitlist[aria-current="page"] {
  box-shadow:
    0 0 20px 5px rgba(255, 45, 45, 0.42),
    0 4px 22px rgba(255, 45, 45, 0.38);
  animation: btnGlow 3s ease-in-out infinite;
}

.tp-btn-demo[aria-current="page"] {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
  font-weight: 700;
}

.tp-btn-demo[aria-current="page"]::before {
  background: rgba(255, 255, 255, 0.1);
}

.tp-btn-demo[aria-current="page"]:hover {
  background: #e52828;
  border-color: #e52828;
  box-shadow: 0 4px 24px rgba(255, 45, 45, 0.45);
  transform: translateY(-1px);
}

.tp-btn-waitlist[aria-current="page"] {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
  font-weight: 700;
}

.tp-btn-waitlist[aria-current="page"]::before {
  background: rgba(255, 255, 255, 0.1);
}

.tp-btn-waitlist[aria-current="page"]:hover {
  background: #e52828;
  border-color: #e52828;
  box-shadow: 0 4px 24px rgba(255, 45, 45, 0.45);
  transform: translateY(-1px);
}

.tp-btn-arrow {
  display: inline-block;
}

/* Mobile menu controls (hidden on desktop/tablet) */
.tp-mobile-toggle {
  display: none;
}

.tp-mobile-menu {
  display: none;
}

@media (max-width: 767px) {
  .tp-row {
    height: 62px;
    padding-top: 0;
    padding-bottom: 0;
    align-items: center;
  }

  .tp-selector,
  .tp-sep,
  .tp-ctas {
    display: none;
  }

  .tp-logo {
    padding-right: 0;
    flex: 0 0 auto;
    min-width: max-content;
  }

  .tp-logo::after {
    display: none;
  }

  /* Same red wordmark + readable underline as desktop (track was too faint on small screens). */
  .tp-logo-wordmark {
    font-size: 15px;
    letter-spacing: 0.06em;
  }

  .tp-logo-line {
    background: rgba(255, 45, 45, 0.55);
    height: 2px;
  }

  .tp-mobile-toggle {
    margin-left: auto;
    display: inline-flex;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .tp-mobile-toggle-bar {
    width: 16px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .tp-nav.mobile-open .tp-mobile-toggle-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .tp-nav.mobile-open .tp-mobile-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .tp-nav.mobile-open .tp-mobile-toggle-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .tp-mobile-menu {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px var(--inset) 12px;
    background: rgba(0, 0, 0, 0.92);
  }

  .tp-nav.mobile-open .tp-mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .tp-mobile-link {
    display: block;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .tp-mobile-link:last-child {
    border-bottom: none;
  }

  .tp-mobile-link.active {
    color: #FF2D2D;
  }
}

/* Mobile/tablet nav: prevent pill text clipping */
@media (max-width: 520px) {
  .tp-row {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    align-items: flex-start;
  }

  /* Let pills take full row and scroll horizontally */
  .tp-selector {
    order: 2;
    flex: 1 1 100%;
    justify-content: flex-start;
    padding: 0;
    margin-top: 6px;
  }

  .tp-pill-track {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tp-pill-track::-webkit-scrollbar {
    display: none;
  }

  /* Hide separator so we don't waste width */
  .tp-sep {
    display: none;
  }

  /* Move CTAs below pills and reduce their footprint */
  .tp-ctas {
    order: 3;
    width: 100%;
    padding-left: 0;
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .tp-ctas::before {
    display: none;
  }

  .tp-btn-demo,
  .tp-btn-waitlist {
    padding: 9px 12px;
    font-size: 10px;
  }

  .tp-pill {
    padding: 7px 12px;
    font-size: 11px;
  }
}

/* Tablet nav: keep pills readable + CTAs not clipped */
@media (max-width: 899px) and (min-width: 521px) {
  .tp-row {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    align-items: flex-start;
  }

  .tp-selector {
    order: 2;
    flex: 1 1 100%;
    justify-content: flex-start;
    padding: 0;
    margin-top: 6px;
  }

  .tp-pill-track {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tp-pill-track::-webkit-scrollbar {
    display: none;
  }

  .tp-sep {
    display: none;
  }

  .tp-ctas {
    order: 3;
    width: 100%;
    padding-left: 0;
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .tp-ctas::before {
    display: none;
  }

  .tp-btn-demo,
  .tp-btn-waitlist {
    padding: 9px 12px;
    font-size: 10px;
    white-space: nowrap;
  }
}
