/* =========================================================
   PROJEKTSEITE – KOPF
   ========================================================= */

.project-header
{
    padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.project-header__back
{
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 2rem;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-ink-soft);
    text-decoration: none;
}

.project-header__back svg
{
    width: 1.1em;
    height: 1.1em;
    transition: transform 0.25s var(--ease);
}

.project-header__back:hover
{
    color: var(--color-ink);
}

.project-header__back:hover svg
{
    transform: translateX(-3px);
}

.project-header__title
{
    max-width: 22ch;
    margin-block: 1.25rem;
    font-size: var(--text-2xl);
    font-weight: 900;
}

.project-header__lead
{
    max-width: 40rem;
    font-size: var(--text-lg);
    line-height: 1.5;
    color: var(--color-ink-soft);
}

/* ---------- Fakten ---------- */

.project-facts
{
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 3rem;
    margin: 2.5rem 0 0;
    padding-top: 1.5rem;
    border-top: var(--stroke);
}

.project-facts dt
{
    margin-bottom: 0.3rem;
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.project-facts dd
{
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 700;
}

.project-facts__customer
{
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-facts__customer img
{
    width: auto;
    max-width: 4rem;
    height: 1.6rem;
    object-fit: contain;
}

.project-facts__link
{
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-ink);
    text-decoration: underline;
    text-decoration-color: var(--color-green);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.25em;
}

.project-facts__link svg
{
    width: 1em;
    height: 1em;
}

/* =========================================================
   PROJEKTSEITE – BILDER
   ========================================================= */

.project-cover,
.project-gallery__link
{
    display: block;
    overflow: hidden;
    border: var(--stroke);
    border-radius: calc(var(--radius) * 2);
    background: var(--color-paper-dark);
    cursor: zoom-in;
}

.project-cover
{
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow-offset);
}

.project-cover img,
.project-gallery__link img
{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.project-cover:hover img,
.project-gallery__link:hover img
{
    transform: scale(1.03);
}

.project-gallery
{
    padding-bottom: var(--section-space);
}

.project-gallery__grid
{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 0.75rem + 1vw, 1.75rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

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

/* Bei ungerader Anzahl füllt das erste Bild die ganze Breite */
.project-gallery__grid--odd .project-gallery__item:first-child
{
    grid-column: 1 / -1;
}

.project-gallery__grid--odd .project-gallery__item:first-child .project-gallery__link
{
    aspect-ratio: 16 / 9;
}

/* =========================================================
   PROJEKTSEITE – BESCHREIBUNG
   ========================================================= */

.project-story
{
    padding-block: clamp(3rem, 2rem + 4vw, 6rem);
}

.project-story__inner
{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: clamp(1.5rem, 1rem + 4vw, 6rem);
}

.project-story__title
{
    font-size: var(--text-xl);
}

.project-story__title .serif-italic
{
    font-weight: 400;
}

.project-story__text
{
    max-width: 42rem;
    font-size: var(--text-lg);
    line-height: 1.65;
    color: var(--color-ink-soft);
    white-space: pre-line;
}

/* =========================================================
   PROJEKTSEITE – NÄCHSTES PROJEKT
   ========================================================= */

.next-project
{
    padding-bottom: var(--section-space);
}

.next-project__link
{
    display: flex;
    align-items: center;
    gap: clamp(1rem, 0.5rem + 2vw, 2.5rem);
    padding: 1rem 1rem 1rem clamp(1.25rem, 1rem + 2vw, 2.5rem);
    border: var(--stroke);
    border-radius: calc(var(--radius) * 2);
    background: var(--color-paper-light);
    color: inherit;
    text-decoration: none;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.next-project__link:hover
{
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-offset);
}

.next-project__text
{
    display: grid;
    flex: 1;
    gap: 0.3rem;
}

.next-project__label
{
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.next-project__title
{
    font-family: var(--font-sans);
    font-size: var(--text-xl);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.next-project__image
{
    width: 9rem;
    aspect-ratio: 4 / 3;
    border: 1.5px solid var(--color-ink);
    border-radius: var(--radius);
    object-fit: cover;
}

.next-project__arrow
{
    display: grid;
    flex: none;
    place-items: center;
    width: 3rem;
    aspect-ratio: 1;
    border: var(--stroke);
    border-radius: 50%;
    background: var(--color-green);
    color: var(--color-on-green);
}

.next-project__arrow svg
{
    width: 1.3rem;
    height: 1.3rem;
    transition: transform 0.25s var(--ease);
}

.next-project__link:hover .next-project__arrow svg
{
    transform: translateX(3px);
}

/* =========================================================
   BILDER-GROSSANSICHT
   ========================================================= */

.lightbox
{
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: clamp(1rem, 0.5rem + 3vw, 4rem);
    border: 0;
    background: transparent;
}

.lightbox[open]
{
    display: grid;
    place-items: center;
}

.lightbox::backdrop
{
    background: rgba(28, 36, 32, 0.9);
}

.lightbox__figure
{
    display: grid;
    justify-items: center;
    gap: 1rem;
    margin: 0;
}

.lightbox__image
{
    max-width: min(100%, 80rem);
    max-height: calc(100vh - 9rem);
    border: 2px solid var(--color-paper);
    border-radius: var(--radius);
    object-fit: contain;
}

.lightbox__caption
{
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--color-paper);
}

.lightbox__button
{
    position: fixed;
    display: grid;
    place-items: center;
    width: 3rem;
    aspect-ratio: 1;
    padding: 0;
    border: var(--stroke);
    border-radius: 50%;
    background: var(--color-paper-light);
    color: var(--color-ink);
    box-shadow: 3px 3px 0 var(--color-ink);
    cursor: pointer;
}

.lightbox__button svg
{
    width: 1.3rem;
    height: 1.3rem;
}

.lightbox__button:hover
{
    background: var(--color-green);
    color: var(--color-on-green);
}

.lightbox__button[hidden]
{
    display: none;
}

.lightbox__button--prev
{
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
}

.lightbox__button--next
{
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
}

.lightbox__button--close
{
    top: 1rem;
    right: 1rem;
}

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

@media (max-width: 760px)
{
    .project-story__inner
    {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-gallery__grid
    {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .next-project__image
    {
        display: none;
    }

    .lightbox__button--prev,
    .lightbox__button--next
    {
        top: auto;
        bottom: 1rem;
        transform: none;
    }
}
