:root {
    --max-width: 1080px;
    --black: #111811;
    --white: #F7F5EF;
    --off-white: #D8DEE0;
    --light-blue: #AED2EA;
    --dark-blue: #1F4E68;
    --light-green: #9BBF9A;
    --mid-green: #6F9B6b;
    --dark-green: #557953;
    --yellow: #FFC80E;
}

* {
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--white);
}

section {
    margin: 4em 0;
}
section:first-child {
    margin: 0 0 4em 0;
}

h1, h2, h3, h4 {
    font-family: "Fraunces", sans-serif;
    font-weight: bold;
    color: var(--dark-blue);
}
h2, h3 {
    margin: 0 0 1em 0;
}
h1 {
    margin: 0;
    font-size: 1.75em;
}
h2 {
    font-size: 1.5em;
}
h3 {
    font-size: 1.25em;
}
h4 {
    margin: 0;
    font-size: 1em;
}

p {
    max-width: 750px;
    font-size: 1em;
    color: var(--black);
}
.card p {
    margin: 0;
}

a:link {
    color: var(--dark-blue);
}
a:visited {
    color: var(--dark-green);
}

.site-header {
    display: flex;
    align-content: center;
    min-height: max-content;
    width: 100%;
    padding: 1em 0;
    background: var(--light-blue);
}
.header-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    column-gap: 1em;
    row-gap: 2em;
}
.title-container {
    max-width: 60vw;
    margin-left: 1.5em;
}

.join-button {
    display: flex;
    align-items: center; 
}
.join-button a {
    padding: 0.5em 1em;
    width: max-content;
    height: min-content;
    background: var(--dark-blue);
    border: 2px solid var(--dark-blue);
    border-radius: 2px;
    font-family: "Fraunces";
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    color: var(--yellow);
    transition: all 0.2s ease;
}
.join-button a:hover {
    background: var(--light-blue);
    border: 2px solid var(--dark-blue);
    color: var(--dark-blue);
}
.join-button a::after {
    content:"";
    display: block;
    position: relative;
    width: 0;
    height: 2px;
    background: var(--dark-blue);
    transition: all 0.2s ease;
    transition-delay: 0.1s;
}
.join-button a:hover::after {
    width: 100%;
}
.desktop-join-button {
    display: none;
}

.mobile-crate-nav-icon {
    margin-right: 1em;
    transition: all 0.7s ease;
}
.mobile-crate-nav-icon img {
    aspect-ratio: 1 / 1;
    max-width: min(15vw, 80px);
    height: auto;
    width: auto;
    cursor: pointer;
}
.mobile-nav-container {
    display: none;
    width: 100%;
}
.show-mobile-nav-container {
    display: flex;
    justify-content: flex-end;
}
.mobile-nav-items-container {
    display: flex;
    width: max-content;
    flex-direction: column;
    margin-right: 1em;
    row-gap: 1em;
}
.mobile-nav-item {
    background: none;
    border: none;
    font-family: "Fraunces", sans-serif;
    font-weight: bold;
    font-size: 1em;
    color: var(--dark-blue);
    text-align: right;
}

.main-container {
    display: flex;
    width: 100%;
}
.desktop-crate-nav-container {
    display: none;
    background: var(--light-blue);
    min-height: 85vh;
    padding: 1em;
}
.desktop-nav-crates {
    display: flex;
    flex-direction: column;
    gap: 1em;
    height: max-content;
    position: sticky;
    top: 2em;
}

.desktop-crate-menu-container {
    display: flex;
}
.desktop-crate-menu-container.active {
    height: max-content;
}

.desktop-crate-submenu-container {
    display: none;
    position: absolute;
    left: calc(min(max(6vh, 6vw), 125px) + 1em);
    min-width: calc(min(max(6vh, 6vw), 125px) + 1em);
    background: var(--light-blue);
    flex-direction: column;
    gap: 1em;
    margin: 0;
    padding: 1em;
    border: 0.25em solid var(--white);
}
.desktop-crate-submenu-container a {
    width: max-content;
}

.desktop-crate-menu-container.active:hover .desktop-crate-submenu-container {
    display: flex;
}

.desktop-submenu-item {
    color: var(--dark-blue);
    font-weight: bold;
    text-decoration: none;
    padding: 0.25em 0.5em;
}
.desktop-submenu-item::after {
    content:"";
    display: block;
    position: relative;
    width: 0;
    height: 2px;
    background: var(--dark-blue);
    transition: all 0.2s ease;
    transition-delay: 0.1s;
}
.desktop-submenu-item:hover::after {
    width: 100%;
}

a.desktop-submenu-item:visited {
    color: var(--dark-blue);
}

.crate-nav-icon {
    aspect-ratio: 1 / 1;
    max-height: min(max(6vh, 6vw), 125px);
    width: auto;
    height: auto;
    margin: 0.5em;
    transition: all 0.7s ease;
}
.crate-nav-icon img {
    aspect-ratio: 1 / 1;
    max-height: min(max(6vh, 6vw), 125px);
    height: auto;
    width: auto;
    cursor: pointer;
}
.crate-nav-icon:not(.rotated-crate) img:hover {
    animation: wobble 0.3s;
}

.rotated-crate {
    transform: rotate(90deg);
}
.mobile-rotated-crate {
    transform: rotate(-180deg);
}

.main-content-container {
    max-width: 100vw;
    padding: 1.5em;
}

.crate-content-container {
    display: none;
}
.crate-content-container.active {
    display: block;
}

.cards-container {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 2em;
}

.card {
    display: flex;
    flex-direction: column;
    flex: 0 1 40%;
    gap: 1em;
    min-width: 250px;
    max-width: 400px;
    padding: 1em;
    background: var(--off-white);
    border-radius: 2px;
}

.image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    transition: all 0.s ease;
}

a.image-container:hover {
    transform: scale(1.01);
}

.card .image-container img {
    width: 90%;
    max-width: 90%;
    max-height: 90%;
    min-width: 80%;
}

.card iframe {
    aspect-ratio: 1 / 1 !important;
}

.card-subtitle {
    margin-top: 0;
    color: var(--dark-green);
    font-family: "Inter";
    font-weight: bold;
    font-style: italic;
}

.image-credit {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-left: auto;
    font-family: "Inter", sans-serif;
    font-size: 0.9em;
}
.image-credit p {
    text-align: right;
}

@media screen and (width > 768px) {
    h1 {
        margin: 0;
        font-size: 2.2em;
    }
    h2 {
        font-size: 2.0em;
    }
    h3 {
        font-size: 1.6em;
    }
    h4 {
        font-size: 1.2em;
    }
    .site-header {
        display: flex;
        align-content: center;
        height: 10vh;
        min-height: 5em;
        padding: 1em 1.5em;
    }
    .header-container {
        align-items: center;
    }
    .title-container {
        max-width: 80vw;
        margin-left: 0;
    }
    .mobile-nav-menu-icon-container {
        display: none;
    }
    .mobile-nav-container {
        display: none;
    }
    .desktop-join-button {
        display: flex;
    }
    .desktop-crate-nav-container {
        display: flex;
    }
    .main-content-container {
        max-width: var(--max-width);
        padding: 2em;
    }
    .cards-container {
        justify-content: flex-start;
    }
}

@keyframes wobble {
    0% { transform: rotate(-0.5deg) translate(-0.5px, 0px); }
    10% { transform: rotate(-1deg) translate(-1px, 0px); }
    20% { transform: rotate(-0.5deg) translate(-0.5px, 0px); }
    30% { transform: rotate(0deg) translate(0px, 0px); }
    40% { transform: rotate(0.5deg) translate(0.5px, 0px); }
    50% { transform: rotate(1deg) translate(1px, 0px); }
    60% { transform: rotate(0.5deg) translate(0.5px, 0px); }
    70% { transform: rotate(0deg) translate(0px, 0px); }
    80% { transform: rotate(-0.5deg) translate(-0.5px, 0px); }
    90% { transform: rotate(-1deg) translate(-1px, 0px); }
    100% { transform: rotate(-0.5deg) translate(-0.5px, 0px); }
}