:root {
    --steel-950: #111416;
    --steel-900: #171b1f;
    --steel-800: #22282e;
    --steel-700: #343d45;
    --steel-600: #4f5b64;
    --steel-200: #d9dee2;
    --steel-100: #edf0f2;
    --warm-500: #d69018;
    --warm-400: #e9aa36;
    --warm-100: #fff3d8;
    --paper: #fbfbfa;
    --focus: #ffbf47;
    --shadow-soft: 0 14px 36px rgba(17, 20, 22, 0.12);
    --rail-width: 4.5rem;
}

html {
    scroll-padding-top: 1rem;
}

body {
    color: var(--steel-900);
    background: var(--paper);
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
    padding-right: var(--rail-width);
}

body.menu-open {
    overflow: hidden;
}

a {
    color: #785007;
    text-underline-offset: 0.18em;
}

a:hover {
    color: #4c3305;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    box-shadow: none !important;
}

.skip-link {
    position: fixed;
    z-index: 1100;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--steel-950);
    background: #fff;
    border: 2px solid var(--steel-950);
    border-radius: 0.25rem;
    transform: translateY(-160%);
    transition: transform 0.15s ease;
}

.skip-link:focus {
    color: var(--steel-950);
    transform: translateY(0);
}

.btn {
    border-width: 2px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.btn-primary,
.btn-primary:focus {
    color: var(--steel-950);
    background: var(--warm-400);
    border-color: var(--warm-400);
}

.btn-primary:hover,
.btn-primary:active {
    color: #fff;
    background: #9b6204;
    border-color: #9b6204;
}

.btn-dark {
    background: var(--steel-900);
    border-color: var(--steel-900);
}

.btn-dark:hover {
    background: var(--steel-700);
    border-color: var(--steel-700);
}

.btn-outline-light:hover {
    color: var(--steel-950);
}

.btn-xl {
    padding: 1rem 1.65rem;
}

.narrow-content {
    max-width: 840px;
}

.section-kicker {
    margin-bottom: 0.55rem;
    color: #8a5b08;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-kicker-light {
    color: #ffc85f;
}

.content-section {
    padding-block: clamp(4.25rem, 8vw, 7rem);
}

.rich-text p:last-child {
    margin-bottom: 0;
}

.menu-backdrop {
    position: fixed;
    z-index: 1040;
    inset: 0;
    background: rgba(9, 11, 12, 0.62);
    backdrop-filter: blur(2px);
}

/* Zwinięty pasek to listwa z logo; najazd lub klik wysuwa całość. */
#sidebar-wrapper,
#sidebar-wrapper.active {
    right: 0;
}

#sidebar-wrapper {
    z-index: 1050;
    top: 0;
    width: min(calc(22rem + var(--rail-width)), 92vw);
    background: var(--steel-900);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: -12px 0 30px rgba(0, 0, 0, 0.22);
    transform: translateX(calc(100% - var(--rail-width)));
    transition: transform 0.3s ease;
}

#sidebar-wrapper.active {
    width: min(calc(22rem + var(--rail-width)), 92vw);
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.sidebar-rail {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    width: var(--rail-width);
    height: 100%;
    justify-content: center;
    align-items: flex-start;
    padding: 1.25rem 0 0;
    color: #fff;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.sidebar-rail:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: -3px;
}

.sidebar-logo {
    width: 2.6rem;
    height: 2.6rem;
    fill: currentColor;
    transition: color 0.15s ease;
}

.sidebar-rail:hover .sidebar-logo,
#sidebar-wrapper.active .sidebar-logo {
    color: var(--warm-400);
}

#sidebar-wrapper .sidebar-nav {
    left: var(--rail-width);
    right: 0;
    width: auto;
    padding-top: 1.5rem;
}

#sidebar-wrapper .sidebar-brand {
    min-height: 5rem;
    height: auto;
    padding: 1rem 1.5rem;
    line-height: 1.25;
}

#sidebar-wrapper .sidebar-brand a {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
}

#sidebar-wrapper .sidebar-nav-item a {
    min-height: 3.5rem;
    padding: 1rem 1.5rem;
    color: #fff;
    line-height: 1.4;
}

#sidebar-wrapper .sidebar-nav-item a:hover,
#sidebar-wrapper .sidebar-nav-item a:focus-visible {
    color: var(--steel-950);
    background: var(--warm-400);
}

.messages-wrap {
    position: relative;
    z-index: 10;
    padding-top: 1rem;
}

.messages-wrap .alert {
    margin-bottom: 0;
    box-shadow: var(--shadow-soft);
}

.masthead {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    color: #fff;
    background:
        linear-gradient(115deg, rgba(10, 12, 14, 0.92), rgba(24, 29, 33, 0.68)),
        linear-gradient(135deg, var(--steel-900), var(--steel-600));
    background-position: center;
    background-size: cover;
    isolation: isolate;
}

.masthead.has-hero-image {
    background-image:
        linear-gradient(115deg, rgba(10, 12, 14, 0.88), rgba(24, 29, 33, 0.56)),
        var(--hero-image);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1040px;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.hero-eyebrow {
    margin-bottom: 0.75rem;
    color: #ffd680;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.masthead h1 {
    max-width: 16ch;
    margin-inline: auto;
    color: #fff;
    font-size: clamp(2.75rem, 7vw, 5.75rem);
    line-height: 0.98;
    text-wrap: balance;
}

.hero-lead {
    max-width: 720px;
    margin-inline: auto;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 500;
    text-wrap: balance;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
}

.services-section {
    background:
        linear-gradient(rgba(23, 27, 31, 0.96), rgba(23, 27, 31, 0.96)),
        repeating-linear-gradient(135deg, transparent 0 10px, rgba(255, 255, 255, 0.03) 10px 11px);
}

.service-card {
    padding-inline: 1rem;
}

.service-icon {
    display: grid;
    width: 7rem;
    height: 7rem;
    color: var(--steel-950);
    background: var(--warm-400);
    place-items: center;
}

.service-svg {
    width: 3.6rem;
    height: 3.6rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-description {
    color: rgba(255, 255, 255, 0.84);
}

.projects-section {
    background: #fff;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: clamp(1.2rem, 3vw, 2rem);
    justify-items: center;
}

.project-card {
    width: 100%;
    max-width: 680px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--steel-200);
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(17, 20, 22, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover,
.project-card:focus-within {
    box-shadow: var(--shadow-soft);
    transform: translateY(-4px);
}

.project-card-link {
    display: block;
    height: 100%;
    color: var(--steel-900);
    text-decoration: none;
}

.project-card-link:hover {
    color: var(--steel-900);
}

.project-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--steel-200);
}

.project-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.project-card:hover .project-card-media img,
.project-card:focus-within .project-card-media img {
    transform: scale(1.035);
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent),
        var(--steel-700);
}

.project-card-body {
    padding: 1.5rem;
}

.project-card-body h2 {
    margin-bottom: 0.65rem;
}

.project-card-body p {
    color: var(--steel-600);
}

.project-card-cta {
    color: #805300;
    font-weight: 800;
}

.metal-callout {
    padding-block: clamp(6rem, 13vw, 11rem);
    color: #fff;
    background:
        linear-gradient(115deg, rgba(13, 16, 18, 0.94), rgba(35, 41, 46, 0.86)),
        url("../vendor/assets/img/bg-callout.31f926ac1342.jpg") center / cover;
}

.metal-callout h2 {
    max-width: 780px;
    color: #fff;
    font-size: clamp(2.1rem, 5vw, 3.8rem);
    text-wrap: balance;
}

.callout-lead {
    max-width: 680px;
    margin: 0 auto 2rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.2rem;
}

.address-section {
    background:
        radial-gradient(circle at top left, var(--warm-100), transparent 42%),
        var(--paper);
}

.page-header {
    padding: clamp(7rem, 13vw, 10rem) 0 clamp(3.5rem, 7vw, 5.5rem);
    color: #fff;
    background:
        linear-gradient(120deg, rgba(16, 19, 22, 0.98), rgba(50, 59, 66, 0.94)),
        url("../vendor/assets/img/bg-masthead.c934a8a6d299.jpg") center / cover;
}

.page-header h1 {
    max-width: 900px;
    color: #fff;
    font-size: clamp(2.5rem, 6vw, 4.6rem);
    text-wrap: balance;
}

.page-header > .container > p:last-child {
    max-width: 760px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.16rem;
}

.breadcrumb {
    margin-bottom: 1.5rem;
}

.breadcrumb-item,
.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.72);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.52);
}

.breadcrumb a {
    color: #ffd77e;
}

.gallery-section {
    background: #f2f4f5;
}

.gallery-hint {
    margin-bottom: 1.5rem;
    color: var(--steel-600);
    text-align: center;
}

.photo-grid {
    column-count: 3;
    column-gap: 1rem;
}

.photo-item {
    display: inline-block;
    width: 100%;
    margin: 0 0 1rem;
    overflow: hidden;
    background: #fff;
    border-radius: 0.35rem;
    box-shadow: 0 5px 18px rgba(17, 20, 22, 0.11);
    break-inside: avoid;
}

.photo-item a {
    display: block;
    overflow: hidden;
    background: var(--steel-200);
}

.photo-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.photo-item a:hover img,
.photo-item a:focus-visible img {
    filter: contrast(1.04);
    transform: scale(1.02);
}

.photo-item figcaption {
    padding: 0.8rem 1rem;
    color: var(--steel-700);
    font-size: 0.93rem;
}

.pagination-nav {
    margin-top: 3rem;
}

.page-link {
    color: #704a06;
}

.page-item.active .page-link {
    color: #fff;
    background: var(--steel-800);
    border-color: var(--steel-800);
}

.empty-state {
    width: 100%;
    padding: 2.5rem;
    color: var(--steel-600);
    background: var(--steel-100);
    border: 1px dashed var(--steel-600);
    border-radius: 0.4rem;
    text-align: center;
}

.company-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-block: 3rem;
}

.company-facts > div {
    padding: 1.4rem;
    background: #fff;
    border: 1px solid var(--steel-200);
    border-left: 4px solid var(--warm-500);
}

.company-facts strong {
    display: block;
}

.fact-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--steel-600);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.contact-section {
    background: var(--steel-100);
}

.contact-layout {
    max-width: 40rem;
    margin-inline: auto;
}

.contact-details {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-soft);
}

.contact-details dl {
    margin-block: 1.75rem;
}

.contact-details dl > div {
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--steel-200);
}

.contact-details dt {
    margin-bottom: 0.2rem;
    color: var(--steel-600);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-details dd,
.contact-details address {
    margin: 0;
}

.text-link {
    font-weight: 800;
}

.footer {
    padding-block: 4rem 2.5rem;
    color: var(--steel-200);
    background: var(--steel-950);
}

.footer h2 {
    color: #fff;
}

.footer a {
    color: #ffd377;
}

.footer .text-muted {
    color: #b8c0c6 !important;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.footer-links,
.social-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li + li {
    margin-top: 0.55rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.scroll-to-top {
    right: calc(var(--rail-width) + 1rem);
    display: grid;
    color: #fff;
    background: rgba(17, 20, 22, 0.88);
    place-items: center;
}

.scroll-to-top:hover {
    color: var(--steel-950);
    background: var(--warm-400);
}

.scroll-to-top[hidden] {
    display: none;
}

.error-page {
    min-height: 70vh;
    display: grid;
    align-items: center;
}

.error-code {
    margin-bottom: 0;
    color: var(--warm-500);
    font-size: clamp(4rem, 13vw, 9rem);
    font-weight: 900;
    line-height: 1;
}

@media (max-width: 991.98px) {
    .photo-grid {
        column-count: 2;
    }

    .service-card:nth-last-child(n + 2) {
        margin-bottom: 3rem;
    }
}

@media (max-width: 575.98px) {
    :root {
        --rail-width: 3.5rem;
    }

    .sidebar-logo {
        width: 2.1rem;
        height: 2.1rem;
    }

    .content-section {
        padding-block: 4rem;
    }

    .masthead h1 {
        font-size: clamp(2.35rem, 14vw, 3.7rem);
    }

    .hero-actions,
    .page-actions {
        flex-direction: column;
    }

    .hero-actions .btn,
    .page-actions .btn {
        width: 100%;
    }

    .photo-grid {
        column-count: 1;
    }

    .company-facts {
        grid-template-columns: 1fr;
    }

    .contact-details {
        padding: 1.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    body {
        padding-right: 0;
    }

    .menu-backdrop,
    #sidebar-wrapper,
    .scroll-to-top,
    .hero-actions,
    .page-actions {
        display: none !important;
    }

    .masthead,
    .page-header,
    .metal-callout {
        min-height: auto;
        color: #000;
        background: #fff !important;
    }

    .masthead h1,
    .page-header h1,
    .metal-callout h2 {
        color: #000;
    }
}
