html {
    background-color: #071924;
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    overflow-x: hidden;
    background-color: #071924;
}

h1 {
    z-index: 1;
    text-align: center;
    font-size: 3em;
    line-height: 1.2em;
    font-family: "Monoton", sans-serif;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: rgba(0, 0, 0, 0.6) 0px 4px 4px;
    letter-spacing: 2px;
    margin: 0;
}

h2 {
    font-family: "Quantico", sans-serif;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
    margin: 0;
}

main {
    padding-top: 10vh;
    min-height: 100vh;
    box-shadow: inset 0 10vh 8vh -4vh rgba(0, 0, 0, 0.8);
}

a {
    color: #ffffff;
    transition: .2s;
}

a:hover {
    filter: brightness(70%);
    transition: .2s;
}

.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: -0.125em;
}

.icon-sm {
    font-size: 0.875em;
}

.icon-lg {
    font-size: 1.25em;
}

/* MENU */
nav.desktop-nav {
    width: 90vw;
    height: 9vh;
    position: absolute;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.5vh 5vw;
    gap: 1.4vw;
    overflow: visible;
    box-sizing: border-box;
    padding: 0.7vh 1.8vw;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background-color: rgba(7, 25, 36, 0.24);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

nav.desktop-nav ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-around;
    padding: 0;
    margin: 0;
}

nav.desktop-nav ul:nth-of-type(1),
nav.desktop-nav ul:nth-of-type(3) {
    flex-basis: 44%;
}

nav.desktop-nav ul:nth-of-type(2) {
    flex-basis: 12%;
}

nav.desktop-nav ul li {
    display: block;
    font-family: "Quantico", sans-serif;
    font-weight: 700;
    font-style: normal;
    text-transform: uppercase;
    white-space: nowrap;
}

nav.desktop-nav ul li a {
    text-decoration: none;
    color: #ffffff;
    line-height: 5vh;
    height: 5vh;
    padding: 2vh 1vw 2vh 1vw;
    display: block;
    text-shadow: rgba(0, 0, 0, 0.6) 0px 2px 2px;
    transition: color 0.28s ease, text-shadow 0.28s ease, transform 0.28s ease;
    font-size: 1.6vw;
    position: relative;
    filter: none;
}

nav.desktop-nav ul:not(.nav-logo) li a::after {
    content: "";
    position: absolute;
    left: 1vw;
    right: 1vw;
    bottom: 1.3vh;
    height: 2px;
    border-radius: 999px;
    background-color: currentColor;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

nav.desktop-nav ul:not(.nav-logo) li a:hover,
nav.desktop-nav ul:not(.nav-logo) li a:focus-visible,
nav.desktop-nav ul:not(.nav-logo) li a.is-active {
    color: var(--nav-accent, #ffffff);
    filter: none;
    text-shadow: rgba(0, 0, 0, 0.8) 0px 2px 2px;
    transform: translateY(-1px);
}

nav.desktop-nav ul:not(.nav-logo) li a:hover::after,
nav.desktop-nav ul:not(.nav-logo) li a:focus-visible::after,
nav.desktop-nav ul:not(.nav-logo) li a.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

nav.desktop-nav ul.nav-logo {
    height: 7.4vh;
}

nav.desktop-nav ul.nav-logo li {
    padding: auto;
    overflow: hidden;
}

nav.desktop-nav ul.nav-logo li a {
    padding: 0;
    box-sizing: border-box;
}

nav.desktop-nav ul.nav-logo li a:hover,
nav.desktop-nav ul.nav-logo li a:focus-visible {
    filter: none;
    transform: none;
}

nav.desktop-nav ul.nav-logo li a::after {
    display: none;
}

nav.desktop-nav ul.nav-logo li a picture {
    display: block;
    height: 7.4vh;
}

nav.desktop-nav ul.nav-logo li a img {
    height: 7.4vh;
    width: auto;
    max-width: none;
    object-fit: contain;
    vertical-align: middle;
}

nav.desktop-nav ul li a img:hover {
    filter: none;
    opacity: 0.88;
    transition: opacity 0.28s ease;
}

header .mobile-header {
    display: none;
}

nav.mobile-nav {
    display: none;
}

/* STRONY BŁĘDÓW */
.template-404 main,
.template-500 main {
    padding-top: 0;
    min-height: 100vh;
    background-color: #0f4159;
    background-image:
        linear-gradient(135deg, rgba(15, 65, 89, 0.96), rgba(131, 60, 143, 0.74)),
        url("/static/img/AllInUJ_Pattern_White.79a5775359b1.png");
    background-position: center;
    background-size: cover, 260px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 10vh 8vh -4vh rgba(0, 0, 0, 0.8);
    animation: error-pattern-drift 48s ease-in-out infinite alternate;
}

.template-500 main {
    background-image:
        linear-gradient(135deg, rgba(137, 27, 27, 0.92), rgba(15, 65, 89, 0.9)),
        url("/static/img/AllInUJ_Pattern_White.79a5775359b1.png");
}

.error-page {
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18vh 8vw 10vh;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.error-page::before {
    content: "";
    position: absolute;
    inset: 10vh 8vw;
    border: 1px solid rgba(255, 255, 255, 0.22);
    pointer-events: none;
    animation: error-frame-in 0.8s ease-out both;
}

.error-page::after {
    content: "ALL IN UJ";
    position: absolute;
    right: 4vw;
    bottom: 4vh;
    font-family: "Quantico", sans-serif;
    font-size: clamp(3rem, 12vw, 12rem);
    font-weight: 700;
    line-height: 0.8;
    color: rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    animation: error-mark-in 0.9s ease-out 0.25s both;
}

.error-page__content {
    width: min(820px, 100%);
    position: relative;
    z-index: 2;
    text-shadow: rgba(0, 0, 0, 0.6) 0px 4px 4px;
}


.error-page h1 {
    font-size: clamp(6rem, 19vw, 16rem);
    line-height: 0.88;
    margin: 0 0 2vh;
    letter-spacing: 0;
    animation: error-copy-in 0.75s ease-out 0.08s both;
}

.error-page h2 {
    font-size: clamp(1.6rem, 4vw, 3.4rem);
    line-height: 1.08;
    margin: 0 auto 2.5vh;
    animation: error-copy-in 0.72s ease-out 0.22s both;
}

.error-page p {
    max-width: 640px;
    margin: 0 auto;
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    line-height: 1.7;
    font-weight: 300;
    animation: error-copy-in 0.72s ease-out 0.34s both;
}

p.error-page__eyebrow {
    margin: 0 auto 1.5vh auto;
    font-family: "Quantico", sans-serif;
    font-size: clamp(1rem, 2vw, 1.45rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: error-copy-in 0.72s ease-out both;
}

.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 4vh;
    animation: error-copy-in 0.72s ease-out 0.46s both;
}

.error-page__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 4px;
    color: #ffffff;
    font-family: "Quantico", sans-serif;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.error-page__button-primary {
    background-color: #ffffff;
    color: #0f4159;
    text-shadow: none;
}

.error-page__button:hover {
    border-color: rgba(255, 255, 255, 0.86);
    filter: none;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.error-page__button-primary:hover {
    background-color: #ffffff;
    color: #0f4159;
}

@keyframes error-pattern-drift {
    from {
        background-position: center, center;
    }

    to {
        background-position: center, calc(50% + 72px) calc(50% + 54px);
    }
}

@keyframes error-copy-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes page-copy-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes error-frame-in {
    from {
        opacity: 0;
        transform: scale(0.985);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes error-mark-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

    .template-404 main,
    .template-500 main {
        animation: none;
    }

    nav.desktop-nav ul li a:hover,
    nav.desktop-nav ul li a:focus-visible,
    nav.desktop-nav ul li a.is-active,
    nav.mobile-nav ul li a:hover,
    nav.mobile-nav ul li a:focus-visible,
    nav.mobile-nav ul li a.is-active,
    .error-page__button:hover {
        transform: none;
    }
}

/* STOPKA */
body {
    --site-footer-overlap-space: clamp(150px, 18vh, 200px);
}

main > section:last-child {
    padding-bottom: calc(
        var(--site-footer-overlap-space)
        + clamp(18px, 4vh, 42px)
        + env(safe-area-inset-bottom, 0px)
    );
}

body.pillar-page main > section.text-image-block:last-child {
    height: calc(100vh + var(--site-footer-overlap-space));
}

.site-footer {
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin-top: calc(-1 * var(--site-footer-overlap-space));
    padding: 0 5vw clamp(18px, 3vh, 32px);
    color: #ffffff;
    /* background:
        radial-gradient(ellipse at 16% 0%, rgba(255, 255, 255, 0.14) 0 7%, transparent 24%),
        radial-gradient(ellipse at 86% 18%, color-mix(in srgb, var(--dominant-color, #0f4159), transparent 58%) 0 9%, transparent 28%),
        linear-gradient(135deg, #071924, color-mix(in srgb, var(--dominant-color, #0f4159), #071924 58%)); */
    background: transparent;
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    font-style: normal;
    text-shadow: none;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 120px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 120px);
    opacity: 0.26;
    mask-image: linear-gradient(145deg, #000, transparent 78%);
    pointer-events: none;
}

.site-footer__inner {
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(18px, 3vw, 42px);
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(14px, 2vw, 22px) clamp(14px, 2vw, 22px) 34px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
}

.site-footer a {
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: #ffffff;
    filter: none;
}

.site-footer p {
    margin: 0;
}

.site-footer__name {
    margin: 0 0 5px;
    font-family: "Quantico", sans-serif;
    font-size: clamp(1.15rem, 1.6vw, 1.45rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.site-footer__meta {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.84rem;
    line-height: 1.35;
}

.site-footer__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.site-footer__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-footer__socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.08);
}

.site-footer__socials a:hover,
.site-footer__socials a:focus-visible {
    border-color: color-mix(in srgb, var(--dominant-color, #ffffff), white 36%);
    background-color: color-mix(in srgb, var(--dominant-color, #ffffff), transparent 70%);
    color: #ffffff;
    transform: translateY(-2px);
}

.site-footer__email,
.site-footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    background-color: rgba(7, 25, 36, 0.2);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
}

.site-footer__email:hover,
.site-footer__email:focus-visible,
.site-footer__links a:hover,
.site-footer__links a:focus-visible {
    border-color: color-mix(in srgb, var(--dominant-color, #ffffff), white 44%);
    background-color: color-mix(in srgb, var(--dominant-color, #ffffff), transparent 72%);
    transform: translateY(-1px);
}

.site-footer__links {
    display: flex;
    gap: 10px;
}

.site-footer__credit {
    position: absolute;
    right: clamp(14px, 2vw, 22px);
    bottom: 10px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    font-style: italic;
    white-space: nowrap;
}

.site-footer__credit .icon {
    color: color-mix(in srgb, var(--dominant-color, #ffffff), white 32%);
}

@media (max-width: 480px) {
    body {
        --site-footer-overlap-space: clamp(190px, 28vh, 245px);
    }

    h2 {
        font-family: "Quantico", sans-serif;
        font-weight: 400;
        font-style: normal;
        text-transform: uppercase;
        margin: 0;
    }

    main {
        padding-top: 10vh;
        min-height: 100vh;
    }

    /* MENU */
    body.no-scroll {
        overflow: hidden;
    }

    header .mobile-header {
        position: absolute;
        top: 0;
        display: flex;
        justify-content: space-between;
        height: 10vh;
        width: 100vw;
        padding: 1vh 5vw;
        box-sizing: border-box;
        z-index: 50;
    }

    header .mobile-header a {
        display: block;
        height: 8vh;
        margin-left: 5vw;
    }

    header .mobile-header a picture {
        display: block;
        height: 8vh;
    }

    header .mobile-header a img {
        height: 8vh;
        width: auto;
        max-width: none;
        object-fit: contain;
    }

    header .mobile-header button {
        font-size: 6vh;
        background: none;
        border: none;
        cursor: pointer;
        color: white;
        line-height: 6vh;
        padding: 0;
        transition: 0.4s ease-in-out;
    }

    header .mobile-header button.active {
        transform: rotate(90deg);
        transition: 0.4s ease-in-out;
    }

    header .mobile-header button i {
        line-height: 6vh;
    }

    header .mobile-header button .icon {
        display: block;
        margin: auto;
    }

    nav.mobile-nav {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
        right: 0;
        z-index: 30;
        justify-content: space-around;
        display: flex;
        gap: 1vw;
        overflow: hidden;
        background-color: rgba(7, 25, 36, 0.56);
        border-left: 1px solid rgba(255, 255, 255, 0.14);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.4s ease-in-out, visibility 0s linear 0.4s;
    }

    nav.mobile-nav.active {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.4s ease-in-out, visibility 0s linear 0s;
    }

    nav.mobile-nav ul {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        padding: 0;
        margin: 15vh 0 15vh 5vw;
    }

    nav.mobile-nav ul li {
        display: block;
        font-family: "Quantico", sans-serif;
        font-weight: 700;
        font-style: normal;
        text-transform: uppercase;
    }

    nav.mobile-nav ul li a {
        text-decoration: none;
        color: #ffffff;
        padding: 2vh 1vw 2vh 1vw;
        display: block;
        text-shadow: rgba(0, 0, 0, 0.6) 0px 2px 2px;
        transition: color 0.28s ease, transform 0.28s ease, text-shadow 0.28s ease;
        font-size: 3.5vh;
        position: relative;
        filter: none;
    }

    nav.mobile-nav ul li a::after {
        content: "";
        position: absolute;
        left: 1vw;
        bottom: 1.35vh;
        width: min(72px, 42%);
        height: 2px;
        border-radius: 999px;
        background-color: currentColor;
        opacity: 0;
        transform: scaleX(0);
        transform-origin: left;
        transition: opacity 0.28s ease, transform 0.28s ease;
    }

    nav.mobile-nav ul li a:hover,
    nav.mobile-nav ul li a:focus-visible,
    nav.mobile-nav ul li a.is-active {
        color: var(--nav-accent, #ffffff);
        filter: none;
        text-shadow: rgba(0, 0, 0, 0.8) 0px 2px 2px;
        transform: translateY(-1px);
    }

    nav.mobile-nav ul li a:hover::after,
    nav.mobile-nav ul li a:focus-visible::after,
    nav.mobile-nav ul li a.is-active::after {
        opacity: 1;
        transform: scaleX(1);
    }

    nav.mobile-nav ul.nav-logo {
        height: 9vh;
    }

    nav.mobile-nav ul.nav-logo li {
        padding: auto;
        overflow: hidden;
    }

    nav.mobile-nav ul.nav-logo li a {
        padding: 0;
        box-sizing: border-box;
    }

    nav.desktop-nav {
        display: none;
    }

    /* STRONY BŁĘDÓW */
    .template-404 main,
    .template-500 main {
        background-size: cover, 180px;
    }

    .error-page {
        min-height: 100vh;
        padding: 18vh 6vw 9vh;
    }

    .error-page::before {
        inset: 12vh 5vw 6vh;
    }

    .error-page::after {
        right: auto;
        left: 50%;
        bottom: 5vh;
        transform: translateX(-50%);
        font-size: 4.5rem;
    }

    .error-page h1 {
        font-size: 6rem;
        line-height: 0.95;
    }

    .error-page h2 {
        font-size: 1.65rem;
    }

    .error-page p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .error-page__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 3.5vh;
    }

    .error-page__button {
        min-height: 46px;
        padding: 0 18px;
        font-size: 0.95rem;
    }

    /* STOPKA */
    main > section:last-child {
        padding-bottom: calc(
            var(--site-footer-overlap-space)
            + 24px
            + env(safe-area-inset-bottom, 0px)
        );
    }

    body.pillar-page main > section.text-image-block:last-child {
        height: auto;
        min-height: calc(100vh + var(--site-footer-overlap-space));
    }

    .site-footer {
        margin-top: calc(-1 * var(--site-footer-overlap-space));
        padding: 0 12px calc(6px + env(safe-area-inset-bottom, 0px));
        background: transparent;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 9px;
        width: 100%;
        padding: 12px 10px;
        text-align: center;
        background-color: rgba(7, 25, 36, 0.72);
    }

    .site-footer__name {
        margin: 0 0 3px;
        font-size: 1rem;
        letter-spacing: 0.045em;
        line-height: 1.1;
    }

    .site-footer__meta {
        font-size: 0.68rem;
        line-height: 1.25;
    }

    .site-footer__actions,
    .site-footer__socials,
    .site-footer__links {
        align-items: center;
        justify-content: center;
    }

    .site-footer__actions {
        gap: 7px;
    }

    .site-footer__socials {
        gap: 6px;
    }

    .site-footer__socials a {
        width: 30px;
        height: 30px;
    }

    .site-footer__email,
    .site-footer__links a {
        min-height: 30px;
        padding: 0 9px;
        font-size: 0.78rem;
    }

    .site-footer__links {
        flex-wrap: wrap;
        gap: 7px;
    }

    .site-footer__credit {
        position: static;
        width: 100%;
        font-size: 10px;
        line-height: 1.2;
        white-space: normal;
        text-align: center;
    }
}
