@import url('https://fonts.googleapis.com/css2?family=Funnel+Display:wght@300..800&family=Funnel+Sans:ital,wght@0,300..800;1,300..800&display=swap');

* {
    box-sizing: border-box;
    user-select: none;
}

body {
    position: relative;
    margin: 0;
    width: 100%;
    height: 100%;
    font-family: "Funnel Sans", sans-serif;
    background: #001220;
    color: #fff;
    min-height: 100vh;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 96px;
    padding: 24px 48px;
}

section {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero {
    height: 100vh;
    background: url("hero bg.svg") no-repeat center center;
    background-size: cover;
}

.header-text {
    display: inline-block;
    margin-left: 228px;
    font-size: 128px;
    line-height: calc(128px * .844);
    font-weight: 800;
    font-family: "Funnel Display", sans-serif;
}

#menu-button {
    position: fixed;
    top: 64px;
    right: 64px;
    width: 100px;
    height: 100px;
    cursor: pointer;

    z-index: 1000;

    background: url("menubtn.svg") no-repeat center center;
    background-size: contain;
}

#menu {
    position: fixed;
    top: 64px;
    right: 64px;
    width: 0;
    height: 0;
    background: #F15025;
    padding: 0;
    
    z-index: 999;

    pointer-events: none;

    transition: width .3s ease-in-out, height .3s ease-in-out, padding .3s ease-in-out;
    overflow: hidden;
}

#menu.open {
    width: 500px;
    height: calc(100vh - 128px);
    pointer-events: auto;
    padding: 48px;
}

#menu a {
    --hover-rotation: 3deg;
    display: block;
    font-size: 24px;
    color: #fff;
    text-decoration: none;
    font-size: 48px;
    margin-bottom: 16px;
    font-weight: 600;
    width: fit-content;
    font-family: "Funnel Display", sans-serif;
    transform-origin: 50% 50%;
    transition: transform .1s ease-in-out;
}

#menu a:nth-child(even) {
    --hover-rotation: -3deg;
}

#menu a:hover {
    transform: scale(1.08) rotate(var(--hover-rotation));
}

#menu-background {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 998;
    
    transition: opacity .3s ease-in-out;
    pointer-events: none;
    opacity: 0;
}

#menu-background.open {
    pointer-events: auto;
    opacity: 1;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media screen and (max-width: 1150px) {
    .header-text {
        margin-left: 96px;
        font-size: 96px;
        line-height: calc(96px * .844);
    }
}

@media screen and (max-width: 786px) {
    #menu-button {
        top: auto;
        bottom: 24px;
        right: 24px;
        width: 64px;
        height: 64px;
        background-image: url("menubtn-mobile.svg");
    }

    #menu {
        top: auto;
        bottom: 24px;
        right: 24px;
        width: 0;
        height: 0;
    }

    #menu.open {
        width: calc(100vw - 48px);
        height: calc(100vh - 48px);
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .header-text {
        margin-left: 48px;
        font-size: 64px;
        line-height: calc(64px * .844);
    }
}

@media screen and (max-width: 475px) {
    .header-text {
        margin-left: auto;
        margin-right: auto;
        font-size: 48px;
        line-height: calc(48px * .844);
    }
}
