/* Ghostir site shell — shared header + subtle background (all pages except full landing atmosphere) */

:root {
    --ghost-header-height: 4.5rem;
    --ghost-padding-x: clamp(1.25rem, 4vw, 2rem);
    --ghost-bg-deep: #0b1220;
}

/* Overlay scrollbar (no gutter) on standard site pages */
html:has(body.ghost-site:not(.landing-page)) {
    scroll-behavior: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html:has(body.ghost-site:not(.landing-page))::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}

/* Body layout */
body.ghost-site.ghost-body {
    display: block;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: stretch;
    overflow-x: hidden;
}

body.ghost-site:not(.landing-page):not(.parkify-page),
body.ghost-site.login-page {
    background: var(--ghost-bg-deep);
}

body.parkify-page.ghost-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    overflow: hidden;
}

body.parkify-page .ghost-container {
    min-height: 0;
    padding-top: 0;
}

body.parkify-page .site-atmosphere {
    display: none;
}

body.ghost-site .preloader {
    background: var(--ghost-bg-deep);
}

/* Subtle fixed background (less busy than landing) */
.site-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 85% 45% at 50% -15%, rgba(56, 189, 248, 0.09) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 80%, rgba(167, 139, 250, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 120% 85% at 50% 100%, #1b2735 0%, var(--ghost-bg-deep) 55%, #05080f 100%);
}

body.landing-page .site-atmosphere {
    display: none;
}

.site-atmosphere::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.45), transparent),
        radial-gradient(1px 1px at 78% 32%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 45% 72%, rgba(191, 219, 254, 0.3), transparent),
        radial-gradient(1px 1px at 88% 68%, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(1px 1px at 22% 88%, rgba(255, 255, 255, 0.3), transparent);
}

body.ghost-site .ghost-container {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: none;
    min-height: calc(100dvh - var(--ghost-header-height));
    padding-top: var(--ghost-header-height);
    box-sizing: border-box;
}

body.landing-page .ghost-container {
    min-height: 0;
    padding-top: 0;
}

body.twitch-go-page .ghost-container {
    min-height: 0;
    padding-top: 0;
}

body.login-page .ghost-container {
    min-height: 100dvh;
    padding-top: 0;
}

/* Shared header — blur + long fade tail (no hard edge when scrolling) */
body.ghost-site .top-navigation.ghost-header-overlay {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    width: 100%;
    margin: 0;
    padding: 0.85rem var(--ghost-padding-x) 1rem;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    max-width: none;
    overflow: visible;
    isolation: isolate;
    background: transparent;
    border: none;
}

body.ghost-site .top-navigation.ghost-header-overlay::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: calc(100% + 3.5rem);
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.94) 0%,
        rgba(15, 23, 42, 0.78) 30%,
        rgba(15, 23, 42, 0.42) 58%,
        rgba(15, 23, 42, 0.12) 78%,
        rgba(15, 23, 42, 0) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 100%);
}

body.landing-page .top-navigation.ghost-header-overlay {
    position: fixed;
}

body.ghost-site .top-navigation .logo {
    float: none;
    flex: 0 0 auto;
    margin-right: 0;
    padding: 0;
    min-height: auto;
    max-height: none;
    border-radius: 0;
}

body.ghost-site .top-navigation .logo img {
    height: 40px;
    width: auto;
}

body.ghost-site .top-navigation .ghost-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    list-style: none;
    row-gap: 0.625rem;
}

body.ghost-site .top-navigation .ghost-nav > li {
    display: flex;
    align-items: center;
    margin: 0;
}

body.ghost-site .top-navigation .navigation-button,
body.ghost-site .top-navigation .login-button {
    flex-shrink: 0;
    white-space: nowrap;
}

.top-navigation .navigation-button.nav-projects {
    border-color: rgba(148, 163, 184, 0.35);
}

.top-navigation .navigation-button.nav-menuly {
    border-color: rgba(245, 158, 11, 0.45);
}

.top-navigation .navigation-button.nav-menuly:hover {
    background-color: rgba(245, 158, 11, 0.12);
}

@media (min-width: 992px) {
    body.ghost-site .top-navigation.ghost-header-overlay {
        flex-wrap: nowrap;
    }

    body.ghost-site .top-navigation .ghost-nav {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }
}

@media (max-width: 991px) {
    body.ghost-site:not(.landing-page) {
        --ghost-header-height: 7.25rem;
    }

    body.ghost-site .top-navigation.ghost-header-overlay {
        flex-direction: column;
        align-items: stretch;
    }

    body.ghost-site .top-navigation .logo {
        justify-content: center;
        width: 100%;
    }

    body.ghost-site .top-navigation .ghost-nav {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    body.landing-page {
        --ghost-header-height: 7.5rem;
    }
}
