:root {
    /* Palette Ultra-Premium Museo Naval */
    --void-navy: #020811;
    --abyss-blue: #0A1929;
    --antique-gold: #C5A059;
    --antique-gold-glow: rgba(197, 160, 89, 0.25);
    --pearl: #FAFAFA;
    --glass-shimmer: rgba(255, 255, 255, 0.04);
    
    /* Typography */
    --font-editorial: 'Cinzel', serif;
    --font-classic: 'EB Garamond', serif;
    --font-tech: 'Inter', sans-serif;

    /* Curves */
    --premium-bezier: cubic-bezier(0.87, 0, 0.13, 1);
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
button, a { outline: none !important; }

body.museum-kiosk {
    margin: 0; padding: 0;
    width: 100vw; height: 100vh;
    background-color: var(--void-navy);
    color: var(--pearl);
    font-family: var(--font-tech);
    overflow-x: hidden;
    overflow-y: auto; /* Permite pull to refresh y scroll vertical */
    overscroll-behavior-y: auto;
}

/* --- ENVIRONMENTS & BACKGROUND --- */
.fluid-background {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 50% 50%, var(--abyss-blue) 0%, var(--void-navy) 80%);
    z-index: 0;
}
.background-texture {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* --- SPLASH SCREEN --- */
.splash-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--void-navy);
    z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 1.2s var(--premium-bezier), visibility 1.2s var(--premium-bezier);
}
.splash-screen.hidden {
    opacity: 0; visibility: hidden;
}
.splash-logo {
    width: 35%; max-width: 160px; height: auto; margin-bottom: 2rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    animation: goldPulse 2s infinite alternate;
}
.splash-line {
    width: 2px; height: 40px;
    background: linear-gradient(to bottom, transparent, var(--antique-gold), transparent);
    margin-bottom: 1.5rem;
}
.splash-text {
    font-family: var(--font-editorial);
    font-size: 0.75rem; letter-spacing: 0.4em;
    color: var(--antique-gold);
    text-transform: uppercase;
    text-align: center;
    max-width: 80%; line-height: 1.8;
}
@keyframes goldPulse {
    0% { filter: drop-shadow(0 0 10px rgba(197, 160, 89, 0.2)) drop-shadow(0 20px 40px rgba(0,0,0,0.5)); transform: scale(0.98); }
    100% { filter: drop-shadow(0 0 30px rgba(197, 160, 89, 0.8)) drop-shadow(0 20px 40px rgba(0,0,0,0.5)); transform: scale(1.02); }
}

/* --- FLOATING UI LAYER --- */
.ui-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; /* Let clicks pass through empty space */
    z-index: 40; /* Mayor que el centro (10) para evitar que quede tapado */
}
.floating-corner {
    position: absolute;
    pointer-events: auto; /* Clickable */
}
.top-left { top: 2rem; left: 2rem; }
.top-right { top: 2rem; right: 2rem; text-align: right; display: flex; flex-direction: column; align-items: flex-end;}
.bottom-left { bottom: 15vh; left: 2rem; } /* Subido dramáticamente para evitar choques con controles y ticker */

/* Brand Cluster (TL) */
.brand-cluster {
    display: flex; align-items: flex-start;
}
.brand-logo {
    height: 120px; 
    width: auto; 
    object-fit: contain;
    /* High-Fidelity: Multi-layer shadow system */
    filter: 
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5))          /* Shadow nítida cercana */
        drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4))          /* Shadow media de profundidad */
        drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3))         /* Shadow larga ambiental */
        drop-shadow(0 0 30px rgba(197, 160, 89, 0.15))      /* Glow dorado institucional */
        drop-shadow(0 0 60px rgba(197, 160, 89, 0.08));     /* Halo dorado suave expandido */
    opacity: 1;
    /* Micro-animación de entrada */
    animation: logoReveal 2s var(--premium-bezier) forwards;
    /* Transición suave para hover */
    transition: filter 0.6s var(--premium-bezier), transform 0.6s var(--premium-bezier);
}

.brand-logo:hover {
    transform: scale(1.03);
    filter: 
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6))
        drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5))
        drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35))
        drop-shadow(0 0 40px rgba(197, 160, 89, 0.25))
        drop-shadow(0 0 80px rgba(197, 160, 89, 0.12));
}

@keyframes logoReveal {
    0% { 
        opacity: 0; 
        transform: translateY(-10px) scale(0.95); 
        filter: 
            drop-shadow(0 0 0 rgba(0,0,0,0))
            drop-shadow(0 0 0 rgba(0,0,0,0));
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
        filter: 
            drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5))
            drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4))
            drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3))
            drop-shadow(0 0 30px rgba(197, 160, 89, 0.15))
            drop-shadow(0 0 60px rgba(197, 160, 89, 0.08));
    }
}
.logo-flex { display: flex; align-items: center; gap: 1rem; }
.anchor-thin { width: 35px; height: 35px; color: var(--antique-gold); }
.museum-h1 {
    font-family: var(--font-editorial);
    font-weight: 400; font-size: 1.4rem;
    letter-spacing: 0.15em; color: var(--antique-gold);
    line-height: 1; margin-bottom: 0.3rem;
}
.museum-p {
    font-family: var(--font-tech);
    font-weight: 300; font-size: 0.75rem;
    letter-spacing: 0.4em; color: rgba(250,250,250,0.5);
}

/* Utility Cluster (TR) */
.ambient-clock {
    font-family: var(--font-tech);
    font-weight: 300; font-size: 2.5rem;
    letter-spacing: -0.02em; color: var(--pearl);
    line-height: 1; margin-bottom: 0.2rem;
}
.ambient-weather {
    font-family: var(--font-classic);
    font-weight: 400; font-size: 1rem;
    font-style: italic; color: var(--antique-gold);
    opacity: 0.8; margin-bottom: 1.5rem;
}

/* Minimal Buttons (Glass) */
.minimal-btn {
    background: rgba(10, 25, 41, 0.4);
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-shimmer);
    border-radius: 100px;
    color: var(--pearl); font-family: var(--font-tech); font-weight: 500; font-size: 0.7rem;
    letter-spacing: 0.15em; text-transform: uppercase;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem;
    padding: 0.8rem 1.5rem; cursor: pointer;
    transition: all 0.4s var(--premium-bezier);
}
.minimal-btn svg { width: 16px; height: 16px; color: var(--antique-gold); }
.minimal-btn:hover {
    background: rgba(197, 160, 89, 0.1);
    border-color: rgba(197, 160, 89, 0.4);
    transform: translateY(-2px);
}
.minimal-btn:active {
    transform: scale(0.95);
    background: rgba(197, 160, 89, 0.2);
}
.lang-btn { width: auto; padding: 0.6rem 1.2rem; margin-top: 0; }

/* Interaction Cluster (BL) */
.interaction-cluster {
    display: flex; flex-direction: column; align-items: flex-start;
}
.qr-pedestal {
    display: flex; align-items: center; gap: 1rem;
    background: rgba(2, 8, 17, 0.5);
    padding: 0.8rem 1.2rem 0.8rem 0.8rem; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    margin-bottom: 1.2rem;
}
.qr-hologram {
    width: 60px; height: 60px;
    border-radius: 4px; background: white; padding: 4px;
}
.qr-legend {
    font-family: var(--font-tech); font-weight: 400; font-size: 0.6rem;
    letter-spacing: 0.15em; color: var(--antique-gold);
    line-height: 1.5; border-left: 1px solid rgba(197, 160, 89, 0.3);
    padding-left: 1rem;
}

/* --- CINEMATIC STAGE (Center Artifacts) --- */
.cinematic-stage {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
}
.carousel-core {
    width: 100%; height: 100%;
    position: relative;
    display: flex; align-items: center; justify-content: center;
}

.flyer-artifact {
    position: absolute;
    width: 100%;
    height: 58vh; /* Más bajo para garantizar aire arriba y abajo */
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: scale(0.92) translateY(20px);
    transition: opacity 1.2s var(--premium-bezier), transform 1.2s var(--premium-bezier);
    pointer-events: none;
}
@media (max-aspect-ratio: 4/3) { 
    .flyer-artifact { height: 45vh; }
}

.flyer-artifact.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    z-index: 2;
}

.artifact-frame {
    position: relative;
    height: 100%; 
    width: max-content; /* IMPORTANTE: Hace que la caja mida EXÁCTAMENTE lo que mide la foto */
    display: flex; align-items: center; justify-content: center;
}

/* Ambilight pseudo-effect */
.artifact-glow {
    position: absolute; top: 0; left: 0; bottom: 0; right: 0;
    background: var(--antique-gold);
    border-radius: 12px;
    filter: blur(80px);
    opacity: 0.15;
    transform: scale(0.9);
    animation: breathGlow 8s infinite alternate;
    pointer-events: none;
}
@keyframes breathGlow {
    0% { opacity: 0.08; transform: scale(0.9); }
    100% { opacity: 0.2; transform: scale(0.95); }
}

/* Fix temporal tras agregar soporte WebP: la etiqueta <picture> rompe la herencia de altura. display: contents permite que la imagen ignore <picture> en el layout */
.artifact-frame picture {
    display: contents;
}

.artifact-img {
    height: 100%; width: auto; max-width: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 40px 100px -20px rgba(0,0,0,0.9);
    border: 1px solid rgba(255,255,255,0.06);
    transition: filter 0.6s var(--premium-bezier), transform 0.6s var(--premium-bezier), border-color 0.6s ease;
    display: block;
}
.artifact-frame:hover .artifact-img {
    transform: scale(1.01);
    border-color: rgba(197, 160, 89, 0.3);
}

.premium-countdown {
    position: absolute; top: -15px; right: -15px; /* Siempre volando en la esquina perfecta */
    background: rgba(10, 25, 41, 0.95);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--antique-gold);
    color: var(--pearl); font-family: var(--font-tech);
    padding: 10px 20px; border-radius: 8px;
    display: flex; align-items: center; gap: 0.8rem;
    font-size: 0.65rem; letter-spacing: 0.15em;
    opacity: 0; transform: translateY(10px) scale(0.95);
    transition: all 0.6s var(--premium-bezier);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    z-index: 50; /* Superior al marco de imagen para que jamas se tape */
}
.artifact-frame:hover .premium-countdown {
    opacity: 1; transform: translateY(0) scale(1);
}
.premium-countdown .days-left {
    font-family: var(--font-editorial);
    font-size: 1.6rem; color: var(--antique-gold);
    line-height: 1;
}

/* --- BOTÓN DESCARGA DISCRETO --- */
.download-flyer-btn {
    position: absolute; bottom: -15px; left: -15px;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(10, 25, 41, 0.9);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    opacity: 0; transform: translateY(10px) scale(0.9);
    transition: all 0.5s var(--premium-bezier);
    z-index: 50;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}
.download-flyer-btn svg {
    width: 18px; height: 18px;
    transition: color 0.3s ease;
}
.artifact-frame:hover .download-flyer-btn {
    opacity: 1; transform: translateY(0) scale(1);
}
.download-flyer-btn:hover {
    background: rgba(197, 160, 89, 0.15);
    border-color: rgba(197, 160, 89, 0.5);
    color: var(--antique-gold);
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.15);
    transform: translateY(0) scale(1.08) !important;
}

/* Mobile: botón siempre visible con toque más grande */
@media (hover: none) {
    .download-flyer-btn {
        opacity: 0.7; transform: translateY(0) scale(1);
        width: 46px; height: 46px;
    }
}

/* --- TICKER INFERIOR (SÓLIDO CON BORDE PARA LECTURA) --- */
.bottom-void {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 45px;
    background: rgba(10, 15, 25, 0.95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(197, 160, 89, 0.4);
    z-index: 50;
    pointer-events: auto;
    display: flex; align-items: center; overflow: hidden;
}
.premium-ticker {
    display: flex;
    white-space: nowrap;
    width: max-content;
    animation: luxuriousScroll 50s linear infinite;
    padding-left: 100%;
}
.premium-ticker:hover {
    animation-play-state: paused;
}
.ticker-node {
    font-family: var(--font-tech); font-weight: 500; font-size: 0.70rem;
    letter-spacing: 0.2em; color: var(--pearl);
    padding: 0 4rem;
    display: inline-flex; align-items: center; gap: 1rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}
@keyframes luxuriousScroll { 0%{transform:translateX(0)} 100%{transform:translateX(-100%)} }

/* --- CONTROLES STEALTH --- */
.stealth-controls {
    position: fixed; bottom: 85px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 2rem;
    z-index: 100; opacity: 0; transition: opacity 0.5s ease;
}
body:hover .stealth-controls { opacity: 0.6; }
.stealth-controls:hover { opacity: 1 !important; }

.stealth-controls button {
    background: none; border: 1px solid transparent; color: rgba(255,255,255,0.3);
    width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s;
}
.stealth-controls button:hover {
    border-color: rgba(255,255,255,0.1); color: var(--antique-gold);
    background: rgba(255,255,255,0.03);
}
.stealth-controls button:active {
    transform: scale(0.85);
    background: rgba(197, 160, 89, 0.2);
}
.stealth-controls button svg { width: 22px; height: 22px; }

/* Ocultar bullets por elegancia interactiva */
.carousel-indicators { display: none; }

.fullscreen-phantom-btn {
    position: absolute; top: 8.5rem; right: 2.5rem;
    background: none; border: none; color: rgba(255,255,255,0.15);
    width: 40px; height: 40px; cursor: pointer; z-index: 30;
    transition: 0.3s; display: flex; align-items: center; justify-content: center;
}
.fullscreen-phantom-btn:hover { color: var(--pearl); }
.fullscreen-phantom-btn svg { width: 24px; height: 24px; }


/* --- AMBIENT MODAL (MAPA) --- */
.ambient-modal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(2, 8, 17, 0.8);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: all 0.6s var(--premium-bezier);
}
.ambient-modal.active { opacity: 1; pointer-events: auto; }

.modal-plate {
    background: rgba(10, 25, 41, 0.6);
    border: 1px solid rgba(197, 160, 89, 0.15);
    border-radius: 2px;
    width: 90%; max-width: 900px;
    padding: 4rem; text-align: center;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.9);
    transform: scale(0.95) translateY(20px);
    transition: all 0.6s var(--premium-bezier);
}
.ambient-modal.active .modal-plate { transform: scale(1) translateY(0); }

.close-plate-btn {
    position: absolute; top: 2rem; right: 2rem;
    background: none; border: none; color: rgba(255,255,255,0.3);
    width: 40px; height: 40px; cursor: pointer; transition: 0.3s;
}
.close-plate-btn:hover { color: var(--antique-gold); }

.plate-title {
    font-family: var(--font-editorial); font-size: 1.8rem; font-weight: 300;
    letter-spacing: 0.15em; color: var(--antique-gold); margin-bottom: 3rem;
}
.plate-canvas {
    width: 100%; height: 400px;
    background: rgba(2, 8, 17, 0.5); border: 1px solid rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center; position: relative;
    overflow: hidden;
}
.plate-desc {
    font-family: var(--font-tech); font-weight: 300; font-size: 0.85rem;
    letter-spacing: 0.1em; color: rgba(255,255,255,0.4);
    z-index: 2;
}
.architectural-grid {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px; z-index: 1;
}

/* --- RESPONSIVE FALLBACKS --- */
@media (max-width: 900px) {
    .floating-corner { position: relative; inset: auto; text-align: center; margin: 0.5rem auto; align-items: center;}
    .ui-layer {
        position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
        background: var(--void-navy); border-bottom: 1px solid var(--glass-shimmer); pointer-events: auto; padding: 1rem;
        height: auto;
    }
    .cinematic-stage { position: relative; height: calc(100vh - 250px); }
    .flyer-artifact { width: 90%; height: 80%; }
    .brand-logo { height: 130px; margin-bottom: 0.8rem; }
    .qr-pedestal { transform: scale(0.85); transform-origin: left center; }
    .interaction-cluster { margin-bottom: 0.5rem; flex-direction: row; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
    .top-right { margin-top: 0; align-items: center; flex-direction: row; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
    .ambient-weather { margin-bottom: 0; }
    .lang-btn { margin-top: 0; }
    .download-flyer-btn {
        opacity: 0.8; transform: translateY(0) scale(1);
        bottom: -10px; left: -10px;
    }
    .stealth-controls { opacity: 0.5; bottom: 55px; }
    .bottom-void { height: 38px; }
}

@media (max-width: 768px) {
    .brand-logo { height: 110px; }
    .ambient-clock { font-size: 1.8rem; }
    .ambient-weather { font-size: 0.85rem; }
    .flyer-artifact { height: 65%; }
    .premium-countdown { 
        padding: 6px 12px; font-size: 0.55rem;
        top: -10px; right: -10px;
    }
    .premium-countdown .days-left { font-size: 1.2rem; }
    .ticker-node { padding: 0 2rem; font-size: 0.6rem; }
    .modal-plate { padding: 2rem; width: 95%; }
    .plate-title { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .brand-logo { height: 90px; margin-bottom: 1rem; }
    .ambient-clock { font-size: 1.4rem; }
    .ambient-weather { font-size: 0.75rem; margin-bottom: 0.8rem; }
    .lang-btn { padding: 0.5rem 0.9rem; font-size: 0.6rem; }
    .cinematic-stage { height: calc(100vh - 160px); }
    .flyer-artifact { width: 95%; height: 70%; }
    .stealth-controls { bottom: 48px; gap: 1rem; }
    .stealth-controls button { width: 38px; height: 38px; }
    .fullscreen-phantom-btn { top: auto; bottom: 1rem; right: 1rem; }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .ui-layer { padding: 0.5rem; flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
    .floating-corner { margin: 0.3rem; }
    .brand-logo { height: 45px; }
    .cinematic-stage { height: calc(100vh - 80px); }
    .flyer-artifact { height: 85%; }
    .bottom-void { height: 28px; }
    .stealth-controls { bottom: 35px; }
}
