/* ============================================================
   THE WALK - style.css (Umbral / A)
   Basado en Mapa.css
   ============================================================ */

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #dadada;
    font-family: system-ui, -apple-system, Ubuntu, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,  Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    cursor: default;
}

/* ---------- CONTENEDOR ---------- */
#umbral-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #dadada;
}

/* ---------- CAPA DE FONDO ---------- */
#background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#background-layer img,
#background-layer video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    transition: opacity 0.8s ease;
}

/* Cambia el orden de las capas */
#bg-image {
    opacity: 0.3; /* Ajusta este valor para más/menos transparencia */
    z-index: 2; /* Imagen encima del video */
    pointer-events: none; /* Permite click-through */
    mix-blend-mode: overlay; /* Opcional: efectos de mezcla */
    
}
/* Modos de mezcla interesantes */
#bg-image {
    
}
#bg-video {
    opacity: 1;
    z-index: 1; /* Video debajo de la imagen */
}

/* Cuando la imagen está "oculta" (para el selector) */
#bg-image.hidden {
    opacity: 0;
}

/* Para el modo video: imagen completamente transparente */
#bg-image.video-mode {
    opacity: 0;
}

/* Para el modo imagen: imagen con transparencia */
#bg-image.image-mode {
    opacity: 0.3; /* Ajustable */
}

/* ---------- OVERLAY CON BREATH ---------- */
#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    background: rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

/* ---------- SELECTOR (hover) ---------- */
#selector {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 10;
    display: flex;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#umbral-container:hover #selector {
    opacity: 1;
}

.selector-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(149, 255, 119, 0.459);
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.selector-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.selector-btn.active {
    background: rgba(105, 170, 93, 0.5);
    border-color: #69aa5d;
}

/* ---------- BOTÓN DE SONIDO (centrado) ---------- */
#sonido {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(149, 255, 119, 0.459);
    color: rgba(245, 255, 240, 0.897);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.6s ease;
    backdrop-filter: blur(4px);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sonido:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(242, 252, 235, 0.74);
    transform: translate(-50%, -50%) scale(1.05);
}

#sonido.active {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(105, 170, 93, 0.15);
}

#sonido.silence {
    color: rgba(255, 255, 255, 0.3);
}

/* ---------- ÁREA DE CLICK ---------- */
#click-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    cursor: pointer;
}

/* ---------- INDICADOR ---------- */
#umbral-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 300;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

/* ---------- RESPIRACIÓN (BREATH) ---------- */
.breath {
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
    0% { opacity: 0.6; transform: scale(1); }
    25% { opacity: 0.9; transform: scale(1.02); }
    50% { opacity: 0.6; transform: scale(1); }
    75% { opacity: 0.9; transform: scale(1.02); }
    100% { opacity: 0.6; transform: scale(1); }
}

/* ---------- OVERLAY BREATH PERSONALIZADO ---------- */
#overlay.breath {
    animation: overlayBreathe 8s ease-in-out infinite;
}

@keyframes overlayBreathe {
    0% { opacity: 0.12; }
    25% { opacity: 0.22; }
    50% { opacity: 0.12; }
    75% { opacity: 0.22; }
    100% { opacity: 0.12; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    #sonido {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    #selector {
        bottom: 20px;
        right: 20px;
        gap: 8px;
    }
    
    .selector-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    #umbral-indicator {
        bottom: 60px;
        font-size: 9px;
        letter-spacing: 2px;
    }
}
/* ---------- MODO DE SONIDO ---------- */
#sound-mode-container {
    position: absolute;
    z-index: 10;
}

/* Posiciones específicas por página */
#umbral-container #sound-mode-container {
    bottom: 40px;
    right: 40px;
}

#B-container #sound-mode-container {
    bottom: 100px;
    right: 40px;
}

#C-container #sound-mode-container {
    top: 30px;
    right: 30px;
}

#D-container #sound-mode-container {
    top: 30px;
    right: 30px;
}

#E-container #sound-mode-container {
    top: 30px;
    right: 30px;
}


@media (max-width: 768px) {
    #sound-mode {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    #umbral-container #sound-mode-container {
        bottom: 30px;
        right: 30px;
    }
    
    #B-container #sound-mode-container {
        bottom: 80px;
        right: 20px;
    }
    
    #C-container #sound-mode-container,
    #D-container #sound-mode-container,
    #E-container #sound-mode-container {
        top: 20px;
        right: 20px;
    }
}


@media (max-width: 768px) {
    #sonido {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    #sonido {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}
