:root {
    --primary-blue: #1a2b42;
    --accent-gold: #c5a065;
    --text-cream: #f4f1ea;
    --bg-cream: #f9f7f2;
    --text-dark: #333;
    --green-land: #4a7c59;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: #2c2c2c;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

/* --- ESCENA DEL LIBRO --- */
.scene {
    width: 1000px;
    height: 600px;
    perspective: 2000px;
    position: relative;
    margin: 20px;
}

.book {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s;
}

/* Páginas */
.page {
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
    left: 50%;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    cursor: pointer;
    background-color: white;
    box-shadow: inset 5px 0 10px rgba(0,0,0,0.1);
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.back {
    transform: rotateY(180deg);
    border-left: 1px solid #ddd;
}

/* ESTADOS DE VUELTA DE PÁGINA */
.page.flipped {
    transform: rotateY(-180deg);
}

/* CONTENIDOS GENERALES */
.content-wrapper {
    padding: 30px;
    height: 100%;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- ESTILOS POR PÁGINA --- */

/* Página 1: Portada */
.split-bg-cover {
    background: linear-gradient(90deg, #1a2b42 40%, #8ebf6e 100%);
    color: white;
}
.overlay-dark {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
}
.cover-content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.cover-content h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    line-height: 1.2;
}
.logo-area {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}
.main-logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
}
.hint { position: absolute; bottom: -60px; width: 100%; font-size: 0.9rem; opacity: 0.8; animation: pulse 2s infinite;}

/* Página 2 (Hombre Ventana) */
.page-bg-blue { background-color: var(--primary-blue); color: white; }
.window-img { 
    height: 220px; 
    width: 100%;
    background: url('pictures/ventana.jpg') no-repeat center top;
    background-size: cover;
    margin-top: 20px; 
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.highlight { margin-top: 15px; font-size: 1.1rem; font-style: italic; color: #ccc;}

/* Página 3 (Iconos) */
.page-bg-cream { background-color: var(--bg-cream); color: var(--text-dark); }
.pain-points .point {
    display: flex;
    margin-bottom: 25px;
    align-items: flex-start;
}
.icon-large { font-size: 2.5rem; color: var(--primary-blue); margin-right: 15px; }

/* Página 4 (Equipo - Fondo Completo) */
.page-bg-dark { background-color: #222; color: #ddd; }
.team-overlay {
    background: url('pictures/equipo.jpg') no-repeat center center;
    background-size: cover;
    padding: 0;
}
.text-overlay-box {
    background: rgba(26, 43, 66, 0.9);
    width: 100%;
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.struggle-item {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}
.struggle-item i {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--accent-gold);
}

/* Página 5 (Desierto - Fondo Completo) */
.page-bg-landscape {
    background: linear-gradient(to right, #5c4033, #e6c288, #4a7c59);
    color: white;
    text-align: center;
}
.desert-bg {
    background: url('pictures/desierto.jpg') no-repeat center bottom;
    background-size: cover;
    padding: 0;
}
.overlay-landscape { 
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(92, 64, 51, 0.2)); 
    height: 100%; 
    padding: 30px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}
.timeline { display: flex; justify-content: space-between; margin-top: 40px; border-top: 2px solid white; padding-top: 10px;}
.stage { display: flex; flex-direction: column; width: 30%; font-size: 0.8rem; }

/* Página 6 */
.page-bg-white { background: white; color: #333; }
.columns-3 { display: flex; gap: 10px; font-size: 0.8rem; text-align: center;}
.col { flex: 1; }
.stage-icon { font-size: 2rem; color: var(--accent-gold); margin-bottom: 10px; display: block; }

/* Página 7 (Ecuación) */
.page-bg-canyon { background: #8B4513; color: white; text-align: center;}
.equation { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 30px 0;}
.eq-part { display: flex; flex-direction: column; align-items: center; font-size: 0.8rem;}
.eq-part i { font-size: 2.5rem; margin-bottom: 5px; color: var(--accent-gold); }
.symbol { font-size: 2rem; font-weight: bold; }

/* Página 8 */
.visions-grid { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.vision-item { text-align: left; border-left: 3px solid var(--accent-gold); padding-left: 10px; }
.vision-item h3 { font-size: 1rem; color: var(--primary-blue); }
.vision-item p { font-size: 0.85rem; }

/* Página 9 */
.page-bg-forest { background: white; text-align: center; }
.gold-text { color: #8B4513; margin-bottom: 20px; }
.benefits-row { display: flex; gap: 10px; font-size: 0.85rem;}
.benefit i { font-size: 2rem; color: var(--accent-gold); margin-bottom: 10px; }

/* Página 10 (Salida - CTA) */
.page-bg-exit { 
    background: url('pictures/salida.jpg') no-repeat center center;
    background-size: cover;
    padding: 0;
    color: white;
}
.exit-overlay {
    background: radial-gradient(circle, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.9) 90%);
    width: 100%; height: 100%;
    padding: 40px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center;
}
.cta-button {
    background-color: var(--accent-gold);
    color: #1a2b42;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 30px;
    border-radius: 5px;
    transition: transform 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.cta-button:hover { transform: scale(1.05); background-color: #d4b075;}

/* Página 11 (Bio) */
.bio-page { display: flex; flex-direction: column; align-items: center; text-align: center;}
.bio-img-container { 
    width: 160px; height: 160px; 
    margin-bottom: 20px;
    border-radius: 50%; 
    border: 4px solid var(--accent-gold);
    background: url('pictures/gonzalo.jpg') no-repeat center center;
    background-size: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.bio-text { font-size: 0.9rem; }

/* Página 12 (Contraportada) */
.page-bg-storm { background: #1a2b42; color: white; text-align: center;}
.footer-logo-container { margin-top: 40px; display: flex; flex-direction: column; align-items: center;}
.footer-logo-img { width: 120px; opacity: 0.9; margin-bottom: 15px;}
.socials i { margin: 0 10px; font-size: 1.5rem; cursor: pointer;}

/* CONTROLES */
.controls {
    position: absolute;
    bottom: -60px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
}
.controls button {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
}
.controls button:hover { background: rgba(255,255,255,0.1); }

/* MODAL */
.modal {
    display: none; 
    position: fixed; 
    z-index: 100; 
    left: 0; top: 0; 
    width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.8); 
    align-items: center; justify-content: center;
}
.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    text-align: center;
}
.close {
    position: absolute; top: 10px; right: 20px;
    font-size: 28px; cursor: pointer; color: #aaa;
}
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; color: #333; }
.form-group input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; }
.full-width { width: 100%; margin-top: 10px; }

/* RESPONSIVE MÓVIL */
@media (max-width: 768px) {
    .scene {
        width: 100%;
        height: auto;
        perspective: none;
        margin: 0;
    }
    .book {
        transform-style: flat;
        display: flex;
        flex-direction: column;
    }
    .page {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 550px;
        left: 0;
        transform: none !important;
        margin-bottom: 5px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    .front, .back {
        position: relative;
        height: auto;
        min-height: 400px;
        backface-visibility: visible;
        transform: none;
        border: none;
    }
    .back { display: block; border-top: 1px solid #ddd; }
    .controls { display: none; }
    .hint { display: none; }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}