main,
body {
    background-color: color-mix(in srgb, var(--app-black) 2%, var(--app-white) 98%);
    min-height: 100%;
}

.home-banner {
    border-bottom: 1px solid var(--app-secondary-color);
    box-shadow: 0 6px 9px color-mix(in srgb, var(--app-secondary-color) 30%, transparent);
    width: 100%;

    position: fixed;
    top: 0;
    z-index: 10;

    overflow: hidden;
    isolation: isolate;
}

/* Default non-home pages: collapsed */
.home-banner:not(.is-animated) {
    height: 10vh;
    min-height: 70px;
}

/* Home page: starts expanded */
.home-banner.is-animated {
    height: 100vh;

    animation: desize linear 1s both;
    animation-range: 0 40vh;
    animation-timeline: scroll(root);
}

.home-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;

    background-image: url("../images/banner_home-COgVHrq.jpeg");
    background-size: cover;
    background-position: center;
}

/* Non-home pages: no big image */
.home-banner:not(.is-animated)::before {
    opacity: 0;
}

/* Home page: image fades out */
.home-banner.is-animated::before {
    opacity: 1;

    animation: fade-background linear 1s both;
    animation-range: 0 40vh;
    animation-timeline: scroll(root);
}

.home-banner-spacer {
    height: 10vh;
    min-height: 70px;
}

.home-banner-spacer.is-animated {
    height: 100vh;

    animation: desize linear 1s both;
    animation-range: 0 95vh;
    animation-timeline: scroll(root);
}

.home-banner-cover {
    position: relative;
    z-index: 1;

    background: radial-gradient(
        circle at top left,
        color-mix(in srgb, var(--app-secondary-color) 30%, rgba(255, 255, 255, 0.5)),
        transparent
    ), radial-gradient(
        circle at bottom right,
        color-mix(in srgb, var(--app-primary-color) 30%, rgba(255, 255, 255, 0.5)),
        transparent
    );

    backdrop-filter: blur(5px);
    height: 100%;
    text-align: center;
}

.title {
    width: 100%;
    height: 100%;
    display: flex;
    gap: 5px;
    align-items: center;
}

/* Non-home pages: already collapsed layout */
.home-banner:not(.is-animated) .title {
    flex-direction: row;
    justify-content: start;
    padding: 0 1rem;
}

/* Home page: animated layout */
.home-banner.is-animated .title {
    flex-direction: column;
    justify-content: center;

    animation: title-layout linear 1s both;
    animation-range: 0 40vh;
    animation-timeline: scroll(root);
}

.title h1 {
    text-shadow:
        1px 1px var(--app-text-color-light),
        0 1px var(--app-text-color-light),
        -1px 1px var(--app-text-color-light),
        -1px 0 var(--app-text-color-light),
        1px -1px var(--app-text-color-light),
        0 -1px var(--app-text-color-light),
        -1px -1px var(--app-text-color-light),
        1px 0 var(--app-text-color-light)
;
    font-weight: 1000;
    margin-bottom: 0;
}

/* Non-home pages */
.home-banner:not(.is-animated) .title h1 {
    font-size: 1.5rem;
}

/* Home page */
.home-banner.is-animated .title h1 {
    font-size: 3rem;

    animation: desize-text linear 1s both;
    animation-range: 0 40vh;
    animation-timeline: scroll(root);
}

.title .subtitle {
    font-weight: bold;
    color: var(--app-text-color);
    font-size: 1.1rem;
    text-align: center;
}

/* Non-home pages */
.home-banner:not(.is-animated) .title .subtitle {
    display: none;
}

/* Home page */
.home-banner.is-animated .title .subtitle {
    display: block;

    animation: fade linear 1s both;
    animation-range: 0 40vh;
    animation-timeline: scroll(root);
}

/* Non-home pages */
.home-banner:not(.is-animated) .title img {
    width: 5rem;
}

/* Home page */
.home-banner.is-animated .title img {
    width: 10rem;

    animation: desize-logo linear 1s both;
    animation-range: 0 40vh;
    animation-timeline: scroll(root);
}

img.home {
    max-width: 20rem;
    border-radius: 20px;
    object-fit: cover;
}

footer ul {
    list-style: none;
}

@keyframes fade-background {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes desize {
    from {
        height: 100vh;
    }

    to {
        height: 10vh;
        min-height: 70px;
    }
}

@keyframes desize-text {
    from {
        font-size-adjust: 0.5;
    }

    to {
        font-size-adjust: 0.3;
    }
}

@keyframes fade {
    from {
        opacity: 1;
        font-size-adjust: 0.5;
    }

    to {
        opacity: 0;
        font-size-adjust: 0;
    }
}

@keyframes title-layout {
    from {
        flex-direction: column;
        justify-content: center;
    }

    to {
        flex-direction: row;
        justify-content: start;
    }
}

@keyframes desize-logo {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(0.5);
    }
}

@media (min-width: 600px) {
    .page-content {
        width: 60%;
        margin: auto;
    }
}
