/* "Tools" navigation menu: hero pill-nav dropdown, sticky navbar dropdown and
   the expandable group inside the mobile hamburger menu.
   Markup is rendered by components/features/landing/LandingToolsMenu.js. */

.lp-tools {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lp-tools-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.lp-tools-trigger:focus {
  outline: none;
}
.lp-tools-trigger:focus-visible {
  outline: 2px solid rgba(39, 176, 121, 0.7);
  outline-offset: 2px;
  border-radius: 0.5rem;
}
.lp-tools-chev {
  width: 0.82em;
  height: 0.82em;
  flex: none;
  opacity: 0.7;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), opacity 160ms ease;
}
.lp-tools.is-open .lp-tools-chev {
  transform: rotate(180deg);
  opacity: 1;
}

/* Hero pill nav: give the open trigger a resting tint */
.lp-tools--hero.is-open > .lp-tools-trigger {
  background: rgba(15, 23, 42, 0.06);
  color: #0b1220;
}
.lp-tools--hero.is-open > .nh-hero-nav-link--active {
  color: #1e7a34;
}

/* Sticky landing navbar (Jobs / Companies pages) */
.lp-tools--nav {
  display: none;
}
@media (min-width: 900px) {
  .lp-tools--nav {
    display: inline-flex;
  }
}
.lp-tools--nav.is-open > .landing-nav-link::after {
  transform: scaleX(1);
}
.lp-tools--nav .lp-tools-menu {
  top: calc(100% + 18px);
}

/* Dropdown card */
.lp-tools-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 90;
  width: 19.75rem;
  max-width: calc(100vw - 2rem);
  padding: 0.55rem;
  border-radius: 18px;
  /* fully opaque: page content must never bleed through the open menu */
  background: #ffffff;
  border: 1px solid rgba(12, 46, 38, 0.1);
  box-shadow:
    0 30px 70px -30px rgba(11, 45, 38, 0.45),
    0 12px 32px -16px rgba(0, 0, 0, 0.18);
  font-family: "Outfit", "DM Sans", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  color: #0c2e26;
  transform: translate(-50%, -8px) scale(0.97);
  transform-origin: top center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 200ms;
}
.lp-tools.is-open .lp-tools-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
  transition:
    opacity 160ms ease,
    transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
/* caret */
.lp-tools-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 13px;
  height: 13px;
  border-radius: 3px 0 0 0;
  background: #ffffff;
  border-left: 1px solid rgba(12, 46, 38, 0.1);
  border-top: 1px solid rgba(12, 46, 38, 0.1);
  transform: translateX(-50%) rotate(45deg);
}
/* invisible hover bridge between trigger and card */
.lp-tools-menu::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -20px;
  height: 20px;
}

.lp-tools-menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.lp-tools-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.66rem 0.72rem;
  border-radius: 13px;
  text-decoration: none;
  color: inherit;
  transition: background 160ms ease;
}
.lp-tools-item:hover,
.lp-tools-item:focus-visible {
  background: rgba(15, 148, 87, 0.08);
  outline: none;
  color: inherit;
}
.lp-tools-item.is-current {
  background: rgba(15, 148, 87, 0.11);
}
.lp-tools-item-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  color: #0b6b41;
  background: linear-gradient(160deg, rgba(99, 234, 113, 0.32), rgba(39, 176, 121, 0.14));
  border: 1px solid rgba(39, 176, 121, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease;
}
.lp-tools-item-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}
.lp-tools-item:hover .lp-tools-item-icon,
.lp-tools-item:focus-visible .lp-tools-item-icon {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 10px 20px -12px rgba(39, 176, 121, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.lp-tools-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.lp-tools-item-title {
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0c2e26;
}
.lp-tools-item.is-current .lp-tools-item-title {
  color: #0b6b41;
}
.lp-tools-item-desc {
  font-size: 0.76rem;
  line-height: 1.35;
  color: #5a726b;
}
.lp-tools-item-arrow {
  flex: none;
  width: 1rem;
  height: 1rem;
  color: #0f9457;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 160ms ease, transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
.lp-tools-item-arrow svg {
  width: 100%;
  height: 100%;
}
.lp-tools-item:hover .lp-tools-item-arrow,
.lp-tools-item:focus-visible .lp-tools-item-arrow,
.lp-tools-item.is-current .lp-tools-item-arrow {
  opacity: 1;
  transform: none;
}
.lp-tools-menu-foot {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.4rem 0.25rem 0;
  padding: 0.62rem 0.55rem 0.3rem;
  border-top: 1px solid rgba(12, 46, 38, 0.08);
  font-size: 0.72rem;
  color: #7c948d;
}
.lp-tools-menu-foot::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #27b079;
  box-shadow: 0 0 0 3px rgba(39, 176, 121, 0.18);
}

/* Mobile hamburger: expandable "Tools" group */
.landing-mobile-group {
  display: flex;
  flex-direction: column;
}
.landing-mobile-group-toggle .lp-tools-chev {
  width: 1.1rem;
  height: 1.1rem;
  opacity: 0.45;
}
.landing-mobile-group.is-open > .landing-mobile-group-toggle {
  background: rgba(var(--black-color-rgb), 0.04);
}
.landing-mobile-group.is-open .lp-tools-chev {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--primary-color-dark);
}
.landing-mobile-sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.landing-mobile-group.is-open .landing-mobile-sub {
  grid-template-rows: 1fr;
}
.landing-mobile-sub-inner {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.35rem;
  transition: padding 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.landing-mobile-group.is-open .landing-mobile-sub-inner {
  padding: 0.2rem 0.35rem 0.5rem;
}
.landing-mobile-sublink {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.75rem;
  border-radius: 13px;
  text-decoration: none;
  color: var(--text-color-primary);
  -webkit-tap-highlight-color: transparent;
  transition: background 160ms ease;
}
.landing-mobile-sublink:hover,
.landing-mobile-sublink:active {
  background: rgba(var(--black-color-rgb), 0.05);
  color: var(--text-color-primary);
}
.landing-mobile-sublink.is-current {
  background: rgba(var(--primary-color-rgb), 0.12);
}
.landing-mobile-sublink .lp-tools-item-icon {
  width: 2.3rem;
  height: 2.3rem;
}
.landing-mobile-sublink .lp-tools-item-title {
  font-family: "Outfit", "DM Sans", sans-serif;
  font-size: 1rem;
  color: var(--text-color-primary);
}
.landing-mobile-sublink .lp-tools-item-desc {
  color: var(--text-color-secondary);
}
.landing-mobile-sublink .lp-tools-item-arrow {
  opacity: 0.45;
  transform: none;
  color: var(--text-color-primary);
}
.landing-mobile-sublink.is-current .lp-tools-item-arrow {
  color: var(--primary-color-dark);
  opacity: 1;
}

/* Stacking / clipping so the dropdown can escape its hero */
.nh-hero-header {
  position: relative;
  z-index: 40;
}
/* While a menu is open, lift the hero container that holds it above any
   sibling content (sticky rails, index cards, featured rows). */
.nh-hero-inner:has(.lp-tools.is-open),
.lb-hero-inner:has(.lp-tools.is-open),
.ci-hero-inner:has(.lp-tools.is-open),
.fp-inner:has(.lp-tools.is-open) {
  z-index: 70;
}
.nh-hero-nav {
  position: relative;
}
#landing-blog .lb-hero-inner {
  z-index: 9;
}
#landing-blog-detail .lb-hero--detail {
  overflow: visible;
}

@media (prefers-reduced-motion: reduce) {
  .lp-tools-menu,
  .lp-tools-chev,
  .lp-tools-item-icon,
  .lp-tools-item-arrow,
  .landing-mobile-sub,
  .landing-mobile-sub-inner {
    transition: none;
  }
}
