@import "/src/css/reset.css";

:root {
    --title-font: "Chewy", system-ui;
    --brand-color: #993C2B;
    --secondary-color: #e37846;
}


body {
    background-color: #fff;
    color: #6b4077;
    font-family: "Comfortaa", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
}

* {
    box-sizing: border-box;
}

main {
    margin: 0 auto;
    max-width: 1024px;
    padding-inline: 1rem;
}

.site-header {
    background: #fff;
    padding: 2.5rem 2.5rem .5rem;
}

@media screen and (max-width: 670px) {
    .site-header {
        padding: 1rem;
    }
}

.about {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

@media screen and (max-width: 670px) {
    .about {
        gap: 1rem;
    }
}

.description {
    color: var(--secondary-color);
    font-family: var(--title-font);
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 400;
}

@media screen and (max-width: 670px) {
    .description {
        font-size: 1.8rem;
    }
}

.navigation {
    margin-top: 1.75rem;

    & ul {
        column-gap: 3rem;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 1rem;
    }

    & a {
        color: #452248;
        text-decoration: none;

        &:hover,
        &:focus {
            color: #452248;
            text-decoration: underline;
        }

        &.active {
            color: rgb(137, 22, 102);
        }
    }
}

.navigation li:not(:last-of-type) {
    margin-bottom: .7rem;
}

@media (min-width: 84px) {}

.social {
    display: flex;
    gap: 1.8rem;
    justify-content: start;

    & a {
        font-size: 2rem;
        color: #fff;
        text-decoration: none;

        &:hover,
        &:focus {
            color: #ffbaf8;
        }
    }
}

@media screen and (max-width: 670px) {
    .social {
        justify-content: center;
    }

    .social a {
        font-size: 1.3rem;
    }
}

.photo {
    border-radius: 100%;
    height: 160px;
    width: 160px;
}

@media screen and (max-width: 670px) {
    .photo {
        height: 70px;
        width: 70px;
    }
}

.portfolio {
    -moz-column-count: 4;
    -webkit-column-count: 4;
    column-count: 4;
    column-gap: 6px;
    page-break-inside: avoid;
    break-inside: avoid-column;

    & a {
        break-inside: avoid-column;
        display: block;
    }

    & picture {
        display: block;
    }

    & img {
        max-width: 100%;
        height: auto;
    }
}

@media screen and (max-width: 670px) {
    .portfolio {
        -moz-column-count: 3;
        -webkit-column-count: 3;
        column-count: 3;
    }
}

@media screen and (max-width: 470px) {
    .portfolio {
        -moz-column-count: 2;
        -webkit-column-count: 2;
        column-count: 2;
    }
}

p {
    line-height: 1.5;
    max-width: 75ch;

    &:not(:last-child) {
        margin-bottom: 1.5rem;
    }
}

strong {
    font-weight: 700;
}

.list {
    list-style: disc;
    margin-bottom: 2rem;
    margin-left: 1.5rem;

    & li {
        margin-bottom: .5rem;
        max-width: 74ch;
    }
}

.link {
    color: #8c268e;
    text-decoration: underline;

    &:hover,
    &:focus {
        text-decoration: none;
    }
}

.subtitle {
    font-family: var(--title-font);
    font-size: 1.85rem;
    margin-bottom: 1.5rem;

    &.has-margin {
        margin-top: 2rem;
    }
}

.category-title {
    align-items: center;
    cursor: pointer;
    display: flex;
    font-size: 1.4rem;
    line-height: 1.2;
    margin-bottom: .5rem;
    margin-top: 1.5rem;

    &::after {
        background-image: url("/src/images/arrow.svg");
        background-size: contain;
        content: '';
        height: 8px;
        margin-left: .5em;
        transition: 0.2s;
        transform: rotate(-90deg);
        width: 15px;
    }

}

details[open]>summary::after {
    transform: rotate(0);
}

.site-footer {
    background-color: #8b64b3;
    color: #fff;
    margin-top: 4rem;
    padding: 2.5rem 2.5rem 1.5rem;
    text-align: center;

    & p {
        font-size: .8rem;
        margin-top: 4rem;
        max-width: none;
    }
}

.footer-content {
    margin: 0 auto;
    max-width: 1024px;
}

@media screen and (min-width: 671px) {
    .footer-content {
        align-items: center;
        display: flex;
        justify-content: space-between;
    }
}

.footer-links {
    text-align: start;

    & h3 {
        font-weight: 900;
        margin-bottom: .5rem;
    }

    & a {
        color: #fff;
        text-decoration: underline;

        &:hover,
        &:focus {
            color: #ffbaf8;
            text-decoration: none;
        }
    }
}

@media screen and (max-width: 670px) {
    .footer-links {
        margin-bottom: 2rem;
        text-align: center;
    }
}

/* ABOUT */

.collage {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;

    & li {
        flex: 1 1 calc(100%/4);
    }

    & img {
        display: block;
        max-width: 100%;
    }
}

@media (max-width: 489px) {
    .collage li {
        flex: 1 1 100%;
    }
}

@media (min-width: 490px) and (max-width: 839px) {
    .collage li {
        flex: 1 1 calc(100%/3);
    }
}

.image-description {
    font-size: .8rem;
    margin-top: 4px;
}

/* CONTACT */

.contact-form {
    margin-top: 2rem;
}

.form-row {
    margin-bottom: 2rem;

    & .info {
        display: block;
        font-size: .8rem;
        margin-top: .4rem;

    }

    & label {
        display: block;
        font-weight: 500;
        margin-bottom: .5rem;
    }

    & input {
        background-color: #f9f4ff;
        border: 1px solid #8b64b3;
        border-radius: 4px;
        font-family: var(--primary-font);
        font-size: 1rem;
        padding: .5rem;
        width: 250px;
    }

    & textarea {
        background-color: #f9f4ff;
        border: 1px solid #B6ACA5;
        border-radius: 4px;
        font-family: var(--primary-font);
        font-size: 1rem;
        height: 200px;
        padding: .5rem;
        width: 250px;
    }
}

@media screen and (min-width: 550px) {
    .form-row {

        & input,
        & textarea {
            width: 500px;
        }
    }
}

.submit {
    background-color: #8b64b3;
    border: 0 none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: block;
    font-family: "Comfortaa", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 1rem 1.2rem;


    &:hover,
    &:focus {
        background-color: #6e4b91;
    }
}

/* Lightbox styles */
.lightbox {
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    left: 0;
    position: fixed;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: 20;
    animation: fadeIn 0.3s;
}

.lightbox.visible {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}