/* 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:focus-within .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;
    padding: 0;
    margin-top: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.16);
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transform-origin: top center;
    transition: opacity 0.12s ease, transform 0.15s ease-out, visibility 0.15s;
    pointer-events: none;
}

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

.home-drop:hover .home-drop-panel,
.home-drop:focus-within .home-drop-panel,
.home-drop.is-open .home-drop-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.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;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.12s ease, transform 0.15s ease-out, background-color 0.12s ease;
}

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

.home-mega-item-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
}

.home-mega-item:hover .home-mega-item-title {
    color: #000000;
}

.home-mega-item-desc {
    display: block;
    font-size: 12px;
    color: #64748B;
    margin-top: 2px;
    line-height: 1.45;
}

.home-drop:hover .home-mega-item,
.home-drop:focus-within .home-mega-item,
.home-drop.is-open .home-mega-item {
    opacity: 1;
    transform: translateY(0);
}

.home-drop:hover .home-mega-item:nth-child(1),
.home-drop:focus-within .home-mega-item:nth-child(1),
.home-drop.is-open .home-mega-item:nth-child(1) { transition-delay: 0.03s; }
.home-drop:hover .home-mega-item:nth-child(2),
.home-drop:focus-within .home-mega-item:nth-child(2),
.home-drop.is-open .home-mega-item:nth-child(2) { transition-delay: 0.07s; }
.home-drop:hover .home-mega-item:nth-child(3),
.home-drop:focus-within .home-mega-item:nth-child(3),
.home-drop.is-open .home-mega-item:nth-child(3) { transition-delay: 0.11s; }
.home-drop:hover .home-mega-item:nth-child(4),
.home-drop:focus-within .home-mega-item:nth-child(4),
.home-drop.is-open .home-mega-item:nth-child(4) { transition-delay: 0.15s; }
.home-drop:hover .home-mega-item:nth-child(5),
.home-drop:focus-within .home-mega-item:nth-child(5),
.home-drop.is-open .home-mega-item:nth-child(5) { transition-delay: 0.19s; }
.home-drop:hover .home-mega-item:nth-child(6),
.home-drop:focus-within .home-mega-item:nth-child(6),
.home-drop.is-open .home-mega-item:nth-child(6) { transition-delay: 0.23s; }

/* Hover highlight itself must be instant — kill the entrance stagger delay */
.home-drop:hover .home-mega-item:hover,
.home-drop:focus-within .home-mega-item:hover,
.home-drop.is-open .home-mega-item:hover {
    transition-delay: 0s;
}

@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;
    }
}
