/* =========================================================
   STORIES / REALIZACJE
========================================================= */

.stories-page {
    --stories-paper: #f2eee7;
    --stories-black: #0b0b0b;
    --stories-line: rgba(0,0,0,.16);

    background: var(--stories-paper);
    color: #111;

    overflow: hidden;
}


/* ---------------------------------------------------------
   COMMON
--------------------------------------------------------- */

.stories-kicker {
    margin: 0 0 17px;

    font-size: 9px;
    line-height: 1.4;

    letter-spacing: .18em;
    text-transform: uppercase;

    color: #111;
}

.stories-kicker--light {
    color: rgba(255,255,255,.78);
}

.stories-link {
    display: inline-flex;
    align-items: center;
    gap: 22px;

    margin-top: 28px;

    font-size: 10px;
    line-height: 1;

    letter-spacing: .07em;
    text-transform: uppercase;

    color: #111;
}

.stories-link--light {
    color: #fff !important;
}

.stories-link span {
    font-size: 18px;
}


/* ---------------------------------------------------------
   INTRO
--------------------------------------------------------- */

.stories-intro {
    min-height: 380px;

    display: grid;
    grid-template-columns: 58% 42%;

    align-items: center;

    box-sizing: border-box;

    padding:
        140px
        var(--pad)
        55px;

    background: var(--stories-paper);
}

.stories-intro__title h1 {
    margin: 0;

    font-family: var(--serif);
    font-size: clamp(72px, 8vw, 145px);

    font-weight: 400;
    line-height: .9;

    letter-spacing: -.045em;
}

.stories-intro__sub {
    margin-top: 30px;

    display: flex;
    align-items: center;
    gap: 20px;
}

.stories-intro__sub span {
    display: block;

    width: 30px;
    height: 1px;

    background: #111;
}

.stories-intro__sub p {
    margin: 0;

    font-size: 10px;
    text-transform: uppercase;

    letter-spacing: .08em;
}

.stories-intro__copy {
    display: flex;
    justify-content: flex-end;
}

.stories-intro__copy p {
    max-width: 410px;

    margin: 0;

    font-size: 14px;
    line-height: 1.65;
}


/* ---------------------------------------------------------
   FEATURED
--------------------------------------------------------- */

.stories-featured {
    min-height: 610px;

    display: flex;
    align-items: center;

    box-sizing: border-box;

    padding:
        70px
        var(--pad);

    background-color: #222;
    background-size: cover;
    background-position: center;

    color: #fff;
}

.stories-featured__content {
    max-width: 540px;
}

.stories-featured h2 {
    margin: 0;

    font-family: var(--serif);
    font-size: clamp(62px, 6vw, 105px);

    font-weight: 400;
    line-height: .9;

    letter-spacing: -.04em;
}

.stories-featured__year {
    margin: 17px 0 0;

    font-family: var(--serif);
    font-size: 24px;
}

.stories-featured__description {
    max-width: 360px;

    margin: 32px 0 0;

    font-size: 13px;
    line-height: 1.6;

    color: rgba(255,255,255,.78);
}


/* ---------------------------------------------------------
   ARCHIVE
--------------------------------------------------------- */

.stories-archive {
    padding:
        45px
        var(--pad)
        70px;
}

.stories-archive__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 30px;

    margin-bottom: 25px;
}

.stories-archive__title .stories-kicker {
    margin: 0;
}


/* FILTERS */

.stories-filters {
    display: flex;
    align-items: center;
    gap: 28px;
}

.stories-filter {
    padding: 0 0 8px;

    border: 0;
    border-bottom: 1px solid transparent;

    background: transparent;

    cursor: pointer;

    font-family: inherit;
    font-size: 9px;

    text-transform: uppercase;
    letter-spacing: .07em;

    color: #666;
}

.stories-filter:hover,
.stories-filter.is-active {
    border-bottom-color: #111;

    color: #111;
}


/* ---------------------------------------------------------
   STORIES GRID
--------------------------------------------------------- */

.stories-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0,1fr));

    grid-auto-flow: dense;

    gap: 5px;
}

.stories-card {
    min-height: 310px;

    position: relative;

    overflow: hidden;

    background: #aca49a;
}

.stories-card--tall {
    grid-row: span 2;

    min-height: 625px;
}

.stories-card--wide {
    grid-column: span 2;
}

.stories-card a {
    display: block;

    width: 100%;
    height: 100%;

    color: #fff;
}

.stories-card__image {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            135deg,
            #777068,
            #b0a79d
        );

    background-size: cover;
    background-position: center;

    transform: scale(1);

    transition:
        transform .6s ease,
        filter .6s ease;
}

.stories-card__image::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            0deg,
            rgba(0,0,0,.78) 0%,
            rgba(0,0,0,.08) 58%
        );
}

.stories-card:hover .stories-card__image {
    transform: scale(1.025);
}

.stories-card__overlay {
    position: absolute;

    z-index: 2;

    left: 26px;
    right: 26px;
    bottom: 25px;
}

.stories-card__overlay p {
    margin: 0 0 9px;

    font-size: 8px;

    letter-spacing: .12em;
    text-transform: uppercase;
}

.stories-card__overlay h3 {
    margin: 0;

    font-family: var(--serif);
    font-size: clamp(25px, 2.2vw, 42px);

    line-height: .95;
    font-weight: 400;
}

.stories-card__overlay span {
    display: block;

    margin-top: 12px;

    font-size: 9px;

    letter-spacing: .06em;

    color: rgba(255,255,255,.65);
}


/* FILTER ANIMATION */

.stories-card {
    opacity: 1;

    transition:
        opacity .25s ease;
}

.stories-card.is-hidden {
    display: none;
}


/* ---------------------------------------------------------
   SELECTED
--------------------------------------------------------- */

.stories-selected {
    display: grid;

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

    gap: 1px;

    background: rgba(0,0,0,.15);

    border-top:
        1px solid rgba(0,0,0,.15);

    border-bottom:
        1px solid rgba(0,0,0,.15);
}

.stories-selected > * {
    background: var(--stories-paper);
}

.stories-selected__intro {
    padding:
        55px
        var(--pad)
        55px;

    min-height: 350px;

    box-sizing: border-box;
}

.stories-selected__intro h2 {
    max-width: 290px;

    margin: 0;

    font-family: var(--serif);
    font-size: clamp(34px, 3vw, 54px);

    line-height: .98;
    font-weight: 400;
}

.stories-selected__item {
    display: grid;

    grid-template-rows:
        auto
        1fr;

    min-height: 350px;

    overflow: hidden;
}

.stories-selected__item > div:first-child {
    padding: 30px 28px;
}

.stories-selected__item p {
    margin: 0 0 11px;

    font-size: 8px;

    letter-spacing: .12em;
    text-transform: uppercase;
}

.stories-selected__item h3 {
    margin: 0;

    font-family: var(--serif);
    font-size: 30px;

    font-weight: 400;
    line-height: .95;
}

.stories-selected__item span {
    display: block;

    margin-top: 13px;

    font-size: 9px;

    color: #666;
}

.stories-selected__image {
    min-height: 180px;

    background:
        linear-gradient(
            135deg,
            #b2aaa0,
            #6d6761
        );

    background-size: cover;
    background-position: center;
}


/* ---------------------------------------------------------
   PHILOSOPHY
--------------------------------------------------------- */

.stories-philosophy {
    display: grid;

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

    align-items: stretch;

    padding:
        55px
        var(--pad);

    background: var(--stories-paper);
}

.stories-philosophy__headline {
    padding-right: 55px;
}

.stories-philosophy__headline h2 {
    max-width: 420px;

    margin: 0;

    font-family: var(--serif);
    font-size: clamp(36px, 3vw, 56px);

    font-weight: 400;
    line-height: .96;
}

.stories-philosophy__item {
    padding: 0 35px;

    border-left:
        1px solid
        rgba(0,0,0,.16);
}

.stories-philosophy__item span {
    display: block;

    margin-bottom: 28px;

    font-family: var(--serif);
    font-size: 28px;
}

.stories-philosophy__item p {
    max-width: 220px;

    margin: 0;

    font-size: 11px;
    line-height: 1.6;
}


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

@media (max-width: 1100px) {

    .stories-grid {
        grid-template-columns:
            repeat(3, minmax(0,1fr));
    }

    .stories-card--wide {
        grid-column: span 2;
    }


    .stories-selected {
        grid-template-columns:
            1fr
            1fr;
    }

    .stories-selected__intro {
        grid-row: span 2;
    }


    .stories-philosophy {
        grid-template-columns:
            1fr
            1fr;
    }

    .stories-philosophy__headline {
        grid-column: 1 / -1;

        margin-bottom: 45px;
    }

    .stories-philosophy__item {
        padding: 28px 0;

        border-left: 0;
        border-top:
            1px solid
            rgba(0,0,0,.15);
    }

}


/* =========================================================
   STORIES MOBILE
========================================================= */

@media (max-width: 760px) {

    .stories-intro {
        min-height: 470px;

        display: block;

        padding:
            135px
            22px
            55px;
    }

    .stories-intro__title h1 {
        font-size: 19vw;
    }

    .stories-intro__copy {
        margin-top: 55px;

        justify-content: flex-start;
    }


    .stories-featured {
        min-height: 620px;

        padding:
            55px
            22px;

        background-position: center;
    }

    .stories-featured h2 {
        font-size: 15vw;
    }


    .stories-archive {
        padding:
            40px
            22px
            55px;
    }

    .stories-archive__toolbar {
        display: block;
    }

    .stories-filters {
        margin-top: 25px;

        gap: 18px;

        overflow-x: auto;

        padding-bottom: 4px;
    }

    .stories-filter {
        white-space: nowrap;
    }


    .stories-grid {
        grid-template-columns:
            1fr
            1fr;

        gap: 4px;
    }

    .stories-card {
        min-height: 64vw;
    }

    .stories-card--tall {
        grid-row: span 1;

        min-height: 95vw;
    }

    .stories-card--wide {
        grid-column: span 2;

        min-height: 62vw;
    }

    .stories-card__overlay {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .stories-card__overlay h3 {
        font-size: 7vw;
    }


    .stories-selected {
        display: block;
    }

    .stories-selected__intro {
        min-height: auto;

        padding:
            50px
            22px;
    }

    .stories-selected__item {
        grid-template-columns:
            1fr
            1fr;

        grid-template-rows: 1fr;

        min-height: 250px;
    }


    .stories-philosophy {
        display: block;

        padding:
            55px
            22px;
    }

    .stories-philosophy__headline {
        margin-bottom: 35px;
        padding: 0;
    }

    .stories-philosophy__item {
        padding: 30px 0;
    }


}


/* =========================================================
   STORIES / REALIZACJE — DARK HERO
========================================================= */

.stories-intro {
    min-height: 720px !important;

    padding:
        185px
        var(--pad)
        70px !important;

    background: #0b0b0b !important;
    color: #fff !important;
}

.stories-intro__title {
    align-self: center;
}

.stories-intro__title h1 {
    color: #fff !important;
}

.stories-intro .stories-kicker {
    color: rgba(255,255,255,.62) !important;
}

.stories-intro__sub span {
    background: rgba(255,255,255,.70) !important;
}

.stories-intro__sub p {
    color: rgba(255,255,255,.78) !important;
}

.stories-intro__copy {
    align-self: center;
}

.stories-intro__copy p {
    color: rgba(255,255,255,.74) !important;
}


/* Header na Realizacjach zostaje biały */

body.page-template-page-stories-php .site-nav--desktop a,
body.page-template-page-stories-php .site-contact-link,
body.page-template-page-stories-php .site-lang {
    color: #fff !important;
}

body.page-template-page-stories-php .site-nav--desktop a::after,
body.page-template-page-stories-php .site-contact-link::after {
    background: #fff !important;
}

body.page-template-page-stories-php .site-brand img {
    filter: invert(1) !important;
}


/* MOBILE */

@media (max-width: 760px) {

    .stories-intro {
        min-height: 690px !important;

        padding:
            135px
            22px
            55px !important;
    }

}

/* Responsive Fix 1 — pełne tytuły kart na małych telefonach. */
@media (max-width: 430px) {
    .stories-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .stories-card {
        grid-column: auto;
        grid-row: auto;
    }

    .stories-card a {
        display: flex;
        align-items: flex-end;
        height: auto;
        min-height: inherit;
    }

    .stories-card__overlay {
        position: relative;
        inset: auto;
        width: 100%;
        padding: 16px;
    }
}

/* Responsive Fix 3 — wysokość dotykowych filtrów. */
@media (max-width: 1080px) {
    .stories-filter {
        min-height: 44px;
        padding-top: 11px;
        padding-bottom: 11px;
    }
}
