@charset "UTF-8";

body.menu-open {
    overflow: hidden;
}


/* =========================================================
   HEADER
========================================================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    padding: 0 clamp(30px, 3.125vw, 60px);
    box-sizing: border-box;
    z-index: 1000;
    background: rgba(90, 90, 90, 0.60);
    color: #fff;
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease;
}


/* =========================================================
   HEADER TOP
========================================================= */

.header-top {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}

.logo-main {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 5px;
}

.logo-sub {
    margin-top: 3px;
    font-size: 8px;
    letter-spacing: 3px;
    opacity: 0.7;
}


/* =========================================================
   NAV
========================================================= */

.nav {
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.083vw, 40px);
}

.header-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.mobile-menu-button {
    display: none;
}

@media (min-width: 701px) {
    .header-top {
        position: relative;
    }

    .header-menu {
        display: contents;
    }

    .main-nav {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .header-top .member-nav {
        margin-left: auto;
    }
}

@media (max-width: 700px) {
    .header,
    .header-top {
        height: 64px;
    }

    .header {
        padding: 0 16px;
    }

    .logo-main {
        font-size: 21px;
        letter-spacing: 4px;
    }

    .header-menu {
        position: fixed;
        inset: 64px 0 0;
        z-index: 999;
        flex-direction: column;
        align-items: stretch;
        padding: 28px 24px 40px;
        overflow-y: auto;
        background: #fff;
        color: #222;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    }

    .header.menu-open .header-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .header-menu .nav {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .header-menu .nav a {
        min-height: 50px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid #eee;
        color: #222;
        font-size: 15px;
    }

    .header-menu .member-nav {
        margin: 20px 0 0;
    }

    .header-menu .member-nav span {
        display: none;
    }

    .mobile-menu-button {
        order: 3;
        width: 44px;
        height: 44px;
        margin-left: 8px;
        padding: 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        border: 0;
        background: transparent;
        color: inherit;
        cursor: pointer;
    }

    .header-top > .mobile-menu-button {
        margin-left: auto;
    }

    .mobile-menu-button span {
        width: 22px;
        height: 2px;
        display: block;
        background: currentColor;
        transition: transform .2s ease, opacity .2s ease;
    }

    .header.menu-open .mobile-menu-button span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .header.menu-open .mobile-menu-button span:nth-child(2) { opacity: 0; }
    .header.menu-open .mobile-menu-button span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .header-search {
        order: 2;
        margin-left: auto;
    }
}

.header-top > .nav:first-of-type {
    margin-left: auto;
}

.nav a {
    color: inherit;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.nav a:hover {
    opacity: 0.6;
}


/* =========================================================
   MEMBER
========================================================= */

.member-nav {
    gap: 15px;
    margin-left: clamp(20px, 1.823vw, 35px);
}

.member-nav span {
    color: #aaa;
}


/* =========================================================
   SEARCH ICON
========================================================= */

.header-search {
    flex-shrink: 0;
    margin-left: clamp(20px, 1.563vw, 30px);
    border: none;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.header-search:hover {
    opacity: 0.6;
    transform: scale(1.05);
}


/* =========================================================
   SCROLLED
========================================================= */

.header.scrolled {
    background: #fff;
    color: #222;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.08);
}
