/* Shared landing navbar — byte-for-byte the landing page topbar.
   Loaded by secondary pages via partials.landing_nav.
   Do not rename classes here: they intentionally match the landing page. */

.wrap {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hidden on scroll down, revealed on scroll up */
.topbar.nav-hidden {
    transform: translateY(-101%);
}

@media (prefers-reduced-motion: reduce) {
    .topbar {
        transition: none;
    }
}

.topbar-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-inner {
    justify-content: flex-start;
}

.topbar .brand,
.topbar .cta,
.topbar-end {
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand img {
    height: 38px;
    width: auto;
}

.home-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0 auto;
    min-width: 0;
}

.home-nav>a,
.home-drop-btn {
    color: #000000;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.home-nav>a:hover,
.home-drop-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
    text-decoration: none;
}

.home-drop {
    position: static;
    padding: 12px 14px;
    margin: -12px -14px;
}

.home-drop-btn::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 4px solid currentColor;
    vertical-align: 2px;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-drop:hover .home-drop-btn::after,
.home-drop.is-open .home-drop-btn::after {
    transform: rotate(180deg);
}

.home-drop-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0;
    box-sizing: border-box;
    padding: 0;
    margin-top: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 0 solid #e2e8f0;
    box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.16);
    z-index: 5;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform-origin: top center;
    transition:
        height 380ms cubic-bezier(0.22, 1, 0.36, 1),
        border-bottom-width 380ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 200ms ease;
    will-change: height, opacity;
}

.home-drop-panel::before {
    content: "";
    position: absolute;
    top: -24px;
    left: 0;
    right: 0;
    height: 24px;
}

.home-drop:hover .home-drop-panel,
.home-drop.is-open .home-drop-panel {
    height: var(--panel-height, auto);
    border-bottom-width: 1px;
    opacity: 1;
    pointer-events: auto;
}

.home-drop-panel.is-measuring {
    height: auto !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: none !important;
    visibility: hidden !important;
}

.home-drop-panel > * {
    opacity: 0;
    transform: translateY(-4px);
    transition:
        opacity 140ms ease,
        transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-drop:hover .home-drop-panel > *,
.home-drop.is-open .home-drop-panel > * {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .home-drop-panel,
    .home-drop-panel > * {
        transition: none !important;
    }
}

.home-mega-inner {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    padding: 16px 0 18px;
    display: grid;
    grid-template-columns: 320px minmax(280px, 380px);
    justify-content: start;
    gap: 32px;
    align-items: start;
}

.home-mega-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #059669;
    margin-bottom: 8px;
}

.home-mega-title {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #000000;
    margin: 0;
}

.home-mega-desc {
    font-size: 13px;
    line-height: 1.55;
    color: #64748B;
    margin: 8px 0 0;
}

.home-mega-items {
    display: grid;
    gap: 2px;
    justify-items: start;
}

.home-mega-items-2 {
    grid-template-columns: 1fr;
    max-width: 380px;
}

.home-mega-items-3 {
    grid-template-columns: 1fr 1fr;
    max-width: 560px;
    column-gap: 8px;
}

.home-mega-item {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    padding: 6px 10px 6px 8px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.12s ease;
}

.home-mega-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

@media (prefers-reduced-motion: reduce) {
    .home-drop-panel,
    .home-mega-item {
        transition: none;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-drop-panel,
    .home-drop-btn::after {
        transition: none;
    }
}

.topbar-end {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 14px;
    border: none;
    border-radius: 9999px;
    background: #000000;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    text-decoration: none;
    cursor: pointer;
}

.cta:hover {
    background: #18181b;
}

.menu-toggle,
.home-mobile-menu {
    display: none;
}

.menu-toggle {
    align-items: center;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #000000;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.home-nav a:focus-visible,
.home-drop-btn:focus-visible,
.menu-toggle:focus-visible,
.home-mobile-menu a:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 3px;
}

.home-mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: #000000;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.home-mobile-label {
    display: block;
    margin-top: 8px;
    color: #71717a;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 960px) {
    .topbar-inner {
        height: auto;
        min-height: 64px;
        padding: 10px 0;
    }
}

@media (max-width: 720px) {
    .wrap {
        width: min(1160px, calc(100% - 32px));
    }

    .home-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .topbar-end {
        gap: 14px;
    }

    .topbar .cta {
        height: 44px;
        padding: 0 14px;
        font-size: 14px;
        white-space: nowrap;
    }

    .brand img {
        height: 24px;
    }

    .home-mobile-menu:not([hidden]) {
        display: block;
        padding-bottom: 8px;
        border-top: 1px solid #e2e8f0;
    }
}

/* Nav link colors (shared across all public pages) */
.public-top-nav .nav-link-item,
.public-top-nav .nav-links a {
    color: #0F172A;
    text-decoration: none;
}
.public-top-nav .nav-link-item:hover,
.public-top-nav .nav-links a:hover {
    color: #059669;
}

/* Landing nav mega items (shared across all public pages) */
.home-mega-item,
.home-mega-item-title {
    color: #0F172A;
    text-decoration: none;
}
.home-mega-item:hover,
.home-mega-item:hover .home-mega-item-title {
    color: #0F172A;
}
