/* nav.css — one unified, theme-aware top navigation used on every page.
   Transparent over the hero on the home page (solidifies on scroll); solid on
   inner pages. Products & Pricing open rich mega-menus on hover (desktop) or
   inside the mobile drawer. Colors come from the theme tokens (--c-*). */

.lp-topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  font-family: 'Inter', 'Inter Placeholder', system-ui, sans-serif;
  color: #fff; /* transparent state sits over the dark hero */
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease,
    backdrop-filter 0.25s ease;
  border-bottom: 1px solid transparent;
}
.lp-topnav.is-solid {
  background: color-mix(in srgb, var(--c-bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--c-border);
  color: var(--c-text);
}
/* inner pages: offset content below the fixed nav (home hero sits under it) */
body.lp-fixednav {
  padding-top: 66px;
}
.lp-topnav__inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 66px;
  padding: 0 clamp(18px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 20px;
}

/* brand */
.lp-topnav__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.lp-topnav__brand svg {
  height: 22px;
  width: auto;
  display: block;
  fill: currentColor;
  color: inherit;
}

/* links */
.lp-topnav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.lp-topnav__item {
  position: relative;
}
.lp-topnav__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: inherit;
  opacity: 0.86;
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.lp-topnav__link:hover {
  opacity: 1;
  background: color-mix(in srgb, currentColor 8%, transparent);
}
.chev {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
.lp-topnav__link .chev {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.lp-topnav__item.has-mega:hover .lp-topnav__link .chev {
  transform: rotate(180deg);
}

/* actions */
.lp-topnav__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lp-topnav__toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lp-topnav__toggle:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
}
.lp-topnav__toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}
.lp-topnav__toggle .lp-ico-moon {
  display: none;
}
.lp-topnav__toggle[data-mode='light'] .lp-ico-sun {
  display: none;
}
.lp-topnav__toggle[data-mode='light'] .lp-ico-moon {
  display: block;
}
.lp-topnav__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 9px;
  background: var(--c-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.lp-topnav__cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.lp-topnav__burger {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.lp-topnav__burger svg {
  width: 24px;
  height: 24px;
}

/* ---- mega-menu ---- */
.lp-mega {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(720px, 90vw);
  background: var(--c-surface);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  padding: 20px;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.lp-topnav__item.has-mega:hover .lp-mega,
.lp-mega:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* hover bridge so the menu doesn't close in the gap */
.lp-topnav__item.has-mega::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
}
.lp-mega__intro {
  padding: 8px 10px;
  border-right: 1px solid var(--c-border);
}
.lp-mega__intro h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--c-text);
}
.lp-mega__intro p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-muted);
}
.lp-mega__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.lp-mega__card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.lp-mega__card:hover {
  background: color-mix(in srgb, var(--c-text) 6%, transparent);
}
.lp-mega__ico {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c-accent) 14%, transparent);
  color: var(--c-accent);
}
.lp-mega__ico svg {
  width: 20px;
  height: 20px;
}
.lp-mega__text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 2px;
}
.lp-mega__text span {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--c-muted);
}

/* ---- mobile ---- */
.lp-topnav__mobile {
  display: none;
}
@media (max-width: 900px) {
  .lp-topnav__links {
    display: none;
  }
  .lp-topnav__cta {
    display: none;
  }
  .lp-topnav__burger {
    display: grid;
  }
  .lp-topnav.is-open {
    background: var(--c-bg);
    color: var(--c-text);
    border-bottom-color: var(--c-border);
  }
  .lp-topnav__mobile {
    display: block;
    max-height: 0;
    overflow: hidden;
    background: var(--c-bg);
    color: var(--c-text);
    transition: max-height 0.3s ease;
  }
  .lp-topnav.is-open .lp-topnav__mobile {
    max-height: calc(100vh - 66px);
    overflow-y: auto;
    border-top: 1px solid var(--c-border);
  }
  .lp-topnav__mobile-inner {
    padding: 14px clamp(18px, 4vw, 40px) 28px;
  }
  .lp-m-group > summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 0;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--c-border);
  }
  .lp-m-group > summary::-webkit-details-marker {
    display: none;
  }
  .lp-m-group > summary .chev {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
  }
  .lp-m-group[open] > summary .chev {
    transform: rotate(180deg);
  }
  .lp-m-link {
    display: block;
    padding: 14px 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--c-text);
    text-decoration: none;
    border-bottom: 1px solid var(--c-border);
  }
  .lp-m-card {
    display: flex;
    gap: 12px;
    padding: 12px 0 12px 6px;
    text-decoration: none;
  }
  .lp-m-card .lp-mega__ico {
    width: 34px;
    height: 34px;
  }
  .lp-m-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
  }
  .lp-m-actions .lp-topnav__cta {
    display: inline-flex;
    flex: 1;
    justify-content: center;
  }
}
