/* =========================================================
   DEEP GREEN CLEAN
   DGC JOURNAL
========================================================= */

.journal {
    position: relative;

    padding:
        145px 0 155px;

    overflow: hidden;

    background:
        var(--green-dark);

    color:
        var(--cream);
}


/* =========================================================
   HEADER
========================================================= */

.journal__head {
    display: grid;

    grid-template-columns:
        minmax(0, 1.1fr) minmax(280px, .55fr);

    gap:
        100px;

    align-items: end;

    margin-bottom:
        86px;
}


.journal__head-title {
    min-width: 0;
}


.journal__eyebrow {
    display: block;

    margin-bottom:
        24px;

    color:
        var(--lime);

    font-size:
        9px;

    font-weight:
        900;

    letter-spacing:
        .15em;
}


.journal__head h2 {
    margin:
        0;

    color:
        var(--cream);

    font-size:
        clamp(54px,
            6.8vw,
            96px);

    font-weight:
        700;

    line-height:
        .93;

    letter-spacing:
        -.065em;
}


.journal__head h2 span {
    color:
        var(--lime);
}


.journal__head-copy {
    padding-bottom:
        6px;
}


.journal__head-copy p {
    max-width:
        420px;

    margin:
        0 0 28px;

    color:
        rgba(245, 241, 231, .62);

    font-size:
        13px;

    line-height:
        1.85;
}


.journal__all-link {
    display: inline-flex;

    align-items: center;

    gap:
        8px;

    color:
        var(--cream);

    font-size:
        10px;

    font-weight:
        800;

    letter-spacing:
        .08em;

    text-decoration:
        none;
}


/* =========================================================
   LIST
========================================================= */

.journal__list {
    position: relative;

    z-index: 2;

    border-top:
        1px solid rgba(245, 241, 231, .18);
}


.journal__item {
    position: relative;

    display: grid;

    grid-template-columns:
        70px minmax(0, 1fr) 150px 52px;

    gap:
        24px;

    align-items: center;

    min-height:
        132px;

    padding:
        24px 18px;

    overflow: hidden;

    border-bottom:
        1px solid rgba(245, 241, 231, .16);

    color:
        inherit;

    text-decoration:
        none;

    transition:
        background .35s ease,
        color .35s ease;
}


/* hover background */

.journal__item::before {
    content: "";

    position: absolute;

    inset:
        0;

    z-index:
        -1;

    background:
        var(--cream);

    transform:
        scaleY(0);

    transform-origin:
        bottom center;

    transition:
        transform .45s cubic-bezier(.76, 0, .24, 1);
}


.journal__item:hover::before,
.journal__item:focus-visible::before {
    transform:
        scaleY(1);
}


/* =========================================================
   NUMBER
========================================================= */

.journal__number {
    position: relative;

    z-index:
        2;

    align-self:
        start;

    padding-top:
        9px;

    color:
        var(--lime);

    font-family:
        monospace;

    font-size:
        9px;

    font-weight:
        700;

    letter-spacing:
        .06em;

    transition:
        color .3s ease;
}


/* =========================================================
   MAIN
========================================================= */

.journal__item-main {
    position: relative;

    z-index:
        2;

    min-width:
        0;
}


.journal__item h3 {
    max-width:
        900px;

    margin:
        0;

    color:
        var(--cream);

    font-size:
        clamp(27px,
            3vw,
            48px);

    font-weight:
        500;

    line-height:
        1.12;

    letter-spacing:
        -.045em;

    transition:
        transform .4s cubic-bezier(.76, 0, .24, 1),
        color .3s ease;
}


/* =========================================================
   META
========================================================= */

.journal__meta {
    position: relative;

    z-index:
        2;

    display: flex;

    flex-direction: column;

    align-items: flex-end;

    gap:
        7px;
}


.journal__category {
    color:
        rgba(245, 241, 231, .72);

    font-size:
        8px;

    font-weight:
        800;

    letter-spacing:
        .11em;

    text-align:
        right;

    transition:
        color .3s ease;
}


.journal__date {
    color:
        rgba(245, 241, 231, .38);

    font-size:
        9px;

    transition:
        color .3s ease;
}


/* =========================================================
   ARROW
========================================================= */

.journal__arrow {
    position: relative;

    z-index:
        2;

    display: grid;

    place-items:
        center;

    width:
        42px;

    height:
        42px;

    border:
        1px solid rgba(245, 241, 231, .2);

    border-radius:
        50%;

    color:
        var(--cream);

    font-size:
        17px;

    transform:
        rotate(0deg);

    transition:
        background .35s ease,
        border-color .35s ease,
        color .35s ease,
        transform .4s cubic-bezier(.76, 0, .24, 1);
}


/* =========================================================
   DESKTOP HOVER
========================================================= */

@media (hover: hover) and (min-width: 768px) {

    .journal__item:hover h3 {
        color:
            var(--green-dark);

        transform:
            translateX(12px);
    }


    .journal__item:hover .journal__number {
        color:
            var(--green);
    }


    .journal__item:hover .journal__category {
        color:
            var(--green);
    }


    .journal__item:hover .journal__date {
        color:
            rgba(10, 43, 35, .55);
    }


    .journal__item:hover .journal__arrow {
        background:
            var(--lime);

        border-color:
            var(--lime);

        color:
            var(--green-dark);

        transform:
            rotate(45deg);
    }

}


/* =========================================================
   MOBILE THUMB
   Desktop에서는 숨김
========================================================= */

.journal__mobile-thumb {
    display:
        none;
}


/* =========================================================
   FLOATING PREVIEW
========================================================= */

.journal-preview {
    position: fixed;

    left:
        0;

    top:
        0;

    z-index:
        90;

    width:
        clamp(280px,
            25vw,
            370px);

    aspect-ratio:
        4 / 3;

    overflow:
        hidden;

    border-radius:
        12px;

    background:
        var(--paper);

    box-shadow:
        0 28px 70px rgba(0, 0, 0, .28);

    pointer-events:
        none;

    opacity:
        0;

    transform:
        translate(-50%,
            -50%) scale(.82);

    transform-origin:
        center center;

    will-change:
        transform,
        left,
        top,
        opacity;
}


.journal-preview::after {
    content: "";

    position: absolute;

    inset:
        0;

    z-index:
        3;

    border:
        1px solid rgba(255, 255, 255, .12);

    border-radius:
        inherit;

    pointer-events:
        none;
}


/* =========================================================
   PREVIEW TRACK
========================================================= */

.journal-preview__track {
    position: absolute;

    left:
        0;

    top:
        0;

    width:
        100%;

    height:
        100%;

    will-change:
        transform;
}


.journal-preview__slide {
    position:
        relative;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    width:
        100%;

    height:
        100%;

    padding:
        26px;

    overflow:
        hidden;

    background:
        var(--cream);
}


.journal-preview__slide img {
    display:
        block;

    width:
        auto;

    max-width:
        88%;

    height:
        auto;

    max-height:
        88%;

    object-fit:
        contain;

    border-radius:
        4px;
}


/* subtle image overlay */

.journal-preview__slide::after {
    content: "";

    position: absolute;

    inset:
        0;

    background:
        linear-gradient(to bottom,
            rgba(0, 0, 0, 0),
            rgba(0, 0, 0, .12));

    pointer-events:
        none;
}


/* =========================================================
   CUSTOM CURSOR
========================================================= */

.journal-cursor {
    position: fixed;

    left:
        0;

    top:
        0;

    z-index:
        91;

    display: grid;

    place-items:
        center;

    width:
        74px;

    height:
        74px;

    border-radius:
        50%;

    background:
        var(--lime);

    color:
        var(--green-dark);

    pointer-events:
        none;

    opacity:
        0;

    transform:
        translate(-50%,
            -50%) scale(0);

    will-change:
        transform,
        left,
        top,
        opacity;
}


.journal-cursor span {
    font-size:
        9px;

    font-weight:
        900;

    letter-spacing:
        .08em;
}


/* =========================================================
   SMALL DESKTOP
========================================================= */

@media (max-width: 1180px) {

    .journal {
        padding:
            125px 0 135px;
    }


    .journal__head {
        grid-template-columns:
            1fr 340px;

        gap:
            70px;

        margin-bottom:
            70px;
    }


    .journal__item {
        grid-template-columns:
            55px minmax(0, 1fr) 130px 46px;

        gap:
            20px;

        min-height:
            120px;
    }


    .journal-preview {
        width:
            310px;
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 960px) {

    .journal {
        padding:
            110px 0 120px;
    }


    .journal__head {
        grid-template-columns:
            1fr;

        gap:
            30px;
    }


    .journal__head-copy {
        display: flex;

        align-items: flex-end;

        justify-content:
            space-between;

        gap:
            30px;
    }


    .journal__head-copy p {
        margin-bottom:
            0;
    }


    .journal__item {
        grid-template-columns:
            50px minmax(0, 1fr) 115px 42px;

        gap:
            16px;

        min-height:
            112px;

        padding:
            22px 8px;
    }


    .journal__item h3 {
        font-size:
            clamp(26px,
                4vw,
                38px);
    }


    .journal-preview {
        width:
            280px;
    }


    .journal-cursor {
        width:
            64px;

        height:
            64px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .journal {
        padding: 88px 0 96px;
    }


    /* =====================================================
       HEADER
    ====================================================== */

    .journal__head {
        gap: 26px;
        margin-bottom: 52px;
    }

    .journal__eyebrow {
        margin-bottom: 18px;
    }

    .journal__head h2 {
        font-size: clamp(44px, 12vw, 62px);
        line-height: .96;
    }

    .journal__head-copy {
        display: block;
    }

    .journal__head-copy p {
        max-width: 430px;
        margin: 0 0 22px;
        font-size: 12px;
    }


    /* =====================================================
       ITEM
    ====================================================== */

    .journal__item {
        display: grid;

        grid-template-columns:
            22px 96px minmax(0, 1fr) 32px;

        grid-template-rows:
            auto;

        gap: 12px;

        align-items: center;

        min-height: 0;

        padding: 20px 0;
    }


    .journal__item::before {
        display: none;
    }


    /* =====================================================
       NUMBER
    ====================================================== */

    .journal__number {
        grid-column: 1;
        grid-row: 1;

        align-self: start;

        padding-top: 4px;

        font-size: 8px;
    }


    /* =====================================================
       MAIN
    ====================================================== */

    .journal__item-main {
        display: contents;
    }


    /* =====================================================
       IMAGE
    ====================================================== */

    .journal__mobile-thumb {
        display: flex;

        grid-column: 2;
        grid-row: 1;

        align-items: center;
        justify-content: center;

        width: 96px;
        height: 82px;

        margin: 0;

        padding: 7px;

        overflow: hidden;

        border-radius: 8px;

        background: var(--cream);
    }


    .journal__mobile-thumb img {
        display: block;

        width: 100%;
        height: 100%;

        object-fit: contain;

        border-radius: 4px;
    }


    /* =====================================================
       TITLE
    ====================================================== */

    .journal__item h3 {
        grid-column: 3;
        grid-row: 1;

        align-self: center;

        margin: 0;

        font-size: 19px;
        font-weight: 600;
        line-height: 1.25;

        letter-spacing: -.035em;
    }


    /* =====================================================
       META
    ====================================================== */

    .journal__meta {
        grid-column: 3;
        grid-row: 1;

        align-self: end;

        display: flex;

        flex-direction: row;

        align-items: center;

        gap: 8px;

        margin: 0 0 4px;
    }


    .journal__category {
        color: var(--lime);

        font-size: 7px;

        text-align: left;
    }


    .journal__date {
        font-size: 7px;
    }


    /*
     * 제목 아래쪽에 meta 공간 확보
     */
    .journal__item h3 {
        padding-bottom: 22px;
    }


    /* =====================================================
       ARROW
    ====================================================== */

    .journal__arrow {
        grid-column: 4;
        grid-row: 1;

        width: 30px;
        height: 30px;

        font-size: 13px;
    }


    /* =====================================================
       DESKTOP ONLY UI
    ====================================================== */

    .journal-preview,
    .journal-cursor {
        display: none;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 430px) {

    .journal {
        padding:
            78px 0 86px;
    }


    .journal__head {
        margin-bottom:
            42px;
    }


    .journal__head h2 {
        font-size:
            43px;
    }


    .journal__item {
        grid-template-columns:
            24px minmax(0, 1fr) 32px;

        padding:
            22px 0;
    }


    .journal__mobile-thumb {
        margin-bottom:
            15px;
    }


    .journal__item h3 {
        font-size:
            22px;
    }


    .journal__arrow {
        width:
            30px;

        height:
            30px;

        font-size:
            13px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .journal__item,
    .journal__item::before,
    .journal__item h3,
    .journal__arrow {
        transition:
            none;
    }


    .journal-preview,
    .journal-cursor {
        display:
            none;
    }

}