:root {
    --color-primary: #323A45;
    --color-primary--light: #CFD8DC;
    --color-secondary: #E57373;
    --color-secondary--light: #FFEBEE;
}

* {
    font-family: "Overpass", sans-serif;
    font-optical-sizing: auto;
}

body {
    font-size: 1.5em;
    line-height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.wrapper {
    max-width: 1200px;
    overflow: hidden;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1em;
}

@media screen and (max-width: 720px) {
    header {
        flex-direction: column;
    }
}

nav a:first-child {
    width: 40px;
    height: 40px;
    padding: 0.5em;
    display: inline-block;
    text-align: center;
    vertical-align: text-bottom;
}

nav a:hover svg path {
    fill: var(--color-secondary);
}

main {
    margin: 1em;
}

p {
    margin: 2em 0;
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1em;
    font-size: 50%;
}

footer svg {
    margin: 0 .25em;
    fill: var(--color-secondary);
}

h1 span, h3 span {
    color: var(--color-secondary);
    margin-right: .5em;
}

h3 {
    display: inline;
    margin: 0;
}

mark {
    background-color: var(--color-secondary--light);
    padding: .5em;
}

.center {
    width: 50%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

@media screen and (max-width: 800px) {
    .center {
        width: 100%;
    }
}

.small {
    font-size: 70%;
}

.muted {
    color: var(--color-primary--light)
}

a {
    color: var(--color-primary);
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--color-secondary);
}

a:hover {
    cursor: pointer;
    color: var(--color-secondary);
    text-decoration-color: var(--color-primary);
}

.preview-wrapper {
    background-color: #efefef;
    width: 1200px;
    height: 800px;
    display: flex;
    position: relative;
    align-items: center;
    background-image: url('../media/preview.jpg');
    background-size: cover;
    background-position: center;
}

.standalone {
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
}

.standalone .wrapper {
     display: flex;
     align-items: center;
     justify-content: center;
}

.standalone footer {
    position: absolute;
    bottom: 0;
    opacity: 0.5;
    transition: opacity ease;
}

.standalone footer:hover {
    opacity: 1;
}

.preview-poem {
    width: 249px;
    height: 124px;
    position: absolute;
    top: 354px;
    left: 494px;
    overflow: hidden;
    margin: 0;
    font-size: 18px;
    line-height: 24px;
    padding: 2px;
    font-family: "Chakra Petch", sans-serif;
    box-sizing: border-box;
    transition: background-color ease;
}

.standalone-poem {
    margin: 0;
    font-size: 48px;
    line-height: 64px;
    padding: 2px;
    font-family: "Lexend", sans-serif;
}

.preview-clock {
    position: absolute;
    top: 466px;
    left: 726px;
    font-size: 7px;
    line-height: 10px;
    font-family: "Chakra Petch", sans-serif;
}

.standalone-clock {
    font-size: 12px;
    line-height: 10px;
    font-family: "Chakra Petch", sans-serif;
}

.preview-reload, .standalone-reload {
    position: absolute;
    bottom: 5px;
    left: 5px;
    width: 20px;
    height: 30px;
}

.standalone-reload {
    opacity: 0.5;
    bottom: 20px;
    left: 20px;
}

.preview-reload button, .standalone-reload button {
    border: none;
    background: transparent;
    margin: 0;
    padding: 0;
    width: 20px;
    height: 30px;
    transition: all .5s ease;
}

.preview-reload button:hover, .standalone-reload button:hover {
    cursor: pointer;
}

.preview-reload button.reload svg, .standalone-reload button.reload svg {
    animation-name: rotate;
    animation-duration: 1s;
}

@keyframes rotate {
    from {transform: rotate(0deg)}
    to {transform: rotate(360deg)}
}

@media screen and (max-width: 1200px) {
    section .preview-wrapper {
        margin-left: 50%;
        transform: translateX(-50%);
    }
    .standalone-poem {
        max-width: 90vw;
        box-sizing: border-box;
        font-size: 36px;
    }
    .standalone-reload {
        bottom: 40px;
    }
    footer {
        max-height: 2em;
    }
}

.hidden {
    display: none;
}

.refresh {
    animation: eInkAnimation .5s 2;
}

@keyframes eInkAnimation {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: var(--color-primary);
    }
}