/**
 * preloader.css — Nuestro Tiempo
 *
 * Estilos para el Preloader Global y la Pantalla de Verificación de Edad.
 */

/* =========================================================================
   1. PRELOADER GLOBAL
   ========================================================================= */
.nt-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--c-oscuro);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.nt-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.nt-preloader__brand {
    margin-bottom: 2rem;
}

.nt-preloader__logo {
    width: 120px;
    height: auto;
    animation: ntPulse 2s infinite ease-in-out;
}

.nt-preloader__text {
    font-family: var(--f-serif);
    font-size: 1.5rem;
    color: var(--c-crema);
    letter-spacing: 0.1em;
    animation: ntPulse 2s infinite ease-in-out;
}

/* Barra de progreso visual (simulada o infinita) */
.nt-preloader__bar {
    width: 200px;
    height: 2px;
    background-color: rgba(249, 247, 242, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.nt-preloader__progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background-color: var(--c-cobre);
    border-radius: 2px;
    animation: ntLoadBar 1.5s infinite ease-in-out;
}

@keyframes ntPulse {
    0%, 100% { opacity: 0.7; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes ntLoadBar {
    0% { left: -30%; width: 30%; }
    50% { width: 50%; }
    100% { left: 100%; width: 30%; }
}


/* =========================================================================
   2. AGE GATE (+18)
   ========================================================================= */
.nt-agegate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 99998; /* Justo debajo del preloader */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.nt-agegate.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.nt-agegate__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 19, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nt-agegate__modal {
    position: relative;
    background-color: var(--c-oscuro);
    border: 1px solid rgba(200, 121, 65, 0.3);
    padding: 3rem 2rem;
    max-width: 450px;
    width: 100%;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: translateY(20px);
    opacity: 0;
    animation: ntAgeModal 0.8s 0.3s ease-out forwards;
}

@keyframes ntAgeModal {
    to { transform: translateY(0); opacity: 1; }
}

.nt-agegate__title {
    font-family: var(--f-serif);
    font-size: 2rem;
    color: var(--c-crema);
    margin-bottom: 1rem;
}

.nt-agegate__desc {
    font-family: var(--f-sans);
    color: rgba(249, 247, 242, 0.7);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    text-align: center;
    margin-inline: auto;
}

.nt-agegate__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.nt-agegate__error {
    color: #ef4444; /* Rojo Tailwind */
    font-family: var(--f-sans);
    font-size: 0.875rem;
    margin-top: 1.5rem;
    display: none;
    animation: ntFadeIn 0.3s ease-out forwards;
}

body.nt-locked {
    overflow: hidden;
    height: 100vh;
}
