/* variabili */
:root {
    /* COLOR PALETTE */
    --dark-color: #000000;
    --light-color: #FFFFFF;
    --red-color: #f73435;
    --yellow-color: #fde259;
    --green-color: #52b74a;
    --blue-color: #62c2e6;


    /* Fonts */
    --font-display: "Montserrat", sans-serif;
    --font-text: "Roboto Mono", monospace;

    /* Size */
    --xs: 4px;
    --s: 8px;
    --m: 12px;
    --l: 16px;
    --xl: 24px;
    --xxl: 32px;

}

/* RESET */
* {
    margin: 0;
    padding: 0;
}

li {
    list-style-type: none;
}

a {
    text-decoration: none;
    display: block;
}

html {
    scroll-behavior: smooth;
}

/* UTILITY */
.res {
    width: 100%;
    max-width: 480px;
}

.wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}





/* TYPO */
body {
    font-family: var(--font-text);
    background-color: var(--light-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    margin-bottom: var(--m);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
}


p {
    margin-bottom: var(--xs);
    color: var(--dark-color);
}



/* HEADER */
header.cover {
    background: var(--dark-color);
    padding: 15px 0;
    height: 40px;
    transition: ease-out 0.4s;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header.cover div.wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

header.cover.active {
    height: 200px;
}

.cover__logo img {
    transition: transform 0.4s;
}

.cover__logo img:hover {
    transform: scale(0.95);
}


.cover__menu {
    order: 3;
    width: 100%;
    text-align: right;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 0.4s ease, opacity 0.25s ease, transform 0.25s ease;
}



.cover__hb {
    color: var(--red-color);
    font-size: var(--xl);
    align-items: center;
}

.cover__hb:hover {
    color: var(--yellow-color);
    cursor: pointer;
    transition: 0.4s;
}

ul.main-menu li a {
    color: var(--light-color);
    margin: 16px;
    font-weight: 400;
}

ul.main-menu li a:hover {
    color: var(--yellow-color);
}



header.cover.active .cover__menu {
    max-height: 260px;
    /* abbastanza per 4 voci */
    opacity: 1;
    transform: translateY(0);
}




/* HERO ------*/
section.hero {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: var(--m);
    margin-top: 40px;
}

.hero__cover {
    margin-top: 30px;
    margin-bottom: 30px;
}

.hero__cover img {
    width: 100%;
    display: block;
    border-radius: var(--s);
    height: auto;
}

.hero__cover .res {
    max-width: 100%;
}


/* CTA */
.cta-group {
    font-size: 1em;
    display: flex;
    gap: var(--l);
    margin-top: var(--xxl);
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.cta-group a {
    border: 2px solid var(--dark-color);
    letter-spacing: 0.02em;
    border-radius: var(--s);
    padding: var(--m) var(--l);
    font-weight: 500;
}

a.cta-primary {
    background: var(--dark-color);
    color: var(--yellow-color);
    transition: 0.4s;
}

a.cta-primary:hover {
    background: var(--red-color);
    border: 2px solid var(--red-color);
    transform: scale(0.95);
}

a.cta-secondary {
    background: transparent;
    color: var(--dark-color);
    transition: 0.4s;
}

a.cta-secondary:hover {
    border: 2px solid var(--green-color);
    color: var(--green-color);
    transform: scale(0.90);
}







/* VARIATIONS----- */
.variation-paragraphs {
    margin-top: var(--xl);
    margin-bottom: var(--xl);
}

.variation h1 {
    text-align: center;
    margin-bottom: var(--m);
    width: 100%;
}

.variation-selector {
    text-align: center;
    margin-top: var(--xl);
    margin-bottom: var(--xl);
}

.color-dots {
    display: flex;
    justify-content: center;
    gap: var(--xl);
    margin-top: var(--xl);
}

.dot {
    width: var(--xl);
    height: var(--xl);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    outline: none;
}

.dot.red {
    background: var(--red-color);
}

.dot.yellow {
    background: var(--yellow-color);
}

.dot.green {
    background: var(--green-color);
}

.dot.blue {
    background: var(--blue-color);
}

.dot.active {
    outline: 2px solid var(--dark-color);
    outline-offset: 4px;
}

.variation-selector img {
    width: 100%;
    max-width: 720px;
    height: auto;
    border-radius: var(--s);
}







/* AUTHOR----- */

.author__content {
    display: flex;
    flex-direction: column;
    gap: var(--xxl);
}

.author {
    background-color: var(--dark-color);
    padding: 60px 0;
}

.author__text {
    color: var(--light-color);
}

.author__text h2 {
    color: var(--green-color);
}

.author__text p {
    color: var(--light-color);
}


.author__jpg img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--s);
}





/* GALLERY----- */
.gallery h1 {
    text-align: center;
    margin: var(--xxl);
}

.gallery__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--xl);
}

.gallery__grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--s);
}

.gallery__grid figure {
    transition: transform 0.4s ease;
}

.gallery__grid figure:hover {
    transform: translateY(-8px);
}




/* NEWSLETTER----- */
.newsletter {
    padding: var(--xxl);
}

.newsletter__box {
    padding: var(--xxl);
    text-align: center;
    background-color: var(--yellow-color);
    border-radius: var(--s);
}

.newsletter__box h1 {
    margin-bottom: var(--m);
}

.newsletter__box p {
    margin-bottom: var(--xl);
}

.newsletter__form {
    display: flex;
    flex-direction: row;
    gap: var(--m);
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter__form input {
    flex: 2;
    min-width: 0;
    padding: 12px;
    font-size: 1em;
    border: 2px solid var(--dark-color);
    border-radius: var(--xs);
}



.newsletter__form button {
    flex: 1;
    padding: var(--m);
    font-size: 1em;
    background-color: var(--dark-color);
    color: var(--light-color);
    border: none;
    cursor: pointer;
    border-radius: var(--xs);
    transition: transform 0.4s;
}

.newsletter__form button:hover {
    background-color: var(--blue-color);
    transform: scale(0.95);
}







/* FOOTER----- */
footer {
    background-color: var(--dark-color);
    padding-top: var(--xl);
    padding-bottom: var(--xl);
}

.footer h4 {
    color: var(--light-color);
    margin-bottom: var(--m);
}


.footer__social a,
.footer__social p {
    color: var(--light-color);
}

.footer__other,
.footer__social {
    display: flex;
    flex-direction: column;
    align-items: center;
}




a.facebook:hover {
    color: var(--blue-color)
}

a.pinterest:hover {
    color: var(--red-color)
}

a.instagram:hover {
    color: var(--yellow-color)
}

a.behance:hover {
    color: var(--green-color);
}



.footer__other a {
    color: var(--light-color);
}

.footer__other a:hover {
    color: var(--green-color);
}


/* distribuisco al centro e allineo in verticale */
.footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--xxl);
}




/* ARROW UPWARD----- */
.scroll-top {
    position: fixed;
    background-color: var(--green-color);
    color: var(--light-color);
    bottom: 48px;
    right: 48px;
    padding: 12px;
    border-radius: 50%;
    font-size: 2rem;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s ease;
}

.scroll-top:hover {
    background-color: var(--red-color);
    color: var(--light-color);
    transform: scale(1.10) rotate(360deg);
}





/* MEDIUM----- */
@media(min-width: 768px) {
    .cta-group {
        flex-direction: row;
    }


    .cover__menu {
        max-height: none;
        overflow: visible;
        opacity: 1;
        transform: none;
        transition: none;
        width: unset;
        order: unset;
    }

    .cover__hb {
        display: none;
    }

    ul.main-menu {
        display: flex;
        gap: var(--m);
    }

    header.cover.active {
        height: 40px;
    }

    .variation-paragraphs {
        column-count: 2;
        column-gap: 40px;
    }

    .variation-paragraphs p {
        break-inside: avoid;
        margin-bottom: 40px;
    }

    .author__text {
        column-count: 2;
        column-gap: var(--xl);
    }


    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }


    .footer {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 100px;
    }
}



/* LARGE----- */
@media(min-width: 1024px) {

    header.cover {
        height: 40px;
    }

    section.hero {
        flex-direction: row;
    }

    .hero__cover .res {
        max-width: 480px;
    }

    .hero__text {
        max-width: 50%;
    }


    .cover__menu {
        order: unset;
        width: unset;
    }

    .cover__hb {
        display: none;
    }

    /* ul.main-menu {
        display: flex;
        gap: var(--m);
    } */


    .author__content {
        display: grid;
        align-items: stretch;
        gap: var(--xxl);
    }

    .author__jpg {
        padding: 0;
    }

    .author__jpg img {
        height: 100%;
    }

}