@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@200;300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;700;800&display=swap');

* {
    padding: 0;
    margin: 0;
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
}

body {
    user-select: none;
    background-color: #F6F6EC;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0 0 0;
    padding: 1.5rem;
    position: relative;
}

.hero-image {
    margin-left: 11rem;
}

.metronome {
    height: 32rem;
    max-width: 40rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.bpm-display-tempo {
    font-size: 6rem;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
}

.bpm-display-text {
    font-size: 1rem;
    text-align: center;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.145em;

}

.tempo-text {
    font-size: 1rem;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.tempo-adjust {
    height: 4rem;
    width: 4rem;
    border-radius: 50%;
    background-color: #BD3538;
    font-size: 3.5rem;
    text-align: center;
    cursor: pointer;
}

.tempo-adjust:hover .tempo-adjust:active {
    background-color: #f0f0f0;
    color: #BD3538;
}

.tempo-decrease {
    color: white;
    line-height: 3.5rem;
    font-family: 'Montserrat', sans-serif;
}

.tempo-increase {
    color: white;
    line-height: 4rem;
    font-family: 'Montserrat', sans-serif;
}

.tempo-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

input[type=range] {
    -webkit-appearance: none;
    background-color: transparent;
    width: 14rem;
    vertical-align: middle;
    margin: 0;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #BD3538;
    cursor: pointer;
}

input[type=range]::-moz-range-thumb {
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #BD3538;
    border: none;
    cursor: pointer;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 1px;
    background-color: #BD3538;
    margin: 0.5rem 0;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 1px;
    background-color: #BD3538;
    margin: 0.5rem 0;
}

.metronome-button {
    height: 7rem;
    width: 7rem;
    border-radius: 50%;
    background-color: #BD3538;
    color: white;
    cursor: pointer;
    line-height: 7rem;
    text-align: center;
    font-size: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
}

.metronome-button:hover .metronome-button:active {
    background-color: #f0f0f0;
    color: #BD3538;
}

.bpm-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.bpm-control-buttons {
    display: flex;
    gap: 1rem;
}

.bpm-control {
    height: 2.5rem;
    width: 2.5rem;
    color: white;
    border-radius: 50%;
    background-color: #BD3538;
}

.bpm-control:hover .bpm-control:active {
    background-color: #f0f0f0;
    color: #BD3538;
}

.bpm-value {
    line-height: 2.5rem;
    font-size: 1.5rem;
    font-weight: 500;
}

.bpm-decrease {
    line-height: 2.5rem;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    font-size: 1.25rem;
}

.bpm-increase {
    line-height: 2.5rem;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    font-size: 1.25rem;

}

.footer {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    align-items: center;
}

.footer-text {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: bold;
    font-size: 0.875rem;
    line-height: 1.125rem;
    color: #370B0D;
    opacity: 0.3;
    margin-right: 0.5rem;
}

.header {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: 0.75rem;
    text-align: center;
    font-weight: bold;
    font-family: 'Nunito Sans', sans-serif;
    color: #BD3538;
}


.header-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    text-align: center;
}

.text {
    margin-bottom: 3rem;
}

/* Metronomre animation */

.metronome-container {
    display: flex;
    flex-direction: column;
    position: relative;
    height: 300px;
    width: 200px;
    margin: 20px 20px;
    justify-content: center;
    align-items: center;
}

.metronome-anchor {
    width: 90px;
    height: 90px;
    background-color: #BD3538;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.metronome-arm {
    position: absolute;
    top: 10%;
    left: 50%;
    width: 4px;
    height: 220px;
    background: #333;
    border-radius: 50%;
    transform-origin: center;
    /* Animation only active when running */
}

.metronome-arm.active {
    animation: swing var(--duration, 0.5s) linear infinite alternate;
}

.weight {
    width: 20px;
    height: 20px;
    background: #BD3538;
    position: absolute;
    bottom: 20px;
    left: -8px;
    border-radius: 4px;
}

@keyframes swing {
    from {
        transform: translateX(-50%) rotate(-30deg);
    }

    to {
        transform: translateX(-50%) rotate(30deg);
    }
}

@media screen and (max-width: 1024px) {
    .hero-image {
        height: 15rem;
        margin-left: 2rem;
    }
}

@media screen and (max-width: 768px) {
    .container {
        margin: 0;
    }

    .metronome {
        height: 30rem;
    }

    .hero-image {
        height: 12rem;
        margin-left: 3rem;
    }
}

@media screen and (max-width: 700px) {
    .hero-image {
        display: none;
    }

    .container {
        margin: 0.5rem 0 0 0;
        display: flex;
        flex-direction: column;
    }
}

@media screen and (max-width: 425px) {
    .header {
        font-size: 2rem;
        font-weight: 700;
    }

    .bpm-display-tempo {
        font-size: 4rem;
    }

    .metronome {
        width: 100%;
    }

    .tempo-text {
        font-size: 1rem;
    }

    .tempo-adjust {
        height: 3.5rem;
        width: 3.5rem;
    }

    .tempo-increase {
        line-height: 3.5rem;
    }

    .tempo-decrease {
        line-height: 3rem;
    }

    .tempo-controls {
        gap: 1.5rem;
    }

    .bpm-controls-text {
        font-size: 0.875rem;
    }

    input[type=range] {
        width: 8rem;
    }

    .metronome-container {
        position: relative;
        height: 90px;
        width: 40px;
        margin: 20px 20px;
    }

    .metronome-arm {
        position: absolute;
        top: 10%;
        left: 50%;
        width: 4px;
        height: 90px;
        background: #333;
        border-radius: 50%;
        transform-origin: top center;
        /* Animation only active when running */
    }

}