/* ==========================================================================
   Nowe portfolio w modelu Współprac (spec .scratch/portfolio-wspolprace).
   Ładowane tylko na stronie roboczej /portfolio-nowe/ (inc/tw-portfolio.php). Wygląd z prototypu zaakceptowanego
   25.09, kolory z poprawionym kontrastem (nadtytuły #8967B0, szary tekst #767676, ciemny tekst na liliowym).
   Wszystkie klasy z prefiksem tw-pf-, bez klas animacji Pixy (mil-up): treść widoczna od razu.
   ========================================================================== */

.tw-pf {
    --tw-pf-maxw: 1340px;
    --tw-pf-text: #767676;
    --tw-pf-label: #8967B0;
    --tw-pf-line: rgba(0, 0, 0, .08);
    --tw-pf-r: 24px;
    --tw-pf-tint-www: #EDF3F9;
    --tw-pf-tint-social: #FCEFF6;
    --tw-pf-tint-film: #F3F0F8;
    --tw-pf-tint-multi: linear-gradient(120deg, #E8F0F9 0%, #F1EDF8 52%, #FCEDF4 100%);
    /* Gradient Pixy .mil-footer::before sięga 40vh nad stopkę i przechwytuje kliknięcia (jak w poprawce 1.4.1
       stopki): treść portfolio leży nad nim. */
    position: relative;
    z-index: 1;
    /* Nagłówek Pixy (fixed) ma 200 px, a na telefonie 100 px: treść zaczyna się pod nim. */
    padding-top: 200px;
    color: var(--tw-dark);
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.tw-pf *,
.tw-pf *::before,
.tw-pf *::after {
    box-sizing: border-box;
}

.tw-pf img {
    display: block;
    max-width: 100%;
    height: auto;
}

.tw-pf a {
    color: inherit;
    text-decoration: none;
}

/* Strzałka linku zewnętrznego (SVG zamiast znaku „↗”, który iOS zamienia w emoji). */
.tw-pf-arrow {
    display: inline-block;
    flex: none;
    width: .72em;
    height: .72em;
    margin-left: .15em;
    vertical-align: .02em;
}

/* Pixy chowa <br> na telefonie; tu łamanie jest częścią nagłówka („nasze projekty, / Twoja przewaga”). */
.tw-pf br {
    display: inline;
}

.tw-pf :focus-visible {
    outline: 2px solid var(--tw-blue);
    outline-offset: 3px;
    border-radius: 4px;
}

.tw-pf-wrap {
    width: 100%;
    max-width: var(--tw-pf-maxw);
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 56px);
}

/* ----- elementy marki ----- */
.tw-pf-eyebrow {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1;
    text-transform: uppercase;
    color: var(--tw-pf-label);
}

.tw-pf-grad {
    background: var(--tw-gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-style: italic;
    font-weight: 800;
    padding: 0 .1em .08em;
    margin-left: -.08em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.tw-pf-display {
    margin: 0;
    font-weight: 300;
    font-size: clamp(40px, 6vw, 92px);
    line-height: 1.06;
    letter-spacing: -.01em;
    text-wrap: balance;
    color: var(--tw-dark);
}

.tw-pf-h2 {
    margin: 0;
    font-weight: 300;
    font-size: clamp(30px, 3.6vw, 54px);
    line-height: 1.1;
    text-wrap: balance;
    color: var(--tw-dark);
}

.tw-pf-lead {
    margin: 24px 0 0;
    max-width: 58ch;
    font-size: clamp(16px, 1.25vw, 19px);
    line-height: 1.6;
    color: var(--tw-pf-text);
}

.tw-pf-tags {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.3;
    color: var(--tw-pf-label);
}

/* ----- archiwum: nagłówek z falą ----- */
.tw-pf-hero {
    position: relative;
    overflow: hidden;
}

.tw-pf-hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    pointer-events: none;
    top: clamp(-120px, -6vw, -40px);
    right: calc(0% - 12vw);
    width: clamp(300px, 38vw, 660px);
    aspect-ratio: 1400 / 1098;
    background: url("../../../../uploads/2025/11/0056_2025_10_team_fala-mala1-1024x803.png") no-repeat center / contain;
}

.tw-pf-hero__in {
    position: relative;
    z-index: 1;
    padding-block: clamp(24px, 2vw, 32px) clamp(28px, 3.4vw, 44px);
}

/* ----- Wyniki (ADR 0003) ----- */
.tw-pf-proof {
    padding-block: 0 clamp(32px, 4vw, 52px);
}

.tw-pf-proof__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 24px;
    margin-bottom: 16px;
}

.tw-pf-proof__head .tw-pf-eyebrow {
    margin: 0;
}

.tw-pf-proof__note {
    margin: 0;
    font-size: 14px;
    color: var(--tw-pf-text);
}

.tw-pf-proof__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px clamp(20px, 3vw, 44px);
    padding-top: 22px;
    border-top: 1px solid var(--tw-pf-line);
}

.tw-pf-proof__num {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.1;
}

.tw-pf-proof__num .tw-pf-grad {
    font-size: clamp(36px, 3.4vw, 54px);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.tw-pf-proof__desc {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.5;
}

/* ----- filtr: przyklejony pod nagłówkiem (skrypt nagłówka publikuje --tw-header-offset) ----- */
/* Pixy daje .mil-transition-fade overflow: hidden, co robi z niego kontener przewijania i wyłącza sticky.
   clip przycina tak samo, ale kontenera przewijania nie tworzy. */
.tw-pf-strona .mil-transition-fade {
    overflow: clip;
}

.tw-pf-filters {
    position: sticky;
    top: var(--tw-header-offset, 0px);
    z-index: 10;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--tw-pf-line);
    transition: top .3s ease;
}

.tw-pf-filters__in {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-block: 14px;
    scrollbar-width: none;
}

.tw-pf-filters__in::-webkit-scrollbar {
    display: none;
}

.tw-pf-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .12);
    background: #fff;
    color: var(--tw-dark);
    font: 500 14px/1 "Poppins", sans-serif;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.tw-pf-chip span {
    color: var(--tw-pf-text);
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.tw-pf-chip:hover {
    border-color: var(--tw-purple);
}

.tw-pf-chip[aria-pressed="true"] {
    background: var(--tw-purple);
    border-color: var(--tw-purple);
    color: var(--tw-dark);
}

.tw-pf-chip[aria-pressed="true"] span {
    color: var(--tw-dark);
}

/* ----- siatka kart: odstęp między kartami wyraźnie większy niż w karcie, bez ramek ----- */
.tw-pf-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: clamp(48px, 5vw, 72px) clamp(28px, 3vw, 48px);
    padding-block: clamp(36px, 4.4vw, 60px) clamp(64px, 8vw, 112px);
}

.tw-pf-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.tw-pf-card[hidden] {
    display: none;
}

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

.tw-pf-card--wide .tw-pf-m {
    aspect-ratio: 2.2 / 1;
}

.tw-pf-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.tw-pf-card--wide .tw-pf-card__body {
    max-width: 62ch;
}

.tw-pf-card__name {
    margin: 2px 0 0;
    font-size: clamp(22px, 1.8vw, 28px);
    font-weight: 700;
    font-style: italic;
    line-height: 1.15;
    color: var(--tw-dark);
}

.tw-pf-card--wide .tw-pf-card__name {
    font-size: clamp(28px, 2.6vw, 40px);
}

.tw-pf-card__name a {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
    transition: text-decoration-color .25s ease;
}

.tw-pf-card__name a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--tw-pf-r);
}

.tw-pf-card:hover .tw-pf-card__name a,
.tw-pf-card__name a:focus-visible {
    text-decoration-color: var(--tw-purple-light);
}

.tw-pf-card__what {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.tw-pf-card--wide .tw-pf-card__what {
    font-size: clamp(16px, 1.3vw, 19px);
}

.tw-pf-card__meta {
    margin: 2px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tw-pf-text);
}

.tw-pf-card__live {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    margin-top: 6px;
    padding-bottom: 2px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--tw-purple-light);
}

.tw-pf-card__live:hover {
    border-bottom-color: var(--tw-blue);
}

.tw-pf-now {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--tw-dark);
    font-weight: 500;
}

.tw-pf-now::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tw-gradient);
}

/* ----- Materiał w naturalnym formacie; tło mówi o usłudze ----- */
.tw-pf-m {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5%;
    padding-inline: 6%;
    aspect-ratio: 4 / 3;
    border-radius: var(--tw-pf-r);
    overflow: hidden;
    isolation: isolate;
    background: var(--tw-pf-tint-www);
}

.tw-pf-m--social { background: var(--tw-pf-tint-social); }
.tw-pf-m--film { background: var(--tw-pf-tint-film); }
.tw-pf-m--multi { background: var(--tw-pf-tint-multi); }

.tw-pf-bw {
    flex: none;
    width: 84%;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 22px 44px -22px rgba(53, 54, 57, .38), 0 2px 6px rgba(53, 54, 57, .06);
    transition: transform .35s ease;
}

.tw-pf-bw__bar {
    display: flex;
    align-items: center;
    gap: 5px;
    height: clamp(18px, 1.6vw, 24px);
    padding: 0 10px;
    background: #F3F3F5;
    border-bottom: 1px solid var(--tw-pf-line);
}

.tw-pf-bw__bar i {
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #D8D8DD;
}

.tw-pf-bw__bar span {
    margin-left: 8px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--tw-pf-text);
}

.tw-pf-bw img {
    width: 100%;
}

.tw-pf-card:hover .tw-pf-bw,
.tw-pf-card:hover .tw-pf-reel {
    transform: translateY(-6px);
}

.tw-pf-reel {
    position: relative;
    flex: none;
    height: 82%;
    aspect-ratio: 9 / 16;
    padding: 0;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #2a2a2d;
    box-shadow: 0 22px 40px -22px rgba(53, 54, 57, .45);
    transition: transform .35s ease;
}

.tw-pf-reel img,
.tw-pf-reel iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.tw-pf-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    transform: translate(-50%, -50%);
}

.tw-pf-play svg {
    width: 14px;
    height: 14px;
    margin-left: 2px;
    fill: var(--tw-dark);
}

.tw-pf-still {
    flex: none;
    width: 78%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 22px 40px -22px rgba(53, 54, 57, .45);
}

/* Zdjęcie na karcie: pionowy kadr 2:3 jak rolka (sesja produktowa); para zdjęć obok siebie, drugie niżej. */
.tw-pf-m > .tw-pf-still {
    width: auto;
    height: 82%;
    aspect-ratio: 2 / 3;
    transition: transform .35s ease;
}

.tw-pf-m > .tw-pf-still img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tw-pf-m--pair > .tw-pf-still { height: 74%; }
.tw-pf-m--pair > .tw-pf-still + .tw-pf-still { margin-top: 8%; }
.tw-pf-card:hover .tw-pf-m > .tw-pf-still { transform: translateY(-6px); }

.tw-pf-m--pair .tw-pf-bw { width: 58%; }
.tw-pf-m--pair .tw-pf-reel { height: 80%; }

/* ----- podstrona Współpracy ----- */
.tw-pf-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tw-pf-text);
}

.tw-pf-back:hover {
    color: var(--tw-dark);
}

/* Nagłówek podstrony: sam tekst na całą szerokość, pod nim od razu fakty i materiały. */
.tw-pf-c-hero {
    padding-block: clamp(28px, 4vw, 56px) clamp(28px, 3.4vw, 48px);
}

.tw-pf-display--case {
    font-size: clamp(38px, 5.4vw, 84px);
}

.tw-pf-lead--case {
    max-width: 72ch;
    font-size: clamp(17px, 1.4vw, 21px);
}

.tw-pf-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 28px;
    margin: 0;
    padding-block: 26px;
    border-block: 1px solid var(--tw-pf-line);
}

.tw-pf-facts dt {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--tw-pf-text);
}

.tw-pf-facts dd {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.45;
}

.tw-pf-facts a {
    border-bottom: 1px solid var(--tw-purple-light);
}

.tw-pf-efekt {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 40px;
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.2;
}

.tw-pf-sec {
    padding-block: clamp(56px, 7vw, 104px) 0;
}

.tw-pf-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 24px clamp(32px, 5vw, 96px);
    align-items: start;
}

.tw-pf-prose p {
    margin: 0 0 16px;
    max-width: 62ch;
    font-size: clamp(16px, 1.2vw, 18px);
    line-height: 1.7;
}

.tw-pf-svc {
    margin-top: clamp(32px, 4vw, 56px);
    padding-top: clamp(32px, 4vw, 48px);
    border-top: 1px solid var(--tw-pf-line);
}

.tw-pf-svc__head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: clamp(24px, 3vw, 36px);
}

.tw-pf-svc__head img {
    flex: none;
    width: clamp(56px, 5vw, 76px);
}

.tw-pf-svc__head h3 {
    margin: 4px 0 0;
    font-size: clamp(24px, 2.4vw, 36px);
    font-weight: 700;
    font-style: italic;
    line-height: 1.1;
    color: var(--tw-dark);
}

.tw-pf-svc__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 32px clamp(32px, 4vw, 72px);
    align-items: start;
}

.tw-pf-ticks {
    display: grid;
    /* Większe odstępy: lista zadań wypełnia kolumnę obok materiałów (uwaga 28.09). */
    gap: clamp(18px, 2.1vw, 34px);
    list-style: none;
    margin: 0;
    padding: 0;
}

.tw-pf-ticks li {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 14px;
    font-size: clamp(16px, 1.05vw, 18px);
    line-height: 1.5;
}

/* Ptaszek z list zadań starego portfolio (assets/img/tw-ptaszek.svg). */
.tw-pf-ticks img {
    width: 26px;
    height: 26px;
    margin-top: -1px;
}

/* Kolumna materiałów jest kilka razy wyższa od listy zadań: lista jedzie obok niej przy przewijaniu.
   Klasę daje tw-portfolio.js tylko liście, która cała mieści się pod nagłówkiem (niski laptop: zwykły przepływ). */
@media (min-width: 861px) {
    .tw-pf-svc__side--sticky {
        position: sticky;
        top: calc(var(--tw-header-offset, 0px) + 24px);
        transition: top .3s ease;
    }
}

.tw-pf-mat {
    display: grid;
    /* Jawna kolumna: przy niejawnej (auto) wskaźniki z auto-fit rozpychały blok na telefonie do 534 px. */
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(16px, 2vw, 24px);
}

.tw-pf-mat__label {
    margin: 0;
    font-size: 14px;
    color: var(--tw-pf-text);
}

.tw-pf-row-reels {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(10px, 1.4vw, 18px);
}

.tw-pf-row-reels .tw-pf-reel {
    width: 100%;
    height: auto;
    cursor: pointer;
}

.tw-pf-row-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: clamp(10px, 1.4vw, 18px);
}

/* Sesja zdjęciowa (5 i więcej zdjęć): cztery kolumny, większe kadry niż przy auto-fit (na telefonie dwie). */
.tw-pf-row-photos:has(> :nth-child(5)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 600px) {
    .tw-pf-row-photos:has(> :nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.tw-pf-row-photos .tw-pf-still {
    width: 100%;
    box-shadow: none;
}

.tw-pf-row-photos .tw-pf-still img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.tw-pf-shots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 26px);
}

.tw-pf-shots figure {
    margin: 0;
}

.tw-pf-shots .tw-pf-bw {
    width: 100%;
    box-shadow: 0 14px 34px -20px rgba(53, 54, 57, .4), 0 1px 3px rgba(53, 54, 57, .06);
}

.tw-pf-shots figcaption {
    margin-top: 10px;
    font-size: 14px;
    color: var(--tw-pf-text);
}

.tw-pf-btn-line {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border: 1px solid var(--tw-purple);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    color: var(--tw-dark);
    transition: background-color .2s ease, color .2s ease;
}

.tw-pf-btn-line .tw-pf-arrow {
    width: 13px;
    height: 13px;
    margin-left: -2px;
}

.tw-pf-btn-line:hover,
.tw-pf-btn-line:focus-visible {
    background: var(--tw-purple);
    color: var(--tw-dark);
}

.tw-pf-opinia {
    margin: 0;
    max-width: 62ch;
}

.tw-pf-opinia blockquote {
    margin: 0;
    font-size: clamp(20px, 1.8vw, 26px);
    font-style: italic;
    line-height: 1.45;
}

.tw-pf-opinia figcaption {
    margin-top: 14px;
    font-size: 14px;
    color: var(--tw-pf-text);
}

/* ----- następna Współpraca: przycisk kwadratowy (.mil-stylized-btn z childa) ----- */
.tw-pf-next {
    padding-block: clamp(56px, 7vw, 104px) 0;
}

.tw-pf-next__card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 24px 40px;
    align-items: center;
    padding-block: clamp(24px, 3vw, 40px);
    border-block: 1px solid var(--tw-pf-line);
}

.tw-pf-next__name {
    margin: 6px 0 4px;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 700;
    font-style: italic;
    line-height: 1.1;
}

.tw-pf-next__what {
    margin: 0;
    color: var(--tw-pf-text);
}

.tw-pf-btn-sq {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 140px;
    height: 140px;
    padding: 16px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--tw-purple);
}

.tw-pf-btn-sq::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--tw-gradient);
    opacity: 0;
    transition: opacity .4s ease;
}

.tw-pf-btn-sq span {
    position: relative;
    z-index: 1;
    color: var(--tw-dark);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
}

.tw-pf-btn-sq svg {
    position: absolute;
    z-index: 1;
    top: 8px;
    right: 2px;
    width: 50px;
    height: 50px;
    color: var(--tw-dark);
    transform: rotate(-45deg);
    transition: transform .25s ease;
}

.tw-pf-next__card:hover .tw-pf-btn-sq::before { opacity: 1; }
.tw-pf-next__card:hover .tw-pf-btn-sq svg { transform: rotate(0); }

/* ----- responsywność ----- */
/* ----- prowadzenie social mediów: siatka profilu, profil, wskaźniki ----- */
.tw-pf-feed {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.tw-pf-feed__i {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f1f2;
}

.tw-pf-feed__i img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tw-pf-feed__mark {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 14px;
    height: 14px;
    fill: #fff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5));
}

/* W bloku Usługi siatka i wskaźniki mają szerokość ekranu profilu, a nie całej kolumny. */
.tw-pf-mat > .tw-pf-feed,
.tw-pf-mat > .tw-pf-kpis {
    max-width: 600px;
}

/* Siatka jako materiał na karcie: biała ramka jak ekran profilu. */
.tw-pf-feed--card {
    flex: none;
    width: 52%;
    padding: 10px;
    gap: 5px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 22px 40px -22px rgba(53, 54, 57, .45);
    transition: transform .35s ease;
}

.tw-pf-feed--card .tw-pf-feed__i { border-radius: 5px; }
.tw-pf-feed--card .tw-pf-feed__mark { top: 5px; right: 5px; width: 10px; height: 10px; }
.tw-pf-card:hover .tw-pf-feed--card { transform: translateY(-6px); }
.tw-pf-m--pair .tw-pf-feed--card { width: 32%; }

.tw-pf-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.tw-pf-kpi {
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--tw-pf-tint-social);
}

.tw-pf-kpi__label {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tw-dark);
}

.tw-pf-kpi__val {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 0;
    font-size: clamp(20px, 1.6vw, 24px);
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--tw-dark);
}

.tw-pf-kpi__start {
    font-size: .68em;
    font-weight: 500;
    color: var(--tw-pf-text);
}

.tw-pf-kpi__arrow {
    width: 16px;
    height: 10px;
    color: var(--tw-pf-text);
}

.tw-pf-kpi__note {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--tw-pf-text);
}

/* ----- film poziomy 16:9 (fasada Vimeo albo YouTube) ----- */
.tw-pf-film {
    position: relative;
    flex: none;
    width: 86%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #2a2a2d;
    box-shadow: 0 22px 40px -22px rgba(53, 54, 57, .45);
    transition: transform .35s ease;
}

.tw-pf-film img,
.tw-pf-film iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.tw-pf-film .tw-pf-play {
    width: 58px;
    height: 58px;
}

.tw-pf-film .tw-pf-play svg {
    width: 20px;
    height: 20px;
}

.tw-pf-card:hover .tw-pf-film { transform: translateY(-6px); }
.tw-pf-m--pair .tw-pf-film { width: 58%; }

.tw-pf-row-films {
    display: grid;
    gap: clamp(14px, 2vw, 26px);
}

.tw-pf-row-films .tw-pf-film {
    width: 100%;
    cursor: pointer;
}

/* ----- grafika w naturalnych proporcjach (branding) ----- */
.tw-pf-art {
    flex: none;
    width: 78%;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 22px 40px -22px rgba(53, 54, 57, .45);
    transition: transform .35s ease;
}

.tw-pf-art img {
    width: 100%;
    height: auto;
}

.tw-pf-card:hover .tw-pf-art { transform: translateY(-6px); }

.tw-pf-row-art {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(14px, 2vw, 26px);
}

.tw-pf-row-art figure { margin: 0; }

.tw-pf-row-art .tw-pf-art {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 14px 34px -20px rgba(53, 54, 57, .4), 0 1px 3px rgba(53, 54, 57, .06);
}

.tw-pf-row-art figcaption {
    margin-top: 10px;
    font-size: 14px;
    color: var(--tw-pf-text);
}

/* ----- kontakt na końcu portfolio (jak w starym: gradient z tekstem i zdjęcie) ----- */
.tw-pf-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: clamp(64px, 7vw, 120px);
    min-height: clamp(420px, 36vw, 620px);
    background: var(--tw-gradient);
}

.tw-pf-cta__txt {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(40px, 6vw, 96px) clamp(24px, 7vw, 110px);
    color: var(--tw-dark);
}

.tw-pf-cta__eyebrow {
    margin: 0 0 18px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.tw-pf-cta__h {
    margin: 0;
    max-width: 11ch;
    font-size: clamp(40px, 4.6vw, 76px);
    font-weight: 300;
    line-height: 1.08;
}

.tw-pf-cta__h em {
    font-weight: 800;
    font-style: italic;
}

.tw-pf-cta__p {
    margin: 26px 0 30px;
    max-width: 40ch;
    font-size: 17px;
    line-height: 1.5;
}

.tw-pf-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .6);
    font-size: 17px;
    font-weight: 500;
    color: var(--tw-dark);
    transition: background-color .2s ease;
}

.tw-pf-cta__btn:hover,
.tw-pf-cta__btn:focus-visible {
    background: #fff;
}

.tw-pf-cta__btn svg {
    width: 14px;
    height: 17px;
}

.tw-pf-cta__img video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1100px) {
    .tw-pf-proof__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tw-pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tw-pf-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .tw-pf-c-hero,
    .tw-pf-split,
    .tw-pf-svc__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
    .tw-pf-cta { grid-template-columns: minmax(0, 1fr); }
    .tw-pf-cta__img { height: 320px; }
    .tw-pf { padding-top: 100px; }
}

@media (max-width: 720px) {
    .tw-pf-grid { grid-template-columns: minmax(0, 1fr); }
    .tw-pf-card--wide { grid-column: auto; }
    .tw-pf-card--wide .tw-pf-m { aspect-ratio: 4 / 3; }
    .tw-pf-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tw-pf-row-reels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tw-pf-shots { grid-template-columns: minmax(0, 1fr); }
    .tw-pf-hero::after { right: -40vw; top: -30px; opacity: .55; }
    .tw-pf-next__card { grid-template-columns: minmax(0, 1fr) 96px; }
    .tw-pf-btn-sq { width: 96px; height: 96px; padding: 12px; }
    .tw-pf-btn-sq span { font-size: 13px; }
    .tw-pf-btn-sq svg { width: 36px; height: 36px; top: 6px; }
}

@media (max-width: 480px) {
    .tw-pf-proof__row { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .tw-pf *,
    .tw-pf *::before,
    .tw-pf *::after { transition-duration: .01ms !important; }
}
