/* ============================================
   WELCOME ANIMATION OVERLAY
   Self-contained styles — does NOT affect 
   any existing page elements.
   ============================================ */

/* Overlay covers entire viewport */
#welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0b0f1a;
    overflow: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#welcome-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Animated background gradient blobs */
.welcome-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: welcomeBlobFloat 8s ease-in-out infinite alternate;
}

.welcome-bg-blob--1 {
    width: 420px;
    height: 420px;
    background: #e63946;
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.welcome-bg-blob--2 {
    width: 350px;
    height: 350px;
    background: #f4a261;
    bottom: -8%;
    right: -5%;
    animation-delay: -4s;
}

.welcome-bg-blob--3 {
    width: 260px;
    height: 260px;
    background: #e63946;
    top: 50%;
    left: 55%;
    opacity: 0.12;
    animation-delay: -2s;
}

@keyframes welcomeBlobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -20px) scale(1.12);
    }
}

/* Canvas for gear particles */
#welcome-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Content wrapper */
.welcome-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

/* Wrench icon above text */
.welcome-icon {
    font-size: 2.8rem;
    color: #f4a261;
    margin-bottom: 1.2rem;
    opacity: 0;
    transform: rotate(-45deg) scale(0.5);
    animation: welcomeIconIn 0.7s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes welcomeIconIn {
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* "Welcome to" subtitle */
.welcome-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: rgba(203, 213, 225, 0.7);
    margin-bottom: 0.6rem;
    opacity: 0;
    transform: translateY(20px);
    animation: welcomeFadeUp 0.7s 0.5s ease forwards;
}

/* "AARYA AUTO" main title line 1 */
.welcome-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    line-height: 1.1;
    color: #f8fafc;
    margin-bottom: 0.1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: welcomeFadeUp 0.8s 0.7s ease forwards;
}

/* "GARAGE" gradient line */
.welcome-title-accent {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.8rem, 8vw, 5.4rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 6px;
    line-height: 1.1;
    background: linear-gradient(135deg, #e63946, #f4a261);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: welcomeTitleAccentIn 0.9s 0.95s ease forwards;
}

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

/* Decorative line under title */
.welcome-line {
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #e63946, #f4a261, transparent);
    margin: 1.4rem auto 1.6rem;
    border-radius: 3px;
    animation: welcomeLineGrow 0.8s 1.3s ease forwards;
}

@keyframes welcomeLineGrow {
    to {
        width: min(320px, 70vw);
    }
}

/* Tagline */
.welcome-tagline {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: rgba(203, 213, 225, 0.55);
    letter-spacing: 2px;
    margin-bottom: 2.2rem;
    opacity: 0;
    animation: welcomeFadeUp 0.6s 1.6s ease forwards;
}

/* Dismiss button */
.welcome-dismiss {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 2.6rem;
    border: 2px solid rgba(230, 57, 70, 0.5);
    border-radius: 50px;
    background: rgba(230, 57, 70, 0.08);
    color: #f8fafc;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    animation: welcomeFadeUp 0.6s 1.9s ease forwards;
    transition: all 0.35s ease;
    backdrop-filter: blur(8px);
}

.welcome-dismiss:hover {
    background: linear-gradient(135deg, #e63946, #f4a261);
    border-color: transparent;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.35);
}

.welcome-dismiss:active {
    transform: translateY(0) !important;
}

.welcome-dismiss i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.welcome-dismiss:hover i {
    transform: translateX(4px);
}

/* Shared fade-up keyframe */
@keyframes welcomeFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating spark particles via pseudo-elements */
.welcome-spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #f4a261;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: welcomeSparkFloat 4s ease-in-out infinite;
}

.welcome-spark:nth-child(1) {
    left: 12%;
    top: 20%;
    animation-delay: 0s;
}

.welcome-spark:nth-child(2) {
    left: 85%;
    top: 35%;
    animation-delay: 1s;
    width: 3px;
    height: 3px;
    background: #e63946;
}

.welcome-spark:nth-child(3) {
    left: 25%;
    top: 75%;
    animation-delay: 2s;
    width: 5px;
    height: 5px;
}

.welcome-spark:nth-child(4) {
    left: 70%;
    top: 80%;
    animation-delay: 0.5s;
    width: 3px;
    height: 3px;
    background: #e63946;
}

.welcome-spark:nth-child(5) {
    left: 50%;
    top: 15%;
    animation-delay: 1.5s;
}

.welcome-spark:nth-child(6) {
    left: 90%;
    top: 60%;
    animation-delay: 3s;
    width: 5px;
    height: 5px;
    background: #e63946;
}

.welcome-spark:nth-child(7) {
    left: 8%;
    top: 55%;
    animation-delay: 2.5s;
    width: 3px;
    height: 3px;
}

.welcome-spark:nth-child(8) {
    left: 45%;
    top: 88%;
    animation-delay: 0.8s;
    background: #e63946;
}

@keyframes welcomeSparkFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }

    20% {
        opacity: 0.8;
        transform: translateY(-10px) scale(1);
    }

    80% {
        opacity: 0.6;
        transform: translateY(-40px) scale(0.8);
    }

    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0);
    }
}

/* Lock body scroll while overlay is active */
body.welcome-active {
    overflow: hidden;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .welcome-icon {
        font-size: 2.2rem;
    }

    .welcome-subtitle {
        font-size: 0.9rem;
        letter-spacing: 4px;
    }

    .welcome-tagline {
        font-size: 0.85rem;
    }

    .welcome-dismiss {
        padding: 0.75rem 2rem;
        font-size: 0.9rem;
    }

    .welcome-bg-blob--1 {
        width: 250px;
        height: 250px;
    }

    .welcome-bg-blob--2 {
        width: 200px;
        height: 200px;
    }

    .welcome-bg-blob--3 {
        width: 150px;
        height: 150px;
    }
}