:root {
    --bg-color: #080808;
    --accent-color: #E6B800;
    --text-color: #F2F2F2;
    --text-muted: #888888;
    
    --font-heading: 'Clash Display', sans-serif;
    --font-body: 'Manrope', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Tipografía */
h1, h2, h3, .logo {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.1;
}

p {
    line-height: 1.6;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Navegación */
.navbar {
    position: absolute; /* El logo se queda arriba, no te persigue al scrollear */
    top: 0;
    width: 100%;
    padding: 2rem 4rem;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(8,8,8,0.9) 0%, rgba(8,8,8,0) 100%);
    pointer-events: none;
}

.logo-link {
    pointer-events: auto;
    display: inline-block;
}

.logo-img {
    height: 140px; /* Tamaño aumentado drásticamente */
    width: auto;
    object-fit: contain;
}

/* Botones / CTAs */
.cta-btn {
    display: inline-block;
    border: 2px solid var(--accent-color);
    background: transparent;
    color: var(--text-color);
    padding: 1.2rem 3rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 0;
}

.cta-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.cta-btn.sm {
    padding: 1rem 2rem;
    font-size: 0.9rem;
}

.cta-btn.solid {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.cta-btn.solid:hover {
    background-color: transparent;
    color: var(--text-color);
}


/* Layout Global */
.section {
    padding: 8rem 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 1. Impacto (Hero) */
.impact {
    position: relative;
    justify-content: flex-end;
    padding-bottom: 6rem;
    background-color: #080808; 
    /* Degradado sutil solo a la izquierda para leer el texto, dejando la foto limpia a la derecha */
    background-image: linear-gradient(to right, #080808 20%, rgba(8,8,8,0) 80%), url('img/cielo.webp');
    background-size: auto 100%;
    background-position: right center;
    background-repeat: no-repeat;
}

.impact-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.impact h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.impact .subtitle {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 3rem;
    max-width: 700px;
    color: var(--text-color);
}


/* 2. Evidencia Física */
.evidencia {
    background-color: var(--bg-color);
}

.evidencia-header {
    margin-bottom: 5rem;
}

.evidencia h2 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    max-width: 800px;
}

.evidencia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

.evidencia-card {
    border-top: 1px solid #222;
    padding-top: 2rem;
}

.evidencia-img-placeholder {
    width: 100%;
    height: 250px;
    background-color: #161616;
    margin-bottom: 2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.evidencia-img-placeholder::after {
    content: '[IMAGEN TÉCNICA] ' attr(data-image);
    font-family: var(--font-heading);
    color: #444;
    letter-spacing: 1px;
    font-size: 0.9rem;
    text-align: center;
}

.evidencia-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

/* 3. Catálogo */
.catalogo {
    padding-left: 0;
    padding-right: 0;
}

.catalogo-header {
    padding: 0 4rem;
    margin-bottom: 4rem;
}

.catalogo h2 {
    font-size: clamp(2.5rem, 4vw, 4rem);
}

.catalogo-swiper {
    width: 100%;
    padding-bottom: 2rem;
}

/* Modal de Galería Completa */
.full-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.full-gallery-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-header {
    position: sticky;
    top: 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(to bottom, rgba(8,8,8,0.95) 0%, rgba(8,8,8,0) 100%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-family: var(--font-heading);
}

.back-btn {
    background: #fff;
    color: #000;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.back-btn:hover {
    transform: scale(1.1);
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 1rem 4rem 4rem 4rem;
    width: 100%;
    box-sizing: border-box;
}

.modal-grid .obra-item {
    width: 100% !important;
    margin: 0 !important;
}

.obra-item {
    position: relative;
    aspect-ratio: 4/5;
    background-color: #111;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
}

.obra-img-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Manejo de la imagen rota/faltante elegantemente */
.obra-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: #161616;
    color: #444;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Rotación matemática perfecta para 4:5 usando contain para no cortar NADA del auto */
.obra-img.rotated {
    width: 125%; 
    height: 80%; 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    object-fit: contain; 
}

.obra-item:hover .obra-img:not(.rotated) {
    transform: scale(1.05);
}

.obra-item:hover .obra-img.rotated {
    transform: translate(-50%, -50%) rotate(-90deg) scale(1.05);
}

.obra-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem;
    z-index: 2;
    background: linear-gradient(to top, rgba(8,8,8,0.95) 0%, rgba(8,8,8,0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.obra-item:hover .obra-info {
    opacity: 1;
    transform: translateY(0);
}

.obra-info h3 {
    font-size: 2rem;
    color: var(--text-color);
}

.catalogo-actions {
    text-align: center;
    margin-top: 3rem;
}

.cta-btn.outline {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.cta-btn.outline:hover {
    background: var(--accent-color);
    color: #080808;
}

/* 4. Manifiesto */
.manifiesto {
    text-align: center;
    align-items: center;
}

.manifiesto-content {
    max-width: 900px;
}

.manifiesto h2 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 2rem;
    color: var(--text-color);
}

.manifiesto p {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--text-muted);
    margin-bottom: 4rem;
}

/* Footer */
.footer {
    padding: 4rem;
    text-align: center;
    border-top: 1px solid #222;
}

.footer p {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
    .impact {
        background-size: cover;
        background-position: center;
        background-image: linear-gradient(to top, #080808 10%, rgba(8,8,8,0.4) 100%), url('img/cielo.webp');
    }

    .section {
        padding: 5rem 1.5rem;
    }
    
    .navbar {
        position: absolute; /* El logo no te persigue ni tapa el arte al bajar */
        padding: 1rem 1.5rem;
    }

    .logo-img {
        height: 120px; /* Aumentado sustancialmente para móvil */
    }

    /* Reducción de tipografía para evitar desbordes */
    .impact h1 {
        font-size: 2.5rem;
    }
    .evidencia h2, .catalogo h2 {
        font-size: 2rem;
    }
    .manifiesto h2 {
        font-size: 2.2rem;
    }
    
    .catalogo-header {
        padding: 0 1.5rem;
    }
    
    .modal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem 1.5rem 4rem 1.5rem;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }

    .obra-item {
        aspect-ratio: 4/5;
    }

    /* Arreglo estructural del botón e info */
    .obra-info {
        position: absolute; /* Vuelve a flotar encima porque ahora la foto es enorme y sobra espacio */
        background: linear-gradient(to top, rgba(8,8,8,0.95) 0%, rgba(8,8,8,0) 100%);
        opacity: 1;
        transform: translateY(0);
        padding: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .obra-info h3 {
        font-size: 0.95rem; /* Títulos mucho más sutiles en móvil */
    }

    .cta-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        width: 100%; /* Botones de ancho completo en celular son mejores en CRO */
        text-align: center;
    }

    .cta-btn.sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.95);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    color: #fff;
    border: none;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10001;
}

.lightbox-content {
    width: 90%;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content .obra-img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    object-fit: contain;
}

.lightbox-content .obra-img.rotated {
    transform: rotate(-90deg) !important;
}
