/* Tavolozza colore */

:root {
    --accent: #3366ff;
    --dark: #0B090A;
    --light: #ffffff;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

li {
    list-style-type: none;
}

.res {
    width: 100%;
}

/* Header Fisso */
.header-fisso {
    top: 0;
    left: 0;
    position: fixed;
    width: 100%;
    background-color: #ffffff;
    z-index: 1000;
    padding: 10px 2vw;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px 20px;
    border-bottom: 2px solid #3366ff;
}

h1 {
    font-family: 'Riottosa Serif', serif;
    color: #3366ff;
    text-align: center;
    justify-items: center;
    font-weight: 100;
    font-size: clamp(2em, 7vw, 6rem);
    display: block;
    width: 100%;
    margin: 0;
    white-space: normal;
    overflow-wrap: break-word;
}

h2 {
    font-family: 'Inter Tight', serif;
    color: var(--light);
    text-align: left;
    justify-items: left;
    font-weight: 400;
    font-size: 1em;
    display: block;
    width: 100%;
    margin: 0;
    white-space: normal;
}

h3 {
    font-family: 'Riottosa Serif', serif;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 100;
    color: var(--light);
}

/* Utility */

html {
    scroll-behavior: smooth;
}

/* Tipografia */
body {
    font-family: 'Inter tight', sans-serif;
}

body.dark {
    background: var(--dark);
    color: var(--light);
}


h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.8em;
    font-weight: 300;
    color: var(--light);
}

p.leading {
    font-size: 1.2em;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 300;
}

p {
    font-size: 1em;
    line-height: 1.5em;
}


.grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    padding: 10px 30px;
    margin: 0 auto;
}

/* Header */




header h2 {
    color: var(--light);
    font-size: 1.8em;
}


nav>a {
    flex-direction: column;
    flex-wrap: wrap;
    color: var(--accent);
}

/* Hero */

#hero {
    margin-top: 60px;
}

.hero_title {
    grid-column: 2/8;
}

.hero_text {
    grid-column: 2/5;
}

.hero_img {
    grid-column: 6/8;
    overflow: hidden;
    max-width: 500px;
    align-content: center;
}

.hero_img img {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Popup */
.content__collection {
    display: flex;
    justify-content: right;
    margin-bottom: 30px;
}

.content__collection .cta__primary {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    background: white;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
}

.content__collection .cta__primary span {
    font-family: Inter Tight;
    font-size: 3em;
    font-weight: 300;
    line-height: 1;
    display: block;
    color: var(--accent);
    line-height: 1;
    transform: translateY(-3px);
    transition: color 0.8s ease;
}

.content__collection .cta__primary:hover {
    background: var(--accent);
    color: white;
    border: 2px solid var(--accent);
    transition: color 0.8s ease;
}

.content__collection .cta__primary:hover span {
    color: white;
    transition: color 0.8s ease;
}

/* SFONDO OSCURATO */

.popup-wrapper {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(11, 9, 10, 0.75);
    z-index: 2000;
}

/* FINESTRA */

.popup {
    position: relative;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    background: var(--light);
    color: var(--dark);
}

/* TITOLO */

.popup h1 {
    font-family: 'Riottosa Serif';
    font-size: 2em;
    color: var(--accent);
    margin-bottom: 30px;
}

.popup label {
    font-family: 'Inter tight';
    font-size: 3em;
    color: var(--accent);
    margin-bottom: -10px;
}


/* X DI CHIUSURA */

.popup__close {
    position: absolute;
    top: 12px;
    right: 15px;
    padding: 0;
    border: 1px var(--accent);
    border-radius: 45%;
    background: transparent;
    color: var(--accent);
    font-size: 2rem;
    cursor: pointer;

}

/* CAMPI */

#trace-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#trace-form label {
    font-size: 0.9rem;
    color: var(--dark);
}

#trace-text {
    min-height: 150px;
    padding: 12px;
    border: 1px solid var(--accent);
    resize: vertical;
    font-family: inherit;
}

#trace-image {
    padding: 10px 0;
}

/* PULSANTE INVIA */

.submit-button {
    padding: 12px 25px;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: white;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.submit-button:hover {
    background: white;
    color: var(--accent);
}

/* MOBILE */

@media screen and (max-width: 600px) {

    .popup {
        padding: 35px 20px 25px;
    }

    .popup h3 {
        font-size: 1.8rem;
    }

}

/* SEZIONE MAPPA */

.map-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    background: white;
}

.map-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: white;
    cursor: grab;
}

.map-container:active {
    cursor: grabbing;
}

.map-stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform-origin: 0 0;
}

#map-image {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    pointer-events: none;
}

#map-pins {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.map-pin {
    position: absolute;
    width: 35px;
    height: auto;
    transform: translate(-50%, -100%);
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
}

/* footer */


#footer {
    background-color: var(--accent);
    color: var(--light);
    height: 100%;
}


.riottosa {
    grid-column: 1/8;


}

.progetto {
    grid-column: 1/8;
}



.footer__rights {
    grid-column: 1/9;
    flex-wrap: wrap;
    justify-content: space-between;
}


.footer__rights h3 {
    font-size: 0.8em;
    color: var(--light);
    font-weight: 400;
}

.footer__rights a {
    font-size: 0.8em;
    color: var(--light);
    font-weight: 400;
    text-decoration: underline;
}

@media screen and (max-width: 600px) {

    .grid {
        grid-template-columns: repeat(4, 1fr);
        padding: 10px 20px;
        gap: 10px;
    }

    .hero_title,
    .hero_text,
    .hero_img {
        grid-column: 1 / -1;
    }

    .content__collection .cta__primary {
        width: 50px;
        height: 50px;

        bottom: 20px;
        right: 20px;
    }

    .content__collection .cta__primary span {
        font-size: 2.5em;
    }

    .header-fisso h1 {
        font-family: 'Riottosa Serif', serif;
        font-size: 1.8rem;
        line-height: 1.1;
        white-space: normal;
    }


    .content__collection .cta__primary span {
        font-family: Inter Tight;
        font-size: 3em;
        font-weight: 300;
        line-height: 1;
        display: block;
        color: var(--accent);
        line-height: 1;
        transition: color 0.8s ease;
    }

    .content__collection .cta__primary:hover {
        background: var(--accent);
        color: white;
        border: 2px solid var(--accent);
        transition: color 0.8s ease;
    }

    .content__collection .cta__primary:hover span {
        color: white;
        transition: color 0.8s ease;
    }




}


.trace-details {
    position: fixed;
    inset: 0;
    z-index: 3000;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;
    background: rgba(11, 9, 10, 0.75);
}

.trace-details-content {
    position: relative;

    width: 100%;
    max-width: 500px;
    max-height: 80vh;

    overflow-y: auto;
    padding: 30px;

    background: var(--light);
    color: var(--dark);
}

.trace-details-content img {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 20px;
}

.trace-details-close {
    position: absolute;
    top: 10px;
    right: 15px;

    border: none;
    background: transparent;

    font-size: 30px;
    cursor: pointer;
}