/* ==========================================================
   WORK HERO  — two stacked zones inside one 100vh view:
   UPPER  = the oversized "Work" wordmark, centred both ways,
            with a hairline divider (2rem inset) on its lower edge.
   LOWER  = eyebrow + a 2-line section heading on the LEFT and a
            4-line supporting paragraph on the RIGHT, sitting on
            the bottom padding (2rem).
   Letter + line reveals: /js/work-hero-animations.js
========================================================== */

.work-hero{
    min-height:100vh;
    display:flex;
    flex-direction:column;

    box-sizing:border-box;
    padding:0 2rem 2rem;
}

/* UPPER ZONE — takes every pixel the statement below does not, and
   centres the wordmark in it on both axes (same as the About hero). */
.work-hero__top{
    flex:1 1 auto;
    min-height:0;
    display:flex;
    align-items:center;
    justify-content:center;

    /* border-bottom:1px solid rgba(255, 255, 255, 0.14); */
}

.work-hero__word{
    margin:0;
    /* tight leading + no descenders makes the glyphs sit visually high in
       their box — nudge down so it reads centred between header and line */
    transform:translateY(0.06em);
    font-family:"degular", sans-serif;
    font-size:clamp(3.25rem, 22vw, 22rem);
    line-height:0.86;
    font-weight:var(--dz-heading-weight);
    letter-spacing:-0.02em;
    color:var(--dz-fg);
    white-space:nowrap;
    text-align:center;
}

/* LOWER ZONE — heading left, paragraph right, sitting on the 2rem
   bottom padding. Only as tall as its own content, so the wordmark
   above keeps the whole of the remaining height to centre in. */
.work-hero__statement{
    flex:0 0 auto;
    width:100%;
    padding-top:clamp(2rem, 7vh, 4.5rem);
    display:flex;
    flex-direction:row;
    align-items:flex-end;
    justify-content:space-between;
    gap:clamp(2rem, 7vw, 7rem);
    text-align:left;
}

.work-hero__col{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    min-width:0;
}

.work-hero__eyebrow.dz-eyebrow{
    margin-bottom:clamp(1.25rem, 3vw, 1.75rem);
}

/* section-sized heading — copy + max-width tuned to wrap to 2 lines */
/* shared page-hero scale from main.css — identical on every page */
.work-hero__heading{
    margin:0;
    max-width:20ch;

    font-family:var(--dz-font-display);
    font-size:var(--dz-page-hero-size);
    line-height:var(--dz-page-hero-line);
    font-weight:var(--dz-heading-weight);
    letter-spacing:var(--dz-heading-tracking);
    color:var(--dz-heading-color);
}

/* supporting copy — right column, ~4 lines, sits on the heading's baseline */
.work-hero__para{
    flex:0 1 44ch;
    max-width:44ch;
    margin:0 0 0.35em;

    font-family:var(--dz-font-body);
    font-size:var(--dz-body-size);
    line-height:var(--dz-body-line);
    color:var(--dz-body-color);
}

@media (max-width: 820px){
    .work-hero__statement{
        flex-direction:column;
        align-items:flex-start;
        gap:clamp(1.5rem, 5vw, 2.5rem);
    }

    .work-hero__heading{
        max-width:24ch;
    }

    .work-hero__para{
        flex-basis:auto;
        max-width:52ch;
        margin-bottom:0;
    }
}







/* ==========================================================
   WORK PROJECTS
========================================================== */

.work-projects{
    width:100%;
    padding:2rem;
    box-sizing:border-box;
}

.work-filter{
    display:flex;
    justify-content:flex-start;
    align-items:center;
    gap:3rem;
    margin-bottom:2.5rem;
}

.filter-btn{
    position:relative;
    display:inline-block;

    background:none;
    border:none;
    padding:0;

    cursor:pointer;

    color:rgba(var(--dz-fg-rgb), calc(.6 + var(--dz-text-lift)));
    font-size:.95rem;
    font-family:inherit;
    line-height:1.2;

    transition:color .35s ease;
}

/* Underline */
.filter-btn::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-8px;

    width:100%;
    height:1px;

    background:var(--dz-fg);

    transform:scaleX(0);
    transform-origin:bottom right;

    transition:transform .55s cubic-bezier(.65,0,.35,1);
}

/* Hover */
.filter-btn:hover{
    color:var(--dz-fg);
}

.filter-btn:hover::after{
    transform:scaleX(1);
    transform-origin:bottom left;
}

/* Active */
.filter-btn.active{
    color:var(--dz-fg);
}

.filter-btn.active::after{
    transform:scaleX(1);
    transform-origin:bottom left;
}

.filter-btn{
    display:flex;
    align-items:center;
    gap:.45rem;
}

.filter-btn .count{
    font-size:.72rem;
    color:rgba(var(--dz-fg-rgb), calc(0.4 + var(--dz-text-lift)));
    transition:.35s ease;
}

.filter-btn:hover .count,
.filter-btn.active .count{
    color:rgba(var(--dz-fg-rgb), calc(0.6 + var(--dz-text-lift)));
}

@media(max-width: 1024px){

    .work-filter{
        justify-content:flex-start;
        gap:1.5rem;
        overflow-x:auto;
        white-space:nowrap;
        margin-bottom:2rem;
    }

}

.project-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:2rem;
}

.project-card{
    width:100%;
     will-change:transform, opacity;
}

.project-image{
    position:relative;
    display:block;
    overflow:hidden;
    text-decoration:none;
    color:#fff;
}

.project-image img{
    display:block;
    width:100%;
    aspect-ratio:1.65/1;
    object-fit:cover;

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

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

.project-info{
    position:absolute;
    left:0;
    right:0;
    bottom:0;

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

    padding:2rem;

    z-index:2;
}

/* title on the photo — white in both themes (the global h3 rule would
   otherwise give it the dark light-mode ink) */
.project-image .project-title{
    color:#fff;
}

.project-meta{
    display:flex;
    margin-top: 1rem;
    gap:1rem;
}

.project-meta span{
    font-size:.7rem;
    text-transform:uppercase;
    letter-spacing:.12em;
    color:rgba(255,255,255,.55);
}

.project-arrow{
    width:48px;
    height:48px;

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

.project-arrow img{
    width:48px;
    height:48px;
    display:block;
    transition:transform .35s ease;
}

.project-card:hover .project-arrow img{
    transform:translate(3px,-3px);
}


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

@media(max-width:991px){

    .project-grid{
        grid-template-columns:1fr;
    }

}

@media(max-width: 1024px){

    .work-projects{
        padding:2rem;
    }

    .project-title{
        font-size:1.35rem;
    }

    .project-meta{
        flex-wrap:wrap;
        gap:.7rem;
    }

}


/* ==========================================================
   PHONE  (≤ 767px) — shared mobile system from main.css
   · "Work" runs gutter to gutter (2.15em is its measured width)
   · the filter row scrolls sideways, edge to edge
   · each project is an editorial plate: a clean 4:3 image with
     the title, meta and arrow set as a caption underneath, so no
     text ever sits on top of the artwork
========================================================== */

@media (max-width: 1024px){

    .work-hero{
        min-height:100svh;
        padding:0 var(--dz-gutter) 1.75rem;
    }

    .work-hero__word{
        font-size:calc((100vw - 2 * var(--dz-gutter)) / 2.15);
    }

    .work-projects{
        padding:1.75rem var(--dz-gutter) var(--dz-section-py);
    }

    .work-filter{
        gap:1.75rem;
        margin:0 calc(-1 * var(--dz-gutter)) 2rem;
        padding:0 var(--dz-gutter) .75rem;
        scrollbar-width:none;
    }

    .work-filter::-webkit-scrollbar{
        display:none;
    }

    .filter-btn{
        flex:0 0 auto;
    }

    .project-grid{
        gap:2.75rem;
    }

    .project-image{
        color:var(--dz-fg);
    }

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

    .project-info{
        position:static;
        align-items:center;
        gap:1rem;
        padding:1rem 0 0;
    }

    .project-image .project-title{
        font-size:1.6rem;
        line-height:1.1;
        color:var(--dz-fg);
    }

    .project-meta{
        margin-top:.6rem;
        gap:.35rem .9rem;
    }

    .project-meta span{
        color:rgba(var(--dz-fg-rgb), calc(.5 + var(--dz-text-lift)));
    }

    .project-arrow,
    .project-arrow img{
        flex:0 0 auto;
        width:40px;
        height:40px;
    }

    /* the arrow artwork is white — flip it on the light page */
    :root[data-theme="light"] .project-arrow img{
        filter:invert(1);
    }

}