:root {
    --bg-dark: #090909;
    --gray-border: rgba(255, 255, 255, 0.15);
    --white: #ffffff;
}

.formularz{
    position: relative;
    width: 100vw;
    height: 100dvh;
    background-color: var(--bg-dark);
    overflow: hidden;
}

.sekcja {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
}

.wstecz-w {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#krok-1 .pole-grupa{
    width: 1400px;
}
#krok-4 .pole-grupa{
    width: 1400px;
}

#krok-5 .pole-grupa {
    width: 1400px;
}

#krok-2 .kontener {
    width: 1400px;
    max-width: 95vw;
    align-items: flex-start;
    /* Treść wewnątrz kontenera do lewej */
}


@media (min-width: 1025px) and (max-width: 1440px),
       (min-width: 1025px) and (max-height: 900px){
    #krok-1 .pole-grupa,
    #krok-4 .pole-grupa,
    #krok-5 .pole-grupa {
        width: 100% !important;
    }
}
/* ---- MAGNETYCZNY PRZYCISK USTAWIENIA  */
:root {
    --btn-bg: #090909;
    --btn-border: rgba(255, 255, 255, 0.1);
    --btn-white: #ffffff;
}

.magnetic-btn {
    position: relative;
    width: 160px;
    aspect-ratio: 1 / 1;
    background: var(--btn-bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.magnetic-text{
    font-family: 'Marble PL', sans-serif;
    font-size: 1.1rem;
}

.magnetic-btn.is-locked {
    cursor: not-allowed;
    pointer-events: auto;
}
.js-magnetic{
    pointer-events: auto;
}

.magnetic-progress {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    pointer-events: none;
}

.ring-bg {
    fill: none;
    stroke: var(--btn-border);
    stroke-width: 1.5px;
}

.ring-fill {
    fill: none;
    stroke: var(--btn-white);
    stroke-width: 1.5px;
    stroke-dasharray: 301.6;
    stroke-dashoffset: 301.6;
    transition: stroke-dashoffset 0.6s ease;
}

.magnetic-btn-content {
    position: relative;
    z-index: 2;
    color: var(--btn-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.magnetic-icon {
    width: 42px;
    height: 42px;
    transition: transform 0.4s ease;
}

.magnetic-btn:not(.is-locked):hover .magnetic-icon {
    transform: translate(3px, 0);
}
/* ---- KONIEC MAGNETYCZNY PRZYCISK  */


/* ---- PASEK PROGRESU ----  */
.progres-w {
    display: flex;
    align-items: center;
    gap: 16px;
    width: clamp(200px, 30vw, 400px);
}

.progres-tekst {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.progres-tlo {
    flex-grow: 1;
    height: 2px;
    background: var(--gray-border);
    position: relative;
    overflow: hidden;
}

.progres-linia {
    position: absolute;
    inset: 0;
    background: var(--white);
    transform-origin: left;
    transform: scaleX(0);
    will-change: transform;
}

/* ---- KONIEC PASEK PROGRESU ----   */


/* PASEK NAWIGACJI NA DOLE  */
.nawigacja {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

@media (min-width: 1025px) and (max-width: 1440px),
       (min-width: 1025px) and (max-height: 900px){
    .nawigacja {
        max-width: 90% !important;
        padding: 0 20px !important;
        bottom: 15px !important;
    }
}

/* KONIEC PASEK NAWIGACJI NA DOLE  */


/* POLE DO WYPEŁNIENIA  */

.kontener{
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.tytul{
    font-family: "Marble PL", sans-serif;
    font-size: clamp(1rem, 4vw, 4rem);
    color: var(--white);
    font-weight: 600;
    line-height: 1.1;
}

.ekran-koncowy-tekst {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55);
    max-width: 46ch;
    margin: 0;
}

/* ───── EKRAN KOŃCOWY ───── */
.kontener-koncowy {
    gap: clamp(1.5rem, 3vh, 2.25rem);
}

.koncowy-head {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2.25rem);
}

.sukces-ikona {
    flex-shrink: 0;
    width: clamp(64px, 8vw, 116px);
    color: #ffffff;
}

.sukces-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.koncowy-head .tytul-w {
    overflow: hidden;
}

.ekran-koncowy-psst {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.85rem, 1.05vw, 1rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.4);
    max-width: 54ch;
    margin: 0;
}

.ekran-koncowy-psst .psst-label {
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
}

.ekran-koncowy-psst strong {
    color: #ffffff;
    font-weight: 600;
}

.koncowy-akcje {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: clamp(0.5rem, 1.5vh, 1.25rem);
}

.koncowy-akcje .magnetic-btn {
    width: clamp(118px, 13vw, 148px);
    border: 1px solid var(--btn-border);
    overflow: hidden;
    text-decoration: none;
}

.koncowy-akcje .magnetic-btn-bg {
    position: absolute;
    inset: 0;
    background: #ffffff;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.koncowy-akcje .magnetic-btn:hover .magnetic-btn-bg {
    transform: scale(1);
}

.koncowy-akcje .magnetic-btn:hover .magnetic-btn-content {
    color: #090909;
}

@media (max-width: 768px) {
    .koncowy-head {
        gap: 1rem;
    }

    .koncowy-akcje .magnetic-btn {
        width: clamp(108px, 32vw, 132px);
    }
}

.pole-grupa {
    display: flex;
    flex-direction: column;
    width: 1000px;
    justify-content: center;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 32px;
    width: 100%;
}

.input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--white);
    font-family: "Marble PL";
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    padding: 0 0 1rem 0;
    outline: none;
}

.input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.input-track {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
}

.input-fill {
    position: absolute;
    top: -1px;
    left: 0;
    height: 2px;
    width: 100%;
    background: var(--white);
    transform-origin: left;
    transform: scaleX(0);
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.input:focus+.input-track .input-fill,
.input:not(:placeholder-shown)+.input-track .input-fill {
    transform: scaleX(1);
}

/* KONIEC POLA DO WYPEŁNIENIA  */

/* POLE RADIO DIAMENT  */
.radio-grid-w {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    width: 100%;
}
.radio-option {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    user-select: none;
}

.radio-option input {
    display: none;
}

.diamond-wrap {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.diamond-outer {
    position: absolute;
    inset: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    transform: rotate(45deg);
    overflow: hidden;
}

.diamond-fill {
    position: absolute;
    inset: 0;
    background: var(--white);
    border-radius: 1px;
    transform: scale(0);
    transform-origin: center;
    will-change: transform;
}

.radio-label {
   color: rgba(255, 255, 255, 0.5); /* stan spoczynkowy = idle (zgodny z JS) */
   font-family: "Marble PL", sans-serif;
   font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

/* KONIEC POLE DIAMENT  */


.radio-label-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    
}

.radio-price {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.04em;
    font-family: "Inter", sans-serif;
    font-weight: 300;
}

.textarea {
    resize: none;
    min-height: 150px;
    line-height: 1.4;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
}

.textarea::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}


/* PRZYGOTOWANIE POD GSAP */
.clip-mask,
.tytul-w,
.input-w,
.textarea-w,
.radio-label-wrap {
    overflow: hidden;
    position: relative;
}

.input-track {
    will-change: transform, background-color;
}

.input,
.tytul,
.radio-label,
.radio-price {
    will-change: transform, opacity;
}

@media (min-width: 1025px) and (max-width: 1440px),
       (min-width: 1025px) and (max-height: 900px){
    .tytul {
        font-size: clamp(1rem, 4vw, 3rem) !important;
    }
    .input {
        font-size: clamp(1rem, 4vw, 2rem) !important;
    }
    .radio-label {
        font-size: clamp(1rem, 4vw, 2rem) !important;
    }
    .radio-price {
        font-size: clamp(1rem, 4vw, 1.5rem) !important;
    }
}
/* ── MOBILKA ─────────────────────────────── */
@media (max-width: 768px) {

    /* KONTENER */
    .kontener {
        gap: 2rem;
        padding: 0 20px;
    }

    /* TYTUŁ */
    .tytul {
        font-size: clamp(1.8rem, 7vw, 2.8rem);
    }

    /* INPUTY */
    .input {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
    }

    .pole-grupa {
        width: 100%;
    }

    #krok-1 .pole-grupa,
    #krok-4 .pole-grupa,
    #krok-5 .pole-grupa {
        width: 100%;
    }

    .input-grid {
        gap: 24px;
    }

    /* RADIO GRID — jedna kolumna */
    .radio-grid-w {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    #krok-2 .kontener {
        width: 100%;
    }

    .radio-label {
        font-size: clamp(1.1rem, 4.5vw, 1.6rem);
    }

    .radio-price {
        font-size: 11px;
    }

    /* DIAMOND — trochę większy na touch */
    .diamond-wrap {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }

    .radio-option {
        gap: 14px;
    }

    /* TEXTAREA */
    .textarea {
        min-height: 120px;
        font-size: clamp(1rem, 4vw, 1.4rem);
    }

    /* NAWIGACJA — ukryta w CSS do momentu animacji GSAP (mobile CLS) */
    .progres-w,
    .dalej-w {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }

    .formularz {
        width: 100%;
    }

    /* NAWIGACJA */
         .nawigacja {
             bottom: 20px;
             padding: 0 16px;
             align-items: center;
             /* upewnij się że są na jednej osi */
         }
    
         .magnetic-btn {
             width: 90px;
             /* znacznie mniejsze */
         }
    
         .magnetic-icon {
             width: 22px;
             height: 22px;
         }
    
         .magnetic-text {
             font-size: 0.7rem;
         }
    
         .progres-w {
             gap: 8px;
             width: clamp(80px, 20vw, 140px);
         }
    
         .progres-tekst {
             font-size: 0.75rem;
         }
}

/* ── BARDZO MAŁE EKRANY (SE, stare androidy) ── */
@media (max-width: 380px) {

    .tytul {
        font-size: 1.6rem;
    }

    .input {
        font-size: 1.1rem;
    }

    .radio-label {
        font-size: 1rem;
    }

    .magnetic-btn {
        width: 90px;
    }

    .magnetic-icon {
        width: 24px;
        height: 24px;
    }

    .magnetic-text {
        font-size: 0.75rem;
    }

    .nawigacja {
        bottom: 16px;
        padding: 0 16px;
    }
}