/* =====================================================
   GLOBAL
===================================================== */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: #191919;
    color: rgba(255, 255, 255, 0.6);

    font-family: owners, sans-serif;
    font-weight: 300;
    font-style: normal;
    letter-spacing: 0.08em;
}

section {
    padding: 0;
}

h1 {
    margin: 0 0 20px;

    font-family: owners, sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 15px;
}

h2 {
    margin: 0 0 5px;

    font-size: 15px;
    font-weight: 300;
}

h3 {
    width: 100%;
    margin: 2px 0 0;

    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 300;
    text-align: left;
}

a {
    color: inherit;
}


/* =====================================================
   PRIMARY PAGE LAYOUT
===================================================== */

#site {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    min-height: 100vh;
}

.desktop-nav {
    position: sticky;
    top: 0;
    align-self: start;

    height: 100vh;
    box-sizing: border-box;
    padding: 30px;

    overflow-y: auto;
}

.project-area {
    min-width: 0;
    padding: 15px;
}


/* =====================================================
   MAIN NAVIGATION
===================================================== */

.site-heading {
    position: relative;
}

ul#menu-main-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

ul#menu-main-nav li a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    text-decoration: none;
}

nav.project-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav.project-nav ul li {
    margin-bottom: 5px;
    opacity: 0.8;
}

nav.project-nav ul li span {
    font-weight: 300;
}

nav.project-nav ul li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    text-decoration: none;

    transition: color 0.2s ease;
}

nav.project-nav ul li a:hover,
nav.project-nav ul li a:focus {
    color: rgba(255, 255, 255, 1);
}

nav.project-nav ul li a.active {
    color: #93f473;
}


/* =====================================================
   PROJECTS — DEFAULT / REGULAR DESKTOP
   NAV | GALLERY
         DESCRIPTION
===================================================== */

.project {
    display: flex;
    flex-direction: column;

    min-height: 100vh;
    box-sizing: border-box;
    padding: 30px;
    margin-bottom: 50px;

    scroll-margin-top: 30px;
}

.project-gallery {
    order: 1;
    width: 100%;
    min-width: 0;
}

.project-info {
    order: 2;

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 30px;

    width: min(100%, calc(70vh * 0.75));
    min-height: 160px;
    box-sizing: border-box;

    margin: 0 auto;
    padding-top: 30px;
}

.project-heading {
    min-width: 0;
}

.project-client {
    display: block;
}

.project-credits {
    min-width: 0;
}

.project-credits p {
    margin-top: 0;
    font-size: 14px;
}


/* =====================================================
   CAROUSEL
===================================================== */

.project .carousel {
    width: min(100%, calc(70vh * 0.75));
    max-height: 70vh;
    aspect-ratio: 3 / 4;

    margin: 0 auto;
}

.project .carousel-inner,
.project .carousel-item {
    width: 100%;
    height: 100%;
}

.project .carousel-item img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.carousel-control-prev,
.carousel-control-next {
    background-image: none;
}

/* Hide carousel arrows by default */
.project .carousel-control-prev,
.project .carousel-control-next {
    opacity: 0;
    pointer-events: none;

    transition: opacity 0.3s ease;
}

/* Show carousel arrows on hover */
.project .carousel:hover .carousel-control-prev,
.project .carousel:hover .carousel-control-next,
.project .carousel:focus-within .carousel-control-prev,
.project .carousel:focus-within .carousel-control-next {
    opacity: 1;
    pointer-events: auto;
}


/* =====================================================
   VIDEO
===================================================== */

.video-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
}

.video-wrapper iframe {
    width: 100%;
    aspect-ratio: 16 / 9;

    border: 0;
}


/* =====================================================
   VERY WIDE SCREENS
   NAV | DESCRIPTION | GALLERY
===================================================== */

@media (min-width: 1400px) {

    #site {
        grid-template-columns:
            minmax(280px, 36vw)
            minmax(0, 1fr);
    }

    .project {
        display: grid;
        grid-template-columns:
            minmax(230px, 320px)
            minmax(0, 1fr);

        gap: 50px;
        align-items: start;
    }

    .project-info {
        grid-column: 1;
        grid-row: 1;
        order: initial;

        display: block;

        width: 100%;
        min-height: 0;

        margin: 0;
        padding-top: 0;
    }

    .project-heading {
        margin-bottom: 20px;
    }

    .project-gallery {
        grid-column: 2;
        grid-row: 1;
        order: initial;
    }

    .project .carousel {
        margin: 0 auto;
    }

    .project-credits p {
        margin-bottom: 0;
    }
}


/* =====================================================
   TABLET / SMALL DESKTOP
===================================================== */

@media (min-width: 768px) and (max-width: 1399.98px) {

    #site {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .project {
        padding: 30px 15px;
    }
}


/* =====================================================
   MOBILE
   GALLERY
   DESCRIPTION
===================================================== */

#mobile-nav {
    display: none;
}

@media (max-width: 767.98px) {

    #site {
        display: block;
    }

    .desktop-nav {
        position: relative;
        top: auto;
        left: auto;

        width: 100%;
        height: auto;
        box-sizing: border-box;

        padding: 15px;
        overflow: visible;
    }

    .site-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .site-heading h1 {
        margin-bottom: 0;
    }

    #mobile-nav {
        display: block;
        position: static;

        padding: 0;
        border: 0;
        background: transparent;

        color: rgba(255, 255, 255, 0.8);
        font-size: 30px;
        line-height: 1;
        cursor: pointer;
    }

    .nav-content {
        display: none;
        padding-top: 20px;
    }

    .nav-content.is-open {
        display: block;
    }

    .project-area {
        position: static;
        width: 100%;
        box-sizing: border-box;
        padding: 0;
    }

    .project {
        min-height: auto;
        padding: 15px;
        margin-bottom: 60px;
    }

    .project .carousel {
        width: 100%;
        max-height: none;
    }

    .project-info {
        grid-template-columns: 1fr;
        gap: 15px;

        width: 100%;
        min-height: 0;

        padding-top: 20px;
    }

    .project-heading {
        margin-bottom: 0;
    }

    .project-credits p {
        margin-bottom: 0;
    }

    /*
     * Touch devices do not have a true hover state,
     * so keep the carousel controls visible.
     */
    .project .carousel-control-prev,
    .project .carousel-control-next {
        opacity: 1;
        pointer-events: auto;
    }
}