/* Floating navigation card; typography and colors inherit the Pyramidsoft brand system. */
.site-header {
    padding: 18px 24px 0;
    transition: padding 0.25s ease;
}

.site-navbar {
    position: relative;
    z-index: 2;
    max-width: var(--nav-max);
    min-height: 64px;
    padding: 11px 12px 11px 26px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 32px -24px rgba(15, 23, 42, 0.52), 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.24s ease, filter 0.24s ease;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
    padding-top: 8px;
}

.site-header.is-scrolled .site-navbar {
    border-color: rgba(203, 213, 225, 0.9);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 36px -24px rgba(15, 23, 42, 0.58), 0 3px 10px rgba(15, 23, 42, 0.06);
}

.site-header .site-nav-menu {
    display: none;
    gap: 4px;
}

.site-nav-link {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    color: #475569;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: var(--text-navigation);
    font-weight: var(--weight-semibold);
    line-height: 1.6;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.site-nav-link:hover {
    color: var(--brand-primary);
    background: #f8fafc;
    transform: translateY(-1px);
}

.site-nav-link.is-active {
    color: var(--brand-blue);
    background: #eff6ff;
    font-weight: 700;
}

.site-nav-cta {
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: var(--text-button);
    font-weight: var(--weight-bold);
    box-shadow: 0 10px 22px -12px rgba(3, 48, 110, 0.72);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.site-nav-cta:hover {
    box-shadow: 0 14px 28px -14px rgba(3, 48, 110, 0.78);
    transform: translateY(-1px);
}

.site-header .nav-menu-toggle {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 16px;
    background: rgba(239, 246, 255, 0.9);
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-menu-toggle:hover,
.nav-menu-toggle[aria-expanded="true"] {
    color: var(--brand-blue);
    border-color: #93c5fd;
    background: #dbeafe;
}

.nav-menu-toggle:active {
    transform: scale(0.96);
}

.site-header .mobile-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    width: min(380px, 84vw);
    height: auto;
    max-height: none;
    margin-top: 0;
    padding: max(20px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    visibility: hidden;
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 0;
    border: 0;
    border-left: 1px solid rgba(226, 232, 240, 0.95);
    flex-direction: column;
    border-radius: 0;
    background: #ffffff;
    box-shadow: -24px 0 48px -30px rgba(15, 23, 42, 0.62);
    transform: translateX(100%);
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.32s ease, visibility 0.32s ease;
}

.mobile-nav-panel.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

body::after {
    position: fixed;
    inset: 0;
    z-index: 45;
    visibility: hidden;
    content: '';
    opacity: 0;
    background: rgba(15, 23, 42, 0.38);
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

body.mobile-navigation-open {
    overflow: hidden;
}

body.mobile-navigation-open::after {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

body.mobile-navigation-open .site-navbar {
    visibility: hidden;
    opacity: 0;
    filter: none;
    pointer-events: none;
}

.mobile-nav-header {
    display: flex;
    min-height: 54px;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: flex-end;
}

.mobile-nav-close {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #0f172a;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.mobile-nav-close:hover {
    color: var(--brand-blue);
    border-color: #93c5fd;
    background: #dbeafe;
}

.mobile-nav-close:active {
    transform: scale(0.96);
}

.mobile-nav-close svg {
    width: 18px;
    height: 18px;
}

.mobile-nav-list {
    display: grid;
    gap: 0;
}

.mobile-nav-link {
    position: relative;
    display: flex;
    min-height: 43px;
    align-items: center;
    padding: 10px 2px;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.mobile-nav-link:hover {
    color: var(--brand-primary);
    background: transparent;
}

.mobile-nav-link.is-active {
    color: var(--brand-blue);
    background: transparent;
    font-weight: 700;
}

.mobile-nav-link.is-active::after {
    position: absolute;
    bottom: -1px;
    left: 2px;
    width: 38px;
    height: 2px;
    content: '';
    background: #3175f5;
}

.mobile-nav-action {
    margin-top: 16px;
    padding-top: 0;
    border-top: 0;
}

.mobile-nav-action a {
    min-height: 48px;
    color: #ffffff;
    background: #3175f5;
    font-family: var(--font-heading);
    box-shadow: 0 14px 28px -14px rgba(49, 117, 245, 0.72);
}

.mobile-nav-action a:hover {
    background: #2563eb;
}

.site-nav-link:focus-visible,
.site-nav-cta:focus-visible,
.nav-menu-toggle:focus-visible,
.mobile-nav-close:focus-visible,
.mobile-nav-link:focus-visible,
.mobile-nav-action a:focus-visible {
    outline: 3px solid rgba(3, 48, 110, 0.28);
    outline-offset: 3px;
}

@media (max-width: 1023px) {
    .site-header {
        padding: 10px 12px;
    }

    .site-header.is-scrolled {
        padding-top: 8px;
    }

    .site-navbar {
        min-height: 58px;
        padding: 7px 9px 7px 16px;
    }

}

@media (min-width: 1200px) {
    .site-header .site-nav-menu { display: flex; }
    .site-header .nav-menu-toggle,
    .site-header .mobile-nav-panel { display: none; }
}

@media (max-width: 639px) {
    .site-navbar {
        padding-left: 14px;
    }

    .site-header .mobile-nav-panel {
        width: min(340px, 84vw);
        padding-inline: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header,
    .site-navbar,
    .site-nav-link,
    .site-nav-cta,
    .nav-menu-toggle,
    .mobile-nav-close,
    .mobile-nav-panel,
    .mobile-nav-link {
        transition: none;
    }
}
