/* Variables y Reset */
:root {
    --bg-color: #F2F0E9;
    --text-color: #1a1a1a;
    --accent-color: #A65E44; /* Terracotta suave */
    --font-title: 'Italiana', serif;
    --font-display: 'Cinzel', serif;
    --font-body: 'Jost', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow: hidden; /* Importante para controlar el scroll nosotros mismos */
    height: 100vh;
    width: 100vw;
}

/* Efecto de Grano (OPTIMIZADO) */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.07; /* Ajustado para la nueva imagen */
    /* Ruido estático ligero en Base64 para evitar cálculos SVG costosos */
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAGFBMVEUAAAA5OTkAAABMTExERERmZmYzMzMyMjJ4D30QAAAACHRSTlMAMwA1MzMzM7O0s14AAABSSURBVDjLpM6xDcAgDARRcysSMgsFs4T9F8EChyi20vhjS5/uLqLq7g4A8K0I41bq9/d7jW2V1s56q2c917t+67/+G0Y84ohHPKBFPOIRj/h/IgEwVRNlH8ke4gAAAABJRU5ErkJggg==");
    background-repeat: repeat;
}

/* Navegación Fija */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000; /* CAMBIO: Muy arriba */
    mix-blend-mode: multiply;
}

.logo {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.chapter-indicator {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.inquire-btn {
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--text-color);
    padding: 10px 25px;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.inquire-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Barra de Progreso */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,0.05);
    z-index: 100;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--text-color);
    transition: width 0.1s linear;
}

/* Estructura de Galería Horizontal */
.gallery-container {
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
}

.gallery-track {
    display: flex;
    flex-wrap: nowrap;
    height: 100%;
    width: max-content;
    padding: 0 10vw;
    will-change: transform;
}

/* CLASE MÁGICA PARA FLUIDEZ */
.is-scrolling {
    pointer-events: none; /* Desactiva hovers mientras se mueve -> FLUIDEZ TOTAL */
}

/* Paneles (Secciones) */
.panel {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* No encoger */
    position: relative;
    padding: 0 5vw;
}

/* Panel Hero */
.panel-hero {
    width: 100vw;
    justify-content: space-between;
}

.hero-content {
    z-index: 2;
}

.art-title {
    font-family: var(--font-title);
    font-size: 10vw;
    line-height: 0.9;
    font-weight: 400;
    color: var(--text-color);
}

.art-title .indent {
    margin-left: 15vw;
    font-style: italic;
    color: var(--accent-color);
}

.curator-note {
    margin-top: 3rem;
    font-size: 1rem;
    max-width: 300px;
    border-left: 1px solid var(--text-color);
    padding-left: 1rem;
}

.hero-img-container {
    width: 35vw;
    height: 70vh;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
}

/* Panel Texto */
.panel-text {
    width: 60vw;
    z-index: 10; /* Elevar panel */
}

.text-block {
    text-align: center;
    max-width: 80%;
    position: relative;
    z-index: 20; /* Elevar contenido */
}


.label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.big-text {
    font-family: var(--font-title);
    font-size: 3rem;
    line-height: 1.3;
}

.signature {
    margin-top: 2rem;
    font-family: var(--font-display);
}

/* Galería Mixta */
.panel-gallery-1 {
    width: 80vw;
    gap: 5vw;
}

.art-piece {
    position: relative;
    /* Optimización: sombra más simple y sin blur excesivo */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.art-piece img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.small-piece {
    width: 25vw;
    height: 35vh;
}

.large-piece {
    width: 35vw;
    height: 55vh;
}

.medium-piece {
    width: 30vw;
    height: 45vh;
}

.top { align-self: flex-start; margin-top: 15vh; }
.bottom { align-self: flex-end; margin-bottom: 15vh; }
.center { align-self: center; }

.placard {
    position: absolute;
    bottom: -60px;
    left: 0;
    font-size: 0.8rem;
}

.placard-title {
    display: block;
    font-weight: 600;
    text-transform: uppercase;
}

.placard-date {
    display: block;
    color: #666;
    font-style: italic;
}

/* Panel Full Bleed (CORREGIDO) */
.panel-full {
    width: 100vw;
    padding: 0;
    overflow: hidden; /* Asegurar que nada se salga */
}

.full-img-wrapper {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.full-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Clave: recorta la imagen para llenar el espacio */
    object-position: center;
    filter: brightness(0.9); /* Un poco más oscuro para que el texto resalte mejor */
}

.floating-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-title);
    font-size: 18vw; /* Más grande */
    line-height: 1; /* Centrado vertical más preciso */
    color: #fff;
    mix-blend-mode: overlay;
    pointer-events: none;
    white-space: nowrap; /* Evitar saltos de línea */
    text-align: center;
    width: 100%; /* Asegurar centrado si hay saltos */
}

/* Servicios */
.panel-services {
    width: 70vw;
}

.services-list {
    width: 100%;
}

.service-row {
    display: flex;
    align-items: baseline;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    font-size: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
}

.service-row:hover {
    padding-left: 2rem;
    border-bottom-color: var(--accent-color);
}

.service-num {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-right: 3rem;
    opacity: 0.5;
}

.service-name {
    font-family: var(--font-title);
    flex-grow: 1;
}

.service-price {
    font-size: 1rem;
    font-style: italic;
}

/* Galería 2 */
.panel-gallery-2 {
    width: 60vw;
}

/* Contacto */
.panel-contact {
    width: 60vw;
    background: #e8e6df;
    z-index: 10; /* Elevar panel */
}

.contact-card {
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 20; /* Asegurar que esté encima */
}

.contact-card h2 {
    font-family: var(--font-title);
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 3rem;
}

.art-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.art-form input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--text-color);
    padding: 1rem 0;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-color);
}

.art-form input:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
}

.art-form button {
    margin-top: 2rem;
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.3s;
}

.art-form button:hover {
    transform: translateY(-5px);
}

.contact-footer {
    margin-top: 5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.5;
    display: flex;
    justify-content: space-between;
}

/* Scroll Hint / Indicador de Navegación */
.scroll-hint {
    position: fixed; /* CAMBIO: Ahora es fixed para flotar siempre */
    bottom: 3rem;
    left: 5vw; 
    display: flex;
    flex-direction: row; 
    align-items: center;
    gap: 15px;
    z-index: 900; /* Alto z-index para estar sobre las fotos */
    opacity: 0.7;
    mix-blend-mode: multiply; /* Mantiene la estética de tinta */
    transition: opacity 0.3s;
    pointer-events: none; /* Para que no bloquee clicks si pasa sobre algo */
}

.scroll-hint:hover {
    opacity: 1;
}

.mouse-icon {
    width: 22px;
    height: 34px;
    border: 1.5px solid var(--text-color);
    border-radius: 12px;
    position: relative;
    display: flex;
    justify-content: center;
}

.wheel {
    position: absolute;
    top: 6px;
    width: 2px;
    height: 6px;
    background: var(--text-color);
    border-radius: 2px;
    animation: scrollWheel 1.5s infinite ease-in-out;
}

.hint-text-group {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.hint-text {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-color);
}

.hint-subtext {
    font-size: 0.7rem;
    font-family: var(--font-title); /* Fuente serif para contraste elegante */
    font-style: italic;
    color: var(--accent-color);
}

.arrow-right {
    display: none; /* Eliminamos la flecha confusa */
}

@keyframes scrollWheel {
    0% { top: 6px; opacity: 1; }
    100% { top: 18px; opacity: 0; }
}

/* Aviso Móvil - Oculto por defecto */
.mobile-advice {
    display: none;
}

/* Estilos para el Acordeón de Servicios */
.services-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.services-intro {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.package-item {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.package-item:first-child {
    border-top: 1px solid rgba(0,0,0,0.1);
}

.package-header {
    display: flex;
    align-items: baseline;
    padding: 1.5rem 0;
    cursor: pointer;
    transition: background 0.3s;
}

.package-header:hover {
    padding-left: 1rem;
}

.pkg-num {
    font-family: var(--font-display);
    font-size: 0.9rem;
    margin-right: 1.5rem;
    opacity: 0.5;
}

.pkg-name {
    font-family: var(--font-title);
    font-size: 1.8rem;
    flex-grow: 1;
}

.pkg-price {
    font-family: var(--font-body);
    font-size: 1.1rem;
    margin-right: 1.5rem;
    font-weight: 500;
}

.pkg-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s;
}

.package-item.active .pkg-toggle {
    transform: rotate(45deg);
}

/* Detalles ocultos por defecto */
.package-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    background: rgba(255,255,255,0.3);
}

.package-item.active .package-details {
    max-height: 600px; /* Altura suficiente para mostrar todo */
}

.pkg-list {
    list-style: none;
    padding: 1.5rem 2rem 2rem 4rem;
}

.pkg-list li {
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: #444;
    position: relative;
}

.pkg-list li::before {
    content: '•';
    position: absolute;
    left: -1.5rem;
    color: var(--accent-color);
}

.pkg-list strong {
    font-weight: 500;
    color: var(--text-color);
}

.pkg-note {
    margin-top: 1rem;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--accent-color) !important;
}

/* Mobile Responsive - Convertir a vertical */
@media (max-width: 768px) {
    /* Mostrar aviso en móvil - BARRA INFERIOR */
    .mobile-advice {
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: var(--text-color);
        color: var(--bg-color);
        padding: 12px 20px;
        text-align: center;
        position: fixed; /* Fijo abajo */
        bottom: 0;
        left: 0;
        z-index: 2000; /* Por encima de todo */
        font-family: var(--font-body);
        font-size: 0.65rem; /* Un poco más pequeño para ser sutil */
        letter-spacing: 1px;
        text-transform: uppercase;
        width: 100%;
        box-shadow: 0 -5px 10px rgba(0,0,0,0.1);
    }

    body {
        overflow-y: auto;
        overflow-x: hidden;
        height: auto;
    }

    .gallery-container {
        display: block;
        height: auto;
    }

    .gallery-track {
        flex-direction: column;
        width: 100%;
        height: auto;
        padding: 0;
    }

    .panel {
        width: 100% !important;
        height: auto !important;
        min-height: 100vh;
        padding: 4rem 1.5rem;
    }

    .panel-hero {
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
    }
    
    .hero-img-container {
        width: 100%;
        height: 50vh;
    }

    .art-title {
        font-size: 15vw;
    }
    
    .art-piece {
        width: 100%;
        height: 50vh;
        margin: 2rem 0 !important;
    }

    .floating-text {
        font-size: 20vw;
    }
    
    .progress-bar {
        display: none;
    }
    
    .service-row {
        font-size: 1.2rem;
    }
    
    /* Ocultar en móvil ya que ahí es scroll vertical nativo */
    .scroll-hint {
        display: none;
    }
}

/* --- ESTILOS DEL FOTOBOOK DIGITAL --- */
.book-btn {
    margin-right: 15px;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}

.book-btn:hover {
    text-decoration: underline;
}

.nav-actions {
    display: flex;
    align-items: center;
}

/* Overlay (Fondo oscuro) */
.book-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.98);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden; /* CAMBIO: Oculto del DOM visual */
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.book-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.book-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #fff;
    font-family: var(--font-body);
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 3001;
}

.book-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.book-wrapper {
    position: relative;
    width: 100%;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-page {
    position: absolute;
    width: auto;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.6s ease;
    transform: scale(0.9) translateX(50px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-page.active {
    opacity: 1;
    transform: scale(1) translateX(0);
    z-index: 2;
}

.book-page img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.book-controls {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 30px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.book-prev, .book-next {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    font-size: inherit;
}

.book-prev:hover, .book-next:hover {
    background: #fff;
    color: #000;
}

/* Ajustes para Móvil del Fotobook */
@media (max-width: 768px) {
    /* Ocultar acciones del header en móvil */
    .nav-actions {
        display: none; 
    }
    
    .book-page img {
        max-width: 95vw;
        max-height: 60vh;
    }
}

/* --- PROTECCIÓN QUIRÚRGICA (SOLO IMÁGENES) --- */
img {
    -webkit-user-drag: none; /* Chrome/Safari */
    user-drag: none;
    -webkit-touch-callout: none; /* iOS Long Press */
    /* NO usamos pointer-events: none para permitir clicks si son necesarios, 
       pero el JS bloqueará el menú contextual */
}

/* Estilos de Formulario Normalizados */
.art-form input, 
.art-form button {
    /* Eliminados z-index extremos y hacks */
}

.art-form button {
    cursor: pointer;
}

/* Selección de texto normal */
input, textarea {
    /* Eliminados hacks de user-select */
}
/* Control de Audio */
.audio-control {
    position: fixed;
    bottom: 3rem;
    right: 5vw;
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    mix-blend-mode: multiply;
    transition: opacity 0.3s;
}

.audio-control:hover {
    opacity: 0.7;
}

.audio-text {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.audio-icon {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 15px;
}

.audio-icon .bar {
    width: 2px;
    background-color: var(--text-color);
    height: 100%;
    animation: equalize 1s infinite ease-in-out;
}

.audio-icon .bar:nth-child(1) { height: 60%; animation-delay: -0.4s; }
.audio-icon .bar:nth-child(2) { height: 100%; animation-delay: -0.2s; }
.audio-icon .bar:nth-child(3) { height: 50%; animation-delay: -0.6s; }
.audio-icon .bar:nth-child(4) { height: 80%; animation-delay: -0.1s; }

/* Estado Pausado */
.audio-control.muted .bar {
    animation: none;
    height: 2px !important; /* Colapsar barras */
}

.audio-control.muted .audio-text {
    text-decoration: line-through;
    opacity: 0.5;
}

@keyframes equalize {
    0% { height: 20%; }
    50% { height: 100%; }
    100% { height: 20%; }
}

/* Ocultar en móvil si molesta, o dejarlo */
@media (max-width: 768px) {
    .audio-control {
        bottom: 4rem; /* Subir un poco para no chocar con el aviso móvil */
    }
}


/* --- MENSAJE DE AUDIO TEMPORAL --- */
.audio-message {
    position: absolute;
    right: 110%; /* A la izquierda del botón */
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0; /* Empieza invisible, JS lo activa */
    pointer-events: none;
    transition: opacity 1s ease, transform 1s ease;
    font-family: var(--font-body);
    letter-spacing: 0.5px;
}

/* Flechita del mensaje */
.audio-message::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -4px;
    transform: translateY(-50%);
    border-width: 4px 0 4px 4px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(0, 0, 0, 0.8);
}

.audio-message.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* --- ICONO TRACKPAD --- */
.icons-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 5px;
}

.divider {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.5;
}

.trackpad-icon {
    width: 28px;
    height: 22px;
    border: 1.5px solid var(--text-color);
    border-radius: 4px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.fingers {
    width: 8px;
    height: 8px;
    background: transparent;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Los dos dedos son pseudo-elementos */
.fingers::before,
.fingers::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--text-color);
    border-radius: 50%;
    animation: scrollTrackpad 1.5s infinite ease-in-out;
}

.fingers::before {
    left: 0;
}

.fingers::after {
    right: 0;
}

@keyframes scrollTrackpad {
    0% { transform: translateY(-4px); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(4px); opacity: 0; }
}

/* --- OPTIMIZACIÓN RENDIMIENTO --- */
.gallery-track {
    will-change: transform; /* Avisa al navegador */
    backface-visibility: hidden; /* Evita parpadeos en algunas pantallas */
    perspective: 1000px;
}

.art-piece img, .hero-img {
    will-change: transform;
    backface-visibility: hidden;
    transform: translate3d(0,0,0); /* Activar GPU desde el inicio */
}

/* Fin de estilos optimizados */

/* OPTIMIZACIÓN AGRESIVA DURANTE SCROLL */
body.is-scrolling .art-piece,
body.is-scrolling .hero-img-container, 
body.is-scrolling .full-img-wrapper {
    box-shadow: none !important; /* Adiós sombras al mover */
    pointer-events: none !important;
}

body.is-scrolling * {
    user-select: none; /* Evita selección accidental */
}

/* Forzar renderizado en capa separada */
.gallery-track {
    /* translateZ(0) fuerza a la GPU a crear una capa nueva */
    transform: translate3d(0,0,0); 
}
