/* =============================================
   DOOR OPENING INTRO ANIMATION
   VM Marketing - Hero Reveal Effect
   ============================================= */

/* Intro Overlay - Covers entire screen initially */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    pointer-events: none;
}

/* Door panels */
.door-left,
.door-right {
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    position: relative;
    overflow: hidden;
    transition: transform 1.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.door-left {
    transform-origin: left center;
    border-right: 2px solid var(--vm-orange);
}

.door-right {
    transform-origin: right center;
    border-left: 2px solid var(--vm-orange);
}

/* Door handle decorations */
.door-left::after,
.door-right::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 80px;
    background: linear-gradient(180deg, var(--vm-orange), #cc7a00);
    border-radius: 8px;
    transform: translateY(-50%);
    box-shadow: 0 0 20px rgba(255, 153, 0, 0.5);
}

.door-left::after {
    right: 30px;
}

.door-right::after {
    left: 30px;
}

/* Door patterns/texture */
.door-left::before,
.door-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            rgba(255, 153, 0, 0.03) 50px,
            rgba(255, 153, 0, 0.03) 51px
        );
}

/* Logo in center of doors */
.door-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    text-align: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.door-logo img {
    width: 120px;
    height: 120px;
    animation: pulse-glow 2s ease-in-out infinite;
}

.door-logo span {
    display: block;
    color: var(--vm-orange);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Animated state - doors open */
.intro-overlay.opened .door-left {
    transform: translateX(-100%);
}

.intro-overlay.opened .door-right {
    transform: translateX(100%);
}

.intro-overlay.opened .door-logo {
    opacity: 0;
}

/* Hide overlay completely after animation */
.intro-overlay.hidden {
    display: none;
}

/* =============================================
   FLOATING SERVICE ICONS (Burst Effect)
   ============================================= */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
    overflow: hidden;
}

.float-icon {
    position: absolute;
    font-size: 5rem;
    opacity: 0;
    color: var(--vm-orange);
    filter: drop-shadow(0 0 20px rgba(255, 153, 0, 0.9));
    z-index: 100002; /* Move in front of doors to ensure visibility during burst */
}

/* Icon burst animation */
@keyframes burst-out {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5);
    }
    70% {
        opacity: 1;
        transform: translate(var(--end-x), var(--end-y)) scale(1) rotate(var(--rotation));
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--end-x) * 1.2), calc(var(--end-y) * 1.2)) scale(0.5) rotate(calc(var(--rotation) + 45deg));
    }
}

.float-icon.animate {
    animation: burst-out 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Individual icon positions and trajectories - Wider spread */
.float-icon:nth-child(1) { --end-x: -350px; --end-y: -350px; --rotation: -45deg; }
.float-icon:nth-child(2) { --end-x: 350px; --end-y: -300px; --rotation: 30deg; }
.float-icon:nth-child(3) { --end-x: -250px; --end-y: 250px; --rotation: -60deg; }
.float-icon:nth-child(4) { --end-x: 400px; --end-y: 200px; --rotation: 45deg; }
.float-icon:nth-child(5) { --end-x: 0px; --end-y: -450px; --rotation: 0deg; }
.float-icon:nth-child(6) { --end-x: -500px; --end-y: 50px; --rotation: -30deg; }
.float-icon:nth-child(7) { --end-x: 500px; --end-y: 80px; --rotation: 60deg; }
.float-icon:nth-child(8) { --end-x: -150px; --end-y: 450px; --rotation: -15deg; }

/* =============================================
   HERO CONTENT REVEAL ANIMATION
   ============================================= */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease 0.5s, transform 1s ease 0.5s;
}

.hero-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal for hero elements */
.hero-content.revealed h1 {
    animation: slide-up 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-content.revealed p {
    animation: slide-up 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-content.revealed > div {
    animation: slide-up 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse glow for logo */
@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 153, 0, 0.6));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(255, 153, 0, 1));
        transform: scale(1.05);
    }
}

/* =============================================
   RESPONSIVE ADJUSTMENTS
   ============================================= */
@media (max-width: 768px) {
    .door-logo img {
        width: 80px;
        height: 80px;
    }
    
    .door-logo span {
        font-size: 1rem;
    }
    
    .float-icon {
        font-size: 2rem;
    }
    
    .door-left::after,
    .door-right::after {
        width: 25px;
        height: 50px;
    }
}

/* Skip intro button */
.skip-intro {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100002;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--vm-orange);
    color: var(--vm-orange);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fade-in 0.5s ease 1s forwards;
}

.skip-intro:hover {
    background: var(--vm-orange);
    color: #000;
}

@keyframes fade-in {
    to { opacity: 1; }
}

.intro-overlay.opened .skip-intro,
.intro-overlay.hidden .skip-intro {
    display: none;
}
