@font-face {
    font-family: "Onest";
    src: url("onest.woff2") format("woff2");
    font-weight: 300 800;
}

:root {
    --em-size: 16px;
    --font-stack: "Onest", system-ui, sans-serif;
    --bounce: cubic-bezier(0, 1.5, 0.5, 1);
}

:root {
    --paper: white;
    --ink: #242424;
    --faded: darkGray;
    --button-ink: oklch(30% 30% 62);
    --accent: oklch(80% 35% 62);
    --hover: oklch(75% 45% 62);
    --press: oklch(70% 55% 62);
}

* {
    padding: 0;
    margin: 0;
    border: none;
    box-sizing: border-box;
}

html,
body {
    position: absolute;
    height: 100vh;
    width: 100vw;
    background-color: var(--ink);
    font-size: var(--em-size);
    color: var(--ink);
    overflow: hidden;
}

#background {
    position: absolute;
    height: 100vh;
    width: 100vw;
    min-height: 30rem;
}

.book-illustration {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: 50% 90%;
    transition:
        opacity 1s linear,
        scale 8s ease-out;
}

main {
    padding: 6rem max(8vw, 2rem);
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    z-index: 99;
    min-height: 40rem;
    background-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0) 60%,
        rgba(0, 0, 0, 0) 100%
    );
}

h1 {
    font-family: var(--font-stack);
    font-size: max(6vw, 2.6rem);
    color: var(--paper);
    letter-spacing: -2%;
    font-weight: 900;
    line-height: 0.95;
    text-align: center;
    text-wrap: balance;
    text-shadow: 0px 0px 30px rgba(0, 0, 0, 0.15);
}

form {
    display: flex;
    flex-flow: row nowrap;
    overflow: visible;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.25);
    gap: 0.25rem;
    border-radius: 1.25rem;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
}

.control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-decoration: none;
    display: block;
    height: 100%;
    font-family: var(--font-stack);
    font-size: 1rem;
    color: var(--ink);
    line-height: 1;
    padding: 0.75rem 1rem;
    white-space: nowrap;
    cursor: pointer;
    background-color: var(--color-background);
    color: var(--color-text);
}

.control::placeholder {
    color: var(--faded);
}

.input {
    --color-background: var(--paper);
    --color-border: var(--border);
    --color-text: var(--ink);
    font-weight: 500;
    border-radius: 0.75rem 0.15rem 0.15rem 0.75rem;
}

.button {
    --color-text: var(--button-ink);
    --color-background: var(--accent);
    font-weight: 700;
    border-radius: 0.15rem 0.75rem 0.75rem 0.15rem;
}

.button:hover {
    --color-background: var(--hover);
}

.button:active {
    --color-background: var(--press);
}

@media only screen and (max-width: 42rem) {
    form {
        flex-flow: column nowrap;
    }

    .input {
        border-radius: 0.75rem 0.75rem 0.15rem 0.15rem;
    }

    .button {
        border-radius: 0.15rem 0.15rem 0.75rem 0.75rem;
    }
}

a.logoContainer {
    display: block;
    width: 100%;
    max-width: max(10vw, 7rem);
}

.logo {
    display: block;
    width: 100%;
}
