/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "Noto Sans KR", Arial, sans-serif;
    color: #111;
    background: #fff;
}

body.mobile-menu-open {
    overflow: hidden;
}

main {
    min-height: 80vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;

    width: 100%;
    height: 76px;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;

    gap: 40px;
    padding-inline: max(20px, calc((100vw - 1260px) / 2));

    background: #fff;

    /* border-bottom 제거 */
    /* border-bottom: 1px solid #eee; */

    position: sticky;
}

.site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}

/* LOGO */

.site-header .logo {
    display: flex;
    align-items: center;

    width: max-content;

    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1.5px;
}

.logo b {
    color: #ff2d7d;
}


/* MAIN NAV */

.main-nav {
    height: 100%;

    display: flex;
    align-items: center;
    gap: 34px;

    font-size: 14px;
}

.main-nav a {
    position: relative;

    height: 100%;

    display: flex;
    align-items: center;

    color: #333;
    white-space: nowrap;
}

.main-nav a.active {
    color: #ff2d7d;
}

.main-nav a.active::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 2px;

    background: #ff2d7d;
}


/* HEADER ACTIONS */

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;

    margin-left: auto;
}

.header-actions a {
    height: 32px;
    padding: 0 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #ddd;

    font-size: 12px;
    font-weight: 600;

    color: #111;
    white-space: nowrap;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.header-actions a:hover {
    border-color: #111;
}

.header-actions .join,
.header-actions .header-join {
    color: #fff;
    background: #111;
    border-color: #111;
}

.header-actions .join:hover,
.header-actions .header-join:hover {
    background: #222;
}


/* =========================================================
   HAMBURGER
========================================================= */

.hamburger {
    position: relative;

    display: none;

    width: 36px;
    height: 36px;

    margin-left: 4px;
}

.hamburger span {
    position: absolute;
    left: 8px;

    width: 20px;
    height: 2px;

    background: #111;

    transition:
        transform .25s ease,
        opacity .2s ease;
}

.hamburger span:nth-child(1) {
    top: 9px;
}

.hamburger span:nth-child(2) {
    top: 17px;
}

.hamburger span:nth-child(3) {
    top: 25px;
}

.hamburger.is-active span:nth-child(1) {
    top: 17px;
    transform: rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
    opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
    top: 17px;
    transform: rotate(-45deg);
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    min-height: 110px;

    padding: 35px 42px;

    display: flex;
    align-items: center;
    gap: 50px;

    border-top: 1px solid #eee;
}

footer nav {
    display: flex;
    gap: 20px;

    font-size: 11px;
    color: #777;
}

footer small {
    margin-left: auto;
    color: #aaa;
}


/* =========================================================
   MOBILE NAV - BOTTOM
========================================================= */

.mobile-nav {
    display: none;
}


/* =========================================================
   MOBILE MENU
========================================================= */

/*
   중요
   .mobile-menu 자체에는 background를 주지 않는다.
   그래야 dim 뒤로 기존 페이지가 보인다.
*/

.mobile-menu {
    display: none;
}


/* =========================================================
   TABLET / MOBILE
========================================================= */

@media (max-width: 900px) {

    /* -----------------------------------------
       BODY
    ----------------------------------------- */

    main {
        min-height: 60vh;
    }


    /* -----------------------------------------
       HEADER
    ----------------------------------------- */

    .site-header {
        height: 62px;

        grid-template-columns: 1fr auto;

        gap: 0;

        padding: 0 20px;
    }

    .main-nav {
        display: none;
    }

    .header-actions {
        gap: 4px;
    }

    .header-actions a {
        display: none;
    }

    .hamburger {
        display: block;
    }


    /* -----------------------------------------
       FOOTER
    ----------------------------------------- */

    footer {
        display: block;

        padding: 30px 20px 90px;
    }

    footer nav {
        margin: 20px 0;

        flex-wrap: wrap;
    }

    footer small {
        display: block;

        margin-left: 0;
    }


    /* -----------------------------------------
       BOTTOM NAV
    ----------------------------------------- */

    .mobile-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;

        height: 66px;

        display: flex;
        align-items: center;
        justify-content: space-around;

        background: rgba(255, 255, 255, .96);
        border-top: 1px solid #eee;

        z-index: 30;
    }

    .mobile-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;

        gap: 4px;

        font-size: 18px;
        color: #777;
    }

    .mobile-nav span {
        font-size: 9px;
    }

    .mobile-nav .active {
        color: #ff2d7d;
    }

    .mobile-nav .create {
        width: 44px;
        height: 44px;

        display: flex;
        align-items: center;
        justify-content: center;

        border-radius: 50%;

        background: #ff2d7d;
        color: #fff;

        font-size: 27px;
    }


    /* -----------------------------------------
       MOBILE MENU WRAPPER
    ----------------------------------------- */

    .mobile-menu {
        position: fixed;
        inset: 0;

        display: block;

        visibility: hidden;
        pointer-events: none;

        z-index: 1000;
    }

    .mobile-menu.is-open {
        visibility: visible;
        pointer-events: auto;
    }


    /* -----------------------------------------
       DIM
       
       ★ 핵심
       dim은 화면 전체를 덮지만
       panel보다 낮은 z-index를 가진다.
    ----------------------------------------- */

    .mobile-menu-dim {
        position: absolute;
        inset: 0;
		width:100%

        background: rgba(0, 0, 0, .65);

        opacity: 0;
        visibility: hidden;


        z-index: 1;
    }

    .mobile-menu.is-open .mobile-menu-dim {
        opacity: 1;
        visibility: visible;
		width:100%;
    }


    /* -----------------------------------------
       MOBILE MENU PANEL
    ----------------------------------------- */

    .mobile-menu-panel {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;

        width: min(82vw, 360px);

        background: #fff;

        transform: translateX(100%);

        transition: transform .3s ease;

        z-index: 2;

        overflow-y: auto;
    }

    .mobile-menu.is-open .mobile-menu-panel {
        transform: translateX(0);
    }


    /* -----------------------------------------
       MOBILE MENU HEADER
    ----------------------------------------- */

    .mobile-menu-header {
        height: 76px;

        padding: 0 24px;

        display: flex;
        align-items: center;
        justify-content: space-between;

        border-bottom: 1px solid #eee;
    }


    /* LOGO */

    .mobile-menu-logo {
        display: block;

        font-size: 24px;
        font-weight: 900;
        line-height: 1;
        letter-spacing: -1.5px;

        color: #111;
    }

    .mobile-menu-logo span {
        color: #ff2d78;
    }


    /* -----------------------------------------
       CLOSE BUTTON
    ----------------------------------------- */

    .mobile-menu-close {
        position: relative;

        width: 40px;
        height: 40px;
    }

    .mobile-menu-close::before,
    .mobile-menu-close::after {
        content: "";

        position: absolute;
        left: 9px;
        top: 19px;

        width: 22px;
        height: 1.5px;

        background: #111;
    }

    .mobile-menu-close::before {
        transform: rotate(45deg);
    }

    .mobile-menu-close::after {
        transform: rotate(-45deg);
    }


    /* -----------------------------------------
       MOBILE MENU NAV
    ----------------------------------------- */

    .mobile-menu-nav {
        padding: 20px 24px 0;
    }

    .mobile-menu-nav a {
        height: 64px;

        display: flex;
        align-items: center;

        border-bottom: 1px solid #eee;

        font-size: 16px;
        font-weight: 700;
        letter-spacing: -.3px;

        color: #111;

        transition:
            color .2s ease,
            padding .2s ease;
    }

    .mobile-menu-nav a:hover {
        color: #ff2d78;
        padding-left: 6px;
    }


    /* -----------------------------------------
       MOBILE ACCOUNT
    ----------------------------------------- */

    .mobile-menu-account {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;

        padding: 28px 24px;
    }

    .mobile-menu-account a {
        height: 48px;

        display: flex;
        align-items: center;
        justify-content: center;

        border: 1px solid #ddd;

        font-size: 13px;
        font-weight: 700;

        color: #111;
        background: #fff;
    }

    .mobile-menu-account a:last-child {
        border-color: #111;

        color: #fff;
        background: #111;
    }


    /* -----------------------------------------
       EYEBROW
    ----------------------------------------- */

    .eyebrow {
        font-size: 9px;
    }
}


/* =========================================================
   SMALL DESKTOP
========================================================= */

@media (min-width: 901px) and (max-width: 1200px) {

    .site-header {
        gap: 24px;
    }

    .main-nav {
        gap: 24px;
        font-size: 13px;
    }

    .site-header .header-actions a {
        padding-inline: 12px;
    }
}



/* =========================================================
   COMMON MODAL
========================================================= */

.common-modal {
    position: fixed;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    visibility: hidden;
    opacity: 0;

    z-index: 9999;

    transition:
        opacity .2s ease,
        visibility .2s ease;
}


.common-modal.is-open {
    visibility: visible;
    opacity: 1;
}


/* DIM */

.common-modal-dim {
    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, .45);

    backdrop-filter: blur(2px);
}


/* BOX */

.common-modal-box {
    position: relative;

    width: calc(100% - 40px);
    max-width: 390px;

    background: #fff;

    border-radius: 18px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, .18);

    transform:
        translateY(10px)
        scale(.97);

    transition:
        transform .2s ease;

    z-index: 1;
}


.common-modal.is-open
.common-modal-box {
    transform:
        translateY(0)
        scale(1);
}


/* CLOSE */

.common-modal-close {
    position: absolute;

    top: 14px;
    right: 15px;

    width: 30px;
    height: 30px;

    padding: 0;

    border: 0;

    background: none;

    color: #999;

    font-size: 24px;
    line-height: 30px;

    cursor: pointer;
}


/* CONTENT */

.common-modal-content {
    padding: 34px 28px 28px;

    text-align: center;
}


/* ICON */

.common-modal-icon {
    width: 42px;
    height: 42px;

    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #fff0f6;

    color: #ff2b83;

    font-size: 18px;
    font-weight: 700;
}


/* TITLE */

.common-modal-content h3 {
    margin: 0 0 10px;

    color: #111;

    font-size: 19px;
    font-weight: 700;
}


/* MESSAGE */

.common-modal-content p {
    margin: 0;

    color: #777;

    font-size: 14px;
    line-height: 1.7;

    word-break: keep-all;
}


/* BUTTONS */

.common-modal-buttons {
    display: flex;

    gap: 8px;

    margin-top: 25px;
}


.common-modal-button {
    flex: 1;

    height: 46px;

    border: 0;
    border-radius: 9px;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}


.common-modal-button.primary {
    background: #ff2b83;
    color: #fff;
}


.common-modal-button.secondary {
    background: #f3f3f3;
    color: #555;
}


.common-modal-button:hover {
    opacity: .9;
}

@media (max-width: 600px) {

    .common-modal-box {
        width: calc(100% - 30px);
        border-radius: 16px;
    }

    .common-modal-content {
        padding: 30px 22px 22px;
    }

}