/* Global */
:root {
    --main-color: #2a2230;
    --main-color-muted: #6A6270;
    --secondary-color: #67487A;
    --link-color: #52266B;
    --contrast-color: #FBFBD0;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}
html {
    font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, sans-serif;
    font-size: 16px;
    line-height: 26px;
}
body {
    color: var(--contrast-color);
    background-color: var(--main-color);
}

@media(min-width: 40rem) {
    html {
        font-size: 18px;
        line-height: 30px;
    }
}

/* Links */
a {
    color: var(--contrast-color);
}

/* Images */
img {
    height: auto;
    max-width: 100%;
}
a img {
    border: none;
}

/* Header */
.page-header {
    position: sticky;
    top: 0;
    z-index: 10;

    display: flex;

    background-color: var(--main-color);
}
.page-header .page-header-separator {
    flex-grow: 1;
}
.page-header a {
    display: inline-block;
    min-height: 70px;
    padding: 1em 1em;

    font-size: 1.2rem;
    text-decoration: none;

    transition: background-color .3s ease-in-out;
}

@media(max-width: 460px) {
    .page-header a {
        height: 90px;
    }
}

.page-header a:hover,
.page-header a:focus {
    background-color: var(--secondary-color);
}

/* Placeholder */
.page-galerie .placeholder {
    display: flex;
    height: calc(100vh - 90px);
    margin-top: 0;
    margin-bottom: 0;

    flex-direction: column;
    align-items: center;
    justify-content: center;

    font-size: 1.3rem;
}

/* Photo */
.photo {
    position: relative;

    text-align: center;
}

.photo .photo-container {
    position: relative;
    vertical-align: bottom;

    display: inline-block;
    height: calc(100vh - 70px - 100px);
    margin-left: auto;
    margin-right: auto;

    overflow: hidden;
}

@media(max-width: 460px) {
    .photo .photo-container {
        height: calc(100vh - 90px - 100px);
    }
}

.photo .photo-container img {
    display: inline-block;
    height: 100%;
    max-width: none;

    border-radius: .25rem;
}

.photo .photo-container .photo-original {
    position: absolute;
    right: 0;
    bottom: 0;

    padding: 1rem 2rem;

    text-decoration: none;

    background-color: var(--secondary-color);
    border-radius: .25rem 0 .25rem 0;

    opacity: 0;
    transition: opacity .3s ease-in-out;
}
.photo .photo-container:hover .photo-original,
.photo .photo-container .photo-original:focus {
    opacity: 1;
}

.photo .photo-title {
    display: flex;
    height: 100px;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: .5rem;
    padding-bottom: .5rem;

    flex-direction: column;
    justify-content: center;
}

/* Gallery navigation */
.photo-gallery-navigation .photo-previous,
.photo-gallery-navigation .photo-next {
    position: absolute;
    top: 0;
    bottom: 0;

    display: flex;
    padding-left: .75rem;
    padding-right: .75rem;

    flex-direction: column;
    justify-content: center;
    text-decoration: none;

    transition: all .3s ease-in-out;
}
.photo-gallery-navigation .photo-previous {
    left: 0;
}
.photo-gallery-navigation .photo-next {
    right: 0;
}

.photo-gallery-navigation .photo-previous:hover {
    padding-left: 0;
    padding-right: 1.5rem;
}
.photo-gallery-navigation .photo-next:hover {
    padding-left: 1.5rem;
    padding-right: 0;
}

/* Gallery */
.gallery-title {
    position: sticky;
    top: -3rem;
    z-index: 10;

    margin-top: 0;
    margin-bottom: 0;
    padding-left: 2.5rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;

    background-color: var(--main-color);
    border-top: 3rem solid var(--secondary-color);
}

.gallery-container {
    display: flex;
    min-height: 100vh;
    padding: 2rem;

    flex-wrap: wrap;
    justify-content: space-evenly;
    align-content: flex-start;

    color: var(--main-color);

    background-color: var(--contrast-color);
    border-bottom: 4rem solid var(--main-color);
}

.gallery-container .photo-preview {
    display: flex;
    margin-left: .5rem;
    margin-right: .5rem;
    margin-bottom: 1rem;

    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.gallery-container .photo-preview img {
    height: 250px;

    border: .25rem solid transparent;
    border-radius: .25rem;

    transition: border-color .3s ease-out;
}
.gallery-container .photo-preview img.focus {
    border-color: var(--main-color);
}
.gallery-container .photo-preview:hover img,
.gallery-container .photo-preview:focus img {
    border-color: var(--secondary-color);
}

/* Button up to the sky */
#up-to-the-sky {
    position: absolute;
    top: 0;
    right: 0;

    height: 100vh;
    width: 1px;
}

#up-to-the-sky button {
    position: fixed;
    bottom: 0;
    right: 0;

    height: 4rem;
    padding: 1em;

    opacity: 1;
    visibility: visible;

    transition: background-color .3s ease-in-out;

    color: var(--contrast-color);
    font-size: 1.2rem;
    font-family: inherit;

    background-color: var(--main-color);
    border: none;
}
#up-to-the-sky button:hover,
#up-to-the-sky button:focus {
    background-color: var(--secondary-color);
}
#up-to-the-sky.intersecting button {
    opacity: 0;
    visibility: hidden;
}

@media(min-width: 40rem) {
    #up-to-the-sky button {
        right: 0;
        left: auto;
    }
}
