/* =====================================================
   DEEP GREEN CLEAN
   FULLSCREEN NAVIGATION
===================================================== */

.dgc-menu {
    --menu-padding: 2em;

    position: fixed;
    inset: 0;
    z-index: 105;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    visibility: hidden;
    pointer-events: none;
}

.dgc-menu[data-dgc-nav="open"] {
    visibility: visible;
    pointer-events: auto;
}


/* -----------------------------------------------------
   OVERLAY
----------------------------------------------------- */

.dgc-menu__overlay {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    padding: 0;
    border: 0;

    background: rgba(23, 32, 28, .42);

    opacity: 0;
    cursor: pointer;
}


/* -----------------------------------------------------
   MENU PANEL
----------------------------------------------------- */

.dgc-menu__panel {
    position: relative;

    width: 35em;
    max-width: 100%;
    height: 100%;

    margin-left: auto;

    padding-top: calc(3 * var(--menu-padding));
    padding-bottom: var(--menu-padding);

    overflow-x: hidden;
    overflow-y: auto;

    background: transparent;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.dgc-menu__close {
    position: absolute;

    top: 26px;
    right: 26px;

    z-index: 10;

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;

    padding: 0;

    border:
        1px solid rgba(18, 60, 50, .22);

    border-radius: 50%;

    background:
        var(--paper, #fbfaf6);

    cursor: pointer;

    transition:
        transform .25s ease,
        background .25s ease;
}


.dgc-menu__close span {
    position: absolute;

    width: 19px;
    height: 1.5px;

    background:
        var(--green, #123c32);

    border-radius: 999px;
}

.dgc-menu__close span:first-child {
    transform:
        rotate(45deg);
}


.dgc-menu__close span:last-child {
    transform:
        rotate(-45deg);
}

/* -----------------------------------------------------
   BACKGROUND PANELS
----------------------------------------------------- */

.dgc-menu__background {
    position: absolute;
    inset: 0;
    z-index: 0;

    overflow: hidden;

    pointer-events: none;
}

.dgc-menu__bg-panel {
    position: absolute;
    inset: 0;

    background: var(--paper, #fbfaf6);

    border-top-left-radius: 1.25em;
    border-bottom-left-radius: 1.25em;

    will-change: transform;
}

.dgc-menu__bg-panel--first {
    background: var(--green-dark, #0a2b23);
}

.dgc-menu__bg-panel--second {
    background: var(--cream, #f5f1e7);
}

.dgc-menu__bg-panel--third {
    background: var(--paper, #fbfaf6);
}


/* -----------------------------------------------------
   MENU INNER
----------------------------------------------------- */

.dgc-menu__inner {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;

    justify-content: space-between;
    align-items: flex-start;

    min-height: 100%;

    gap: 5em;
}


/* -----------------------------------------------------
   MENU LIST
----------------------------------------------------- */

.dgc-menu__list {
    display: flex;
    flex-direction: column;

    width: 100%;

    margin: 0;
    padding: 0;

    list-style: none;
}

.dgc-menu__item {
    position: relative;

    overflow: hidden;
}


/* -----------------------------------------------------
   MENU LINK
----------------------------------------------------- */

.dgc-menu__link {
    position: relative;

    display: flex;
    align-items: flex-start;

    width: 100%;

    gap: .75em;

    padding:
        .75em var(--menu-padding);

    text-decoration: none;

    color: var(--green-dark, #0a2b23);
}


/* Main heading */

.dgc-menu__link-heading {
    position: relative;
    z-index: 1;

    font-family:
        "Noto Sans KR",
        Arial,
        sans-serif;

    font-size: clamp(3rem, 5.6vw, 5.625rem);
    font-weight: 800;

    line-height: .8;
    letter-spacing: -.065em;

    text-transform: uppercase;

    white-space: nowrap;

    text-shadow:
        0 1em 0 var(--cream, #f5f1e7);

    transition:
        transform .55s cubic-bezier(.65, .05, 0, 1);

    will-change: transform;
}


/* Menu number */

.dgc-menu__number {
    position: relative;
    z-index: 1;

    margin-top: .2em;

    color: var(--green-2, #215a49);

    font-family: monospace;
    font-size: .8rem;
    font-weight: 500;
}


/* Hover background */

.dgc-menu__link-bg {
    position: absolute;
    inset: 0;
    z-index: 0;

    background: var(--green, #123c32);

    transform: scaleY(0);
    transform-origin: 50% 100%;

    transition:
        transform .55s cubic-bezier(.65, .05, 0, 1);

    will-change: transform;
}


/* -----------------------------------------------------
   HOVER INTERACTION
----------------------------------------------------- */

@media (hover: hover) {

    .dgc-menu__close:hover {
        background:
            var(--lime, #d9f06f);

        transform:
            rotate(8deg);
    }

    .dgc-menu__link:hover .dgc-menu__link-heading {
        transform: translateY(-1em);
        transition-delay: .1s;
    }

    .dgc-menu__link:hover .dgc-menu__link-bg {
        transform: scaleY(1);
    }

    .dgc-menu__link:hover .dgc-menu__link-heading {
        color: var(--green-dark, #0a2b23);
    }

    .dgc-menu__link:hover .dgc-menu__number {
        color: var(--lime, #d9f06f);
    }

}


/* Keyboard accessibility */

.dgc-menu__link:focus-visible .dgc-menu__link-bg {
    transform: scaleY(1);
}

.dgc-menu__link:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: -3px;
}


/* -----------------------------------------------------
   BOTTOM DETAILS
----------------------------------------------------- */

.dgc-menu__details {
    display: flex;
    flex-direction: column;

    align-items: flex-start;

    gap: 1.25em;

    padding-left: var(--menu-padding);
}

.dgc-menu__details-label {
    margin: 0;

    color: var(--muted, #68716b);

    font-size: .75rem;
    font-weight: 700;

    letter-spacing: .12em;
}

.dgc-menu__details-copy {
    display: flex;
    flex-direction: column;

    gap: .5em;
}

.dgc-menu__details-copy p {
    margin: 0;

    color: var(--green-dark, #0a2b23);

    font-family: "Gaegu", cursive;
    font-size: 1.5rem;
    font-weight: 700;
}

.dgc-menu__details-copy span {
    color: var(--muted, #68716b);

    font-size: .7rem;
    font-weight: 700;

    letter-spacing: .12em;
}


/* -----------------------------------------------------
   TABLET / MOBILE
----------------------------------------------------- */

/* =====================================================
   MOBILE NAVIGATION FIX
===================================================== */

@media (max-width: 767px) {

    .dgc-menu {
        --menu-padding: 20px;

        position: fixed;
        inset: 0;

        width: 100vw;
        width: 100dvw;

        height: 100vh;
        height: 100dvh;

        max-width: none;

        margin: 0;

        overflow: hidden;
    }


    .dgc-menu__overlay {
        position: fixed;
        inset: 0;

        width: 100vw;
        width: 100dvw;

        height: 100vh;
        height: 100dvh;
    }


    .dgc-menu__panel {
        position: absolute;

        inset: 0;

        width: 100%;
        max-width: none;

        height: 100%;

        margin: 0;

        padding:
            max(90px, env(safe-area-inset-top)) 0 max(28px, env(safe-area-inset-bottom));

        overflow-y: auto;
        overflow-x: hidden;

        overscroll-behavior: contain;

        -webkit-overflow-scrolling: touch;
    }


    .dgc-menu__background {
        position: absolute;
        inset: 0;

        width: 100%;
        height: 100%;
    }


    .dgc-menu__bg-panel {
        inset: 0;

        width: 100%;
        height: 100%;

        border-radius: 0;
    }


    .dgc-menu__inner {
        width: 100%;
        min-height: 100%;

        gap: 48px;
    }


    .dgc-menu__list {
        width: 100%;
    }


    .dgc-menu__item {
        width: 100%;

        min-height: 0;

        overflow: hidden;
    }


    .dgc-menu__link {
        position: relative;

        width: 100%;

        padding: 10px var(--menu-padding);

        gap: 10px;

        align-items: center;

        overflow: hidden;

        isolation: isolate;
    }


    .dgc-menu__link-heading {
        position: relative;

        z-index: 2;

        font-size:
            clamp(42px, 11vw, 62px);

        line-height: .82;

        text-shadow: none;

        transform: none !important;

        transition:
            color .35s ease !important;
    }


    .dgc-menu__number {
        position: relative;

        z-index: 2;

        margin-top: 2px;

        font-size: 10px;

        transition:
            color .35s ease;
    }

    .dgc-menu__link-bg {
        z-index: 1;

        transform:
            scaleY(0);

        transform-origin:
            50% 100%;

        transition:
            transform .45s cubic-bezier(.65, .05, 0, 1);
    }


    .dgc-menu__link:hover .dgc-menu__link-heading,
    .dgc-menu__link:focus-visible .dgc-menu__link-heading {
        transform: none !important;

        color:
            var(--cream, #f5f1e7);
    }


    .dgc-menu__link:hover .dgc-menu__number,
    .dgc-menu__link:focus-visible .dgc-menu__number {
        color:
            var(--lime, #d9f06f);
    }


    .dgc-menu__link:hover .dgc-menu__link-bg,
    .dgc-menu__link:focus-visible .dgc-menu__link-bg {
        transform:
            scaleY(1);
    }


    .dgc-menu__details {
        width: 100%;

        padding:
            0 var(--menu-padding);

        margin-top: auto;
    }
}


@media (max-width: 640px) {

    .dgc-menu__close {
        top:
            max(18px,
                env(safe-area-inset-top));

        right: 18px;

        width: 42px;
        height: 42px;
    }

}


@media (max-width: 479px) {

    .dgc-menu__panel {
        padding-top: 7em;
        padding-bottom: 2em;
    }

    .dgc-menu__inner {
        gap: 3em;
    }

    .dgc-menu__link-heading {
        font-size: clamp(2rem, 9.5vw, 3rem);
    }

}


/* -----------------------------------------------------
   REDUCED MOTION
----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .dgc-menu__link-heading,
    .dgc-menu__link-bg {
        transition: none !important;
    }

}