/* ============================================
   SPLASH SCREEN — Vindam Webpage
   Clipped corners, scan line, glows, star field,
   and sequenced entrance / exit animations.
   ============================================ */

/* --- Entrance Transitions (JS-driven sequence) --- */
.splash-step {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.splash-step.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Card Base --- */
.splash-card {
    position: relative;
}

.splash-card-inner {
    position: relative;
    padding: 24px 22px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.25);
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    /* Cut corner top-right */
    clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}

.splash-card:hover .splash-card-inner {
    border-color: rgba(109, 190, 218, 0.5);
    box-shadow: 0 0 25px rgba(109, 190, 218, 0.06);
}

/* --- Diagonal Line on Cut Corner --- */
.splash-card-diagonal {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 29px;
    height: 29px;
    pointer-events: none;
    z-index: 20;
    color: rgba(255, 255, 255, 0.3);
    transition: color 0.4s ease;
}

.splash-card:hover .splash-card-diagonal {
    color: rgba(109, 190, 218, 0.7);
}

/* --- Ambient Glow --- */
.splash-card-glow {
    position: absolute;
    inset: 0;
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.splash-card:hover .splash-card-glow {
    opacity: 0.6;
}

/* --- Scan Line --- */
.splash-scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(109, 190, 218, 0.25) 30%,
        rgba(109, 190, 218, 0.4) 50%,
        rgba(109, 190, 218, 0.25) 70%,
        transparent 100%
    );
    z-index: 15;
    pointer-events: none;
    animation: scan-sweep 5s linear infinite;
}

@keyframes scan-sweep {
    0%   { top: -2px; opacity: 0; }
    5%   { opacity: 1; }
    90%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.splash-card:hover .splash-scan-line {
    animation-duration: 3s;
}

/* --- Card Label (e.g. "AI CHATBOT") --- */
.splash-card-label {
    display: inline-block;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6DBEDA;
}

/* --- Expanding Underline Divider --- */
.splash-divider {
    width: 40px;
    height: 1px;
    background: #6DBEDA;
    transition: width 0.5s ease;
}

.splash-card:hover .splash-divider {
    width: 64px;
}

/* --- Icon Wrap --- */
.splash-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    color: #6DBEDA;
}

/* --- Features List --- */
.splash-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.splash-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: rgba(156, 163, 175, 0.9);
    letter-spacing: 0.04em;
}

.splash-feat-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #6DBEDA;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(109, 190, 218, 0.5);
}

/* --- Keyboard Key (desktop) --- */
.splash-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: rgba(156, 163, 175, 0.9);
    border: 1.5px solid #6DBEDA;
    border-radius: 5px;
    padding: 5px 14px;
    background: transparent;
    box-shadow: 0 0 10px rgba(109, 190, 218, 0.2);
}

/* --- Tap Button (mobile) --- */
.splash-tap-mobile {
    font-size: 13px;
    letter-spacing: 0.15em;
    color: rgba(156, 163, 175, 0.9);
    border: 1.5px solid #6DBEDA;
    border-radius: 5px;
    padding: 10px 28px;
    background: transparent;
    box-shadow: 0 0 10px rgba(109, 190, 218, 0.2);
}

/* --- Prompt Pulse --- */
#splash-prompt.visible {
    animation: prompt-pulse 2.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

@keyframes prompt-pulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

/* ============================================
   EXIT ANIMATIONS
   ============================================ */

/* Cards fly out left and right */
.splash-exiting #splash-card-chatbot {
    animation: card-fly-left 0.7s cubic-bezier(0.55, 0, 1, 0.45) forwards !important;
}

.splash-exiting #splash-card-callbot {
    animation: card-fly-right 0.7s cubic-bezier(0.55, 0, 1, 0.45) forwards !important;
}

@keyframes card-fly-left {
    0%   { opacity: 1; transform: translateX(0)       scale(1);   }
    100% { opacity: 0; transform: translateX(-110vw)  scale(0.7) rotateY(15deg);  }
}

@keyframes card-fly-right {
    0%   { opacity: 1; transform: translateX(0)      scale(1);   }
    100% { opacity: 0; transform: translateX(110vw)  scale(0.7) rotateY(-15deg); }
}

/* CTA text fades down */
.splash-exiting #splash-custom-cta {
    animation: fade-out-down 0.3s ease-out forwards !important;
}

/* Keyboard/tap prompt fades down */
.splash-exiting #splash-prompt {
    animation: fade-out-down 0.3s ease-out forwards !important;
}

@keyframes fade-out-down {
    to { opacity: 0; transform: translateY(20px); }
}

/* Final overlay fade-out */
.splash-final-fade {
    animation: overlay-fade 0.5s ease-out forwards !important;
}

@keyframes overlay-fade {
    to { opacity: 0; pointer-events: none; }
}

/* ============================================
   BODY STATE — while splash is active
   ============================================ */
body.splash-active {
    overflow: hidden;
}

/* Hide all page content behind the overlay */
body.splash-active > header,
body.splash-active #main-content,
body.splash-active > footer {
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE — Mobile
   ============================================ */
@media (max-width: 767px) {
    #splash-overlay {
        justify-content: flex-start;
    }

    #splash-content {
        padding-top: 2.5rem;
        padding-bottom: 0;
    }

    #splash-logo-wrapper {
        margin-bottom: 1.75rem;
    }

    #splash-logo-wrapper img {
        height: 4.5rem;
    }

    .splash-card-inner {
        padding: 14px 14px 12px;
    }

    .splash-card-inner p {
        font-size: 10.5px;
        margin-bottom: 0.75rem;
        line-height: 1.5;
    }

    .splash-card-inner h3 {
        font-size: 16px;
    }

    .splash-icon-wrap {
        width: 30px;
        height: 30px;
    }

    .splash-icon-wrap svg {
        width: 20px;
        height: 20px;
    }

    .splash-features {
        gap: 5px;
    }

    .splash-features li {
        font-size: 10px;
        gap: 7px;
    }

    .splash-feat-dot {
        width: 4px;
        height: 4px;
    }

    .splash-divider {
        margin-bottom: 0.5rem;
    }

    #splash-custom-cta {
        margin-top: 1.25rem;
    }

    #splash-prompt {
        margin-top: 1rem;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .splash-step {
        transition: none;
        opacity: 1 !important;
        transform: none !important;
    }

    .splash-scan-line {
        animation: none;
        display: none;
    }

    #splash-prompt {
        animation: none;
        opacity: 0.7;
    }
}
