body {
    margin: 0;
    padding: 0;
}

section {
    height: 100vh;
    background: #000;
}

video {
    position: absolute;
    object-fit: cover;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Add gradient overlay that changes color */
    filter: hue-rotate(0deg);
    animation: smokeColorShift 10s ease-in-out forwards;
}

h1 {
    margin: 0;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    text-align: center;
    color: #ddd;
    font-size: 3.5em;
    font-family: sans-serif;
    letter-spacing: 1.5rem;
    cursor: pointer;
}

h1:hover {
    opacity: 0.8;
}

/* Letters start completely hidden */
h1 span {
    display: inline-block;
    opacity: 0;
    transform: rotateY(90deg) scale(0.5);
    animation: smokeReveal 1.5s ease-out forwards;
    animation-fill-mode: forwards;
    /* Add a subtle glow effect when revealed */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Enhanced reveal animation - like smoke clearing */
@keyframes smokeReveal {
    0% {
        opacity: 0;
        transform: rotateY(90deg) scale(0.5);
        filter: blur(10px);
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    }
    
    30% {
        opacity: 0.3;
        filter: blur(5px);
    }
    
    70% {
        opacity: 0.8;
        transform: rotateY(30deg) scale(0.9);
        filter: blur(2px);
    }

    100% {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
        filter: blur(0);
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    }
}

/* Red smoke overlay animation - timed with the red letter reveal */
@keyframes redSmokeOverlay {
    0% {
        opacity: 0;
    }
    
    45% {
        opacity: 0;
    }
    
    50% {
        opacity: 0.6;
    }
    
    55% {
        opacity: 0.6;
    }
    
    100% {
        opacity: 0;
    }
}

/* Letter timing */
h1 span:nth-child(1) {
    animation-delay: 1s;
}
h1 span:nth-child(2) {
    animation-delay: 1.5s;
}
h1 span:nth-child(3) {
    animation-delay: 2s;
}
h1 span:nth-child(4) {
    animation-delay: 2.5s;
}
h1 span:nth-child(5) {
    color: #cc1515;
    animation-delay: 3s;
    /* Enhanced glow for the red letter */
    text-shadow: 0 0 20px rgba(204, 21, 21, 0.6);
}
h1 span:nth-child(6) {
    animation-delay: 3.5s;
}
h1 span:nth-child(7) {
    animation-delay: 4s;
}
h1 span:nth-child(8) {
    animation-delay: 4.5s;
}
h1 span:nth-child(9) {
    animation-delay: 5s;
}
h1 span:nth-child(10) {
    animation-delay: 5.5s;
}