/* =========================================================
   WORK STORIES
   ========================================================= */


/* --------------------------
   Page Layout
   -------------------------- */

.craft {
    max-width: 1200px;
    margin: 4rem auto 6rem;
    padding: 0 1.5rem;
}

.craft-work {
    width: 100%;
}


/* --------------------------
   Intro
   -------------------------- */

.section-intro {
    width: calc((235px * 3) + (42px * 2));
    max-width: 100%;

    margin: 0 auto 3rem;
    text-align: center;
    line-height: 1.6;
    padding-bottom: 1rem;
    
}

.section-intro h1 {
    font-size: 2rem;
}

.section-intro p {
    color: #555;
    font-size: 1.05rem;
}




/* =========================================================
   PROJECT GRID
   ========================================================= */

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 255px);
    justify-content: center;

    column-gap: 48px;
    row-gap: 80px;

    margin: 0 auto 5rem;
}


/* --------------------------
   Story
   -------------------------- */

.project-card {
    display: flex;
    flex-direction: column;
    width: 235px;
    min-width: 0;
}


/* --------------------------
   Artwork
   -------------------------- */

.project-image {
    width: 235px;
    height: 176px;

    margin-bottom: 18px;
    overflow: hidden;
}

.project-image img {
    display: block;
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* --------------------------
   Copy
   -------------------------- */

.project-caption h3 {
    margin: 0 0 10px;

    font-size: 1.1rem;
    line-height: 1.35;
    font-weight: 600;
}

.project-caption p {
    margin: 0;

    color: #6b6f76;
    font-size: 0.92rem;
    line-height: 1.65;
}


/* --------------------------
   Story Links
   -------------------------- */

.project-card .project-text-link {
    align-self: flex-start;

    width: fit-content;
    margin-top: 18px;
    padding-bottom: 3px;

    color: #242220;

    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;

    border-bottom: 1px solid transparent;

    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

.project-card .project-text-link:hover {
    color: #000;
    border-color: #aaa;
}

.project-card .project-text-link:focus-visible {
    outline: 2px solid #242220;
    outline-offset: 3px;
}


/* =========================================================
   BOTTOM / PAGE EXIT
   ========================================================= */

.more-stories {
    width: calc((235px * 3) + (42px * 2));
    max-width: 100%;

    margin: 1rem auto 0;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 2rem;
}

.more-stories .text-link {
    margin: 0;
}

.more-stories .back-link {
    font-size: 0.95rem;
}

/** add tags for stories **/
.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.7rem;

    margin: 0 0 0.65rem;

    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #999;
}

.story-tags span+span::before {
    content: "·";
    margin-right: 0.7rem;
    color: #bbb;
}

/** override back arrow **/

.hand-arrow-back {
    transform: scaleX(-1);
}



/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 800px) {

    .craft {
        margin: 3rem auto 5rem;
        padding: 0 32px;
    }

    .section-intro {
        width: calc((235px * 2) + 34px);
        margin-bottom: 2.5rem;
    }

    .project-grid {
        grid-template-columns: repeat(2, 235px);

        column-gap: 34px;
        row-gap: 52px;

        margin-bottom: 4rem;
    }

    .more-stories {
        width: calc((235px * 2) + 34px);
    }

}


/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 550px) {

    .project-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2.5rem;
        width: 100%;
    }

    .project-card {
        width: 100%;
        display: grid;
        grid-template-columns: 115px 1fr;
        grid-template-areas:
            "image caption"
            "image link";
        column-gap: 18px;
        row-gap: 10px;
        align-items: start;
    }

    .project-image {
        grid-area: image;

        width: 115px;
        height: 86px;
        aspect-ratio: auto;
        margin: 0;
    }

    .project-caption {
        grid-area: caption;
    }

    .project-caption h3 {
        margin: 0 0 6px;
        font-size: 1rem;
        line-height: 1.3;
    }

    .project-caption p {
        margin: 0;

        font-size: 0.82rem;
        line-height: 1.5;
    }

    .project-card .project-text-link {
        grid-area: link;

        margin: 0;
        font-size: 0.7rem;
    }
}