@import url("./fonts/fonts.css");

:root {
    --font-sans-medium: "seabirds_medium";
    --font-sans-reg: "seabirds_regular";
    --font-serif-reg: "louize_regular";
    --font-serif-italic: "louize_italic";
    --color-cotton: #fff;
    --color-lilac: #f0eef1;
    --color-dove: #d2dada;
    --color-mauve: #baa7b9;
    --color-lavender: #f0e0f4;
    --color-dusk: #3e3842;
    --color-heather: #806d8b;

    font-family: var(--font-sans-reg), sans-serif;
    background-color: var(--color-lilac);
    color: var(--color-dusk);
}

body {
    margin: 0;
    scroll-behavior: smooth;
}

main {
    min-height: 100vh;
}

header {
    display: flex;
    flex-direction: row;
    justify-content: between;
    align-items: center;
    padding: 0.75rem;
}

footer {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    gap: 1.5rem;
    border-top: 1px solid var(--color-mauve);

    div {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

.desktop-nav {
    display: none;
}

.top-options {
    display: flex;
    flex-direction: row;
    justify-content: between;
    align-items: center;
}

.top-nav {
    background-color: var(--color-dusk);
    color: var(--color-lilac);
    position: fixed;
    inset: 0;
    height: fit-content;
    transform: translateY(-100%);
    transition: transform 250ms ease-out;
    padding: 1.25rem 0.75rem 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;

    a {
        font-size: 1.125rem;
    }

    hr {
        width: 100%;
        border: 1px solid var(--color-dove);
    }
}

.opened {
    transform: translateY(0%);
}

.site {
    font-size: 1.25rem;
    text-decoration: none;
    color: inherit;
}

.menu-btn {
    border: none;
    margin-left: auto;
    cursor: pointer;
    padding: 0;
    background-color: transparent;
}

.menu-btn .list {
    width: 25px;
    height: 2px;
    margin: 6px 0;
    background-color: var(--menu-btn-bg-color, var(--color-dusk));
}

.menu-btn--on-dark .list {
    --menu-btn-bg-color: var(--color-lilac);
}

.menu-btn--on-light .list {
    --menu-btn-bg-color: var(--color-dusk);
}

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

.reader-link {
    color: var(--color-heather);
    font-family: var(--font-sans-medium);
}

.reader-avatar {
    border-radius: 100%;
    height: 200px;
    width: 200px;
    object-fit: cover;
}

.reader-palette {
    display: flex;
    flex-direction: row;
    padding-bottom: 1rem;
    div {
        width: 50px;
        height: 30px;
        cursor: pointer;
    }

    :first-child {
        border-radius: 4px 0 0 4px;
    }

    :last-child {
        border-radius: 0 4px 4px 0;
    }
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

h1,
h2 {
    font-family: var(--font-serif-reg);
    font-weight: normal;
}

h3,
h4 {
    font-family: var(--font-sans-medium);
    font-weight: normal;
}

h1,
h2,
h3,
h4 {
    margin: 0;
}

section {
    padding: 0.75rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem;
}

.info-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-card > :nth-child(2) {
    padding-top: 1rem;
}

#how-it-works,
#reader-details,
#reader-stats {
    margin: 3rem 0;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding-top: 0;
}

#reader-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 3rem 0;
}

#reader-details {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
    margin: 3rem 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.stat-grid-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-item-value {
    font-size: 2rem;
}

.stat-value-units {
    padding-left: 0.5rem;
    font-size: 1rem;
}

.book-gallery {
    display: flex;
    flex-direction: row;
    overflow-x: scroll;
    gap: 0.75rem;

    a {
        padding-top: 0.75rem;
    }
}

.shelves {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.25rem;
    padding-bottom: 1rem;
}

ul {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    max-height: 250px;
    overflow-y: scroll;
    border-bottom: 1px solid var(--color-mauve);
    padding-bottom: 1rem;
    gap: 0.5rem;
}

.book {
    width: 50px;
    height: 70px;
    background-color: var(--color-dusk);
}

.submit-div {
    background-color: var(--color-dusk);
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    input {
        background: none;
        border: none;
        color: var(--color-dove);
        font-family: var(--font-sans-reg);
        font-size: 1rem;
        width: 100%;
    }

    input:focus {
        outline: none;
    }

    input:placeholder {
        color: var(--color-mauve);
        opacity: 80%;
    }

    button {
        background-color: var(--color-lilac);
        border: none;
        height: 35px;
        width: 35px;
        border-radius: 4px;
        cursor: pointer;
    }
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 4rem;
}

.hero--reader {
    gap: 1rem;
}

.emphasis {
    font-family: var(--font-serif-italic);
    color: var(--color-heather);
}

@media (min-width: 600px) {
    .menu-btn,
    .top-nav {
        display: none;
    }

    .desktop-nav {
        display: flex;
        flex-direction: row;
        gap: 2rem;
        margin-left: auto;
    }

    .reader-palette {
        padding-bottom: 0;
        div {
            width: 40px;
            height: 60px;
        }
    }

    .reader-avatar {
        width: 100px;
        height: 100px;
    }

    #reader-gr-url {
        display: inline-block;
    }

    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    header,
    footer,
    form,
    section {
        padding: 2rem;
    }

    footer {
        div {
            flex-direction: row;
            align-items: center;
            justify-content: space-between;

            div {
                gap: 2rem;
            }
        }
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 3.5rem;
    }

    form {
        width: 500px;
        margin: 0 auto;
        padding: 0;
    }

    header,
    footer {
        max-width: 80%;
        margin: auto;
    }

    #how-it-works,
    #reader-details,
    #reader-stats {
        max-width: 80%;
        margin: 6rem auto;
    }

    #how-it-works {
        gap: 4rem;
    }

    .stat-item-value {
        font-size: 3rem;
    }

    #shelf-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #reading {
        width: 80%;
    }

    .reader-avatar {
        width: 200px;
        height: 200px;
    }

    footer {
        p {
            max-width: 50%;
        }
    }
}

@media (min-width: 1440px) {
    header,
    footer,
    #how-it-works,
    #reader-details,
    #reader-stats {
        max-width: 60%;
    }

    #reading {
        width: 60%;
    }

    footer {
        p {
            max-width: 100%;
        }
    }
}

.background-effects {
    position: absolute;
    inset: 0;
    overflow-x: hidden;
    pointer-events: none;
    z-index: -1;
}

.texture {
    background: url("./images/texture.png") repeat;
    width: 100vw;
    height: 100%;
    position: fixed;
    inset: 0;
    opacity: 0.05;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.blob {
    width: 180vw;
    height: 2000px;
    left: -40vw;
    border-radius: 100%;
    z-index: -2;
    filter: blur(63.25px);
}

.blob--top {
    background-color: var(--color-mauve);
    position: absolute;
    top: -1900px;
}

.blob--bottom {
    background-color: var(--color-lavender);
    position: fixed;
    bottom: -1900px;
}
