:root {
    --ink: #20201e;
    /* --cream: #f7f4ee; */
    --red: #d84d3c;
    --sage: #dfe6d5;
    --line: #cbc8c0;
    --muted: #6c6b66;
    --max: 1240px;
	--cream: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
   /* background: var(--cream); */
}
a { color: inherit; text-decoration: none; }

.wrap {
    width: min(calc(100% - 42px), var(--max));
    margin-right: auto;
    margin-left: auto;
}

.top {
    border-bottom: 1px solid var(--line);
    background: #fff;
    font: 12px "DM Mono", monospace;
}
.top .wrap {
    display: flex;
    height: 37px;
    align-items: center;
    justify-content: space-between;
}
.top a { color: var(--red); }

header {
    position: sticky;
    top: 0;
    z-index: 100;
    isolation: isolate;
    overflow: visible;
    border-bottom: 0px solid var(--line);
    background: var(--cream);
	box-shadow: 0px 9px 10px #77736a42;
}
.head {
    display: flex;
    position: relative;
    z-index: 101;
    overflow: visible;
    height: 91px;
    align-items: center;
  /*  justify-content: space-between; */
}
.brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font: 600 22px/1 "Playfair Display", serif;
    letter-spacing: -1px;
}
.brand span { display: block; min-width: 0; }
.brand small {
    display: block;
    margin-top: 7px;
    font: 11px "DM Mono", monospace;
    letter-spacing: 1px;
}
.brand-logo {
    display: block;
    width: 80px;
    height: 80px;
    max-width: 80px;
    flex: 0 0 80px;
    object-fit: contain;
}
.nav {
    display: flex;
    position: relative;
    z-index: 101;
    gap: 27px;
    align-items: center;
    font-size: 14px;
    font-weight: 200;
	padding-left:60px;
}
.nav a:hover { color: var(--red); }
.menub {
    display: none;
    border: 1px solid var(--ink);
    padding: 9px 12px;
    background: none;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
}

/* Jedno menu projektów dla Home, Aktualności i podstron. */
.nav-projects {
    position: relative;
    z-index: 102;
}
.nav-projects-toggle {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: 300;
}
.nav-projects-toggle::after { content: "\25BE"; margin-left: 7px; color: var(--red); font-size: .8em; }
.nav-projects-menu {
    position: fixed;
    z-index: 1000;
    top: var(--nav-menu-top, 125px);
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    width: auto;
    max-height: min(560px, calc(100vh - var(--nav-menu-top, 125px)));
    overflow-y: auto;
    overscroll-behavior: contain;
   /* padding: 30px 30px 34px; */
    column-count: initial;
    column-gap: 42px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-5px);
    border-top: 1px solid #ecebea;
    border-bottom: 1px solid #ecebea;
    border-radius: 0;
    background: #f7f7f7;
    box-shadow: 0 20px 45px rgb(31 42 31 / 18%);
    transition: opacity .28s ease, transform .38s ease, visibility .18s ease;
}
.nav-projects-menu::before { content: ""; position: absolute; top: -1px; right: 0; left: 0; height: 1px; }
.nav-mega-brand {
    display: flex;
    min-height: 190px;
    align-items: flex-start;
    justify-content: center;
    padding: 4px 28px 4px 0;
    border-right: 1px solid #ecebea;
	background:#ffeb3b;
}
.nav-mega-brand img {
    display: block;
    width: min(170px, 100%);
    height: auto;
    max-height: 170px;
    object-fit: contain;
}
.nav-mega-links {
    min-width: 0;
    column-count: 3;
    column-gap: 58px;
	background:#f7f7f7;
}
.nav-projects-menu a {
    display: flex;
    align-items: center;
    break-inside: avoid;
    min-width: 0;
    min-height: 44px;
    padding: 10px 0;
    border: 0;
    color: #262626;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.3;
    transition: color .15s ease, padding-left .15s ease;
}
.nav-projects-menu a::before {
    display: none;
}
.nav-projects-menu a:hover,
.nav-projects-menu a:focus-visible {
    outline: none;
    color: var(--red);
    padding-left: 4px;
}
.nav-projects.is-open .nav-projects-menu { visibility: visible; opacity: 1; transform: translateY(0); }
.nav-projects.is-open .nav-projects-toggle::after { content: "\25B4"; }
.nav-page-scrim {
    position: fixed;
    z-index: 99;
    top: var(--nav-scrim-top, 128px);
    right: 0;
    bottom: 0;
    left: 0;
    background: rgb(32 32 30 / 30%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}
.nav-page-scrim.is-visible {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1100px) and (min-width: 701px) {
    .nav-mega-links { column-count: 2; }
}

footer {
    padding: 45px 0 20px;
    background: var(--ink);
    color: #fff;
}
.foot {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(140px, .55fr) minmax(430px, 1.7fr);
    gap: 20px;
    font-size: 13px;
}
.foot > div:first-child::before {
    content: "";
    display: block;
    width: 72px;
    height: 72px;
    margin-bottom: 13px;
    background: url("../images/logo_200.png") center / contain no-repeat;
}
.foot strong {
    font: 500 25px "Playfair Display", serif;
}
.foot p { color: #b8b7b1; }
.foot-contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 22px;
}
.foot-contact-item {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
}
.foot-contact-item > .fa {
    padding-top: 2px;
    color: #f3d47b;
    font-size: 16px;
}
.foot-contact-item p {
    min-width: 0;
    margin: 0;
    line-height: 1.45;
}
.foot-contact-item b {
    display: block;
    margin-bottom: 4px;
    color: #f3d47b;
    font: 11px "DM Mono", monospace;
    letter-spacing: .05em;
}
.foot-contact-item span,
.foot-contact-item a {
    color: #fff;
    overflow-wrap: anywhere;
}
.copy {
    margin-top: 40px;
    padding-top: 15px;
    border-top: 1px solid #55534f;
    color: #aaa8a1;
    font: 11px "DM Mono", monospace;
}

@media (max-width: 760px) {
    .top .wrap { justify-content: center; }
    .top span { display: none; }
    .head { height: 70px; }
    .brand { gap: 8px; }
    .brand-logo {
        width: 58px;
        height: 58px;
        max-width: 58px;
        flex-basis: 58px;
    }
    .nav {
        position: absolute;
        top: 70px;
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 20px;
        border-bottom: 1px solid var(--line);
        background: var(--cream);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    .nav.open { display: flex; }
    .nav > a,
    .nav > .nav-projects {
        width: 100%;
        min-width: 0;
        padding: 10px 0;
    }
    .nav-projects-toggle {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }
    .nav-projects-menu {
        position: static;
        display: none;
        grid-template-columns: 1fr;
        column-count: 1;
        column-gap: 0;
        width: 100%;
        min-width: 0;
        max-height: 55vh;
        margin-top: 10px;
        padding: 9px 14px;
        border: 1px solid rgb(38 79 59 / 14%);
        border-radius: 13px;
        background: #fff;
        box-shadow: none;
        transform: none;
        overflow-x: hidden;
        overflow-y: auto;
    }
    .nav-projects-menu a {
        display: block;
        min-width: 0;
        min-height: 0;
        padding: 9px 10px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .nav-mega-brand { display: none; }
    .nav-mega-links { column-count: 1; }
    .nav-projects-menu a::before { display: none; }
    .nav-projects.is-open .nav-projects-menu { display: block; visibility: visible; opacity: 1; }
    .nav-projects.is-open .nav-projects-menu {
        left: auto;
        right: auto;
        transform: none;
    }
    .nav-projects-menu::before { display: none; }
    .menub { display: block; }
    .foot { display: block; }
    .foot-contact { margin-top: 25px; }
}
