/* ==========================================
   CONFIGURACIÓN GLOBAL Y FUENTES
   ========================================== */
@font-face {
    font-family: 'FuenteMemos';
    src: url('fonts/Dalek.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    background-color: #000;
    color: #D4AF37;
    font-family: 'FuenteMemos', sans-serif;
    text-align: center;
    margin: 0;
    overflow-x: hidden;
}

/* ==========================================
   PANTALLA DE INICIO (INTRO)
   ========================================== */
.pantalla-inicio {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.bloque-central {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

/* --- MEDIOS DE FONDO  --- */
.video-fondo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; 
}

.capa-oscura {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2); 
    z-index: 2;
}

.video-opaco {
    opacity: 0.15;
}

/* --- ELEMENTO: LOGO ANIMADO --- */
.logo-animado {
    width: 280px;
    height: auto;
    opacity: 0;
    mix-blend-mode: lighten;
    filter: grayscale(100%) brightness(0.8) drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
    animation: 
        aparecerLogo 2s ease-out forwards, 
        parpadear 3s ease-in-out infinite 5s; 
}

@keyframes aparecerLogo {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes parpadear {
    0%, 100% {
        opacity: 0.9;
        filter: grayscale(100%) brightness(1) drop-shadow(0 0 12px rgba(255, 255, 255, 0.3));
    }
    50% {
        opacity: 0.4;
        filter: grayscale(100%) brightness(0.5) drop-shadow(0 0 0px transparent);
    }
}

/* --- ELEMENTO: BOTÓN DE ACCESO --- */
.boton-entrar {
    position: relative; 
    background-color: transparent;
    color: rgba(255, 255, 255, 0.5); 
    text-decoration: none;
    font-family: 'FuenteMemos', sans-serif;
    font-size: 0.4rem; 
    font-weight: bold;
    letter-spacing: 3px;
    border: none; 
    cursor: pointer;
    outline: none;
    text-transform: uppercase;
    opacity: 0;
    transform: scale(1.2);
    transition: all 0.4s ease, transform 0.4s ease;
    animation: aparecerBoton 2s ease-out forwards 6s; 
    display: inline-block; 
}

.boton-entrar::before {
    content: '';
    position: absolute;
    top: -300px;       
    bottom: -300px;    
    left: -50vw;       
    right: -50vw;      
    transform: translateX(0); 
    background: transparent; 
    z-index: 1;        
}

.boton-entrar:hover {
    color: rgba(255, 255, 255, 0.5); 
    text-shadow: 0 0 4px #ffffff; 
    transform: scale(0.65); 
}

@keyframes aparecerBoton {
    from {
        opacity: 0;
        transform: scale(0.4);
    }
    to {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ==========================================
   PANTALLA DE DETALLES (CONTENIDO PRINCIPAL)
   ========================================== */
.pantalla-detalles {
    position: relative;
    min-height: 100vh; 
    width: 100%;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: center;
    text-align: center;
    border-top: 2px double rgba(255, 255, 255, 0.2); 
    outline: 1px solid rgba(255, 255, 255, 0.15);
    outline-offset: -10px;
    box-sizing: border-box;
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch;
}

.colchon-espacio {
    width: 100%;
    height: 100vh; 
    flex-shrink: 0; 
    pointer-events: none;
}

.contenedor-datos {
    width: 100%;
    max-width: 450px;
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    padding: 60px 20px; 
    box-sizing: border-box;
    z-index: 5;
    flex-shrink: 0;
}

/* ==========================================
   COMPONENTES DE LA CABECERA 3D LOGOMEMS
   ========================================== */
.cabecera-3d {
    position: fixed; 
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%) scale(1); 
    width: 70%;          
    max-width: 380px;    
    height: 40%;         
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    opacity: 0;
    z-index: 99;
    pointer-events: none; 
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity;
}

.cabecera-3d.entrada-apple {
    opacity: 1;
    pointer-events: auto; 
}

.cabecera-3d.fijado-esquina {
    opacity: 0; 
    pointer-events: none; 
}

.cabecera-3d .video-logo,
.cabecera-3d model-viewer {
    width: 100%;
    height: 100%;
    object-fit: contain; 
}

/* ==========================================
   ELEMENTOS DE TEXTO Y EFECTOS DE REVELADO
   ========================================== */
.titulo-bienvenida,
.titulo-dorado,
.texto-frase,
.texto-info,
.boton-ubicacion,
.linea-decorativa,
.contador-regresivo {
    opacity: 0;
    transform: translateY(40px); 
    transition: 
        opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1),
        transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;
}

.revelado-apple {
    opacity: 1;
    transform: translateY(0); 
}

.bloque-textos {
    width: 100%;
}

.titulo-bienvenida {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 5px;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    letter-spacing: 6px;
}

.titulo-dorado {
    font-family: 'FuenteMemos', sans-serif;
    color: #ffffff;
    font-size: 1.6rem; 
    letter-spacing: 4px;
    margin: 10px 0;
}

.texto-frase {
    color: #ffffff;
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 15px;
    letter-spacing: 3px;
}

.texto-info {
    color: #fff;
    font-size: 1rem;
    letter-spacing: 1px;
    margin-bottom: 20px; 
    opacity: 0.8;
}

.boton-ubicacion {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid #ffffff;
    color: #fdfdfc;
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 3px;
    transition: background-color 0.3s, color 0.3s, opacity 1.2s, transform 1.2s; 
    margin-top: 5px;
}

.boton-ubicacion:hover {
    background-color: #fffffd;
    color: #000;
}

.linea-decorativa {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #ffffff, transparent);
    width: 80%;
    margin: 25px auto;
}

/* ==========================================
   COMPONENTE: CONTADOR REGRESIVO
   ========================================== */
.contador-regresivo {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    margin-bottom: 40px;
    width: 100%;
}

.caja-tiempo {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(214, 175, 55, 0.2);
    padding: 10px 5px;
    border-radius: 8px;
    flex: 1; 
    max-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(4px);
}

.caja-tiempo span {
    font-size: 1.6rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.caja-tiempo small {
    font-size: 0.6rem;
    color: #b9b9b9;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 3px;
}

/* ==========================================
   OPTIMIZACIONES RESPONSIVAS
   ========================================== */
@media (max-width: 600px) {
    .pantalla-detalles {
        padding: 0px 15px; 
    }

    .colchon-espacio {
        height: 80vh; 
    }

    .cabecera-3d {
        height: 80vh;
    }

    .titulo-dorado {
        font-size: 1.4rem;
    }

    .contador-regresivo {
        gap: 8px;
    }

    .caja-tiempo {
        padding: 8px 4px;
    }
    
    .caja-tiempo span {
        font-size: 1.2rem;
    }
}

.scroll-hint {
  position: fixed !important;
  bottom: 15px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 9999 !important;
  pointer-events: none;
}

.arrow {
  display: block;
  width: 16px;
  height: 16px;
  border-right: 3px solid #ffffff; 
  border-bottom: 3px solid #ffffff;
  transform: rotate(45deg);
  animation: bounceMemos 2s infinite ease-in-out;
}

@keyframes bounceMemos {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
  40% { transform: translateY(-10px) rotate(45deg); }
  60% { transform: translateY(-5px) rotate(45deg); }
}