
/* SUD IN CAMPO
   Visual Identity 1.0 */

:root {
    --black: #000000;
    --blue: #2454ff;
    --white: #f5f5f5;
    --grey: #888888;
    --border: #242424;
}

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

body {
    background: var(--black);
    color: var(--white);
    font-family: Helvetica, Arial, sans-serif;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
    cursor: pointer;
}

button:focus-visible, a:focus-visible {
    outline: 2px solid #648aff;
    outline-offset: 3px;
}

/* LOGO E NAVIGAZIONE */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--black);
    gap: 20px;
}

.brand h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
}

.brand em {
    font-style: italic;
}

.brand h1 span {
    color: var(--blue);
}

.brand p {
    margin-top: 9px;
    font-size: 9px;
    letter-spacing: 2.5px;
    color: var(--grey);
}

.navigation {
    display: flex;
    align-items: center;
    gap: 26px;
}

.navigation a {
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
}

.navigation a.active,
.navigation a:hover {
    color: #648aff;
}

.navigation button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--white);
    padding: 8px 12px;
    font-size: 11px;
}

/* ATLANTE MONDIALE */

.atlas {
    position: relative;
    flex: 1;
    min-height: 650px;
    overflow: hidden;
}

#map {
    position: absolute;
    inset: 0;
    background: #000;
}

.map-heading {
    position: absolute;
    top: 35px;
    left: 32px;
    z-index: 2;
    pointer-events: none;
}

.map-heading span {
    color: #648aff;
    font-size: 10px;
    letter-spacing: 3px;
}

.map-heading h2 {
    margin-top: 14px;
    font-size: clamp(32px, 5vw, 68px);
    font-weight: 700;
    letter-spacing: -3px;
    line-height: 0.95;
}

/* FILTRI ETNOGRAFICI */

.filters {
    position: absolute;
    bottom: 65px;
    left: 32px;
    right: 90px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.filters button {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid #333;
    color: var(--white);
    padding: 9px 15px;
    border-radius: 30px;
    font-size: 11px;
    transition: 0.2s;
}

.filters button.active,
.filters button:hover {
    background: var(--blue);
    border-color: var(--blue);
}

/* CONTROLLI MAPPA */

.map-controls {
    position: absolute;
    right: 24px;
    bottom: 65px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.map-controls button {
    width: 40px;
    height: 40px;
    background: #080808;
    border: 1px solid #333;
    color: var(--white);
    font-size: 20px;
}

.map-controls button:hover {
    background: var(--blue);
}

/* PUNTI SONORI */

.sound-marker {
    width: 14px;
    height: 14px;
    padding: 0;
    border-radius: 50%;
    background: var(--blue);
    border: 2px solid #91a8ff;
    box-shadow: 0 0 15px #2454ff;
    cursor: pointer;
}

.sound-marker::after {
    content: "";
    position: absolute;
    inset: -7px;
    border: 1px solid var(--blue);
    border-radius: 50%;
    animation: pulse 2.5s infinite;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: scale(0.7);
        opacity: 1;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* MINI PLAYER ANCORATO ALLA MAPPA */

.maplibregl-popup-content {
    background: #080b14;
    color: var(--white);
    border: 1px solid var(--blue);
    border-radius: 6px;
    padding: 14px;
    box-shadow: 0 0 25px #2454ff33;
}

.maplibregl-popup-tip {
    display: none;
}

.maplibregl-popup-close-button {
    color: var(--white);
    font-size: 20px;
    padding: 2px 6px;
}

.mini-player {
    width: 210px;
    max-width: 65vw;
}

.mini-player h3 {
    font-size: 14px;
    margin: 4px 12px 6px 0;
}

.mini-player p {
    font-size: 10px;
    color: #a0a0a0;
    margin-bottom: 10px;
}

.mini-player audio {
    width: 100%;
    height: 32px;
    color-scheme: dark;
}

/* STATO ARCHIVIO */

.map-status {
    position: absolute;
    bottom: 32px;
    left: 32px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10px;
    letter-spacing: 1px;
    color: #aaa;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--blue);
}

/* FOOTER */

footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 32px;
    border-top: 1px solid var(--border);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--grey);
}

/* VERSIONE MOBILE */

@media (max-width: 768px) {

    .header {
        padding: 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .brand h1 {
        font-size: 30px;
    }

    .navigation {
        width: 100%;
        gap: 15px;
        flex-wrap: wrap;
    }

    .navigation a {
        font-size: 12px;
    }

    .atlas {
        min-height: 540px;
    }

    .map-heading {
        top: 24px;
        left: 18px;
    }

    .map-heading h2 {
        font-size: 38px;
        letter-spacing: -2px;
    }

    .filters {
        left: 18px;
        right: 65px;
        bottom: 60px;
    }

    .filters button {
        font-size: 10px;
        padding: 7px 10px;
    }

    .map-controls {
        right: 12px;
    }

    .map-status {
        left: 18px;
    }

    footer {
        padding: 14px 18px;
        font-size: 8px;
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sound-marker::after {
        animation: none;
    }

    * {
        transition: none !important;
    }
}
