/* ================================================
   MICROSITIO 50 AÑOS UNMdP
   Estilos principales — Mobile only (412px)
   Sistema tipográfico: Inter 18px / 27px / módulo 8px
   ================================================ */

/* --- TOKENS & VARIABLES --- */
:root {
    --color-bg: #1B1464;
    --color-bg-dark: #0d0b35;
    --color-text: #ffffff;
    --color-acento: #F5C842;
    /* amarillo/dorado del diseño */
    --color-footer: #0d0b35;
    --color-sub-footer: #00FFFF;
    --font-base: 'Inter', sans-serif;
    --font-display: 'Aleo', serif;
    --altura-base: 8px;
    /* Ritmo vertical: 18px base / 27px line-height / módulo 8px */
    --base-size: 18px;
    --base-lh: 27px;
    --mod: 8px;

    /* Espacios en múltiplos de 8 */
    --sp-1: 8px;
    --sp-2: 16px;
    --sp-3: 24px;
    --sp-4: 32px;
    --sp-5: 40px;
    --sp-6: 48px;
    --sp-8: 64px;
    --sp-12: 96px;

    --max-w: 412px;
    --header-h: 56px;
    /* 24px logo + padding */
}

/* --- RESET --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: var(--base-size);
    line-height: var(--base-lh);
    -webkit-text-size-adjust: 100%;
    /* Scroll Snapping Proximity */
    scroll-snap-type: y proximity;
    /* Compensar el header de 56px para el snapping */
    scroll-padding-top: var(--header-h);
    /* Fondo idéntico al sitio para evitar bordes blancos */
    background-color: var(--color-bg);
}

body {
    font-family: var(--font-base);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    /* Centrar y limitar ancho */
    max-width: var(--max-w);
    margin: 0 auto;
    position: relative;
    border: none;
}





img {
    display: block;
    max-width: 100%;
}

/* ================================================
   HEADER STICKY
   ================================================ */
.header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    background-color: var(--color-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* El header empieza invisible y aparece tras la pantalla 1 */
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    will-change: transform, opacity;
    display: none;
}

.header.visible {
    opacity: 1;
    transform: translateY(0);
    display: flex;
}

.header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--sp-3);
}

/* Logo en header: 24px de alto */
.header__logo {
    height: 24px;
    width: auto;
    fill: var(--color-text);
}

.titulo_display {
    font-family: var(--font-display);
    line-height: 1.5rem;
}

.color-subfooter {
    color: var(--color-sub-footer);
}

/* ================================================
   PANTALLAS BASE
   ================================================ */
.pantalla {
    width: 100%;
    /* Usar la altura máxima (sin barras) para evitar el efecto "pantalones cortos" */
    height: calc(100vh - var(--header-h) + 1px);
    height: calc(100lvh - var(--header-h) + 1px);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Snapping */
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

/* La primera pantalla es de pantalla completa (el header no se ve todavía) */
#pantalla-1 {
    height: 100vh;
    height: 100lvh;
}





/* ================================================
   PANTALLA 1 — HERO con logo animado
   ================================================ */
.pantalla--hero {
    background-color: var(--color-bg);
    flex-direction: column;
}

.hero__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* o "contain" según preferencia, usualmente para background es cover */
    mix-blend-mode: soft-light;
    z-index: 0;
    opacity: 1;
    /* para controlar cuán fuerte es el multiply, si hiciera falta */
    pointer-events: none;
}

.hero__logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 var(--sp-5);
    z-index: 2;
    /* encima del video */
}

#logo {
    width: 300px;
    height: auto;
    fill: var(--color-text);
    transform-origin: center center;
    will-change: transform, filter, opacity;
}

/* Epígrafe en pantalla 1: texto debajo del logo */
.pantalla1__epigraf {
    position: absolute;
    bottom: var(--sp-4);
    left: var(--sp-4);
    right: var(--sp-4);
    font-family: var(--font-base);
    font-size: 1rem;
    /* ~14px */
    line-height: 1.6;
    color: var(--color-acento);
    font-weight: 300;
    text-align: left;
    z-index: 1;
    pointer-events: none;
}

/* Flecha scroll-hint */
.scroll-hint {
    position: absolute;
    bottom: var(--sp-4);
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    animation: bounceDown 2s ease-in-out infinite;
    z-index: 2;
}

.scroll-hint svg {
    width: 32px;
    height: 32px;
    stroke: rgba(255, 255, 255, 0.5);
}

@keyframes bounceDown {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ================================================
   PANTALLA 2 y 6 — Solo texto
   ================================================ */
.pantalla--texto {
    background-color: var(--color-bg);
    padding: var(--sp-6) var(--sp-4);
    align-items: flex-start;
}

.texto-contenedor {
    max-width: 100%;
}

.texto-contenedor p {
    font-family: var(--font-base);
    font-size: 1rem;
    /* 18px */
    line-height: 1.5rem;
    /* 27px */
    color: var(--color-acento);
    margin-bottom: var(--sp-4);
    font-weight: 400;
}

.texto-contenedor p:last-child {
    margin-bottom: 0;
}

/* Efecto Typewriter */
.is-typing::after {
    content: '|';
    display: inline-block;
    margin-left: 2px;
    animation: blinkCursor 0.7s infinite;
    color: var(--color-acento);
}

@keyframes blinkCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ================================================
   PAN SCROLL SECTIONS (pantallas 3, 5, 7, 8)
   Wrapper alto para dar scroll range, imagen sticky
   ================================================ */
.pan-scroll-section {
    /* Doble altura: la primera mitad ancla la imagen,
       la segunda mitad se usa para el pan */
    height: 200svh;
    position: relative;
    /* Snapping */
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}



.pantalla--imagen {
    /* Sticky: permanece visible mientras el usuario
       scrollea a través del .pan-scroll-section */
    position: sticky;
    top: var(--header-h);
    /* Posicionar debajo del header */
    width: 100%;
    height: calc(100vh - var(--header-h) + 1px);
    height: calc(100lvh - var(--header-h) + 1px);
    /* Ajustar altura */


    overflow: hidden;
    /* oculta lo que queda fuera del viewport */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* la imagen arranca desde un lado */
    background-color: var(--color-bg-dark);
}


/* La imagen se muestra COMPLETA en altura;
   si su ancho supera el viewport, el JS la traslada */
.img-pan {
    height: 100vh;
    width: auto;
    /* ancho proporcional — imagen completa */
    max-width: none;
    /* permite superar 100vw */
    object-fit: contain;
    flex-shrink: 0;
    will-change: transform;
    /* Empieza en el borde derecho del contenedor */
    transform: translateX(0px);
    transition: none;
    /* el JS maneja la animación */
}

/* ================================================
   PANTALLA 4 — Carrusel Swiper
   ================================================ */
.pantalla--carrusel {
    background-color: var(--color-bg-dark);
    padding: 5%;
    /* Ajustar al cálculo global para que no lo tape el header */
    height: calc(100vh - var(--header-h) + 1px);
    height: calc(100lvh - var(--header-h) + 1px);
}

.swiper-pantalla4 {
    width: 100%;
    height: 100%;
}

.swiper-pantalla4 .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--color-bg-dark);
}

.swiper-pantalla4 .swiper-slide img {
    width: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Paginación dots */
.swiper-pantalla4-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
}

.swiper-pantalla4-pagination .swiper-pagination-bullet-active {
    background: var(--color-acento);
}

/* Flechas de navegación */
.swiper-pantalla4-prev,
.swiper-pantalla4-next {
    color: var(--color-acento) !important;
}

.swiper-pantalla4-prev::after,
.swiper-pantalla4-next::after {
    font-size: 20px !important;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
    background-color: var(--color-bg);
    padding: var(--sp-8) var(--sp-4) var(--sp-6);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Snapping */
    scroll-snap-align: start;
}


.footer__frase {
    font-family: var(--font-display);
    font-size: 1.44rem;
    /* escala mayor */
    line-height: 1.4;
    font-weight: 700;
    color: var(--color-acento);
    margin-bottom: var(--sp-6);
    letter-spacing: -0.01em;
}

.footer__creditos {
    margin-top: var(--sp-4);
}

.footer__creditos p {
    font-family: var(--font-base);
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: var(--sp-3);
    font-weight: 300;
}

.footer__creditos p em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
}

.footer__creditos p:last-child {
    margin-bottom: 0;
    font-size: 0.75rem;
}

.footer__agradecimientos {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35) !important;
    margin-top: var(--sp-4) !important;
    margin-bottom: var(--sp-2) !important;
    font-weight: 400 !important;
}

/* ================================================
   BOTÓN TRANSCRIPCIÓN
   ================================================ */
.btn-transcripcion {
    position: absolute;
    bottom: var(--sp-12);
    left: 50%;
    transform: translateX(-50%);
    background-color: #0000FF;
    /* Azul intenso */
    color: #ffffff;
    font-family: var(--font-base);
    font-size: 1rem;
    font-weight: 400;
    padding: 12px 32px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-transcripcion:active {
    transform: translateX(-50%) scale(0.95);
    background-color: #0000cc;
}

/* ================================================
   BOTÓN GALERÍA
   ================================================ */
.btn-galeria {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin: var(--sp-4) auto;
    background-color: var(--color-acento);

    color: var(--color-bg);
    font-weight: 600;
    width: 100%;
    max-width: 300px;
    z-index: 10;
}

.btn-galeria:active {
    transform: scale(0.95);
    background-color: #e0b63b;
}

/* ================================================
   MODAL TRANSCRIPCIÓN
   ================================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s ease;
}

.modal.active {
    visibility: visible;
    opacity: 1;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal__content {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    max-height: 80dvh;
    background-color: var(--color-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal__close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.modal__body {
    padding: var(--sp-5) var(--sp-4);
    overflow-y: auto;
    font-family: var(--font-base);
    color: rgba(255, 255, 255, 0.85);
}

.modal__body p {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: var(--sp-3);
}

.modal__body h2,
.modal__body h3,
.modal__body h4 {
    color: var(--color-acento);
    margin-top: var(--sp-4);
    margin-bottom: var(--sp-2);
    line-height: 1.3;
}

.modal__body h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal__body h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal__body h4 {
    font-size: 1rem;
    font-weight: 500;
}

.modal__body strong {
    color: #fff;
    font-weight: 600;
}

/* ================================================
   UTILIDADES
   ================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ================================================
   BOTÓN FLOTANTE AUDIO
   ================================================ */
.btn-flotante-audio {
    position: fixed;
    top: var(--sp-2);
    right: var(--sp-4);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-flotante-audio:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.btn-flotante-audio:active {
    transform: scale(0.95);
}

.btn-flotante-audio img {
    width: 24px;
    height: 24px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.btn-flotante-audio:hover img {
    opacity: 1;
}

/* ================================================
   DESKTOP OVERLAY
   ================================================ */
.desktop-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-bg);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--sp-4);
}

.desktop-overlay__inner {
    max-width: 600px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--sp-6) var(--sp-4);
    border-radius: 16px;
}

.desktop-overlay__inner h2 {
    color: var(--color-acento);
    font-size: 2rem;
    margin-bottom: var(--sp-3);
}

.desktop-overlay__inner p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--sp-2);
}

.desktop-overlay__qr {
    width: 200px;
    height: 200px;
    margin: var(--sp-4) auto 0;
    background-color: #fff;
    padding: 10px;
    border-radius: 12px;
    object-fit: contain;
}

/* ================================================
   PRELOADER
   ================================================ */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: var(--color-bg);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
    transition: opacity 0.8s ease, visibility 0.8s;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

.preloader__inner .titulo_display {
    color: var(--color-text);
    font-size: 1.4rem;
    line-height: 1.5;
    text-align: center;
    min-height: 90px;
    white-space: pre-line;
    margin-bottom: var(--sp-6);
}

.preloader__action {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.5s ease;
}

.btn-ingresar {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    transform: none;
    margin-top: var(--sp-1);
    margin-bottom: var(--sp-3);
    font-size: 1.1rem;
    padding: 14px 44px;
    background-color: var(--color-acento);
    color: var(--color-bg);
    font-weight: 600;
}

.btn-instalar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    background-color: transparent !important;
    border: 2px solid var(--color-acento) !important;
    color: var(--color-acento) !important;
    font-weight: 600 !important;
    margin-bottom: var(--sp-1) !important;
    box-shadow: none !important;
}

.btn-ingresar:active,
.btn-instalar:active {
    transform: scale(0.95) !important;
    background-color: #e0b63b !important;
}

.preloader__hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-family: var(--font-base);
}

/* Media Query para escritorio */
@media (min-width: 768px) {
    .desktop-overlay {
        display: flex;
    }

    /* Ocultar elementos principales en desktop */
    .header,
    main,
    .footer,
    .btn-flotante-audio {
        display: none !important;
    }

    body {
        overflow: hidden !important;
    }
}

#swipebox-overlay {
    background: #ffffff !important;
}

#swipebox-prev,
#swipebox-next,
#swipebox-close {
    filter: invert(1);
}

#swipebox-top-bar,
#swipebox-bottom-bar {
    background: none !important;
    text-shadow: none !important;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    z-index: 1000000 !important;
    pointer-events: none !important;
    /* No bloquear la imagen */

    /* Matar animaciones */
    transition: none !important;
    transform: none !important;
}

/* Solo los botones dentro de las barras reaccionan al clic */
#swipebox-close,
#swipebox-prev,
#swipebox-next,
#swipebox-arrows {
    pointer-events: auto !important;
    cursor: pointer !important;
}

#swipebox-top-bar {
    top: 0 !important;
    height: 60px !important;
}

#swipebox-bottom-bar {
    bottom: 0 !important;
    height: 60px !important;
}

#swipebox-title {
    color: #000000 !important;
    font-family: var(--font-base) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;

    /* Forzar su posición fija abajo a la izquierda */
    position: fixed !important;
    bottom: 32px !important;
    left: 64px !important;
    text-align: left !important;
    width: auto !important;
    max-width: calc(100% - 128px);
    z-index: 1000002 !important;
    pointer-events: none !important;
}


.swipebox-logo {
    position: absolute;
    top: 16px;
    left: 24px;
    height: 24px;
    width: auto;
    fill: #000000 !important;
    z-index: 10000;
    pointer-events: none;
}

._brand svg {
    transition: fill 0.3s ease;
}

._brand a:hover svg {
    fill: #00FFFF !important;
}

.sponsors.swiper {
    width: 70%;
    height: 96px;
}

.sponsors .swiper-slide {
    text-align: center;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sponsors .swiper-slide img {
    display: block;

}