/* =========================================================
   HEADER
========================================================= */

header {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    z-index: 9999;

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* NAVBAR BACKGROUND — 60% */
    background: var(--background) / 0.6;

    border-bottom:
        1px solid var(--border);

    transition: all 0.3s ease;
}


header .container {
    max-width: 1280px;

    margin: 0 auto;

    padding: 0 24px;

    height: 64px;

    display: flex;

    align-items: center;

    justify-content: space-between;
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    display: flex;

    align-items: center;

    gap: 10px;

    text-decoration: none;

    color: var(--foreground);

    transition: opacity 0.2s;

    flex-shrink: 0;
}


.logo:hover {
    opacity: 0.8;
}


.logo-icon {
    width: 32px;
    height: 32px;

    border-radius: 6px;

    background: var(--gradient-primary);

    display: flex;

    align-items: center;

    justify-content: center;

    box-shadow: var(--shadow-glow);
}


.logo-icon svg {
    width: 16px;
    height: 16px;

    stroke: var(--primary-foreground);

    stroke-width: 2.5;
}


.logo-text {
    display: flex;

    flex-direction: column;

    gap: 0;

    line-height: 1;
}


.logo-text-main {
    font-family: var(--font-display);

    font-size: 14px;

    font-weight: 700;

    letter-spacing: -0.8px;
}


.logo-text-sub {
    font-family: var(--font-mono);

    font-size: 9px;

    color: var(--muted-foreground);

    letter-spacing: 3px;
}


/* =========================================================
   DESKTOP NAV
========================================================= */

nav {
    display: flex;

    align-items: center;

    gap: 32px;

    font-size: 14px;

    margin-left: auto;

    margin-right: 28px;
}


nav a {
    color: var(--muted-foreground);

    text-decoration: none;

    transition:
        color 0.2s ease;

    white-space: nowrap;
}


nav a:hover {
    color: var(--foreground);
}


nav a.active {
    color: var(--foreground);
}


/* =========================================================
   PRODUCTS DROPDOWN
========================================================= *//* =====================================================
   PRODUCTS DROPDOWN
===================================================== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

/* Arrow */
.nav-dropdown-toggle::after {
    content: "▼";
    font-size: 8px;
    transition: transform 0.25s ease;
}

/* Rotate arrow */
.nav-dropdown.active .nav-dropdown-toggle::after {
    transform: rotate(180deg);
}


/* DROPDOWN */

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;

    width: 280px;

    padding: 6px;

    background: var(--background);

    border: 1px solid var(--border);

    border-radius: 10px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.45);

    opacity: 0;
    visibility: hidden;

    transform: translateY(-8px);

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;

    z-index: 99999;
}


/* IMPORTANT */

.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* ITEMS */

.dropdown-item {
    display: block;

    width: 100%;

    padding: 14px 16px;

    box-sizing: border-box;

    color: var(--foreground);

    text-decoration: none;

    border-radius: 7px;

    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: var(--surface-elevated);
}

.dropdown-desc {
    display: block;

    color: var(--foreground);

    font-size: 13px;
}

/* =========================================================
   REQUEST DEMO BUTTON
========================================================= */

.btn-demo {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    padding: 9px 16px;

    border-radius: 7px;

    background:
        var(--gradient-primary);

    color:
        var(--primary-foreground);

    text-decoration: none;

    font-size: 12px;

    font-weight: 600;

    white-space: nowrap;

    box-shadow:
        var(--shadow-glow);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}


.btn-demo:hover {
    transform:
        translateY(-1px);

    box-shadow:
        0 8px 25px
        rgba(0,150,255,.25);
}


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.mobile-menu-btn {
    display: none;

    width: 40px;
    height: 40px;

    padding: 0;

    border:
        1px solid var(--border);

    border-radius: 8px;

    background:
        var(--surface);

    cursor: pointer;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 5px;
}


.mobile-menu-btn span {
    display: block;

    width: 19px;

    height: 2px;

    border-radius: 2px;

    background:
        var(--foreground);

    transition:
        transform .25s ease,
        opacity .25s ease;
}


/* Hamburger → X */

.mobile-menu-btn.active
span:nth-child(1) {
    transform:
        translateY(7px)
        rotate(45deg);
}


.mobile-menu-btn.active
span:nth-child(2) {
    opacity: 0;
}


.mobile-menu-btn.active
span:nth-child(3) {
    transform:
        translateY(-7px)
        rotate(-45deg);
}


/* =========================================================
   MOBILE MENU
========================================================= */

.mobile-menu {
    display: none;

    position: absolute;

    top: 64px;

    left: 12px;

    right: 12px;

    background:
        var(--background);

    backdrop-filter: blur(25px);

    -webkit-backdrop-filter: blur(25px);

    border:
        1px solid var(--border);

    border-radius: 12px;

    box-shadow:
        0 25px 60px
        rgba(0,0,0,.45);

    overflow: hidden;
}


.mobile-menu.open {
    display: block;
}


.mobile-menu-inner {
    padding: 8px;
}


/* =========================================================
   MOBILE LINKS
========================================================= */

.mobile-menu-inner > a,
.mobile-products-btn {
    width: 100%;

    min-height: 50px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 14px;

    border: none;

    border-radius: 7px;

    background: transparent;

    color:
        var(--foreground);

    text-decoration: none;

    font-family: inherit;

    font-size: 14px;

    text-align: left;

    cursor: pointer;

    box-sizing: border-box;
}


.mobile-menu-inner > a:hover,
.mobile-products-btn:hover {
    background:
        var(--surface-elevated);
}


.mobile-menu-inner > a span,
.mobile-products-btn span {
    color:
        var(--electric);

    font-size: 17px;
}


/* =========================================================
   MOBILE PRODUCTS
========================================================= */

.mobile-products {
    display: none;

    padding:
        0 8px 8px 18px;
}


.mobile-products.open {
    display: block;
}


.mobile-products a {
    display: block;

    padding:
        12px 14px;

    color:
        var(--muted-foreground);

    text-decoration: none;

    font-size: 12px;

    border-left:
        1px solid var(--electric);

    transition:
        color .2s ease,
        background .2s ease;
}


.mobile-products a:hover {
    color:
        var(--foreground);

    background:
        var(--surface-elevated);
}


/* =========================================================
   MOBILE DEMO
========================================================= */

.mobile-demo-btn {
    margin-top: 8px;

    justify-content: center !important;

    background:
        var(--gradient-primary) !important;

    color:
        var(--primary-foreground) !important;

    font-weight: 600;
}


/* =========================================================
   MOBILE BREAKPOINT
========================================================= */

@media (max-width: 850px) {

    header .container {
        height: 64px;

        padding:
            0 18px;
    }


    /* Hide desktop navigation */

    nav,
    .btn-demo {
        display: none;
    }


    /* Show hamburger */

    .mobile-menu-btn {
        display: flex;
    }


    .mobile-menu {
        top: 64px;
    }


    .logo img {
        max-height: 26px;

        width: auto;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 450px) {

    header .container {
        padding:
            0 14px;
    }


    .logo img {
        max-height: 23px;
    }


    .mobile-menu {
        left: 8px;

        right: 8px;
    }
}