/* Landing navbar styles.
 *
 * Extracted from the inline <style> block in pages/index.html so any page
 * that renders the landing navbar (via the session-aware /api/layout/navbar
 * endpoint) can pick them up via <link>. Previously these styles travelled
 * only with pages/index.html, so pages like /login and /register that also
 * load the landing navbar had unstyled buttons and a broken top bar.
 *
 * This file is additive: pages/landing.css still owns the shared landing
 * color variables and base selectors. Load order on any page: fonts →
 * variables → base → landing.css → landing-nav.css. The button styles use
 * !important to override the minified base rules in landing.css. */

.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 1rem 1.5rem;
    padding-bottom: 20px;
    background: linear-gradient(180deg,
        rgba(140, 180, 220, 0.08) 0%,
        rgba(60, 100, 150, 0.04) 30%,
        transparent 55%,
        rgba(0, 0, 0, 0.06) 75%,
        rgba(0, 0, 0, 0.12) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(140, 180, 220, 0.1);
    border-bottom: 1px solid rgba(2, 10, 25, 0.2);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(160, 200, 240, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}
@media (min-width: 640px) {
    .landing-nav {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }
}

.landing-nav-inner {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 80rem;
    gap: 0.5rem;
}
@media (min-width: 640px) {
    .landing-nav-inner { gap: 1rem; }
}

.landing-nav-menu-container {
    position: relative;
    order: 1;
    flex-shrink: 0;
}

.landing-nav-brand {
    order: 2;
    flex-shrink: 0;
    cursor: pointer;
    transform: translateX(4px);
    text-decoration: none;
}
@media (min-width: 640px) {
    .landing-nav-brand { transform: translateY(0) translateX(4px); }
}

.landing-nav-brand-text {
    font-size: 1rem;
    filter:
        drop-shadow(0 0 10px rgba(74, 158, 255, 0.3))
        drop-shadow(0 0 20px rgba(74, 158, 255, 0.15));
}
@media (min-width: 640px) {
    .landing-nav-brand-text { font-size: 1.25rem; }
}

.landing-nav-ticker-slab {
    position: relative;
    display: none;
    order: 3;
    flex: 1;
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 9999px;
    overflow: hidden;
    background: rgba(10, 20, 35, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(74, 158, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
@media (min-width: 640px) {
    .landing-nav-ticker-slab { display: block; margin-top: -2px; }
}
.landing-nav-ticker-inner { padding-left: 2rem; padding-right: 2rem; overflow: hidden; }

/* ═══ Pill buttons (Login / Apply) ═══ */
.landing-nav-btn {
    position: relative;
    order: 4;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #1a3a6a 0%, #0e2748 40%, #081c38 100%) !important;
    color: #fff !important;
    text-decoration: none;
    font-family: inherit;
    font-size: 11.5px !important;
    font-weight: 600;
    letter-spacing: 0.04em !important;
    line-height: 1.2 !important;
    padding: 6px 16px !important;
    border: 1px solid rgba(184, 197, 208, 0.4) !important;
    border-top-color: rgba(200, 215, 230, 0.5) !important;
    border-bottom-color: rgba(100, 120, 140, 0.25) !important;
    border-radius: 50px;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.5),
        0 0 14px rgba(74, 158, 255, 0.12),
        0 0 4px rgba(184, 197, 208, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.15),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    text-transform: none !important;
}
.landing-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.landing-nav-btn::after { content: none; }
.landing-nav-btn:hover {
    color: #fff !important;
    background: linear-gradient(180deg, #224a7e 0%, #14325a 40%, #0c2444 100%) !important;
    border-color: rgba(184, 197, 208, 0.6) !important;
    border-top-color: rgba(200, 215, 230, 0.7) !important;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.5),
        0 0 16px rgba(74, 158, 255, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3) !important;
}
.landing-nav-btn:hover::before { opacity: 1; }
.landing-nav-btn:hover::after { left: 100%; }
.landing-nav-btn:active { transform: scale(0.95) !important; transition: transform 0.1s ease !important; }
.landing-nav-btn-login { margin-left: auto; }
.landing-nav-btn-apply { order: 5; }
.landing-nav-btn-apply.logged-in { margin-left: auto; transform: translateY(-2px); }
@media (max-width: 639px) {
    .landing-nav-btn-apply.logged-in { transform: translateY(1px); }
}
@media (min-width: 640px) {
    .landing-nav-btn { padding: 7px 22px !important; font-size: 13px !important; }
}

/* ═══ Grid-icon menu toggle ═══ */
.landing-grid-icon-btn {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(184, 197, 208, 0.2);
    background: transparent;
    overflow: hidden;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow:
        0 0 8px rgba(74, 158, 255, 0.15),
        0 0 18px rgba(74, 158, 255, 0.08),
        0 0 32px rgba(90, 200, 232, 0.04);
}
@media (min-width: 640px) {
    .landing-grid-icon-btn { width: 56px; height: 56px; transform: translateY(0); }
}
.landing-grid-icon-btn img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.landing-grid-icon-btn .landing-grid-icon-default { opacity: 1; }
.landing-grid-icon-btn .landing-grid-icon-hover { opacity: 0; }

/* ═══ Mobile: vertical-center nav items ═══ */
@media (max-width: 639px) {
    .landing-nav-login { transform: translateY(2px); }
    .landing-nav-brand { transform: translateY(4px) translateX(4px) !important; }
    .landing-grid-icon-btn { transform: translateY(4px) !important; }
}

/* ═══ MEMDEX brand text — electric shimmer on hover ═══
 * Extracted from css/effects.css so any page that renders the landing
 * navbar picks up the hover animation automatically — without having to
 * load all of effects.css just for this one selector. The .navbar-* half
 * of the original rule (dashboard navbar) stays in effects.css since it
 * only applies on authenticated pages that already load it. */
@keyframes memdexElectric {
    0%   { background-position: 100% center; filter: drop-shadow(0 0 8px rgba(74,158,255,.25)) drop-shadow(0 0 18px rgba(180,210,240,.1)); }
    50%  { filter: drop-shadow(0 0 16px rgba(100,170,255,.5)) drop-shadow(0 0 32px rgba(180,210,240,.2)); }
    100% { background-position: 0% center; filter: drop-shadow(0 0 8px rgba(74,158,255,.25)) drop-shadow(0 0 18px rgba(180,210,240,.1)); }
}
.landing-nav-brand-text { transition: letter-spacing .4s ease, filter .4s ease; }
.landing-nav-brand:hover .landing-nav-brand-text {
    background: linear-gradient(90deg,
        #C0D0E0 0%, #4A9EFF 20%, #B8CCE0 40%, #6EB4FF 60%, #D0DCE8 80%, #4A9EFF 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: memdexElectric 4.5s ease-in-out infinite alternate;
    letter-spacing: .22em;
}
@media (prefers-reduced-motion: reduce) {
    .landing-nav-brand:hover .landing-nav-brand-text { animation: none !important; }
}
