/* COLOR PALETTE */
:root {
    --bg-color: white;
    --fg-color: #333;
    --accent: #fe7445;
}

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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    display: flex;
    flex-direction: column;

    gap: 3em;
    min-height: 100%;

    font-family: system-ui, -apple-system, sans-serif;
    color: var(--fg-color);
    background-color: var(--bg-color);
}

h1 {
    font-family: Kaph;
    font-size: 28pt;
}

p {
    font-family: Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif;
    font-size: 20pt;
}

.accent {
    display: block;
    width: fit-content;
    margin: 0;
    padding: 0.3em 0.6em;

    background-color: var(--accent);
    color: var(--fg-color);

    font-family: Kaph;
    font-size: 12pt;
    line-height: 1.4;
}

p.accent + p.accent {
    margin-top: 0.35em;
}

.accent.muted {
    background-color: lightgrey;
}

a {
    text-decoration: none;
    color: inherit;
}

#links a > img {
    width: 3em;
}

body > section {
    width: 100%;
    padding: 1em;
}

#landing {
    min-height: 40em;
    height: 100dvh;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.parallax-layers {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;

    /* layer height matches padded section content box */
    --layer-h: calc(100vh - 2em);
    --tile-w: calc(var(--layer-h) * 576 / 324);
}

#landing > #info,
#project-listing > * {
    position: relative;
    z-index: 1;
}

#logo,
#links {
    z-index: 1;
}

.layer {
    position: absolute;
    top: 0;
    left: 0;

    height: 100%;
    width: calc(var(--tile-w) * 4);

    background-repeat: repeat-x;
    background-position: left center;
    background-size: var(--tile-w) 100%;

    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;

    animation: pan-x linear infinite;
}

#landing .layer {
    /* tower sits on the left of the art — start it on the right half */
    background-position: 50vw center;
}

#landing .layer.l1 {
    background-image: url(assets/bg/1.png);
    animation: none;
}

#landing .layer.l2 {
    background-image: url(assets/bg/2.png);
    animation-duration: 480s;
}

#landing .layer.l3 {
    background-image: url(assets/bg/3.png);
    animation-duration: 300s;
}

#landing .layer.l4 {
    background-image: url(assets/bg/4.png);
    animation-duration: 200s;
}

@keyframes pan-x {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(var(--tile-w) * -1)); }
}

@media (prefers-reduced-motion: reduce) {
    .layer {
        animation: none;
    }
}

#logo {
    width: 8em;
    margin-right: 2em;
    position: absolute;

    bottom: 1em;
    left: 1em;
}

#info {
    text-align: left;
    height: 100%;
    width: 50%;
}

.contact-btn {
    display: inline-flex;
    align-items: end;

    gap: 0.5em;
    margin-top: 3em;

    font-size: 16pt;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.contact-btn > img {
    width: 1.5em;
    display: block;
    flex-shrink: 0;
}

#links {
    display: flex;
    flex-direction: column;
    gap: 1em;

    width: fit-content;

    position: absolute;
    bottom: 1em;
    right: 1em;
}
#links > p {
    align-self: flex-end;
}
#links > div {
    display: flex;
    flex-direction: row;

    gap: 1em;
}

#project-listing {
    position: relative;
    height: auto;
    overflow: hidden;

    display: flex;
    flex-shrink: 0;
    flex-direction: row;
    align-items: center;
    gap: 1em;
}

#project-listing > .section-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: Kaph;
    font-size: 24pt;
    margin: 0;
    flex-shrink: 0;
}

#project-listing > .projects {
    flex: 1;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    padding-inline: 10%;
    align-content: center;
}

#project-listing .fs,
#project-listing .hs {
    grid-column: 1 / -1;
}

.project {
    width: 100%;
    height: 15em;
    overflow: hidden;
    border: 3px solid var(--accent);
    box-shadow: 0.5em 0.5em var(--accent);
    transition: filter 0.15s ease, transform 0.15s ease;
}

.contact-btn:hover,
.project:not(.hs):hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.project:not(.hs):hover {
    box-shadow: 0.5em calc(0.5em + 1px) var(--accent);
}

.hs {
    background-image: url("assets/unannounced.gif");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    border: 3px solid lightgrey;
    box-shadow: 0.5em 0.5em lightgrey;
}

.fs {
    background-image: url("assets/fading-serenades.png");
    background-position: bottom;
    background-size: cover;
}

.asab {
    background-image: url("assets/a-story-about-birds.png");
    background-position: 50% 75%;
    background-size: cover;
}

.vil {
    background-image: url("assets/villager.gif");
    background-position: center;
    background-size: cover;
}

#imprint {
    padding: 1em;
    padding-top: 5em;
}

/* MOBILE */
@media (max-width: 1000px) {
    h1 {
        font-size: 19pt;
    }

    p {
        font-size: 14pt;
    }

    .accent {
        font-size: 10pt;
    }

    #landing,
    #project-listing {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    #landing {
        display: flex;
        flex-direction: column;
        gap: 1.5em;
        padding-bottom: 1.5em;
    }

    #info {
        width: 100%;
        height: auto;
    }

    .contact-btn {
        margin-top: 1.5em;
        font-size: 14pt;
    }

    #logo {
        position: static;
        width: 5em;
        margin: 0;
        margin-top: 3em;
    }

    #links {
        position: static;
        width: 100%;
        gap: 0.75em;

        align-self: flex-end;
    }

    #links > p {
        align-self: flex-start;
    }

    #links > div {
        flex-wrap: wrap;
        gap: 0.75em;
    }

    #links a > img {
        width: 2.5em;
    }

    #project-listing {
        flex-direction: column;
        align-items: stretch;
        gap: 1em;
    }

    #project-listing > .section-title {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 20pt;
    }

    #project-listing > .projects {
        width: 100%;
        padding-inline: 0;
        grid-template-columns: 1fr;
        align-content: start;
    }

    #project-listing .fs,
    #project-listing .asab {
        grid-column: auto;
    }

    .project {
        height: 12em;
    }

    #imprint {
        padding-top: 2em;
        font-size: 14pt;
    }
}
