/* |---------=| ↓ |=--------=| Navigation Bar |=--------=| ↓ |=---------| */

.header {
    position: fixed;
    top: 0;
    background-color: var(--color-prim);
    width: 100%;
    z-index: 5;
}

.navbar {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    height: var(--header-position);
}

header .logo {
    display: flex;
    flex-basis: 20%;
    justify-content: space-evenly;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    top: 0;
}

header .logo img {
    height: calc( 1.7 * var(--header-position));
    width: calc( 1.7 * var(--header-position));
    position: relative;
    top: 30%;
    object-fit: contain;
}

.site-name {
    color: var(--color-sec);
    font-size: var(--font-size-title);
    line-height: var(--font-size-title);
    font-weight: bold;
    text-align: center;
}

.site-subname {
    color: var(--color-ter);
    font-size: calc( .5 * var(--font-size-title));
    line-height: calc( .5 * var(--font-size-title));
    text-align: center;
}

/* |---------=| ↑ |=--------=| Navigation Bar |=--------=| ↑ |=---------| */



/* |---------=| ↓ |=--------=| MENU Bar |=--------=| ↓ |=---------| */

nav {
    flex-basis: 20%;
    color: var(--color-sec);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

nav .box-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    width: calc(var(--header-position) * 1.3);
    height: var(--header-position);
    cursor: pointer;
}

nav .menu-button {
    position: absolute;
    width: calc(var(--header-position) * 2);
    height: var(--header-position);
    top: 0;
    z-index: -1;
    opacity: 0;
}

nav .hamburger-lines {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 50%;
    height: 50%;
    z-index: -1;
}

nav .hamburger-lines .line {
    height: clamp(1px, 10%, 6px);
    width: 100%;
    border-radius: 10px;
    background: var(--color-sec);
    opacity: .7;
}

nav .box-menu:hover .hamburger-lines .line {
    opacity: 1;
}

/* |---------=| ↑ |=--------=| MENU Bar |=--------=| ↑ |=---------| */




/* |---------=| ↓ |=--------=| MENU |=--------=| ↓ |=---------| */

.menu-list {
    --color-primary: var(--color-ter-back);
    --color-secondary: var(--color-prim-text);
    --color-primary-rev: var(--color-ter-back-rev);
    --color-secondary-rev: var(--color-prim-text-rev);
    --duration: 1s;
    --nav-duration: calc(var(--duration) / 4);
    --ease: cubic-bezier(0.215, 0.61, 0.355, 1);
    --space: calc( 1 * var(--space-w));
    --font-size-menu: calc( 1.5 * var(--font-size));

    position: fixed;
    top: var(--header-position);
    right: 0;
    display: flex;
    width: 100%;
    max-height: calc(100dvh - var(--header-position));
    height: calc(100vh - var(--header-position));
    z-index: -1;
    overflow: hidden auto;
    transform: translateX(100%);
    transition: transform var(--nav-duration);
}

.menu-list::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary);
    transform-origin: 100% 50%;
    z-index: -1;
}

.menu-list ul {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    font-size: var(--font-size-menu);
    width: 100%;
}

.menu-list li {
    --border-size: 1vh;

    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.menu-list li::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: var(--border-size);
    background-color: var(--color-secondary);
    transform-origin: 100% 50%;
    transform: translateX(100%) skew(-15deg);
}

.menu-list a,
.menu-list .active {
    display: inline-block;
    width: 100%;
    color: var(--color-secondary);
    line-height: 0;
    font-weight: 700;
    transition: color 0.5s,
                opacity 0.5s;
    text-align: center;
    text-decoration: none;
    user-select: none;
    padding: var(--space) calc(var(--space) * 2) calc(var(--space) + var(--border-size) / 2);
    transform: translateY(105%);
}

/* |---------=| ↑ |=--------=| MENU |=--------=| ↑ |=---------| */




/* |---------=| ↓ |=--------=| MENU List Annimation |=--------=| ↓ |=---------| */

.menu-list ul:hover li a {
    opacity: .5;
}

.menu-list ul li:hover a {
    opacity: 1;
    color: var(--color-secondary-rev);
    background: transparent;
    cursor: pointer;
}

.menu-list ul li a::before,
.menu-list ul li .active::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: calc( 5 * var(--font-size-menu));
    color: var(--color-light-transp-10);
    border-radius: 0 100vw 100vw 0;
    z-index: -1;
    opacity: 0;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 500px;
    transition: letter-spacing 0.5s,
                left 0.5s,
                font-size 0.5s;
    overflow: hidden;
}

.menu-list ul li a:hover::before {
    content: attr(data-text);
    opacity: 1;
    left: 45%;
    letter-spacing: 5px;
    font-size: calc( 1.5 * var(--font-size-menu));
    padding-left: 10%;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    background: var(--color-primary-rev);
}

.menu-list ul li .active {
  color: var(--color-prim);
}

.menu-list ul:hover li .active {
    opacity: 1;
}

.menu-list ul li:hover .active {
    opacity: 1;
    color: var(--color-prim);
    background: transparent;
}

.menu-list ul li .active::before {
    content: attr(data-text);
    left: 55%;
    letter-spacing: 5px;
    font-size: calc( 1.5 * var(--font-size-menu));
    padding-right: 10%;
    box-sizing: border-box;
    border-radius: 100vw 0 0 100vw;
    width: 100%;
    height: 100%;
    background: var(--color-primary-rev);
    opacity: .5;
}

/* ul li:nth-child(6n + 1) a:before {
    background: #0470fe;
}
ul li:nth-child(6n + 2) a:before {
    background: #ff7675;
}
ul li:nth-child(6n + 3) a:before {
    background: #1582fe;
}
ul li:nth-child(6n + 4) a:before {
    background: #a29bfe;
}
ul li:nth-child(6n + 5) a:before {
    background: #fd79a8;
}
ul li:nth-child(6n + 6) a:before {
    background: #ffeaa7;
} */
  
/* |---------=| ↑ |=--------=| MENU List Annimation |=--------=| ↑ |=---------| */




/* |---------=| ↓ |=--------=| MENU Animation |=--------=| ↓ |=---------| */

nav input[type="checkbox"]:checked ~ .menu-list {
    transition-duration: 0s;
    transform: translateX(0);
}

nav input[type="checkbox"]:checked ~ .menu-list::after {
    animation: nav-bg var(--nav-duration) var(--ease) forwards;
}

nav input[type="checkbox"]:checked ~ .menu-list li::after {
    animation: nav-line var(--duration) var(--ease) forwards;
}

nav input[type="checkbox"]:checked ~ .menu-list a,
nav input[type="checkbox"]:checked ~ .menu-list .active {
    animation: link-appear calc(var(--duration) * 1.5) var(--ease) forwards;
}

nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(1)::after,
nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(1) a,
nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(1) .active {
    animation-delay: calc((var(--duration) / 2) * 1 * 0.125);
}

nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(2)::after,
nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(2) a,
nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(2) .active {
    animation-delay: calc((var(--duration) / 2) * 2 * 0.125);
}

nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(3)::after,
nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(3) a,
nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(3) .active {
    animation-delay: calc((var(--duration) / 2) * 3 * 0.125);
}

nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(4)::after,
nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(4) a,
nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(4) .active {
    animation-delay: calc((var(--duration) / 2) * 4 * 0.125);
}

nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(5)::after,
nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(5) a,
nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(5) .active {
    animation-delay: calc((var(--duration) / 2) * 5 * 0.125);
}

nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(6)::after,
nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(6) a,
nav input[type="checkbox"]:checked ~ .menu-list li:nth-child(6) .active {
    animation-delay: calc((var(--duration) / 2) * 6 * 0.125);
}

@keyframes nav-bg {
    from {
        transform: translateX(100%) skewX(15deg);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes nav-line {
    0% {
        transform: scaleX(0);
        transform-origin: 100% 50%;
    }

    35% {
        transform: scaleX(1);
        transform-origin: 100% 50%;
    }

    65% {
        transform: scaleX(1);
        transform-origin: 0 50%;
    }

    100% {
        transform: scaleX(0);
        transform-origin: 0 50%;
    }
}

@keyframes link-appear {
    0%, 25% {
        transform: translateY(105%);
    }

    50%, 100% {
        transform: translateY(0);
    }
}

/* |---------=| ↑ |=--------=| MENU Animation |=--------=| ↑ |=---------| */
