* {
    box-sizing: border-box;
}

body {
    color: whitesmoke;
    background-color: black;
    border: 2px solid whitesmoke;
    padding: 20px;
    font-family: 'Amatic SC';
    font-size: 1.7rem;
}

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


/*==============================================================
    ADMIN BUTTON
==============================================================*/

.admin-button {
    position: fixed;
    top: 42px;
    left: 18px;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: black;

    box-shadow: 0 1px 4px white;

    transition: .2s;
}

.admin-button.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.admin-button:hover {
    transform: scale(1.08);
}

.admin-button img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}


/*==============================================================
    MODAL
==============================================================*/

#modal {
    position: fixed;
    inset: 0;

    background: black;

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    pointer-events: none;

    transition: opacity .4s ease;

    z-index: 999;
}

#modal.active {
    opacity: 1;
    pointer-events: auto;
}

#modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
    max-height: 94vh;

    gap: 7px;
}

#modal-img {
    max-width: 90vw;
    max-height: 90vh;

    transform: scale(.96);
    opacity: 0;

    transition:
       
        
        opacity .4s ease 0s,
        transform .4s ease 0s,
        max-height 2.5s ease 1.5s;
}

#modal.active #modal-img {
    max-height: 78vh;

    transform: scale(1);
    opacity: 1;
}

#modal-title,
#modal-description,
#modal-details {
    opacity: 0;
    max-height: 0;
    overflow: hidden;

    transform: translateY(8px);

    margin: 0;

    transition:
        
        opacity 1.5s ease 1.5s,
        transform 1.5s ease 1.5s,
        max-height 2.5s ease 1.5s;

    font-weight: normal;
    line-height: .8;
    font-size: .7em
}

#modal.active #modal-title {
    max-height: 2.2em;

    opacity: 1;
    transform: translateY(0);

}

#modal.active #modal-description {
    max-height: 90px;

    opacity: 1;
    transform: translateY(0);
}

#modal.active #modal-details {
    max-height: 1.6em;

    opacity: 1;
    transform: translateY(0);
}

#modal-description {
    position: relative;

    width: min(80vw, 900px);

    color: white;

    overflow-y: auto;
    overscroll-behavior: contain;

    padding-right: 8px;
    padding-bottom: 16px;

    font-size: 1rem;
    line-height: 1.2;
    text-align: center;

    mask-image:
        linear-gradient(
            to bottom,
            black 0%,
            black 72%,
            transparent 100%
        );

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            black 0%,
            black 72%,
            transparent 100%
        );

    scrollbar-width: none;
}

#modal-description::-webkit-scrollbar {
    display: none;
}


/*==============================================================

    PORTRAIT MODAL LAYOUT

==============================================================*/

#modal-content.portrait-layout {
    display: grid;
    grid-template-columns: auto minmax(220px, min(28vw, 420px));
    grid-template-rows: auto auto auto;

    width: min(94vw, 1500px);

    column-gap: 24px;
    row-gap: 7px;

    justify-content: center;
    align-items: center;
}

#modal-content.portrait-layout #modal-img {
    grid-column: 1;
    grid-row: 1 / 4;

    max-width: 62vw;
    max-height: 90vh;
}

#modal.active #modal-content.portrait-layout #modal-img {
    max-width: 58vw;
    max-height: 88vh;
}

#modal-content.portrait-layout #modal-title {
    grid-column: 2;
    grid-row: 1;

    align-self: end;

    width: 100%;
    text-align: left;
}

#modal-content.portrait-layout #modal-description {
    grid-column: 2;
    grid-row: 2;

    width: 100%;
    max-width: none;

    text-align: left;
}

#modal-content.portrait-layout #modal-details {
    grid-column: 2;
    grid-row: 3;

    align-self: start;

    width: 100%;
    text-align: left;
}

@media (max-width: 767px) {

    #modal-content.portrait-layout {
        display: flex;
        flex-direction: column;

        width: 100%;
        gap: 7px;
    }

    #modal-content.portrait-layout #modal-img,
    #modal.active #modal-content.portrait-layout #modal-img {
        max-width: 94vw;
        max-height: 70vh;
    }

    #modal-content.portrait-layout #modal-title,
    #modal-content.portrait-layout #modal-description,
    #modal-content.portrait-layout #modal-details {
        width: 90%;
        text-align: center;
    }

}


/*==============================================================
    IMAGE EFFECTS
==============================================================*/

.zoom {
    transition: transform .5s ease;
}

.zoom:hover {
    transform: scale(1.08);
}

.fade-in {
    opacity: 0;
    transition: opacity .8s ease;
}

.fade-in.is-visable {
    opacity: 1;
}


/*==============================================================
    GALLERY
==============================================================*/

#images-root {
    width: 100%;
    padding: 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-category {
    width: 100%;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    margin-bottom: 80px;
}

.gallery-category h1 {
    width: 100%;

    text-align: center;

    font-size: 3rem;

    margin: 20px 0;
}


/*==============================================================
    GALLERY FLEX
==============================================================*/

.gallery-grid {
    border: 1px solid white;

    width: 100%;

    display: flex;
    flex-flow: row wrap;

    justify-content: center;
    align-items: flex-start;

    column-gap: 30px;
    row-gap: 55px;
}

.gallery-grid picture {
    padding: 15px;

    flex: 0 1 410px;

    width: 100%;
    max-width: 410px;
    min-width: 0;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    overflow: hidden;
}

.gallery-grid picture:nth-child(even) {
    margin-top: 35px;
}

.categories-container {
    border: 2px solid whitesmoke;

    padding: 10px;

    display: block;

    width: 100%;
    max-width: 380px;

    height: auto;

    object-fit: contain;
}


/*==============================================================
    LANDING
==============================================================*/

#landing-container {
    border: 10px solid blue;
    padding: 15px;
    height: 93vh;
}

#logo {
    position: fixed;

    top: 50%;
    left: 50%;

    height: 35vh;

    transform-origin: center;
}

#title {
    width: 100%;
}


/*==============================================================
    OLD FLEX SUPPORT
==============================================================*/

.flex {
    display: flex;

    flex-flow: row wrap;

    justify-content: center;
    align-items: center;

    gap: 20px;

    padding: 10px;

    width: 90%;
}


/*==============================================================
    TOOLBAR
==============================================================*/

#toolbar {
    position: fixed;

    left: 0;
    bottom: 0;

    width: 100%;

    display: flex;

    justify-content: center;
    align-items: center;

    padding: 12px 0;

    z-index: 1000;

    pointer-events: none;
}

.categories {
    width: 19vw;
    height: 40px;

    text-align: center;

    background-color: black;
    color: white;
}


/*==============================================================
    MEDIA QUERIES
==============================================================*/

@media (min-width: 1400px) {

    .gallery-grid {
        column-gap: 40px;
        row-gap: 60px;
    }

}

@media (max-width: 1399px) {

    .gallery-grid {
        column-gap: 35px;
        row-gap: 55px;
    }

}

@media (max-width: 1199px) {

    .gallery-grid {
        column-gap: 30px;
        row-gap: 50px;
    }

}

@media (max-width: 1100px) {

    body {
        padding: 15px;
    }

    .gallery-grid {
        column-gap: 25px;
        row-gap: 45px;
    }

    .gallery-grid picture {
        flex-basis: 340px;
        max-width: 340px;
    }

    .categories-container {
        max-width: 310px;
    }

    .gallery-category h1 {
        font-size: 2.5rem;
    }

    #modal-content {
        width: 100%;
        max-height: 92vh;
        padding: 20px;
    }

    #modal-img {
        max-width: 92vw;
        max-height: 90vh;
    }

    #modal.active #modal-img {
        max-height: 74vh;
    }

}

@media (max-width: 767px) {

    body {
        padding: 10px;
    }

    .gallery-grid {
        gap: 30px;
    }

    .gallery-grid picture {
        flex: 0 1 100%;

        width: 100%;
        max-width: 410px;
    }

    .gallery-grid picture:nth-child(even),
    .gallery-grid picture:nth-child(3n) {
        margin-top: 0;
    }

    .categories-container {
        width: 90%;
        max-width: 380px;
    }

    .gallery-category h1 {
        font-size: 2.2rem;
    }

    #modal-content {
        width: 100%;
        max-height: 92vh;
        padding: 20px;
    }

    #modal-img {
        max-width: 94vw;
        max-height: 90vh;
    }

    #modal.active #modal-img {
        max-height: 70vh;
    }

}

@media (max-width: 575px) {


    .admin-button {
        width: 36px;
        height: 36px;
    }


    body {
        padding: 8px;
    }

    #images-root {
        padding: 8px;
    }

    .gallery-grid {
        gap: 22px;
    }

    .gallery-grid picture {
        padding: 8px;

        flex: 0 1 100%;

        width: 100%;
        max-width: 410px;
    }

    .categories-container {
        width: 95%;
    }

    .gallery-category h1 {
        font-size: 2rem;
    }

    #modal-img {
        max-height: 90vh;
    }

    #modal.active #modal-img {
        max-height: 66vh;
    }

    #modal-title {
        font-size: 2rem;
    }

    #modal.active #modal-description {
        max-height: 100px;
    }

    #modal-description {
        font-size: 1.25rem;
        line-height: 1.25;
    }

    #modal-details {
        font-size: 1rem;
    }

}


/*==============================================================
    PHIORO ONBOARD BUTTON
==============================================================*/

.onboard-button {
    position: fixed;
    top: 100px;
    left: 35px;
    z-index: 9999;

    width: 14px;
    height: 14px;

    border-radius: 50%;

    /* background: black;
    color: white; */
    box-shadow: 0 1px 4px white;

    transition: .2s;
}

.onboard-button:hover {
    transform: scale(1.18);
}

@media (max-width: 575px) {

    .onboard-button {
        top: 88px;
        left: 31px;

        width: 11px;
        height: 11px;
    }

}
