@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #06021b;
}
.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
.brand {
    color: #fff;
    font-weight: 800;
    font-size: 38px;
    letter-spacing: .18em;
}
.navigation {
    position: relative;
    --item-size: 70px;
    width: calc(var(--item-size) * 4 + 50px);
    height: var(--item-size);
    background: linear-gradient(45deg, #2196f3, #e91e63);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
}
.navigation ul {
    display: flex;
    width: calc(var(--item-size) * 4);
}
.navigation ul li {
    position: relative;
    width: var(--item-size);
    height: var(--item-size);
    list-style: none;
    z-index: 1;
}
.navigation ul li a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    text-align: center;
    font-weight: 500;
}
.navigation ul li a .icon {
    position: relative;
    display: block;
    line-height: calc(var(--item-size) + 5px);
    font-size: 1.5em;
    text-align: center;
    color: #fff;
    transition: .5s;
}
.navigation ul li.active a .icon {
    transform: translateY(calc(var(--item-size) * -0.46));
}
.navigation:hover ul li.active a .icon {
    transform: translateY(0);
}
.navigation ul li.hovered a .icon {
    transform: translateY(calc(var(--item-size) * -0.53));
}
.navigation ul li.hovered a .text {
    opacity: 1;
    transform: translateY(10px);
}
.navigation ul li a .text {
    position: absolute;
    color: #fff;
    font-weight: 400;
    font-size: .75em;
    letter-spacing: .05em;
    opacity: 0;
    transform: translateY(20px);
    transition: .5s;
}
.navigation ul li.active a .text {
    opacity: 1;
    transform: translateY(10px);
}
.navigation ul li a .circle {
    position: absolute;
    display: block;
    width: 50px;
    height: 50px;
    background: transparent;
    border-radius: 50%;
    border: 1.8px solid #fff;
    transform: translateY(calc(var(--item-size) * -0.53)) scale(0);
}
.navigation ul li.active a .circle {
    transition: .5s;
    transition-delay: .5s;
    transform: translateY(calc(var(--item-size) * -0.53)) scale(1);
}
.navigation ul li.hovered a .circle {
    transition: .5s;
    transform: translateY(calc(var(--item-size) * -0.53)) scale(1);
}
.navigation:hover ul li.active a .circle {
    transform: translateY(calc(var(--item-size) * -0.53)) scale(0);
}
.indicator {
    position: absolute;
    top: -50%;
    width: var(--item-size);
    height: var(--item-size);
    background: linear-gradient(45deg, #2196f3, #e91e63);
    border: 6px solid #06021b;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: .5s;
    --pos: 0;
    --scale: 1;
    transform: translateX(calc(var(--item-size) * var(--pos))) scale(var(--scale));
}
.indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -22px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-top-right-radius: 20px;
    box-shadow: 1px -10px 0 #06021b;
}
.indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -22px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-top-left-radius: 20px;
    box-shadow: -1px -10px 0 #06021b;
}
.navigation ul li:nth-child(1).active~.indicator { --pos: 0; }
.navigation ul li:nth-child(2).active~.indicator { --pos: 1; }
.navigation ul li:nth-child(3).active~.indicator { --pos: 2; }
.navigation ul li:nth-child(4).active~.indicator { --pos: 3; }

.navigation ul li:nth-child(1).hovered~.indicator { --pos: 0; }
.navigation ul li:nth-child(2).hovered~.indicator { --pos: 1; }
.navigation ul li:nth-child(3).hovered~.indicator { --pos: 2; }
.navigation ul li:nth-child(4).hovered~.indicator { --pos: 3; }

.navigation ul li.hovered~.indicator {
    --scale: 1.15;
    box-shadow: 0 10px 20px rgba(0,0,0,.35), 0 0 12px rgba(255,255,255,.2);
}

.label {
    position: absolute;
    bottom: -28px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-weight: 500;
    font-size: .8em;
    letter-spacing: .05em;
    opacity: 0;
    transition: .3s;
    pointer-events: none;
}

@media (max-width: 480px) {
    .wrapper { gap: 14px; }
    .brand { font-size: 30px; letter-spacing: .14em; }
    .navigation { --item-size: 56px; width: calc(var(--item-size) * 4 + 40px); }
    .label { bottom: -24px; font-size: .75em; }
}

@media (max-width: 360px) {
    .brand { font-size: 26px; letter-spacing: .12em; }
    .navigation { --item-size: 50px; width: calc(var(--item-size) * 4 + 36px); }
    .label { bottom: -22px; }
}