/* ====== VARIABLES ====== */
:root {
    --color-primary: #5A6FAE;
    --color-secondary: #AAB8D4;
    --color-black: #000831;
    --color-white: #F9FAFF;
    --color-grey: #E8E9ED;
}

/* ======= INDEX ======== */
* {
    line-height: 1.5;
}

html,
body {
    padding: 0;
    margin: 0;
    font-family: "futura-pt", sans-serif;
    background-color: var(--color-white);
}

img {
    width: 100%;
    height: auto;
    display: block;
    z-index: 1;
}

body {
    margin: auto;
    transition: opacity 0.3s ease;
}

.index-body::before,
.detail-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    pointer-events: none;
    animation: fadeIn 0.3s both;
}

body.entry-replay::before {
    animation: fadeIn 0.3s both !important;
}

body.fadeout::before {
    animation: fadeOut .3s both;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul li {
    white-space: nowrap;
}

a {
    text-decoration: none;
    color: var(--color-black);
    font-size: 24px;
}

h1 {
    font-size: 48px;
    font-weight: 450;
    color: var(--color-primary);
}

h2 {
    font-size: 32px;
    font-weight: 450;

    @media screen and (min-width: 700px) {
        font-size: 40px;
    }
}

h3 {
    font-size: 28px;
    font-weight: 450;
}

h4 {
    font-size: 24px;
    font-weight: 450;
    margin: 0;
}

p {
    font-size: 20px;
}

.nav-background {
    background-color: var(--color-primary);
    z-index: 100;
    width: 100%;
}


.nav-container {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 90%;
    margin: 0 auto;

    @media screen and (min-width: 700px) {
        padding: 16px 64px;

    }
}

.nav-container nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    z-index: 100;
    pointer-events: none;
    transition: right 0.5s ease-out, opacity 0.5s ease-out;

    @media screen and (min-width: 700px) {
        display: flex;
        position: static;
        opacity: 1;
        background-color: transparent;
        width: fit-content;
        pointer-events: auto;
        justify-content: center;
        max-width: 1024px;
    }

}

.nav-container ul {
    padding: 24px 20px;
    position: relative;
    top: 40px;

    @media screen and (min-width: 700px) {
        display: flex;
        gap: 48px;
        position: static;
        padding: 0;
    }

}

.nav-container ul li:first-child {
    margin-bottom: 48px;

    @media screen and (min-width: 700px) {
        margin: 0;
    }

}

.nav-container ul a {
    color: var(--color-primary);
    transition: color 0.3s ease-in-out;

    @media screen and (min-width:700px) {
        color: var(--color-white);
    }
}

.nav-container ul a:hover {
    @media screen and (min-width:1024px) {
        color: var(--color-secondary);
    }
}

.nav-container nav.is-open {
    background-color: var(--color-white);
    right: 0;
    opacity: 1;
    pointer-events: auto;
    text-align: center;
}


.menu-open {
    width: 16px;

    @media screen and (min-width: 700px) {
        display: none;
    }
}

.close-menu {
    width: 16px;
    position: absolute;
    top: 20px;
    right: 20px;

    @media screen and (min-width: 700px) {
        display: none;
    }
}

img.logo {
    height: 24px;
    width: fit-content;
}

.heading {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.heading p {
    width: 100%;
}

p.hero-description {
    font-size: 20px;
    margin: 0;

    @media screen and (min-width: 700px) {
        font-size: 32px;
    }
}

.social-icons-container {
    display: flex;
    gap: 16px;
    align-items: center;
}

.social-icons-container a {
    font-size: initial;
    transition: color 0.3s ease-in-out;
}

.social-icons-container a:hover {
    @media screen and (min-width: 1024px) {
        color: var(--color-primary);
    }
}

.social-icon {
    width: 20px;
}

.logo-heading-container {
    max-width: 540px;
    flex-basis: 100%;
}

.logo-heading {
    height: 40px;

    @media screen and (min-width: 700px) {
        height: 67px;
    }

}

div.heading,
section {
    padding: 48px 20px;

    @media screen and (min-width: 700px) {
        padding: 80px 48px;
    }

    @media screen and (min-width: 1024px) {
        padding: 80px 160px;
    }
}

section:nth-child(2) {
    padding-bottom: 0;
}

section {
    position: relative;
}

section h2 {
    text-align: center;
    width: 100%;
    margin: 0 0 24px 0;

    @media screen and (min-width: 700px) {
        margin: 0 0 48px 0;

    }

}

section#about {
    background-color: var(--color-secondary);

}

section#about h2 {
    margin-bottom: 24px;

    @media screen and (min-width: 700px) {
        margin-bottom: 48px;

    }
}

section#about .about-wrapper {
    display: grid;
    justify-content: center;
    align-items: center;
    justify-items: center;
    max-width: 1120px;
    margin: 0 auto;

    @media screen and (min-width: 700px) {
        grid-template-columns: minmax(220px, 30%) auto;
        column-gap: 6%;
        row-gap: 24px;
    }
}

section#about img {
    width: 50%;
    margin-bottom: 24px;


    @media screen and (min-width: 700px) {
        width: 100%;
        margin: 0;
    }
}

section#about .about-description-container {
    display: grid;
    gap: 12px;
}

section#about .about-description-container h3,
section#about .about-description-container p {
    margin: 0;
}


section#works {
    background-color: var(--color-grey);
}

section#works .work-item-wrapper {
    display: flex;
    flex-wrap: wrap;
    row-gap: 24px;
    column-gap: 16px;
    width: 100%;

    @media screen and (min-width: 700px) {
        row-gap: 48px;
        max-width: 1120px;
        margin: 0 auto;
    }
}

section#works .work-item {
    display: grid;
    grid-template-rows: auto auto;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    gap: 8px;
    width: 100%;

    @media screen and (min-width: 700px) {
        width: calc((100% - 16px)/2);
        padding: .3rem 0 1rem 0;
        gap: 16px;
    }

    @media screen and (min-width: 1024px) {
        width: calc((100% - 16px*2)/3);
    }
}


section#works .work-item.visible {
    opacity: 1;
    transform: translateY(0);
}

section#works .work-item .work-item-description h4 {
    margin: 0;
    transition: color 0.3s ease-in-out;

    @media screen and (min-width:1024px) {
        margin: 0 0 4px 0;
    }

}

section#works .work-item h4:hover {
    @media screen and (min-width:1024px) {
        color: var(--color-primary);
    }
}

section#works .work-item .work-item-description p {
    margin: 4px 0 0 0;

    @media screen and (min-width: 700px) {
        margin: 8px 0 0 0;

    }

}

section#works .work-item .work-item-description .detail {
    margin: 0;
    font-size: 14px;

    @media screen and (min-width: 700px) {
        margin: 0;
    }
}

.main-to-top-container {
    padding: 24px 0 48px 0;
    background-color: var(--color-grey);

    @media screen and (min-width: 700px) {
        padding: 48px 0 80px 0;
    }
}

.main-to-top {
    color: var(--color-primary);
    font-size: 14px;
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;

}

.main-to-top img {
    height: 14px;
    width: auto;
}

footer {
    padding: 8px 20px;
    background-color: var(--color-secondary);
    text-align: center;
}

footer p {
    font-size: 14px;
    padding: 0;
    margin: 0;
}


/*  ========== DETAIL ============ */

.detail-body {
    background-color: var(--color-grey);
    scroll-behavior: auto;
}

.detail-main {
    padding: 48px 20px;

    @media screen and (min-width: 700px) {
        padding: 80px 48px;
    }

    @media screen and (min-width: 1024px) {
        padding: 80px 160px;
        max-width: 1120px;
        margin: 0 auto;
    }
}

.detail-main #detail-top {
    position: absolute;
    left: 0;
    top: -64px;
    right: 0;
    height: 1px;
}

.detail-main h2 {
    text-align: center;
    margin: 64px 0 24px 0;
}

.detail-main .detail-top-img {
    margin: 24px auto;
    max-width: 740px;

}

.detail-main .detail-overview {
    max-width: 740px;
    margin: 48px auto;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;

}

.detail-main .detail-navigate-button {
    background-color: var(--color-primary);
    border: 2px solid var(--color-primary);
    color: var(--color-white);
    padding: 0px 24px;
    width: fit-content;
    height: 40px;
    display: flex;
    align-items: center;
    min-width: 120px;
    border-radius: 80px;
    font-size: 20px;
    font-family: "futura-pt", sans-serif;
    margin: 16px auto 0 auto;
    transition: all 0.3s ease;
}

.detail-main .detail-navigate-button:hover {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    background-color: var(--color-white);
}

.detail-main h3 {
    text-align: center;
    margin: 0;
}

.detail-main .detail-overview div {
    padding: 16px 0;
}

.detail-main .detail-overview p {
    margin: 0;
}

.detail-main .detail-details {
    margin: 24px 0 0 0;
    opacity: 0;
    display: grid;
    gap: 8px;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;

    @media screen and (min-width: 700px) {
        grid-template-columns: repeat(2, 1fr);
        gap: 48px;
        margin: 32px 0 0 0;
        align-items: center;
        text-align-last: left;
        justify-content: center;

    }
}

.detail-main .detail-details.visible,
.detail-main .detail-overview.visible {
    opacity: 1;
    transform: translateY(0);
}

.detail-details h3 {
    margin: 8px 0 4px 0;

    @media screen and (min-width: 700px) {}
}

.detail-details p {
    margin: 0;
}

.detail-details:nth-child(even) div {
    @media screen and (min-width: 700px) {
        grid-column: 1/2;
        grid-row: 1/-1;
    }
}

.detail-details:nth-child(even) img {
    @media screen and (min-width: 700px) {
        grid-column: 2/-1;
    }
}

.detail-details.detail-details-coffee-img img {
    grid-column: 1/-1;
}

.detail-to-top {
    color: var(--color-primary);
    font-size: 14px;
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    margin: 24px 0 0 0;

    @media screen and (min-width: 700px) {
        margin: 48px 0 0 0;
    }
}

.detail-to-top img {
    height: 14px;
    width: auto;
}


/*  ========== ANIMATION ============ */

@keyframes fadeIn {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}