/* ========================================
   INVESTIGACIÓN 003 - PARALLAX COLLAGE
   Inspirado en indirect.flights
   ======================================== */

/* ========================================
   RESET Y CONFIGURACIÓN BASE
   ======================================== */

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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #e0e0e0;
    color: #333333;
}

body {
    cursor: move;
}


/* ========================================
   CONTROLES DE INTERFAZ
   ======================================== */

.ui-controls {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 100;
    display: flex;
    gap: 1rem;
}

.ui-button {
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #333333;
    padding: 0.5rem 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: lowercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ui-button:hover {
    background-color: #333333;
    color: #ffffff;
}


/* ========================================
   PANEL DE INFORMACIÓN
   ======================================== */

.info-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.info-panel.hidden {
    opacity: 0;
    pointer-events: none;
}

.close-button {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background-color: transparent;
    border: 2px solid #333333;
    padding: 0.5rem 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: lowercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-button:hover {
    background-color: #333333;
    color: #ffffff;
}

.info-content {
    max-width: 600px;
    padding: 3rem;
    text-align: left;
}

.info-content h1 {
    font-size: 2.5rem;
    font-weight: 300;
    font-style: italic;
    margin-bottom: 0.5rem;
    color: #333333;
}

.info-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #333333;
}

.info-content p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #555555;
}

.info-content .credits {
    font-size: 0.85rem;
    color: #888888;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #cccccc;
}


/* ========================================
   CONTENEDOR PARALLAX
   ======================================== */

.parallax-container {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    transform-style: preserve-3d;
    overflow: hidden;
}


/* ========================================
   CAPAS PARALLAX
   ======================================== */

.parallax-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.parallax-layer img {
    width: auto;
    height: auto;
    max-width: 150%;
    max-height: 150%;
    object-fit: cover;
    opacity: 0.85;
    mix-blend-mode: multiply;
    pointer-events: none;
    user-select: none;
}

/* Opacidades específicas para cada capa */
.parallax-layer[data-depth="0.1"] img {
    opacity: 0.5;
}

.parallax-layer[data-depth="0.2"] img {
    opacity: 0.6;
}

.parallax-layer[data-depth="0.3"] img {
    opacity: 0.65;
}

.parallax-layer[data-depth="0.4"] img {
    opacity: 0.7;
}

.parallax-layer[data-depth="0.5"] img {
    opacity: 0.9;
    mix-blend-mode: normal;
}

.parallax-layer[data-depth="0.6"] img {
    opacity: 0.75;
}

.parallax-layer[data-depth="0.7"] img {
    opacity: 0.8;
}

.parallax-layer[data-depth="0.8"] img {
    opacity: 0.7;
}

.parallax-layer[data-depth="0.9"] img {
    opacity: 0.65;
}

.parallax-layer[data-depth="1.0"] img {
    opacity: 0.6;
}


/* ========================================
   INFORMACIÓN INFERIOR
   ======================================== */

.bottom-info {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    font-size: 0.85rem;
    color: #333333;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border: 1px solid #cccccc;
}

.bottom-info .separator {
    margin: 0 0.5rem;
}

.bottom-info .title {
    font-style: italic;
}

.bottom-info .author {
    font-weight: bold;
}


/* ========================================
   RESPONSIVE - TABLET Y MÓVIL
   ======================================== */

@media (max-width: 1024px) {
    .ui-controls {
        top: 1rem;
        left: 1rem;
        gap: 0.5rem;
    }

    .ui-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .info-content {
        padding: 2rem;
    }

    .info-content h1 {
        font-size: 2rem;
    }

    .info-content h2 {
        font-size: 1.2rem;
    }

    .bottom-info {
        bottom: 1rem;
        right: 1rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 640px) {
    body {
        cursor: default;
    }

    .ui-controls {
        flex-direction: column;
        gap: 0.3rem;
    }

    .close-button {
        top: 1rem;
        right: 1rem;
    }

    .info-content {
        padding: 1.5rem;
        max-width: 90%;
    }

    .info-content h1 {
        font-size: 1.5rem;
    }

    .info-content h2 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .info-content p {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .bottom-info {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        text-align: right;
    }

    .bottom-info .separator {
        display: none;
    }

    /* En móvil, las capas se mueven menos para evitar mareos */
    .parallax-layer {
        transition: transform 0.2s ease-out;
    }
}


/* ========================================
   ANIMACIONES Y TRANSICIONES
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.parallax-container {
    animation: fadeIn 1s ease-in;
}


/* ========================================
   MODO REDUCCIÓN DE MOVIMIENTO
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .parallax-layer {
        transition: none;
    }
    
    .parallax-container {
        animation: none;
    }
}
