/* ==========================================================
   PROJECT INTRO
========================================================== */

.project-page{
    width:100%;
    /* background-color: blue; */
}

.project-intro{

    width:100%;
    padding:6rem 2rem 4rem;
    /* background-color: blue; */

}

.project-intro-grid{

    display:grid;
    grid-template-columns:1.4fr .6fr;
    gap:6rem;
    align-items:start;

}

.project-label{

    display:block;

    margin-bottom:1.25rem;

    font-size:.75rem;
    letter-spacing:.16em;
    text-transform:uppercase;

    color:rgba(var(--dz-fg-rgb), calc(.55 + var(--dz-text-lift)));

}

.project-title{

    margin:0;

    font-size:clamp(4rem,7vw,7rem);
    line-height:1;
    font-weight:var(--dz-heading-weight);

}


/* ==========================================================
   SHOWCASE
========================================================== */

.project-showcase{

    width:100%;
    padding:0 2rem 2rem;
    /* background-color: aqua; */

}

.project-showcase img{

    display:block;

    width:100%;
    height:100vh;

    object-fit:cover;

}


/* ==========================================================
   PROJECT OVERVIEW
========================================================== */

.project-overview{

    padding:2rem 2rem;
    /* background-color: blueviolet; */

}

.overview-label{

    display:block;

    margin-bottom:2rem;

    font-size:.75rem;
    letter-spacing:.16em;
    text-transform:uppercase;

    color:rgba(var(--dz-fg-rgb), calc(.45 + var(--dz-text-lift)));

}

.overview-grid{

    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:5rem;

    margin-bottom:2rem;

}

.overview-heading{

    margin-bottom:1.5rem;

    font-size:2rem;
    font-weight:var(--dz-regular-weight);

}

.overview-block p{

    max-width:520px;

    font-size:1.05rem;
    line-height:1.75;

    color:rgba(var(--dz-fg-rgb), calc(.72 + var(--dz-text-lift)));

}

.overview-meta{
    display:flex;
    justify-content:space-between;

        padding: 2rem 0 2rem 0;

    border-top:1px solid rgba(var(--dz-fg-rgb), .08);
    border-bottom: 1px solid rgba(var(--dz-fg-rgb), .08);
}

.overview-item{
    display: flex;
    flex-direction: column;
}

.overview-item span{

    display:block;

    margin-bottom:.65rem;

    font-size:.72rem;

    letter-spacing:.12em;

    text-transform:uppercase;

    color:rgba(var(--dz-fg-rgb), calc(.45 + var(--dz-text-lift)));

}

.overview-item strong{

    font-size:1rem;

    font-weight:var(--dz-medium-weight);

    line-height:1.6;

}


/* ==========================================================
   PROJECT GALLERY
========================================================== */

.project-gallery{

    width:100%;
    padding:0 2rem 0rem;

}

/* spacing */

.project-gallery > *{

    margin-bottom:2rem;

}

/* all images */

.project-gallery img{

    width:100%;
    display:block;
    object-fit:cover;


    will-change:transform;

    transform:translateZ(0);

    backface-visibility:hidden;

    /* border-radius:18px; */

    /* transform:translateZ(0);
    backface-visibility:hidden;

    image-rendering:auto; */

}

/* .project-gallery > *{

    margin-bottom:2rem;

    overflow:hidden;

    contain:layout paint;

} */

/* ==========================================================
   FULL
========================================================== */

.bento-full img{

    aspect-ratio:16/9;

}

/* ==========================================================
   HALF
========================================================== */

.bento-half{

    display:grid;
    grid-template-columns:1fr 1fr;

    gap:2rem;

}

.bento-half img{

    aspect-ratio:1/1;

}

/* ==========================================================
   FEATURE
========================================================== */

.bento-feature{

    display:grid;

    grid-template-columns:2fr 1fr;

    gap:2rem;

}

/* mirrored: narrow column on the left, wide column on the right
   (child order in the markup is small-then-large) */
.bento-feature--flip{

    grid-template-columns:1fr 2fr;

}

.feature-large img{

    aspect-ratio:16/10;

}

.feature-small img{

    aspect-ratio:1/1;

    height:100%;

}

/* ==========================================================
   THREE
========================================================== */

.bento-three{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:2rem;

}

.bento-three img{

    aspect-ratio:1/1;

}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media(max-width:991px){

    /* the 2:1 feature rows stack; the even pairs and triples have
       room to stay side by side down to the phone layout below */
    .bento-feature,
    .bento-feature--flip{

        grid-template-columns:1fr;

    }

    /* stacked, the square thumbnail would run as tall as the page is
       wide — give it the same landscape frame as the large one */
    .feature-small img{

        height:auto;
        aspect-ratio:16/10;

    }

    .bento-half,
    .bento-three{

        gap:1.25rem;

    }

}

/* ==========================================================
   MORE PROJECTS
========================================================== */

.more-projects{
    width:100%;
    padding:0rem 2rem;
    overflow:hidden;
}

.more-projects-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    margin-bottom:3rem;
}

.section-label{
    display:block;
    margin-bottom:1rem;

    font-size:.75rem;
    letter-spacing:.16em;
    text-transform:uppercase;

    color:rgba(var(--dz-fg-rgb), calc(.55 + var(--dz-text-lift)));
}

.section-heading{
    margin:0;

    font-size:clamp(2.8rem,5vw,4.8rem);
    line-height:1;
    font-weight:var(--dz-heading-weight);
}

/* ==========================================================
   ARROWS
========================================================== */

.more-projects-nav{
    display:flex;
    gap:1rem;
}

.more-projects-nav button{

    width:52px;
    height:52px;

    display:flex;
    align-items:center;
    justify-content:center;

    border:none;
    /* border-radius:50%; */

    background:transparent;

    cursor:pointer;

    transition:all .35s cubic-bezier(.22,1,.36,1);

}

.more-projects-nav button img{

    width:52px;
    height:52px;

    transition:transform .35s ease;
}

/* Previous → left */
.project-prev img {
    transform: rotate(180deg);
}

/* Next → right */
.project-next img {
    transform: none;
}

.more-projects-nav button:hover img {
    filter: invert(1);
}

.project-prev:hover img {
    transform: rotate(180deg) translateX(-4px);
}

.project-next:hover img {
    transform: translateX(4px);
}

/* ==========================================================
   SLIDER
========================================================== */

.projects-slider{
    overflow: hidden;
    width: 100%;
}

.projects-track{
    display:flex;
    gap:2rem;
    will-change:transform;
}

.project-slide{
    flex: 0 0 calc((100% - 4rem) / 3);
}

.project-slide{

    flex:0 0 calc((100% - 4rem)/3);

    text-decoration:none;

    /* color:#fff; */

}

/* ==========================================================
   IMAGE
========================================================== */

.project-slide-image{

    overflow:hidden;

    /* border-radius:18px; */

    /* isolate paint so the slider's texture is prepared up-front,
       not rasterised during the first scroll into view */
    contain:paint;

}

.project-slide-image img{

    width:100%;
    aspect-ratio:9/6;

    display:block;

    object-fit:cover;

    transform:translateZ(0);
    backface-visibility:hidden;
    will-change:transform;

    transition:transform .8s cubic-bezier(.22,1,.36,1);

}

.project-slide:hover img{

    transform:translateZ(0) scale(1.05);

}

/* ==========================================================
   INFO
========================================================== */

.project-slide-info{

    display:flex;
    justify-content:space-between;
    align-items:center;

    margin-top:1rem;

}

.project-slide-info h3{

    font-size:1.45rem;
    font-weight:var(--dz-regular-weight);

}

.project-slide-info span{

    font-size:.9rem;

    color:rgba(var(--dz-fg-rgb), calc(.55 + var(--dz-text-lift)));

}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media(max-width:991px){

    .project-slide{

        flex:0 0 calc((100% - 2rem)/2);

    }

}

@media(max-width: 1024px){

    .more-projects{

        padding:6rem 1rem;

    }

    .more-projects-header{

        flex-direction:column;
        align-items:flex-start;
        gap:2rem;

    }

    .project-slide{

        flex:0 0 100%;

    }

}


/* ==========================================================
   PHONE  (≤ 767px) — shared mobile system from main.css
   · intro + cover: the title, then a 4:5 cover instead of a
     full-screen-tall image
   · overview: Challenge and Solution stack; the facts become a
     2-up grid (it used to run off the side of the screen)
   · gallery: a phone-sized bento — full frames alternate with
     pairs of squares, on a tight 0.75rem grid
   · more projects: one card with the next one peeking in;
     swipe or use the arrows (js/project.js)
========================================================== */

@media(max-width: 1024px){

    .project-intro{
        padding:calc(64px + 2.5rem) var(--dz-gutter) 2.25rem;
    }

    .project-intro-grid{
        grid-template-columns:1fr;
        gap:1.5rem;
    }

    .project-title{
        font-size:clamp(2.75rem, 13vw, 4rem);
    }

    .project-showcase{
        padding:0 var(--dz-gutter) 0;
    }

    .project-showcase img{
        height:auto;
        aspect-ratio:4 / 5;
    }

    .project-overview{
        padding:var(--dz-section-py) var(--dz-gutter) 3rem;
    }

    .overview-grid{
        grid-template-columns:1fr;
        gap:2.5rem;
        margin-bottom:3rem;
    }

    .overview-heading{
        margin-bottom:1rem;
        font-size:1.75rem;
    }

    .overview-block p{
        font-size:1rem;
        line-height:1.7;
    }

    .overview-meta{
        display:grid;
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:1.5rem 1rem;
        padding:1.75rem 0;
    }

    .overview-item strong{
        font-size:.95rem;
        overflow-wrap:anywhere;
    }

    /* gallery */
    .project-gallery{
        padding:0 var(--dz-gutter);
    }

    .project-gallery > *{
        margin-bottom:.75rem;
    }

    .bento-half,
    .bento-three,
    .bento-feature,
    .bento-feature--flip{
        gap:.75rem;
    }

    .bento-full img,
    .feature-large img{
        aspect-ratio:4 / 3;
    }

    /* pairs of squares side by side */
    .bento-half{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

    /* three → one full frame over a pair */
    .bento-three{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

    .bento-three > :first-child{
        grid-column:1 / -1;
    }

    .bento-three > :first-child img{
        aspect-ratio:4 / 3;
    }

    .feature-small img{
        height:auto;
        aspect-ratio:4 / 3;
    }

    /* more projects */
    .more-projects{
        padding:var(--dz-section-py) var(--dz-gutter);
    }

    .more-projects-header{
        flex-direction:row;
        align-items:flex-end;
        gap:1rem;
        margin-bottom:2rem;
    }

    .section-heading{
        font-size:clamp(2.25rem, 10vw, 2.75rem);
    }

    .more-projects-nav{
        gap:.25rem;
    }

    .more-projects-nav button,
    .more-projects-nav button img{
        width:40px;
        height:40px;
    }

    /* the next card may peek into the right gutter; the left edge is
       clipped so the previous one never shows */
    .projects-slider{
        overflow:visible;
        clip-path:inset(0 calc(-1 * var(--dz-gutter)) 0 0);
        touch-action:pan-y;
    }

    .more-projects{
        overflow:hidden;
    }

    .projects-track{
        gap:.75rem;
    }

    .project-slide{
        flex:0 0 84%;
    }

    .project-slide-image img{
        aspect-ratio:4 / 3;
    }

    .project-slide-info{
        align-items:baseline;
        gap:1rem;
    }

    .project-slide-info h3{
        font-size:1.2rem;
    }

    .project-slide-info span{
        font-size:.8rem;
        text-align:right;
    }

}