#menu {
    position: fixed;
    top: 54px;
    right: 60px;
    cursor: pointer;
}

#menu.ativo{
    z-index: 10;
}


#botao-menu {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

#barra1 {
    display: block;
    width: 48px;
    height: 2px;
    background: #fff;
    border-radius: 10px;
    border: 0px;
    transition: 0.5s;
}

#barra2 {
    display: block;
    width: 48px;
    height: 2px;
    background: #fff;
    border-radius: 10px;
    border: 0px;
    transition: 0.5s;
}

#barra3 {
    display: block;
    width: 48px;
    height: 2px;
    background: #fff;
    border-radius: 10px;
    border: 0px;
    transition: 0.5s;
}

#botao-menu:hover #barra1 {
    animation: menu-barras 1s infinite ease-in-out;
    animation-delay: 0;
}

#botao-menu:hover #barra2 {
    animation: menu-barras 1s infinite ease-in-out;
    animation-delay: 0.2s;
}

#botao-menu:hover #barra3 {
    animation: menu-barras 1s infinite ease-in-out;
    animation-delay: 0.4s;
}

@keyframes menu-barras {
    0% {
        width: 48px;
    }
    50% {
        width: 34px;
    }
    100% {
        width: 48px;
    }
}

#botao-menu.ativo #barra1 {
    /*transform: matrix(1, -0.75, 0, 2, 0, 10);*/
    transform: rotate(-45deg);
    transform-origin: top right;
}

#botao-menu.ativo #barra2 {
    transform: matrix(0.01, 0, 0, 1, 0, 0);
}

#botao-menu.ativo #barra3 {
    /* transform: matrix(1, 0.75, 0, 2, 0, -18); */
    transform: rotate(45deg);
    transform-origin: bottom right;
}

#botao-menu.ativo:hover #barra1 {
    animation: unset;
}

#botao-menu.ativo:hover #barra2 {
    transform: matrix(0.01, 0, 0, 1, 0, 0);
    animation: unset;
}

#botao-menu.ativo:hover #barra3 {
    animation: unset;
}

#overlay-menu {
    display: none;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    position: fixed;
    width: 100%;
    height: 100vh;
    background: rgb(0 0 0 / 95%);
    backdrop-filter: blur(6px);
    top: 0;
}

#overlay-menu.ativo {
    display: flex;
    animation: square-in-bottom-left 1.25s forwards cubic-bezier(.25, 1, .30, 1) ;
}

@keyframes wipe-cinematic-in {
    0% {
        clip-path: inset(100% 0 100% 0);
    }
    /*30%, 70% {
        clip-path: inset(10% 0 10% 0);
    }*/
    100% {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes square-in-bottom-left {
    from {
      clip-path: inset(0 0 100% 100%);
    }
    to {
      clip-path: inset(0 0 0 0);
    }
  }


@keyframes circle-in-top-right {
    from {
      clip-path: circle(0%);
    }
    to {
      clip-path: circle(150% at top right);
    }
}

nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

nav a {
    color: #fff;
    font-size: 2em;
    transition: 0.75s;
    font-weight: 700;
    overflow: hidden;
    font-family: 'Exo', sans-serif;
}

nav a:hover {
    scale: 1.5;
}

nav a:nth-child(n) span {
    display: block;
    /*transition: 1s cubic-bezier(0.59, 0, 0.32, 0.99);*/
    transform: translateY(80%);
    animation: 0.5s de-baixo 1.5s forwards cubic-bezier(0.59, 0, 0.32, 0.99);
    animation-delay: calc(0.75s + (0.02s * var(--i)));
    font-family: 'Exo', sans-serif;
    cursor: pointer;
}

nav a:nth-child(1) span {
    --i: 1;
}

nav a:nth-child(2) span {
    --i: 2;
}

nav a:nth-child(3) span {
    --i: 3;
}

nav a:nth-child(4) span {
    --i: 4;
}

nav a:nth-child(5) span {
    --i: 5;
}

nav a:nth-child(6) span {
    --i: 6;
}

nav a:nth-child(7) span {
    --i: 7;
}

@keyframes de-baixo {
    0% {
        transform: translateY(80%)
    }
    100% {
        transform: translateY(0%)
    }
}

nav a span:hover {
    display: block;
    transform: translateY(100%);
}

#submenu-trabalhos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    height: 0px;
    transition-behavior: allow-discrete;
    /*transition: 1s height forwards cubic-bezier(0.59, 0, 0.32, 0.99);*/
    transition: 1s height cubic-bezier(0.59, 0, 0.32, 0.99);
    width: 100%;
    cursor: pointer;
}

#submenu-trabalhos.submenu-ativo {
    display: flex;
    height: 160px; /*calc-size(auto)*/
    /*animation: 1s submenu-abrir forwards cubic-bezier(0.59, 0, 0.32, 0.99);*/
}

@keyframes submenu-abrir {
    0% {
        height: 0px;
    }
    100% {
        height: 160px;
    }
}

#submenu-trabalhos a {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4AA1CD;
    filter: brightness(1.25);
    cursor: pointer;
}

/*#logo.ativo {
    opacity: 1;
    filter: brightness(1.25);
}*/

@media (max-width: 767px) {
    nav a {
        font-size: 1.25em;
    }

    nav a:hover {
        scale: 1.17;
    }

    .icone-social {
        width: 18px;
    }

    #submenu-trabalhos a {
        font-size: 1rem;
    }
}