* {
    box-sizing: border-box;
    user-select: none;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
}
.header-realizacje{
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    z-index: 9999;
    padding: 2vh 2vw
}
h2 {
    font-size: clamp(1rem, 6vw, 10rem);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    width: 100vw;
    max-width: 1200px;
    text-transform: none;
    font-family: "Marble PL", sans-serif;
}


section {
    height: 100%;
    width: 100%;
    top: 0;
    position: fixed;
    visibility: hidden;
}

.outer,
.inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bg {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    height: 110%;
    width: 100%;
    top: -5%;
    background-size: cover;
    background-position: center;
}

.clip-text {
    overflow: hidden;
}



/* SEKCJA 1 INTRO  */
.first .bg {
    background-color: var(--bg-light);
    display: flex;
    flex-direction: row;
}

.first h2.hero-title {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
    line-height: 1;
    font-size: 0;
}

.first .h2-desc-wrapper {
    display: block;
    width: 100%;
}

.first .h2-desc{
    display: block;
    width: 100%;
    max-width: 100%;
    font-family: 'Marble PL', sans-serif;
    font-size: clamp(1rem, 3vw, 2rem);
    line-height: 1.22;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: #0a0a0a;
    margin: 0;
}

.first .hero-title .h2-wrapper {
    display: block;
    overflow: hidden;
    width: 100%;
}

.first .hero-title-line {
    display: block;
    color: #0a0a0a;
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.25rem, 6vw, 6.5rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: none;
    will-change: transform;
}

@media (max-width: 1440px) {
    .first .hero-title-line {
        font-size: clamp(2rem, 6vw, 4.5rem);
    }
    .first .h2-desc {
        font-size: clamp(1rem, 3vw, 1.5rem);
    }
}

.cta-button-wrap,
.hero-magnetic-wrapper {
    display: flex;
    justify-content: flex-start;
    text-align: left;
    width: auto;
    margin-left: 0;
    padding-left: 0;
}
.panel-lewy {
    display: flex;
    flex-direction: column;
    padding: 2vh 2vw 3vh 2vw;
    height: 100vh;
    width: 50vw;
    justify-content: center;
    position: relative;
    z-index: 10;
    gap: 1.75rem;
}


.panel-stats {
    width: 100%;
}

.stat-divider-top {
    width: 100%;
    height: 1px;
    background: rgba(10, 10, 10, 0.15);
    margin-bottom: 1.5rem;
}

.stats-row {
    display: flex;
    gap: 5rem;
    align-items: flex-start;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stat-num {
    font-size: clamp(1.8rem, 4vw, 5rem);
    font-weight: 800;
    font-family: "Marble PL", sans-serif;
    color: transparent;
    line-height: 1;
    -webkit-text-stroke: 2px #0a0a0a;
}

.stat-label {
    font-size: clamp(0.6rem, 0.7vw, 0.75rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(10, 10, 10, 0.45);
    line-height: 1.5;
    font-weight: 600;
}
.panel-prawy {
    position: relative;
    width: 50vw;
    height: 100vh;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

@media (max-width: 768px) {

    .first .bg {
        flex-direction: column;
        align-items: center;
        padding: 3vh 6vw 5vh 6vw;
        gap: 3vh;
    }

    .panel-lewy {
        width: 100%;
        height: auto;
        padding: 0;
        gap: 2vh;
        order: 1;
        display: contents;

    }

    .first .hero-title {
        order: 1;
        width: 100%;
    }
    .first .h2-desc{
        order: 2;
        display: block;
        font-family: 'Marble PL', sans-serif;
        font-size: clamp(1.15rem, 3vw, 1.75rem);
        font-weight: 400;
        line-height: 1.22;
        letter-spacing: -0.01em;
        color: #0a0a0a;
        max-width: 100%;
        will-change: transform, opacity;
        text-wrap: pretty;
    }
    .first .h2-desc-wrapper {
        order: 2;
        width: 100%;
        max-width: 100%;
    }


    .panel-stats {
        display: none;
    }

    .panel-prawy {
        order: 3;
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
        align-self: center;
        flex-shrink: 0;
        will-change: transform, opacity;
    }

    .hero-video {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 16px;
        background: #fff;
    }

    .cta-button-wrap {
        order: 4;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .first .hero-title-line {
        font-size: 2.75rem;
        line-height: 0.98;
    }

    .first .magnetic-btn{
        display: none;}
    
}


/* SEKCJA 2  */
.second .bg {
    background-color:#FF215A
}

.portfolio-media{
    position: relative;
    width: 50vw;
    height: 100vh;
    overflow: hidden;
}

.portfolio-content {
    width: 50vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 2.5rem;
    padding: 4vh 4vw;
}

/* tylko jedna reguła dla h2, bez duplikatów */
.second .portfolio-h2 {
    color: #fff;
    font-size: clamp(1rem, 8vw, 8rem);
    width: 100%;
    margin: 0;
    line-height: 1.1;
    word-break: break-word;
    text-align: left;
    
}

.portfolio-info {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 1.5rem;
}

.portfolio-desc {
    margin: 0;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 600;
    font-family: "Inter", sans-serif;
    color: #f4f4f4;
    line-height: 1.45;
    max-width: 100%;
    text-wrap: pretty;

}

.portfolio-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portfolio-stack span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background-color: #fff;
    color: #FF215A;
    padding: 0.8em 1.5em;
    border-radius: 999px;
    font-weight: 600;
}

.portfolio-buttons {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
}


/* przyciski białe na czerwonym tle */
.second .magnetic-btn {
    border-color: rgba(255, 255, 255, 0.5);
}

.second .magnetic-btn-bg {
    background-color: #fff;
}

.second .magnetic-btn-content {
    color: #fff;
    mix-blend-mode: normal;
    text-align: center;
}

.second .magnetic-btn:hover .magnetic-btn-content {
    color: #FF215A;
}

/* mniejsze przyciski niż hero */
.portfolio-buttons .magnetic-btn {
    width: clamp(110px, 13vw, 180px);
}



@media (min-width: 1025px) and (max-width: 1440px),
       (min-width: 1025px) and (max-height: 900px){
    
        .second .portfolio-h2 {
            font-size: clamp(1rem, 6vw, 5rem) !important;
        }

        .second .portfolio-buttons .magnetic-btn {
            width: clamp(130px, 15vw, 160px) !important;
        }

        .second .portfolio-buttons .magnetic-btn .magnetic-text {
            font-size: 0.9rem !important;
        }

        .second .portfolio-info .portfolio-desc {
            font-size: 1rem !important;
        }

        .second .portfolio-info .portfolio-stack span {
            font-size: 0.7rem !important;
        }
}

@media (max-width: 768px) {

    .second .bg {
        flex-direction: column;
        align-items: center;
        padding: 3vh 6vw 5vh 6vw;
        gap: 3vh;
    }

    .portfolio-media {
        order: 1;
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
        flex-shrink: 0;
    }

    .second .portfolio-media .hero-video {
        object-fit: cover;
        border-radius: 16px;
    }

    .second .portfolio-content {
        order: 2;
        width: 100%;
        height: auto;
        padding: 0;
        gap: 1.5vh;
        align-items: flex-start;
    }

    .second .portfolio-h2 {
        font-size: clamp(2.5rem, 13vw, 5rem);
        line-height: 0.9;
        text-align: left;
    }

    .second .portfolio-info .portfolio-desc {
        display: none;
    }

    .second .portfolio-buttons {
        justify-content: center;
        width: 100%;
    }

    .second .portfolio-info .portfolio-stack {
        font-size: 0.2rem;
    }

    .second .portfolio-buttons .magnetic-btn {
        width: clamp(135px, 40vw, 150px);
    }
    .second .portfolio-buttons .magnetic-btn .magnetic-text {
        font-size: 0.8rem;}

}


/* SEKCJA 3  */

.third .magnetic-btn {
    border-color: rgba(255, 255, 255, 0.5);
}
.third .magnetic-btn-bg {
    background-color: #fff;
}

.third .magnetic-btn-content {
    color: #fff;
    mix-blend-mode: normal;
    text-align: center;
}

.third .magnetic-btn:hover .magnetic-btn-content {
    color: #8A1515;
}

.third .portfolio-h2 {
    color: #fff;
    font-size: clamp(1rem, 8vw, 8rem);
    width: 100%;
    margin: 0;
    line-height: 1.1;
    word-break: break-word;
    text-align: left;

}

.third .bg {
    background-color: #8A1515;
    display: flex;
    flex-direction: row-reverse;
}

@media (min-width: 1025px) and (max-width: 1440px),
(min-width: 1025px) and (max-height: 900px) {

    .third .portfolio-h2 {
        font-size: clamp(1rem, 6vw, 5rem) !important;
    }

    .third .portfolio-buttons .magnetic-btn {
        width: clamp(130px, 15vw, 160px) !important;
    }

    .third .portfolio-buttons .magnetic-btn .magnetic-text {
        font-size: 0.9rem !important;
    }

    .third .portfolio-info .portfolio-desc {
        font-size: 1rem !important;
    }

    .third .portfolio-info .portfolio-stack span {
        font-size: 0.7rem !important;
    }
}
@media (max-width: 768px) {

    .third .bg {
        flex-direction: column;
        align-items: center;
        padding: 3vh 6vw 5vh 6vw;
        gap: 3vh;
    }

    .third .portfolio-media {
        order: 1;
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
        flex-shrink: 0;
    }

    .third .portfolio-media .hero-video {
        object-fit: cover;
        border-radius: 16px;
    }

    .third .portfolio-content {
        order: 2;
        width: 100%;
        height: auto;
        padding: 0;
        gap: 1.5vh;
        align-items: flex-start;
    }

    .third .portfolio-h2 {
        font-size: clamp(2.5rem, 13vw, 5rem);
        line-height: 0.9;
        text-align: left;
    }

    .third .portfolio-info .portfolio-desc {
        display: none;
    }

    .third .portfolio-buttons {
        justify-content: flex-start;
        width: 100%;
    }

    .third .portfolio-buttons .magnetic-btn {
        width: clamp(135px, 40vw, 150px);
    }

    .third .portfolio-buttons .magnetic-btn .magnetic-text {
        font-size: 0.8rem;
    }
}




/* SEKCJA 4  */

.fourth .bg {
    background-color:#3C6B00;
}

.fourth .magnetic-btn {
    border-color: rgba(255, 255, 255, 0.5);
}

.fourth .magnetic-btn-bg {
    background-color: #fff;
}

.fourth .magnetic-btn-content {
    color: #fff;
    mix-blend-mode: normal;
    text-align: center;
}

.fourth .magnetic-btn:hover .magnetic-btn-content {
    color: #7DAA47;
}

.fourth .portfolio-h2 {
    color: #fff;
    font-size: clamp(1rem, 8vw, 8rem);
    width: 100%;
    margin: 0;
    line-height: 1.1;
    word-break: break-word;
    text-align: left;

}


.fourth .portfolio-stack span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background-color: #fff;
    color: #7DAA47;
    padding: 0.8em 1.5em;
    border-radius: 999px;
    font-weight: 600;
}

@media (min-width: 1025px) and (max-width: 1440px),
(min-width: 1025px) and (max-height: 900px) {

    .fourth .portfolio-h2 {
        font-size: clamp(1rem, 6vw, 5rem) !important;
    }

    .fourth .portfolio-buttons .magnetic-btn {
        width: clamp(130px, 15vw, 160px) !important;
    }

    .fourth .portfolio-buttons .magnetic-btn .magnetic-text {
        font-size: 0.9rem !important;
    }

    .fourth .portfolio-info .portfolio-desc {
        font-size: 1rem !important;
    }

    .fourth .portfolio-info .portfolio-stack span {
        font-size: 0.7rem !important;
    }
}
@media (max-width: 768px) {

    .fourth .bg {
        flex-direction: column;
        align-items: center;
        padding: 3vh 6vw 5vh 6vw;
        gap: 3vh;
    }

    .fourth .portfolio-media {
        order: 1;
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
        flex-shrink: 0;
    }

    .fourth .portfolio-media .hero-video {
        object-fit: cover;
        border-radius: 16px;
    }

    .fourth .portfolio-content {
        order: 2;
        width: 100%;
        height: auto;
        padding: 0;
        gap: 1.5vh;
        align-items: flex-start;
    }

    .fourth .portfolio-h2 {
        font-size: clamp(2.5rem, 13vw, 5rem);
        line-height: 0.9;
        text-align: left;
    }

    .fourth .portfolio-info .portfolio-desc {
        display: none;
    }

    .fourth .portfolio-buttons {
        justify-content: flex-start;
        width: 100%;
    }

    .fourth .portfolio-buttons .magnetic-btn {
        width: clamp(135px, 40vw, 150px);
    }

    .fourth .portfolio-buttons .magnetic-btn .magnetic-text {
        font-size: 0.8rem;
    }
}



/* SEKCJA 5 */
.fifth .bg {
    background-color: #0a0a0a;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}
.fifth .h2-desc{
    display: none
}
.fifth .upper {
    height: 50vh;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 4vw 2rem 4vw;
    box-sizing: border-box;
    position: relative;
}

.fifth .lower {
    height: 50vh;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding: 2rem 4vw 0 4vw;
    box-sizing: border-box;
    position: relative;
}

/* TYPOGRAFIA */
.outro-title {
    color: #fff;
    font-size: clamp(4rem, 15vw, 18rem);
    font-family: "Marble PL", sans-serif;
    font-weight: 800;
    margin: 0;
    line-height: 0.85;
    white-space: nowrap;
    will-change: transform;
}

.fifth .lower .outro-title {
    text-align: right;
}

/* GSAP WRAPPERS */
.h2-wrapper {
    overflow: hidden;
}

.fifth .upper .h2-wrapper,
.fifth .lower .h2-wrapper {
    width: 100%;
    overflow: hidden;
}

.fifth .lower .h2-wrapper {
    display: flex;
    justify-content: right;
    padding-right: 12rem;
}

/* PRZYCISKI */
.fifth .outro-buttons {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.fifth .upper .outro-buttons {
    position: absolute;
    right: 4vw;
    bottom: 2rem;
}

.fifth .lower .outro-buttons {
    position: absolute;
    left: 4vw;
    top: 2rem;
}

.fifth .outro-buttons .magnetic-btn {
    width: clamp(300px, 12vw, 450px);
}

.fifth .magnetic-btn {
    border-color: rgba(255, 255, 255, 0.5);
}

.fifth .magnetic-btn-bg {
    background-color: #fff;
}

.fifth .magnetic-btn-content {
    color: #fff;
    mix-blend-mode: normal;
}

.fifth .magnetic-btn:hover .magnetic-btn-content {
    color: #0a0a0a;
}

.fifth .portfolio-buttons .magnetic-btn {
    width: clamp(120px, 12vw, 170px);
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .fifth .outro-buttons .magnetic-btn {
        width: clamp(220px, 15vw, 270px);
    }

    .fifth .upper .outro-title {
        font-size: clamp(10rem, 35vw, 12rem);
        padding-right: 10rem;
    }

    .fifth .lower .outro-title {
        font-size: clamp(10rem, 35vw, 12rem);
        padding-left: 27.5rem;
    }
}

@media (min-width: 1025px) and (max-width: 1440px),
       (min-width: 1025px) and (max-height: 900px) {
    .fifth .outro-buttons .magnetic-btn {
        width: clamp(200px, 30vw, 200px) !important;
    }

    .fifth .upper .outro-title {
        font-size: clamp(10rem, 35vw, 10rem);
        padding-right: 20rem;
    }

    .fifth .lower .outro-title {
        font-size: clamp(10rem, 35vw, 10rem);
        padding-left: 35rem;
    }
}




@media (min-width: 1921px) {
    .outro-title {
        font-size: clamp(20rem, 13vw, 28rem);

    }

    .fifth .lower .h2-wrapper {
    display: flex;
    justify-content: right;
    padding-right: 25rem;
}
    .fifth .outro-buttons .magnetic-btn {
        width: clamp(400px, 10vw, 550px);
    }


    .fifth .lower {
        gap: 6vw;
    }
}

@media (max-width: 768px) {

    .fifth .bg {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 2vh 3vw;
        gap: 3vh;
    }

    .fifth .upper {
        display: contents;
    }

    .fifth .lower {
        display: contents;
    }

    .fifth .upper .h2-wrapper {
        order: 2;
    }

    .fifth .upper .outro-buttons {
        order: 1;
        position: static;
    }

    .fifth .lower .h2-wrapper {
        order: 3;
        padding-right: 0;
        justify-content: flex-start;
    }

    .fifth .lower .outro-buttons {
        order: 4;
        position: static;
    }

    .outro-title {
        font-size: clamp(4rem, 10vw, 4rem);
        line-height: 0.85;
        white-space: nowrap;
        text-align: left;
    }

    

    .fifth .outro-buttons {
        flex-direction: row;
        gap: 1rem;
    }

    .fifth .outro-buttons .magnetic-btn {
        width: clamp(150px, 45vw, 200px);
    }

    .fifth .outro-buttons .magnetic-btn .magnetic-text {
        font-size: 0.7rem;
    }

    .fifth .h2-desc{
        display: block;
        font-family: "Inter", sans-serif;
        font-size: clamp(1.3rem, 3vw, 1.3rem);
        font-weight: 500;
        line-height: 1.1;
        color: #fff;
        max-width: 100%;
        text-wrap: pretty;
        text-align: left;
    }
    .fifth .h2-desc-wrapper {
        order: 3;
        width: 100%;
    }

    .fifth .upper .cta-button-wrap {
        display: none;
    }
}

@media (min-width: 1024px) and (max-width: 1440px) {
    .second .portfolio-h2 {
        font-size: clamp(1rem, 8vw, 6rem);
    }
    .third .portfolio-h2 {
        font-size: clamp(1rem, 8vw, 6rem);
    }
    .fourth .portfolio-h2 {
        font-size: clamp(1rem, 8vw, 6rem);
    }
    .fifth .outro-title {
        font-size: clamp(4rem, 12vw, 10rem);
    }
    .fifth .lower .cta-button-wrap {
        z-index: 10;
    }
}













/* PRZYCISKI MAGNETYCZNE  */
.hero-magnetic-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.magnetic-btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: clamp(175px, 22vw, 250px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 1px solid var(--text-dark);
    background-color: transparent;
    overflow: hidden;
    cursor: pointer;
    will-change: transform;
    text-decoration: none !important;
}

.magnetic-btn-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    aspect-ratio: 1 / 1;
    background-color: var(--text-dark);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.magnetic-btn:hover .magnetic-btn-bg {
    transform: translate(-50%, -50%) scale(1);
}

.magnetic-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    color: var(--text-dark);
    mix-blend-mode: difference;
    transition: color 0.4s ease;
}

.magnetic-btn:hover .magnetic-btn-content {
    color: #ffffff;
}

.magnetic-icon {
    width: 30px;
    height: 30px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.magnetic-btn:hover .magnetic-icon {
    transform: rotate(45deg);
}

.magnetic-text {
    font-family: 'Marble PL', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
}

.line-outer {
    overflow: hidden;
}

/* PERF: efekt magnetyczny (transform x/y) chodzi tylko po mousemove (desktop).
   Na telefonach przyciski się nie ruszają, więc stała warstwa GPU jest zbędna. */
@media (hover: none) {
    .magnetic-btn {
        will-change: auto;
    }
}