@media (prefers-reduced-motion: reduce) {

    .gallery-image {
        transition: none;
    }

}

:root {
    --background: #f3f1ec;
    --foreground: #222;
    --content-width: 1000px;
    --spacing: clamp(1.5rem, 4vw, 4rem);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--foreground);

    display: flex;
    justify-content: center;

    font-family: system-ui, sans-serif;
}

.page {
    width: min(100%, var(--content-width));
    padding: var(--spacing);
}

.gallery {
    position: relative;
    margin: 0;
    overflow: hidden;
}

.gallery-image {
    display: block;
    width: 100%;
    height: auto;

    transition: opacity 2s ease-in-out;
}

.gallery-image.next {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.gallery-image.next.visible {
    opacity: 1;
}

#hero-image {
    display: block;
    width: 100%;
    height: auto;

    border-radius: 2px;
}