/* Explain: Styles and animations for the camera intro sequence. */
/* Animación de entrada de la home: la cámara aparece, hace foco en la lente y la página se revela. */

body.intro-lock {
    overflow: hidden;
}

.app-intro {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 107, 0, 0.16), transparent 30rem),
        linear-gradient(150deg, #0B2340 0%, #0D2A4D 55%, #143B6B 100%);
    opacity: 1;
    visibility: visible;
    transition: opacity 700ms ease, visibility 0s linear 0s;
}

.app-intro.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 700ms ease, visibility 0s linear 700ms;
}

.app-intro__scene {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    padding: 0 1.5rem;
    text-align: center;
    animation: introSceneIn 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes introSceneIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.app-intro__camera {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform-origin: 50% 50%;
    will-change: transform, filter;
}

.app-intro.is-zooming .app-intro__camera {
    animation: introZoom 950ms cubic-bezier(0.5, 0, 0.75, 0) forwards;
}

@keyframes introZoom {
    from {
        transform: scale(1);
        filter: blur(0);
    }
    to {
        transform: scale(2.6);
        filter: blur(3px);
    }
}

.app-intro__lens {
    position: relative;
    z-index: 2;
    display: inline-flex;
    height: 7rem;
    width: 7rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 2px solid rgba(255, 178, 122, 0.5);
    background: radial-gradient(circle at 50% 38%, #1E4E86 0%, #0B2340 72%);
    color: #ffffff;
    font-size: 2.6rem;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35), inset 0 0 26px rgba(255, 107, 0, 0.28);
}

.app-intro__lens i {
    filter: drop-shadow(0 0 12px rgba(255, 107, 0, 0.55));
}

.app-intro__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 7rem;
    width: 7rem;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    border: 2px solid rgba(255, 107, 0, 0.55);
    animation: introRing 2200ms ease-out infinite;
    pointer-events: none;
}

@keyframes introRing {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.75;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.95);
        opacity: 0;
    }
}

.app-intro.is-zooming .app-intro__ring {
    animation: none;
    opacity: 0;
}

.app-intro__iris {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    height: 7rem;
    width: 7rem;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 999px;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 60px rgba(255, 107, 0, 0.55), inset 0 0 50px rgba(255, 107, 0, 0.3);
    opacity: 0;
    pointer-events: none;
}

.app-intro.is-zooming .app-intro__iris {
    animation: introIris 950ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes introIris {
    0% {
        transform: translate(-50%, -50%) scale(0.25);
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 1;
    }
}

.app-intro__rec {
    position: absolute;
    top: -1.5rem;
    right: -1.75rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.app-intro__rec i {
    color: #FF3B30;
    font-size: 0.55rem;
    animation: introRec 1200ms steps(1, end) infinite;
}

@keyframes introRec {
    0%, 45% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0.12;
    }
}

.app-intro__label {
    margin: 0;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 4vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: opacity 420ms ease, transform 420ms ease;
}

.app-intro__sub {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: opacity 420ms ease, transform 420ms ease;
}

.app-intro.is-zooming .app-intro__label,
.app-intro.is-zooming .app-intro__sub {
    opacity: 0;
    transform: translateY(-10px);
}

.app-intro__flash {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 55%);
    transform: scale(0.4);
    opacity: 0;
    pointer-events: none;
}

.app-intro.is-revealing .app-intro__flash {
    animation: introFlash 640ms ease-out forwards;
}

@keyframes introFlash {
    0% {
        opacity: 0;
        transform: scale(0.4);
    }
    40% {
        opacity: 0.85;
    }
    100% {
        opacity: 0;
        transform: scale(1.7);
    }
}

@media (max-width: 480px) {
    .app-intro__lens,
    .app-intro__ring,
    .app-intro__iris {
        height: 5.5rem;
        width: 5.5rem;
    }

    .app-intro__lens {
        font-size: 2.1rem;
    }

    .app-intro__rec {
        top: -1.2rem;
        right: -1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-intro__scene,
    .app-intro__ring,
    .app-intro__rec i,
    .app-intro.is-zooming .app-intro__camera,
    .app-intro.is-zooming .app-intro__iris,
    .app-intro.is-revealing .app-intro__flash {
        animation: none;
    }
}