@charset "utf-8";

/* =========================================================
    Global Navigation Overlay + Blur Effect
    - Vanilla implementation
    - camelCase IDs / classes
   ========================================================= */

/* Blur effect for the main content */
.isBlur {
    filter: blur(8px);
}

/* =========================================================
    Overlay Navigation
   ========================================================= */

#globalNav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 1);
    opacity: 0;
    z-index: -1; /* keep behind until opened */
    transition: all 0.3s;

  /* Open state */
    &.isNavOpen {
        opacity: 1;
        z-index: 999;
    }

  /* Scroll container (when links overflow vertically) */
    &.isNavOpen #globalNavList {
        position: fixed;
        z-index: 999;
        width: 100%;
        height: 100vh;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

  /* Centered nav list */
    ul {
        display: none;
        position: absolute;
        z-index: 999;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        padding: 0;
    }

    &.isNavOpen ul {
        display: block;
    }

    li {
        list-style: none;
        text-align: center;
    }

    a {
        display: block;
        padding: 10px;
        color: #888;
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-weight: 100;
        font-family: var(--font-base);
    }
}

/* =========================================================
    Toggle Button (Hamburger / Close)
   ========================================================= */

.navToggleBtn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    cursor: pointer;

  /* Remove default button styling */
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;

  /* Optional: suppress tap highlight on iOS */
    -webkit-tap-highlight-color: transparent;

  /* Lines */
    span {
        display: inline-block;
        position: absolute;
        left: 14px;
        width: 45%;
        height: 3px;
        border-radius: 2px;
        background-color: #666;
        transition: all 0.4s;
    }

    span:nth-of-type(1) {
        top: 15px;
    }

    span:nth-of-type(2) {
        top: 23px;
    }

    span:nth-of-type(3) {
        top: 31px;
    }

  /* Transform into "X" */
    &.isActive {
        span:nth-of-type(1) {
            top: 18px;
            left: 18px;
            width: 30%;
            transform: translateY(6px) rotate(-45deg);
        }

        span:nth-of-type(2) {
            opacity: 0;
        }

        span:nth-of-type(3) {
        top: 30px;
        left: 18px;
        width: 30%;
        transform: translateY(-6px) rotate(45deg);
        }
    }

    /* Focus styles */
    &:focus {
        outline: none;
    }

    &:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: 4px;
        border-radius: 6px;
    }
}