/* VuSuite Entrance Animation Styles */

.entrance-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.entrance-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.entrance-overlay.fade-out {
    opacity: 0;
}

.entrance-container {
    max-width: 90vw;
    padding: 20px;
    text-align: center;
    position: relative;
    width: 100%;
    perspective: 1000px;
}

.entrance-scene {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    opacity: 0;
    padding: 0 20px;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.entrance-scene.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.entrance-scene:not(.active) {
    transform: translate(-50%, -50%) scale(0.98);
}

/* Scene 1 - Dramatic Typewriter */
.entrance-scene1 {
    font-size: clamp(1.4rem, 5vw, 2.8rem);
    font-weight: 400;
    color: #a0a0a0;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(160, 160, 160, 0.1);
}

.entrance-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    animation: entranceCharReveal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.entrance-cursor {
    display: inline-block;
    width: 2px;
    height: clamp(1.5rem, 6vw, 3.2rem);
    background: #707070;
    margin-left: 4px;
    vertical-align: middle;
    animation: entranceBlink 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes entranceBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Scene 2 - The Reality (Dramatic Impact) */
.entrance-scene2 {
    font-size: clamp(1.8rem, 6vw, 3.5rem);
    line-height: 1.3;
    color: #808080;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-shadow: 0 0 30px rgba(128, 128, 128, 0.15);
}

.entrance-text-line {
    opacity: 0;
    transform: translateY(30px);
    margin: clamp(15px, 4vh, 25px) 0;
}

.entrance-text-line.fade-in {
    animation: entranceDramaticFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.entrance-text-line:nth-child(2).fade-in {
    animation-delay: 0.25s;
}

.entrance-text-line:nth-child(3).fade-in {
    animation-delay: 0.5s;
}

@keyframes entranceDramaticFade {
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

/* Scene 3 - The Solution (Powerful Reveal) */
.entrance-scene3 {
    font-size: clamp(0.95rem, 3.5vw, 1.1rem);
    line-height: 1.8;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.entrance-reveal-text {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 200;
    color: #b0b0b0;
    display: block;
    margin-bottom: clamp(25px, 5vh, 40px);
    letter-spacing: 0.15em;
    opacity: 0;
    transform: scale(0.9);
    text-shadow: 0 0 40px rgba(176, 176, 176, 0.2);
}

.entrance-reveal-text.reveal {
    animation: entrancePowerReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes entrancePowerReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.entrance-divider {
    width: clamp(150px, 60vw, 300px);
    height: 1px;
    background: linear-gradient(90deg, transparent, #606060, transparent);
    margin: clamp(20px, 4vh, 30px) auto;
    opacity: 0;
    transform: scaleX(0);
}

.entrance-divider.show {
    animation: entranceExpandDivider 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes entranceExpandDivider {
    to {
        opacity: 0.5;
        transform: scaleX(1);
    }
}

.entrance-subtext {
    opacity: 0;
    transform: translateY(20px);
    color: #909090;
    font-size: clamp(0.75rem, 2.5vw, 0.95rem);
    line-height: 2;
}

.entrance-subtext.fade-in {
    animation: entranceSubtextFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes entranceSubtextFade {
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

/* Scene 4 - Brand Reveal (Final Impact) */
.entrance-scene4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(15px, 3vh, 25px);
}

.entrance-brand {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 100;
    letter-spacing: 0.3em;
    color: #c0c0c0;
    opacity: 0;
    transform: scale(0.85);
    filter: blur(15px);
    text-shadow: 0 0 60px rgba(192, 192, 192, 0.3);
}

.entrance-brand.reveal {
    animation: entranceBrandReveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes entranceBrandReveal {
    0% {
        opacity: 0;
        transform: scale(0.85);
        filter: blur(15px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

.entrance-tagline {
    font-size: clamp(0.85rem, 2.8vw, 1.1rem);
    font-weight: 300;
    letter-spacing: 0.15em;
    color: #808080;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
}

.entrance-tagline.reveal {
    animation: entranceTaglineFade 0.8s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes entranceTaglineFade {
    to {
        opacity: 0.7;
        transform: translateY(0);
    }
}

/* Mysterious ambient glow effect */
.entrance-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(160,160,160,0.02) 0%, transparent 70%);
    pointer-events: none;
    mix-blend-mode: screen;
    animation: entranceMysteriousGlow 10s ease-in-out infinite alternate;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes entranceMysteriousGlow {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.15;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.3;
    }
}

/* Skip button - Grey aesthetic */
.entrance-skip-btn {
    position: fixed;
    top: clamp(20px, 4vh, 30px);
    right: clamp(20px, 4vw, 30px);
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(128, 128, 128, 0.2);
    color: rgba(128, 128, 128, 0.6);
    font-size: clamp(0.75rem, 2.5vw, 0.85rem);
    font-weight: 400;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
    opacity: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    backdrop-filter: blur(10px);
    z-index: 10001;
}

.entrance-skip-btn.show {
    opacity: 1;
    animation: entranceSkipFadeIn 0.6s 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes entranceSkipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 0.5;
        transform: translateY(0);
    }
}

.entrance-skip-btn:hover {
    background: rgba(128, 128, 128, 0.05);
    border-color: rgba(160, 160, 160, 0.4);
    color: rgba(160, 160, 160, 0.9);
}

.entrance-skip-btn:active {
    transform: scale(0.98);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .entrance-container {
        max-width: 95vw;
    }

    .entrance-scene {
        padding: 0 15px;
    }

    .entrance-cursor {
        width: 2px;
    }
}

@media (max-width: 480px) {
    .entrance-skip-btn {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

/* iPhone specific optimizations */
@media only screen 
    and (min-device-width: 390px) 
    and (max-device-width: 430px)
    and (-webkit-device-pixel-ratio: 3) {
    
    .entrance-overlay {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .entrance-skip-btn {
        top: calc(20px + env(safe-area-inset-top));
        right: calc(20px + env(safe-area-inset-right));
    }
}

/* Prevent text selection */
.entrance-scene {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .entrance-overlay,
    .entrance-scene,
    .entrance-char,
    .entrance-question,
    .entrance-highlight,
    .entrance-divider,
    .entrance-message,
    .entrance-tagline,
    .entrance-skip-btn {
        animation: none !important;
        transition: opacity 0.3s ease !important;
    }
    
    .entrance-glow {
        display: none;
    }
}
