:root {
    --viola-scuro: #460169;
    --grigio-viola: #5d466b;
    --viola-profondo: #36024f;
    --bianco-crema: #fff6d7;
    --ottanio-luminoso: #00A6B6;
    --lavanda: #ac99cc;
    --oro-caldo: #f4c542;
    --bianco: #ffffff;
}

/* FONT */
.atkinson-hyperlegible-regular {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 400;
}

.atkinson-hyperlegible-bold {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 700;
}

.atkinson-hyperlegible-regular-italic {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 400;
    font-style: italic;
}

.atkinson-hyperlegible-bold-italic {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 700;
    font-style: italic;
}

h1, h2, h3, h4 {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 700;
}

p {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 400;
}

/* BODY */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}


/* SFONDO A SCHERMO INTERO */
.parete-viewport {
    position: fixed;
    inset: 0;
    background-image: url("immagini/bacheca/parete.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* SCENA CENTRATA */
.bacheca {
    position: relative;
    width: 100vw;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* LANDSCAPE */
@media (orientation: landscape) {
    .container {
        position: relative;
        aspect-ratio: 16 / 9;
        max-width: 100vw;
        max-height: 100dvh;
        width: 100vw;
        height: auto;
        overflow: visible;
        z-index: 2;
    }
}



/* ===========================
   LAMPADA — fissa in alto allo schermo
   =========================== */
.lampada {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    z-index: 1; /* sotto gli oggetti */
    pointer-events: none; /* non blocca click */
}

/* ===========================
   ELEMENTI DI SFONDO — LANDSCAPE
   =========================== */
.elementi-sfondo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    pointer-events: none;
    z-index: 3;
}

/* ===========================
   OGGETTI — base
   =========================== */
.oggetto {
    position: absolute;
    z-index: 4;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.oggetto:hover {
    transform: scale(1.05);
}

/* ===========================
   POSIZIONI LANDSCAPE
   =========================== */
.mappa {
    width: 32%;
    bottom: 4%;
    left: 32%;
}

.lettera {
    width: 16%;
    top: 5%;
    left: 3%;
    transform: rotate(-5deg);
}

.polaroid {
    width: 14%;
    top: 5%;
    right: 4%;
    transform: rotate(8deg);
}

.giornale {
    width: 16%;
    bottom: 3%;
    left: 5%;
    transform: rotate(3deg);
}

.piastrina {
    width: 4%;
    bottom: 2%;
    right: 2%;
}



/* ===========================
   MODAL LETTERA
   =========================== */

.modal-lettera {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-lettera.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 80vw;
    max-width: 450px;
    aspect-ratio: 1 / 1;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.25s ease;
    font-size: clamp(12px, 3.2vw, 18px);
}

/* BUSTA COME IMG REALE */
.busta-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

.modal-lettera.visible .modal-content {
    transform: scale(1);
}

/* BLOCCO UNICO: scritta + icone */
.contenuto-lettera {
    position: absolute;
    top: 14%;                 
    left: 50%;
    transform: translateX(-50%);
    width: 70%;               
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4em;              
    z-index: 2;
}

/* SCRITTA "Seguimi su" */
.seguimi-su {
    font-family: "Caveat", cursive;
    font-size: 1.8em;
    color: var(--bianco);
    margin: 0;
    line-height: 1;
    pointer-events: none;
}

/* ICONE SOCIAL */
.contenuto-lettera .social-buttons {
    display: flex;
    justify-content: center;
    gap: 2.5em;              
}

.contenuto-lettera .social-icon {
    font-size: 2.4em;
    color: var(--bianco);
    transition: transform 0.2s ease, color 0.2s ease;
}

.contenuto-lettera .social-icon:hover {
    transform: scale(1.30);
}

/* Nascondi inizialmente */
.hidden {
    display: none;
}





/* ===========================
   PORTRAIT
   =========================== */

@media (orientation: portrait) {
    .bacheca {
        justify-content: center;
    }

    .container {
        position: relative;
        aspect-ratio: 9 / 16;
        max-width: 100vw;
        max-height: 100dvh;
        width: auto;
        height: 100vh;
        overflow: visible;
        z-index: 2;
    }


    .elementi-sfondo {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center center;
        pointer-events: none;
        z-index: 3;
        content: url("immagini/bacheca/elementi-sfondo-mobile.png");
    }

    .mappa {
        width: 58%;
        top: 40%;
        left: 22%;
    }

    .lettera {
        width: 38%;
        top: 3%;
        left: 3%;
        transform: rotate(-5deg);
    }

    .polaroid {
        width: 29%;
        top: 3%;
        right: 3%;
        transform: rotate(8deg);
    }

    .giornale {
        width: 36%;
        bottom: 2%;
        left: 10%;
        transform: rotate(3deg);
    }

    .piastrina {
        width: 11.5%;
        bottom: 2%;
        right: 3%;
    }
}
