:root {
    --radius: 0;
    --color: rgb(214, 126, 88);
    --background: rgb(245, 241, 229);
    --dot-bg: olive;
    --dot-color: var(--background);
    --dot-size: 1px;
    --dot-space: 5px;
    --gradient: linear-gradient(rgba(0, 0, 0, 0), rgb(97, 173, 183), rgb(255, 200, 0), rgba(20, 91, 102, 0.5) 30%, rgb(111, 163, 33) 80%, rgba(30, 41, 27, 0.5));
    --film-color: black;
}

@keyframes gradient {
	0% {
		background-position: 0% 0%;
	}
	100% {
		background-position: 0% 100%;
	}
}

html {
    scroll-behavior: smooth;
}

small {
    text-transform: lowercase;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
    transition: 1s background ease;
}

body.ambient {
    --background: black;
    --color: olive;
    --film-color: rgb(23, 23, 23);
}

img {
    width: 100%;
    height: auto;
}

header {
    width: 100%;
    max-width: 200px;
    position: fixed;
    background-color: var(--background);
    bottom: 0;
    right: 0;
    z-index: 99;
    transition: 1s background ease;
}

h1 {
    margin: 0;
}

#ambient-gradient {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    background: var(--gradient);
    background-size: 100% 300vh;
    user-select: none;
    pointer-events: none;
    z-index: 100;
    mix-blend-mode: overlay;
    opacity: 0;
    animation: gradient 30s linear infinite alternate;
    transition: 1s opacity ease;
}

#ambient-gradient.show {
    opacity: 0.8;
}

#ambient-info {
    visibility: hidden;
    opacity: 0;
    transition: 1s opacity, 1s visibility;
}

#ambient-info.show {
    visibility: visible;
    opacity: 1;
}

fieldset {
    border: 0;
    border-top: 1px solid var(--color);
    padding: 1rem 0;
}

#video-container {
    width: 100%;
    position: fixed;
    z-index: 80;
    top: 0;
    left: 0;
    background: var(--color);
    padding: 2rem 0;
    display: none;
}

#video-container.show {
    display: block;
}

iframe {
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
}

audio {
    display: none;
}

main {
    width: 100%;
    position: relative;
}

/* main::before {
    content: '';
    display: block;
    width: 100%;
    position: fixed;
    height: 100vh;
    z-index: 70;
    background: var(--gradient);
    mix-blend-mode: screen;
    /* opacity: 0.5; 
    background-size: 100% 400vh;
    animation: gradient 10s linear infinite alternate;
} */

.collection {
    /* background-color: var(--color); */
    /* border-bottom: 2px double var(--color); */
    background-color: var(--film-color);
    transition: background 0.5s ease;
}

.collection:last-child {
    margin-bottom: calc(100vh - 10rem);
    position: relative;
    padding-bottom: 5rem;
}

.collection:last-child::after {
    content: 'fin';
    position: absolute;
    display: flex;
    align-items: flex-end;
    justify-content: end;
    padding: 0.5rem;
    bottom: -8rem;
    right: 0;
    width: 40%;
    height: 8rem;
    background-color: var(--film-color);
    transition: background 0.5s ease;
}

.collection ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
}

.collection ul li img {
    width: 100%;
    display: block;
    border-radius: 3px;
}

.collection ul li p {
    margin-bottom: 0;
}

.collection h3 {
    position: sticky;
    align-self: flex-start;
    top: 0;
    margin: 0;
    background: rgba(54, 32, 33);
    color: var(--color);
    display: block;
    z-index: 10;
    padding-top: 5rem;
    text-align: center;
    /* border-bottom: 1px solid var(--color); */
}

figcaption {
    font-family: var(--font-main);
    font-size: 0.8rem;
}

@media screen and (min-width: 1025px) {
    main,
    #video-container {
        margin-left: 200px;
        max-width: 600px;
    }

    .collection {
        /* gap: 1rem; */
        display: grid;
        /* grid-template-columns: 120px 1fr; */
    }

    .collection ul {
        margin-left: 0;
    }

    header {
        position: fixed;
        bottom: 1rem;
        right: 5rem;
    }

    figure {
        position: relative;
    }
    
    figcaption {
        width: 200px;
        position: absolute;
        top: 0;
        right: 0;
        transform: translateX(105%);
        opacity: 0;
        transition: linear 0.5s opacity;
    }

    figcaption.show {
        opacity: 1;
    }
}