css
/* =====================================================
   MOLLY SMART
   HOME / INDEX
   ===================================================== */


/* =====================================================
   RESET
   ===================================================== */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;

    background: #e9e4d8;
    color: #171717;

    font-family: Helvetica, Arial, sans-serif;
    font-weight: 400;
}

img {
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}


/* =====================================================
   MAIN PAGE
   ===================================================== */

.layout-container {
    width: 100%;
    max-width: 1350px;

    margin: 0 auto;
    padding: 0 24px;
}


/* =====================================================
   HEADER
   ===================================================== */

.site-header {
    min-height: 100px;

    display: grid;
    grid-template-columns: 2fr 1fr 1fr;

    align-items: end;

    padding: 25px 0 18px;

    border-bottom: 1px solid #171717;
}

.header-title h1 {
    margin: 0;

    font-family: Helvetica, Arial, sans-serif;

    font-size: 42px;
    line-height: 0.9;

    font-weight: 700;

    letter-spacing: -2.5px;
}

.header-subtitle {
    padding-bottom: 3px;

    font-size: 10px;
    line-height: 1;

    font-weight: 400;

    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.header-year {
    padding-bottom: 3px;

    text-align: right;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.6px;
}


/* =====================================================
   NAVIGATION
   ===================================================== */

.market-nav-bar {
    width: 100%;

    background: #e9e4d8;

    border-bottom: 1px solid #171717;
}

.market-nav-bar > ul {
    display: flex;

    align-items: stretch;
    justify-content: space-between;

    width: 100%;

    margin: 0;
    padding: 0;

    list-style: none;
}

.nav-item {
    position: relative;

    margin: 0;
    padding: 0;
}

.nav-item > a {
    display: block;

    padding: 13px 3px 12px;

    color: #171717;

    font-size: 10px;
    line-height: 1;

    font-weight: 500;

    text-transform: uppercase;
    letter-spacing: 0.4px;

    white-space: nowrap;
}

.nav-item > a:hover {
    font-weight: 700;
}

.nav-item > a span {
    margin-left: 3px;

    font-weight: 700;
}


/* =====================================================
   DROPDOWN MENUS
   ===================================================== */

.dropdown-menu {
    position: absolute;

    top: 100%;
    left: -10px;

    min-width: 120px;

    margin: 0;
    padding: 7px 0;

    list-style: none;

    background: #e9e4d8;

    border: 1px solid #171717;

    z-index: 1000;

    display: none;
}


/* Desktop hover */

@media screen and (min-width: 901px) {

    .has-dropdown:hover .dropdown-menu,
    .has-dropdown:focus-within .dropdown-menu {
        display: block;
    }

}


/* Mobile/tablet click */

@media screen and (max-width: 900px) {

    .has-dropdown.dropdown-open .dropdown-menu {
        display: block;
    }

}


.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu li a {
    display: block;

    padding: 8px 12px;

    font-size: 9px;

    font-weight: 400;

    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus-visible {
    background: #171717;
    color: #e9e4d8;

    font-weight: 700;
}


/* =====================================================
   ARTWORK GALLERY
   ===================================================== */

.gallery {
    --gallery-max-width: 1200px;

    --columns: 3;
    --gap: 24px;

    width: 100%;
    max-width: var(--gallery-max-width);

    margin: 40px auto 90px;
    padding: 0;

    display: grid;

    grid-template-columns:
        repeat(var(--columns), minmax(0, 1fr));

    gap: var(--gap);

    align-items: start;
}


/* =====================================================
   INDIVIDUAL IMAGE BOX
   ===================================================== */

.gallery-item {
    position: relative;

    width: 100%;

    min-width: 0;

    margin: 0;
    padding: 0;

    overflow: hidden;

    background: #ded9ce;

    cursor: pointer;
}


/* =====================================================
   IMAGE INSIDE BOX
   ===================================================== */

.gallery-image {
    display: block;

    width: 100%;
    height: auto;

    max-width: 100%;

    margin: 0;
    padding: 0;

    object-fit: contain;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}


/* =====================================================
   GALLERY HOVER
   ===================================================== */

.gallery-item:hover .gallery-image {
    opacity: 0.72;
}


/* Keyboard focus */

.gallery-image:focus-visible {
    outline: 2px solid #171717;
    outline-offset: 3px;
}


/* =====================================================
   MODAL
   ===================================================== */

.image-modal {
    position: fixed;

    inset: 0;

    width: 100vw;
    height: 100vh;

    padding: 40px 80px;

    background: rgba(20, 20, 20, 0.94);

    display: flex;

    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    z-index: 9999;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}


.image-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =====================================================
   MODAL IMAGE CONTAINER
   ===================================================== */

.modal-image-container {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    width: auto;
    max-width: 90vw;
    max-height: 88vh;
}


/* =====================================================
   MODAL IMAGE
   ===================================================== */

.modal-image-container img {
    display: block;

    width: auto;
    height: auto;

    max-width: 90vw;
    max-height: 82vh;

    margin: 0;
    padding: 0;

    object-fit: contain;
}


/* =====================================================
   MODAL BUTTONS
   ===================================================== */

.modal-close,
.modal-prev,
.modal-next {
    position: absolute;

    border: 0;
    padding: 0;

    background: transparent;

    color: white;

    font-family: Helvetica, Arial, sans-serif;

    cursor: pointer;

    z-index: 10000;
}

.modal-close {
    top: 20px;
    right: 28px;

    width: 40px;
    height: 40px;

    font-size: 38px;
    line-height: 1;

    font-weight: 300;
}

.modal-prev {
    left: 25px;
    top: 50%;

    width: 50px;
    height: 70px;

    transform: translateY(-50%);

    font-size: 55px;
    line-height: 1;

    font-weight: 300;
}

.modal-next {
    right: 25px;
    top: 50%;

    width: 50px;
    height: 70px;

    transform: translateY(-50%);

    font-size: 55px;
    line-height: 1;

    font-weight: 300;
}


.modal-close:hover,
.modal-prev:hover,
.modal-next:hover {
    opacity: 0.5;
}


/* Keyboard focus */

.modal-close:focus-visible,
.modal-prev:focus-visible,
.modal-next:focus-visible {
    outline: 1px solid white;
    outline-offset: 4px;
}


/* =====================================================
   MODAL COUNTER
   ===================================================== */

.modal-counter {
    position: absolute;

    left: 0;
    bottom: -28px;

    color: white;

    font-family: Helvetica, Arial, sans-serif;

    font-size: 9px;

    font-weight: 500;

    letter-spacing: 1px;

    text-transform: uppercase;

    white-space: nowrap;
}


/* =====================================================
   LOCK PAGE WHILE MODAL IS OPEN
   ===================================================== */

body.modal-open {
    overflow: hidden;
}


/* =====================================================
   FOOTER
   ===================================================== */

footer {
    display: flex;

    justify-content: space-between;

    padding: 15px 0 25px;

    border-top: 1px solid #171717;

    font-size: 8px;

    font-weight: 500;

    text-transform: uppercase;

    letter-spacing: 0.6px;
}


/* =====================================================
   TABLET
   ===================================================== */

@media screen and (max-width: 900px) {

    .layout-container {
        padding: 0 20px;
    }


    /* HEADER */

    .site-header {
        grid-template-columns: 2fr 1fr;
    }

    .header-subtitle {
        display: none;
    }


    /* NAVIGATION */

    .market-nav-bar > ul {
        justify-content: flex-start;

        gap: 20px;

        overflow-x: auto;

        scrollbar-width: none;
    }

    .market-nav-bar > ul::-webkit-scrollbar {
        display: none;
    }


    /* GALLERY */

    .gallery {
        --columns: 2;
        --gap: 18px;
    }


    /* MODAL */

    .image-modal {
        padding: 40px;
    }

    .modal-image-container img {
        max-width: 88vw;
        max-height: 82vh;
    }

}


/* =====================================================
   MOBILE
   ===================================================== */

@media screen and (max-width: 600px) {

    .layout-container {
        padding: 0 14px;
    }


    /* HEADER */

    .site-header {
        min-height: 75px;

        padding: 20px 0 14px;

        grid-template-columns: 1fr 1fr;
    }

    .header-title h1 {
        font-size: 28px;

        letter-spacing: -1.5px;
    }

    .header-year {
        font-size: 8px;
    }


    /* NAVIGATION */

    .market-nav-bar > ul {
        gap: 17px;

        justify-content: flex-start;

        overflow-x: auto;
    }

    .nav-item > a {
        padding: 11px 0;

        font-size: 8px;
    }


    /* DROPDOWN */

    .dropdown-menu {
        left: 0;

        min-width: 105px;
    }


    .dropdown-menu li a {
        padding: 8px 10px;

        font-size: 8px;
    }


    /* GALLERY */

    .gallery {
        --columns: 2;
        --gap: 10px;

        margin-top: 25px;
        margin-bottom: 60px;
    }


    /* MODAL */

    .image-modal {
        padding: 45px 15px;
    }

    .modal-image-container {
        max-width: 100%;
        max-height: 85vh;
    }

    .modal-image-container img {
        max-width: 92vw;
        max-height: 78vh;
    }


    /* MODAL BUTTONS */

    .modal-close {
        top: 12px;
        right: 15px;

        width: 35px;
        height: 35px;

        font-size: 32px;
    }

    .modal-prev {
        left: 5px;

        width: 40px;

        font-size: 42px;
    }

    .modal-next {
        right: 5px;

        width: 40px;

        font-size: 42px;
    }


    /* COUNTER */

    .modal-counter {
        bottom: -25px;

        font-size: 8px;
    }


    /* FOOTER */

    footer {
        display: block;

        padding: 14px 0 20px;

        line-height: 2;
    }

}


/* =====================================================
   REDUCE MOTION
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
   *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}
