/* General resets */
body,
html {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    background-color: transparent !important;
    position: relative !important;
}

.banner {
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 640px;
    height: 150px;
    box-sizing: border-box;
    cursor: pointer;
    overflow: hidden;
    background-color: #fced1e;
    user-select: none;
}

/* Base layer styling */
.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    image-rendering: auto;
}

/* Animations */
.bg-layer {
    z-index: 1;
}

.bar-layer {
    z-index: 2;
    opacity: 0;
    animation: bar-fade-in 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.4s;
}

.logo-layer {
    z-index: 3;
    opacity: 0;
    animation: logo-fade-in 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.2s;
}

.text-layer {
    z-index: 4;
    opacity: 0;
    animation: text-fade-in 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.6s;
}

.cta-layer {
    z-index: 10;
    opacity: 0;
    animation: cta-fade-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
        cta-pulse 2s ease-in-out infinite;
    animation-delay: 1.1s, 2s;
    transform-origin: 238px 110px;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    image-rendering: auto;
    transform: translateZ(0);
}

.original-layer {
    z-index: 8;
    opacity: 0;
    animation: original-fade-in 0.5s ease-in-out forwards;
    animation-delay: 1.8s;
    clip-path: polygon(evenodd, 0px 0px, 640px 0px, 640px 150px, 0px 150px, 0px 0px, 139.75px 92.25px, 139.75px 128.75px, 336.0px 128.75px, 336.0px 92.25px, 139.75px 92.25px);
}

@keyframes logo-fade-in {
    0% {
        opacity: 0;
        transform: translateY(-15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bar-fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes text-fade-in {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cta-fade-in {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cta-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes original-fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Hover effect on the banner to make only the CTA respond */
.banner:hover .cta-layer {
    animation-name: cta-fade-in, cta-pulse-fast;
    animation-duration: 0.6s, 0.6s;
    animation-delay: 1.1s, 0s;
    animation-iteration-count: 1, infinite;
    image-rendering: auto;
    transform: translateZ(0);
    will-change: transform;
}

@keyframes cta-pulse-fast {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Close button style */
.close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    z-index: 100;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.close-btn img {
    width: 12px;
    height: 12px;
    object-fit: contain;
}