/* ==============================================
   🎬 EFECTO CINEMATOGRÁFICO DE ENTRADA — Slow Step
   🌟 Volando, con profundidad, blur y brillo dorado
============================================== */

/* === Animaciones base === */

/* ✈️ Entrada con vuelo y profundidad */
@keyframes cinematicFly {
    0% {
        opacity: 0;
        transform: perspective(900px) translateY(80px) translateZ(-200px) rotateX(25deg) scale(0.8);
        filter: blur(10px);
    }
    50% {
        opacity: 1;
        transform: perspective(900px) translateY(-10px) translateZ(0) rotateX(0deg) scale(1.05);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: perspective(900px) translateY(0) translateZ(0) scale(1);
        filter: blur(0);
    }
}

/* 💎 Brillo suave dorado pulsante */
@keyframes goldGlow {
    0%, 100% {
        text-shadow: 0 0 12px rgba(178,142,93,0.4), 0 0 28px rgba(178,142,93,0.25);
    }
    50% {
        text-shadow: 0 0 22px rgba(255,220,150,0.85), 0 0 40px rgba(178,142,93,0.6);
    }
}

/* 🌫 Desenfoque atmosférico al fondo */
@keyframes cinematicFog {
    0% { transform: scale(1.1) translate(0, 0); opacity: 0.7; }
    100% { transform: scale(1) translate(-15px, -10px); opacity: 1; }
}

/* 🎥 Efecto de zoom y aparición */
@keyframes zoomReveal {
    from {
        opacity: 0;
        transform: scale(1.2) rotateY(25deg);
        filter: blur(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
        filter: blur(0);
    }
}

/* === Aplicación de animaciones === */

/* Fondo animado más cinematográfico */
.background-smoke {
    animation: cinematicFog 18s ease-in-out infinite alternate;
}

/* Carrusel entra con zoom lateral */
.carrusel-card {
    animation: cinematicFly 1.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Logo dentro del carrusel con zoomReveal */
#carrusel {
    animation: zoomReveal 2s ease-out 0.4s forwards;
}

/* Título principal con brillo dorado dinámico */
.text-block h1 {
    animation: cinematicFly 1.8s ease-out 0.6s forwards, goldGlow 3s ease-in-out 2.4s infinite alternate;
}

/* Subtítulo — vuelo más suave y lateral */
.text-block .subtitle {
    animation: cinematicFly 1.6s ease-out 1s forwards;
    transform-origin: center top;
}

/* Texto typing “En construcción…” con entrada retardada */
.text-block .typing {
    animation:
        appear 0.3s linear 2.4s forwards,
        typing 3s steps(40, end) 2.4s forwards,
        blink 0.7s step-end infinite alternate;
}

/* Footer — aparece deslizándose desde abajo */
.footer {
    animation: cinematicFly 1.6s ease-out 1.8s forwards;
}

/* Audio toggle entra flotando */
#audio-toggle {
    opacity: 0;
    animation: cinematicFly 1.4s ease-out 2.2s forwards;
}

/* === Extra: efecto sutil de foco central === */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.05), transparent 60%);
    z-index: -1;
    opacity: 0;
    animation: fadeIn 2s ease 1.5s forwards;
}

/* ==============================================
   🌟 DESTELLO CINEMATOGRÁFICO DORADO
   ⚡ Cruza el logo y el texto SLOW STEP
============================================== */

/* Contenedor de brillo */
.text-block {
    position: relative;
    overflow: visible;
}

/* Rayo de luz */
.text-block::after {
    content: "";
    position: absolute;
    top: 30%;
    left: -15%;
    width: 140%;
    height: 80px;
    background: linear-gradient(
        115deg,
        rgba(255, 250, 220, 0) 0%,
        rgba(255, 240, 180, 0.2) 35%,
        rgba(255, 230, 160, 0.5) 50%,
        rgba(255, 240, 180, 0.2) 65%,
        rgba(255, 250, 220, 0) 100%
    );
    transform: rotate(8deg) translateY(-20px);
    opacity: 0;
    pointer-events: none;
    animation: lensFlare 3.2s ease-in-out 3.5s forwards;
}

/* Animación del destello */
@keyframes lensFlare {
    0% {
        opacity: 0;
        transform: translateX(-150%) rotate(8deg);
        filter: blur(5px) brightness(1.2);
    }
    20% {
        opacity: 1;
        filter: blur(2px) brightness(1.8);
    }
    50% {
        transform: translateX(60%) rotate(8deg);
        opacity: 0.9;
        filter: blur(1px) brightness(2);
    }
    80% {
        transform: translateX(130%) rotate(8deg);
        opacity: 0.5;
        filter: blur(4px) brightness(1.5);
    }
    100% {
        transform: translateX(200%) rotate(8deg);
        opacity: 0;
        filter: blur(10px) brightness(1);
    }
}


/* ============================================
   🎨 INDEX.CSS — Slow Step · Cinemático + Typing
   ✅ Versión sin scroll, centrada y con transiciones suaves
============================================ */
@import url('comon.css');

/* 🌍 Estructura base bloqueada */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
    background: radial-gradient(circle at 30% 20%, #16243a, #0e1a2b 65%);
    font-family: 'Roboto', sans-serif;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 🌫 Fondo animado */
.background-smoke {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.05), transparent 70%),
                radial-gradient(circle at 75% 75%, rgba(255,255,255,0.04), transparent 70%);
    animation: fog 20s ease-in-out infinite alternate;
    filter: blur(10px);
    z-index: -1;
}
@keyframes fog {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.1) translate(-8px, -8px); opacity: 1; }
}

/* === Layout general === */
.main-layout {
    flex: 1;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding-top: 10vh; /* 🆙 Carrusel ~10% desde arriba */
    box-sizing: border-box;
    overflow: hidden;
}

/* 🎞 Carrusel */
.carrusel-card {
    position: relative;
    background: rgba(34,51,74,0.75);
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    border: 1px solid rgba(178,142,93,0.35);
    width: min(90vw, 760px);
    height: clamp(180px, 35vh, 300px);
    overflow: hidden;
    flex-shrink: 0;
    animation: fadeIn 1.2s ease forwards;
}

#carrusel {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    pointer-events: none;
    opacity: 0.95;
    transition: opacity 1s ease, transform 4s ease;
}
#carrusel.fade-in {
    opacity: 1;
    transform: scale(1.05);
}
#carrusel.fade-out {
    opacity: 0;
    transform: scale(1);
}

/* 📜 Bloque de texto centrado */
.text-block {
    margin-top: 6vh; /* 🔹 más espacio desde el carrusel */
    height: 45vh;    /* 🔹 centrado vertical aproximado */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    animation: fadeInUp 1.2s ease 0.3s forwards;
    opacity: 0;
    user-select: none;
}

/* 🔹 Título principal */
.text-block h1 {
    color: var(--gold);
    font-size: clamp(3.8rem, 9vw, 5.4rem);
    font-weight: 700;
    margin-bottom: 1.6rem;
    letter-spacing: 1.4px;
    text-shadow: 0 0 10px rgba(178,142,93,0.25);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    animation: titleFade 1.2s ease 0.6s forwards;
}
@keyframes titleFade {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* 🔹 Subtítulo */
.text-block .subtitle {
    color: #e0e6ee;
    font-size: clamp(1.2rem, 3.8vw, 1.6rem);
    font-weight: 500;
    letter-spacing: 0.6px;
    margin-bottom: 2rem;
    line-height: 1.6;
    opacity: 0;
    animation: fadeSlide 1.2s ease 1.2s forwards;
}
@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ✨ Texto "En construcción" */
.text-block .typing {
    display: inline-block;
    color: var(--white);
    font-size: clamp(1rem, 3.5vw, 1.3rem);
    font-weight: 400;
    border-right: 2px solid var(--gold);
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    opacity: 0;
    animation:
        appear 0.2s linear 2.5s forwards,
        typing 3s steps(40, end) 2.5s forwards,
        blink 0.7s step-end infinite alternate;
}
@keyframes appear { to { opacity: 1; } }
@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink { 50% { border-color: transparent; } }

/* 🔊 Botón de audio */
#audio-toggle {
    position: fixed;
    bottom: 6vh; /* 🔼 más arriba del footer */
    right: 3vw;
    background: rgba(26,26,26,0.85);
    color: #fff;
    border: none;
    font-size: 1.6rem;
    padding: 0.6em;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    user-select: none;
}
#audio-toggle:hover {
    background: rgba(68,68,68,0.9);
    transform: scale(1.1);
}

/* 🧾 Footer fijo */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    color: #9ba5b2;
    font-size: clamp(0.8rem, 3vw, 1rem);
    padding: 0.4rem 0 0.6rem;
    letter-spacing: 0.4px;
    opacity: 0.8;
    user-select: none;
}

/* ✨ Animaciones base */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px);} to { opacity: 1; transform: translateY(0);} }

/* 📱 Móvil */
@media (max-width: 600px) {
    html, body { height: 100svh; }
    .main-layout { padding-top: 8vh; }
    .carrusel-card { width: 94vw; height: clamp(176px, 36vh, 265px); }
    .text-block {
        margin-top: 5vh;
        height: 42vh;
    }
    .text-block h1 {
        font-size: clamp(3.2rem, 9vw, 4.4rem);
        margin-bottom: 1.2rem;
        line-height: 1.1;
    }
    .text-block .subtitle {
        font-size: clamp(1.1rem, 4vw, 1.5rem);
        margin-bottom: 1.6rem;
    }
    .text-block .typing {
        font-size: clamp(1rem, 3.8vw, 1.3rem);
    }
    #audio-toggle { bottom: 8vh; } /* 🔼 más arriba del footer en móviles */
}

.subtitle a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.subtitle a:hover {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(178,142,93,0.7);
}

/* =====================================================
   💻 MEJORA ESCRITORIO — Slow Step Cinematic Layout (corregido)
===================================================== */
@media (min-width: 1025px) {
  .main-layout {
    padding-top: 5vh; /* 🔹 Más aire arriba para no cortar el logo */
    justify-content: flex-start; /* 🔹 Mantiene orden natural: carrusel + texto */
    align-items: center;
  }

  .carrusel-card {
    width: min(78vw, 940px);
    height: clamp(280px, 42vh, 400px); /* 🔹 un poco menos alto para dejar respirar */
    margin-bottom: 5vh;
    border-radius: 22px;
  }

  .text-block {
    margin-top: 0;
    height: auto;
    justify-content: center;
    margin-bottom: 6vh; /* 🔹 equilibrio con footer */
  }

  .text-block h1 {
    font-size: clamp(4.2rem, 6vw, 5.8rem);
    letter-spacing: 1.8px;
    margin-bottom: 1.6rem;
  }

  .text-block .subtitle {
    font-size: clamp(1.3rem, 1.8vw, 1.7rem);
    margin-bottom: 2rem;
    max-width: 75%;
  }

  .text-block .typing {
    font-size: 1.3rem;
  }

  .footer {
    font-size: 1rem;
    opacity: 0.9;
  }
}
