/* Podstawy */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    min-width: 280px;
    min-height: 100vh;
    background: #ffffff;
    color: #222927;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    color: #59615e;
}

h1,
h2,
h3 {
    color: #222927;
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: break-word;
}

h2 {
    margin-bottom: 18px;
    font-size: clamp(1.875rem, 3.1vw, 2.625rem);
    letter-spacing: -0.035em;
}

section {
    position: relative;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid #285982;
    outline-offset: 4px;
}

/* Nawigacja */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e1e4e0;
    background: #ffffff;
}

.nav-menu {
    position: relative;
    z-index: 1001;
    width: min(1180px, calc(100% - 48px));
    min-height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 32px;
}

.nav-menu > .podpis {
    min-width: 0;
    margin-right: auto;
    color: #222927;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.menu-list {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
}

.menu-list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #414944;
    font-size: 1.2rem;
    font-weight: 700;
    text-underline-offset: 6px;
    transition: color 160ms ease;
}

.menu-list a:hover,
.menu-list a[aria-current="page"] {
    color: #285982;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.przycisknav,
.formularz button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 24px;
    border: 1px solid #285982;
    border-radius: 3px;
    background: #285982;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.przycisknav:hover,
.formularz button:hover {
    border-color: #1c4263;
    background: #1c4263;
}

.przycisknav:active,
.formularz button:active {
    border-color: #173650;
    background: #173650;
}

.nav-menu > .przycisknav {
    flex: 0 0 auto;
}

.hamburger {
    display: none;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    border: 1px solid #d6dbd5;
    border-radius: 3px;
    background: #ffffff;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #222927;
    transition: transform 160ms ease, opacity 160ms ease;
}

.nav-overlay {
    display: none;
}

/* Pierwsza sekcja i zdjecie */
.hero {
    position: relative;
    isolation: isolate;
    min-height: 620px;
    padding: 88px max(24px, calc((100% - 1180px) / 2));
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    border-bottom: 1px solid #e1e4e0;
    background-color: #18232d;
    background-image:
        linear-gradient(
            90deg,
            rgba(12, 20, 29, 0.93) 0%,
            rgba(12, 20, 29, 0.86) 42%,
            rgba(12, 20, 29, 0.68) 62%,
            rgba(12, 20, 29, 0.20) 100%
        ),
        url("hero.png");
    background-position: center, 74% 42%;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero h1 {
    max-width: 680px;
    margin-bottom: 24px;
    color: #ffffff;
    font-size: clamp(2.75rem, 4.5vw, 4rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.hero p {
    max-width: 580px;
    margin-bottom: 30px;
    color: #e6ebef;
    font-size: 1.0625rem;
    line-height: 1.75;
}

.hero .slogan {
    display: block;
    margin-top: 24px;
    color: #ffffff;
}

.hero > .przycisknav {
    max-width: 100%;
}

/* Sekcje i uslugi */
.uslugi,
.opinie,
.realizacje,
.proces,
.kontakt {
    padding: 88px max(24px, calc((100% - 1180px) / 2));
}

.uslugi,
.realizacje,
.kontakt {
    background: #ffffff;
}

.uslugi > h2,
.uslugi > p,
.opinie > h2,
.realizacje > h2 {
    max-width: 720px;
}

.uslugi > p {
    margin-bottom: 42px;
    font-size: 1.0625rem;
}

.karty {
    margin-top: 40px;
    border-top: 1px solid #d9ded8;
}

.karta {
    width: 100%;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    padding: 32px 0;
    border-bottom: 1px solid #d9ded8;
    text-align: left;
}

.obrazek {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
}

.obrazek img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.karta .podpis {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(180px, 0.85fr) minmax(0, 1.5fr);
    align-items: start;
    column-gap: 44px;
    row-gap: 12px;
}

.karta .podpis h3 {
    grid-column: 1;
    grid-row: 1;
    font-size: clamp(1.125rem, 1.7vw, 1.375rem);
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.karta .podpis p {
    grid-column: 2;
    max-width: 640px;
    font-size: 1rem;
    line-height: 1.75;
}

.karta .podpis a {
    color: #285982;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.karta .podpis > br {
    display: none;
}

/* Opinie */
.opinie {
    border-top: 1px solid #e1e4e0;
    border-bottom: 1px solid #e1e4e0;
    background: #f5f5f1;
}

.opiniekarty {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 22px;
    margin-top: 38px;
}

.kartaopinie {
    min-width: 0;
    padding: 8px;
    overflow: hidden;
    border: 1px solid #dce0da;
    border-radius: 2px;
    background: #ffffff;
}

.kartaopinie img {
    width: 100%;
    height: auto;
}

/* Realizacje */
.galeria {
    margin-top: 38px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.zdjecie {
    position: relative;
    min-width: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 2px;
    background: #f0f1ed;
}

.zdjecie img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Etapy wspolpracy */
.proces {
    border-top: 1px solid #e1e4e0;
    border-bottom: 1px solid #e1e4e0;
    background: #f5f5f1;
}

.naglowek-sekcji,
.kontakt-naglowek {
    max-width: 720px;
    margin-bottom: 42px;
}

.naglowek-sekcji p,
.kontakt-naglowek p {
    font-size: 1.0625rem;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.timeline-item {
    min-width: 0;
    padding-top: 22px;
    border-top: 1px solid #bcc7bc;
}

.timeline-number {
    display: block;
    margin-bottom: 22px;
    color: #285982;
    font-size: 0.9375rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.timeline-content h3 {
    margin-bottom: 12px;
    font-size: 1.1875rem;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.timeline-content p {
    font-size: 0.9375rem;
    line-height: 1.75;
}

/* Kontakt i formularz */
.kontakt-container {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
    gap: clamp(40px, 6vw, 88px);
    padding-top: 40px;
    border-top: 1px solid #d9ded8;
}

.kontakt-info {
    min-width: 0;
    overflow-wrap: anywhere;
}

.kontakt-info h3 {
    margin-bottom: 24px;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
}

.kontakt-info p {
    margin: 14px 0;
    color: #59615e;
}

.kontakt-info a {
    color: #222927;
    text-decoration: underline;
    text-decoration-color: #a9b6ab;
    text-underline-offset: 4px;
}

.kontakt-info a:hover {
    color: #285982;
    text-decoration-color: currentColor;
}

.formularz {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.formularz input,
.formularz textarea {
    width: 100%;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid #bdc6bc;
    border-radius: 3px;
    background: #ffffff;
    color: #222927;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 160ms ease;
}

.formularz input {
    min-height: 54px;
}

.formularz textarea {
    min-height: 160px;
    resize: vertical;
}

.formularz input::placeholder,
.formularz textarea::placeholder {
    color: #687267;
    opacity: 1;
}

.formularz input:hover,
.formularz textarea:hover {
    border-color: #879884;
}

.formularz input:focus,
.formularz textarea:focus {
    border-color: #285982;
    outline: 2px solid #285982;
    outline-offset: 2px;
}

.formularz input[type="hidden"] {
    display: none;
}

.formularz input[type="checkbox"],
.formularz input[type="radio"] {
    width: 18px;
    height: 18px;
    min-height: 0;
    padding: 0;
    accent-color: #285982;
    vertical-align: middle;
}

.formularz button {
    justify-self: start;
    min-height: 52px;
    margin-top: 6px;
    padding-right: 28px;
    padding-left: 28px;
}

.formularz button:disabled {
    border-color: #e0e4de;
    background: #e0e4de;
    color: #59615e;
    cursor: not-allowed;
}

/* Stopka */
.footer {
    background: #222927;
    color: #ffffff;
}

.footer-container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 58px 0 44px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.7fr) minmax(0, 0.9fr);
    gap: 52px;
}

.footer-container > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.footer h3 {
    margin-bottom: 18px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
}

.footer p,
.footer a {
    color: #bfc7c1;
    font-size: 0.9375rem;
}

.footer a {
    text-underline-offset: 4px;
    transition: color 160ms ease;
}

.footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer a:focus-visible {
    outline-color: #ffffff;
}

.footer-brand p {
    max-width: 410px;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li + li,
.footer-kontakt p + p {
    margin-top: 10px;
}

.footer-bottom {
    border-top: 1px solid #424b46;
}

.footer-bottom p {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 22px 0;
    color: #b5beb7;
    font-size: 0.8125rem;
    text-align: left;
}

.podpisek a {
    color: #e0e6e0;
    font-weight: 500;
}

.slogan {
    font-size: clamp(1.5rem, 2.6vw, 2.125rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

/* Tablet */
@media (max-width: 1050px) {
     .podpis{
        text-align: center;
    }

    .nav-menu {
        gap: 20px;
    }

    .menu-list {
        gap: 18px;
    }

    .hero {
        min-height: 560px;
        padding-top: 72px;
        padding-bottom: 72px;
        background-image:
            linear-gradient(
                90deg,
                rgba(12, 20, 29, 0.94) 0%,
                rgba(12, 20, 29, 0.82) 65%,
                rgba(12, 20, 29, 0.56) 100%
            ),
            url("hero.png");
    }

    .karta .podpis {
        column-gap: 28px;
    }

    .timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }

    .footer-container {
        gap: 36px;
    }

    .podpis{
        text-align: center;
    }

}

@media (max-width: 860px) {
    html {
        scroll-padding-top: 88px;
    }

    .nav-menu {
        min-height: 72px;
        gap: 16px;
    }

    .hamburger {
        position: relative;
        z-index: 4;
        display: block;
    }

    .nav-menu > .podpis {
        flex: 1 1 auto;
        overflow: hidden;
        font-size: 0.875rem;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .nav-menu > .przycisknav {
        position: relative;
        z-index: 4;
        min-height: 44px;
        margin-left: auto;
        padding: 10px 18px;
        font-size: 0.875rem;
    }

    .menu-list {
        position: absolute;
        z-index: 3;
        top: calc(100% + 1px);
        right: 0;
        left: 0;
        max-height: calc(100dvh - 96px);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow-y: auto;
        padding: 8px 20px;
        border: 1px solid #d9ded8;
        border-top: 0;
        background: #ffffff;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-6px);
        transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    }

    .menu-list.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .menu-list li {
        width: 100%;
    }

    .menu-list li + li {
        border-top: 1px solid #edf0eb;
    }

    .menu-list a {
        width: 100%;
        min-height: 52px;
        padding: 10px 0;
    }

    .hamburger.is-open span:nth-child(1),
    .hamburger[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.is-open span:nth-child(2),
    .hamburger[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.is-open span:nth-child(3),
    .hamburger[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-overlay {
        position: fixed;
        z-index: 999;
        top: 73px;
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        background: rgba(20, 28, 23, 0.24);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 160ms ease, visibility 160ms ease;
    }

    .nav-overlay.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

}

@media (max-width: 760px) {
     .podpis{
        text-align: center;
    }

    .hero {
        min-height: 620px;
        padding: 72px 24px 64px;
        background-image:
            linear-gradient(
                90deg,
                rgba(12, 20, 29, 0.88) 0%,
                rgba(12, 20, 29, 0.78) 58%,
                rgba(12, 20, 29, 0.64) 100%
            ),
            url("hero.png");
        background-position: center, 74% center;
    }

    .hero h1 {
        max-width: 590px;
        margin-bottom: 20px;
        font-size: clamp(2.25rem, 6.2vw, 3rem);
    }

    .hero p {
        max-width: 570px;
        margin-bottom: 26px;
        font-size: 1rem;
    }

    .hero > .przycisknav {
        max-width: 100%;
    }

    .uslugi,
    .opinie,
    .realizacje,
    .proces,
    .kontakt {
        padding: 64px 24px;
    }

    .karta {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 22px;
        padding: 28px 0;
    }

    .obrazek {
        width: 48px;
        height: 48px;
    }

    .obrazek img {
        width: 38px;
        height: 38px;
    }

    .karta .podpis {
        display: block;
    }

    .karta .podpis h3 {
        margin-bottom: 10px;
        font-size: 1.1875rem;
    }

    .karta .podpis p + p {
        margin-top: 10px;
    }

    .opiniekarty {
        max-width: 580px;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .galeria {
        gap: 16px;
    }

    .kontakt-container {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-top: 28px;
    }

    .footer-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

}

/* Telefon */
@media (max-width: 560px) {

    .slogan{
        font-size: 30px;
        margin-top: 12px;

    }

     .podpis{
        text-align: center;
    }

    .nav-menu,
    .footer-container,
    .footer-bottom p {
        width: calc(100% - 40px);
    }

    .nav-menu {
        gap: 10px;
    }

    .nav-menu > .przycisknav {
        padding: 10px 14px;
        font-size: 0.8125rem;
    }

    .hero {
        padding-right: 20px;
        padding-left: 20px;
    }

    .uslugi,
    .opinie,
    .realizacje,
    .proces,
    .kontakt {
        padding: 56px 20px;
    }

    h2 {
        font-size: clamp(1.75rem, 7.5vw, 2.125rem);
    }

    .uslugi > p,
    .naglowek-sekcji p,
    .kontakt-naglowek p {
        font-size: 1rem;
    }

    .uslugi > p,
    .naglowek-sekcji,
    .kontakt-naglowek {
        margin-bottom: 30px;
    }

    .karty,
    .opiniekarty,
    .galeria {
        margin-top: 30px;
    }

    .karta {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 16px;
        padding: 24px 0;
    }

    .obrazek {
        width: 36px;
        height: 36px;
    }

    .obrazek img {
        width: 30px;
        height: 30px;
    }

    .karta .podpis p {
        font-size: 0.9375rem;
    }

    .galeria {
        grid-template-columns: 1fr;
    }

    .timeline {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .timeline-item {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr);
        align-items: start;
        gap: 18px;
        padding-top: 22px;
    }

    .timeline-number {
        margin: 0;
    }

    .timeline-content h3 {
        margin-bottom: 10px;
    }

    .formularz button {
        width: 100%;
        justify-self: stretch;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 44px 0 36px;
    }

    .footer-brand {
        grid-column: auto;
    }

}

@media (max-width: 380px) {
     .podpis{
        text-align: center;
    }

    .nav-menu > .podpis {
        display: none;
    }

    .hero h1 {
        font-size: 2.125rem;
    }

    .hero > .przycisknav {
        width: 100%;
    }

}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}

@media (max-width: 860px) {
    .nav-overlay {
        z-index: 999;
    }

    .menu-list {
        z-index: 1002;
    }

    .hamburger,
    .nav-menu > .przycisknav {
        z-index: 1003;
    }

}
