/*———————— VARIABLES ————————*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Suez+One&display=swap');

:root {
    /* Colours variables */
    --color-primary: #212121;
    --color-secondary: #555555;
    --color-background: #FFFFFF;
    --color-text-default: #212121;

    /* Fonts variables  */
    --headline-font: 'Suez One', serif;
    --body-font: 'Inter', sans-serif;

    /* Other styles  */
    font-size: 16px;
}


/*———————— STYLES RESET ————————*/

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    text-decoration: none;
    list-style: none;
}

a {
    text-decoration: none;
    color: #212121;
}

/*———————— MAIN CONTENT ————————*/

h1, h2, h3, h4 {
    font-family: var(--headline-font);
    color: var(--color-primary);
}

h2 {
    font-size: 1.75rem;
}

body {
    background-color: var(--color-background);
    font-family: var(--body-font);
}

header, main, footer {
    max-width: 1080px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

main {
    animation: fadein 1s ease-in;
}

footer {
    animation: fadein 2s ease-in;
}

.button {
    background-color: var(--color-primary);
    width: fit-content;
    color: var(--color-background);
    border-radius: .5rem;
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: center;
    padding: .5rem 2rem;
    margin: 1rem auto 0;
    font-family: var(--headline-font);
    cursor: pointer;
}

@media (min-width: 600px) {

    header {
        margin-top: 2rem;
    }
}

/*———————— TOP BAR ————————*/

#top-bar {
    width: 100%;
    background-color: var(--color-primary);
    color: var(--color-background);
    overflow: visible;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: .75rem .75rem;
    font-size: .9rem;
}

#top-bar a {
    color: var(--color-background);
}

/*———————— NAV ————————*/

nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    color: var(--color-primary);
    font-family: var(--headline-font);
    font-size: 1.5rem;
    position: relative;
}

.nav__logo {
    margin: .5rem .5rem 0 .5rem;
}

.nav__links ul {
    margin: 0;
    padding: 0;
    display: flex;
}

.nav__links li {
    list-style: none;
}

.nav__links li a {
    padding: .5rem 1rem;
    display: block;
}

.nav__links li:hover {
    opacity: .8;
}

.toggle-button {
    position: absolute;
    top: 1.5rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 2rem;
    height: 1.5rem;
}

.toggle-button .bar {
    height: .2rem;
    width: 100%;
    background-color: var(--color-primary);
    border-radius: .5rem;
    transition: transform .3s ease-in;
}


@media (max-width: 600px) {
    .nav {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 1rem;
    }

    .nav__links {
        display: none;
        width: 100%;
        background-color: rgba(222,222,222, .2);
        border-radius: 1rem;
    }

    .nav__links ul {
        flex-direction: column;
        width: 100%;
    }

    .nav__links li {
        text-align: center;
    }

    .nav__links li a {
        padding: 1rem 1rem;
        color: var(--color-primary);
    }

    .nav__links.active {
        display: flex;
        margin-top: 1rem;
        animation: topfadein .3s ease-in;
    }

    .toggle-button {
        display: flex;
    }

    .toggle-button.active {
        display: flex;
        justify-content: center;
    }

    .toggle-button.active .bar {
        transition: transform .3s ease-in;
    }

    .toggle-button.active .bar:first-child {
        transform: rotate(45deg);
        margin-bottom: -.25rem;
    }

    .toggle-button.active .bar:nth-of-type(2) {
        display: none;
    }
    
    .toggle-button.active .bar:last-child {
        transform: rotate(-45deg);
        margin-top: .05rem;
    }
}

/*———————— SECTIONS ————————*/

section {
    margin: 3rem 0;
}

.section > h2 {
    margin-left: .5rem;
}

/*———————— NEW RELEASE ————————*/

#releases-new {
    margin: 1.5rem .5rem 5rem;
}

.block-new {
    display: block;
    position: relative;
    width: 100%;
}

.block-new__image img {
    display: block;
    width: 100%;
    height: 50vh;
    object-fit: cover;
    object-position: center;
    border-radius: 1rem;
}

.block-new__info {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 1rem;
    color: #fff;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.1) 65%, rgba(0,0,0,.4) 100%);
}

#releases-new h2 {
    color: var(--color-background);
    font-size: clamp(1.25rem, 1rem + 2vw, 2rem);
    line-height: 1.15;
}

#releases-new p {
    color: var(--color-background);
    opacity: .6;
    font-size: clamp(1rem, 0.85rem + 1.2vw, 1.75rem);
    line-height: 1.2;
    margin-bottom: 0;
}

.block-new__info__text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    box-sizing: border-box;
    padding: 0 4.5rem clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2rem);
}

.block-new__info__icon {
    position: absolute;
    right: clamp(0.75rem, 4vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    line-height: 1;
}

.block-new__info__icon i {
    font-size: clamp(2rem, 7vw, 3rem);
    line-height: 1;
}

@media (max-width: 640px) {
    .block-new__image img {
        height: auto;
    }
}


/*———————— LATEST RELEASES ————————*/

#releases-latest {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: .5rem auto 2rem;
}

#releases-latest .block:nth-of-type(n+5) {
    display: none;
}

#releases-all {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    margin: 0 auto;
}

.more-releases {
    display: flex;
    justify-content: flex-end;
}

.more-releases--load {
    justify-content: center;
    margin-top: 3rem;
}

.more-releases__link {
    width: 24%;
    background-color: rgba(222,222,222, .2);
    padding: 1rem 0;
    text-align: center;
    border-radius: 1rem;
    font-family: var(--headline-font);
    font-size: 1.25rem;
}

button.more-releases__link {
    border: 0;
    background-color: var(--color-primary);
    color: var(--color-background);
    cursor: pointer;
}

button.more-releases__link[hidden] {
    display: none;
}

.more-releases__link:hover {
    transform: translateY(-.25rem);
    transition: .3s ease-in;
    box-shadow: 5px 5px 30px rgba(0,0,0,.3);
}

@media (max-width: 640px) {
    .more-releases__link {
        width: 100%;
    }
}

/*———————— RELEASES ————————*/

.block {
    flex-basis: calc(25% - 1rem);
    margin: .75rem .5rem;
    width: 100%;
    background-color: rgba(222,222,222, .2);
    padding: .75rem .75rem 1.5rem;
    border-radius: 1rem;
}

.block:hover,
.block-playlist:hover,
.block-links:hover {
    transform: translateY(-.25rem);
    transition: .3s ease-in;
    box-shadow: 5px 5px 30px rgba(0,0,0,.3);
    opacity: .9;
}

.block__image img {
    border-radius: .5rem;
}

.block__title h2 {
    font-size: 1.25rem;
    margin-top: .75rem;
}

.block__artist p {
    font-size: 1rem;
    font-family: var(--body-font);
    color: var(--color-secondary);
}

.block-new:hover {
    transform: translateY(-.25rem);
    transition: .3s ease-in;
    /* box-shadow: 5px 5px 30px rgba(0,0,0,.3); */
}

@media (max-width: 999px) {
    .block__title h2 {
        font-size: 1.25rem;
    }

    .block__artist p {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .block {
        flex-basis: calc(50% - 1rem);
        margin: .5rem;
    }
}

@media (max-width: 400px) {
    .block__title h2 {
        font-size: 1rem;
    }

    .block__artist p {
        font-size: .8rem;
    }
}

/*———————— ARTISTS ————————*/

#artists {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 1.5rem auto 2rem;
}

#artists img {
    aspect-ratio: 1/1;
    object-fit: cover;
}

/*———————— PLAYLISTS ————————*/

#playlists {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 1.5rem auto 2rem;
}

.block-playlist {
    flex-basis: calc(33% - 1rem);
    margin: .75rem .5rem;
    background-color: rgba(222,222,222, .2);
    padding: .75rem .75rem 1.5rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}

.button-playlist {
    background-color: var(--color-primary);
    width: fit-content;
    color: var(--color-background);
    border-radius: .5rem;
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: center;
    padding: .25rem 2rem;
    margin: 1rem auto 0;
    font-family: var(--headline-font);
}

@media (max-width: 640px) {
    #playlists {
        flex-direction: column;
    }
}

/*———————— LINKS ————————*/

.links-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 640px;
    margin: 3rem auto;
}

#releases-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto 2rem;
}

#custom-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 1.5rem auto 0rem;
}

.block-links {
    margin: .75rem .5rem;
    max-height: 4rem;
    background-color: rgba(222,222,222, .2);
    padding: 1rem .75rem 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.block-links__info h2 {
    font-size: 1.25rem;
    margin-top: .75rem;
    text-align: center;
}

#releases-links .block-links:nth-of-type(n+11) {
    display: none;
}

/*———————— FOOTER ————————*/

.footer {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin: 6rem 0 3rem .5rem;
}

.footer h2 {
    margin-bottom: 1rem;
}

.footer p {
    margin-bottom: 1rem;
    color: #555555;
}

.footer__about {
    flex: 70%;
}

.footer__follow {
    flex: 30%;
}

.socials {
    display: flex;
    gap: 1rem;
}

.social {
    font-size: 1.5rem; 
}


.social a:hover {
    opacity: .8;
}

@media (max-width: 640px) {
    .footer {
        flex-direction: column-reverse;

    }
}


/*———————— EMAIL MODAL ————————*/
.modal {
    display: none;
    position: fixed;
    z-index: 20;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: auto;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background-color: var(--color-background);
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 640px;
    text-align: center;
    cursor: default;
    animation: topfadein .5s ease-in;
}

.modal-content h2 {
    padding: 2rem 0 1rem;
}

input {
    font-family: var(--color-text-default);
    margin: 1rem 0 0;
    padding: .5rem;
    min-width: 70%;
    border-radius: .5rem;
    border: 1px solid var(--color-primary);
}

.close {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-primary);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
}
  
.close:hover,
.close:focus {
    opacity: .8;
    text-decoration: none;
    cursor: pointer;
}

/*———————— ANIMATION ————————*/

@keyframes fadein {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes topfadein {
    0% {
        opacity: 0;
        transform: translateY(-.5rem);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}