/* ============================================
   CodeIQ Splash Screen - Professional Power-Up Sequence
   Real logo assets with neon thrumming + white impact
   ============================================ */

/* Fonts loaded via iq-suite-editorial.css — no duplicate @import needed */

/* ============================================
   CSS Custom Properties - Professional Palette
   ============================================ */

:root {
    /* Brand Colors - CodeIQ Editorial Rose */
    --codeiq-purple-deep: #9a4054;
    --codeiq-purple-brand: #c4576a;
    --codeiq-purple-bright: #c4576a;
    --codeiq-pink-brand: #c4576a;
    --codeiq-pink-bright: #9a4054;

    /* Light Cream/Rose Background */
    --splash-bg-deepest: #fdf5f7;
    --splash-bg-deep: #fae8ec;
    --splash-bg-mid: #f5d0d9;

    /* Functional Colors */
    --splash-white: #1a1a1a;
    --splash-text-subtle: rgba(26, 26, 26, 0.55);
    --splash-glow-purple: rgba(196, 87, 106, 0.15);
    --splash-glow-pink: rgba(196, 87, 106, 0.2);
}

/* Hide notifications until splash completes */
body.splash-active #toast-container {
    display: none !important;
}

/* Hide RiQ assistant UI until splash completes */
body.splash-active .riq-container,
body.splash-active .riq-chat-modal,
body.splash-active #codeiq-footer {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ============================================
   Main Splash Container - Full Viewport
   ============================================ */

.codeiq-splash {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    /* Use dynamic viewport height for mobile (fallback to vh) */
    height: 100dvh;
    min-height: -webkit-fill-available;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg,
        var(--splash-bg-deepest) 0%,
        var(--splash-bg-deep) 40%,
        var(--splash-bg-mid) 70%,
        var(--splash-bg-deep) 100%
    );
    z-index: 99999;
    overflow: hidden;
    /* Override global zoom.css (85%) to ensure full screen coverage */
    /* Counter 85% zoom by scaling up: 1 / 0.85 = 1.176 - use ONLY zoom, not transform */
    zoom: 1.176 !important;
    /* Box sizing to prevent any overflow */
    box-sizing: border-box;
}

/* Subtle radial gradient for depth */
.codeiq-splash::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 60% 50% at 50% 40%,
        var(--splash-glow-purple),
        transparent 70%
    );
    opacity: 0.3;
    pointer-events: none;
}

/* ============================================
   Background Animation: Aurora / Northern Lights Effect
   Moving box-shadows with hue rotation - creates organic flowing lights
   ============================================ */

.codeiq-splash .aurora-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.codeiq-splash .aurora-layer {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0.4;
}

/* Rose glow - moves clockwise from top */
.codeiq-splash .aurora-layer:nth-child(1) {
    top: 0;
    left: 50%;
    box-shadow: 0 0 50vmax 50vmax rgba(196, 87, 106, 0.12);
    animation: auroraPath1 20s linear infinite, auroraPulse1 8s ease-in-out infinite;
}

/* Deeper rose glow - moves counter-clockwise from right */
.codeiq-splash .aurora-layer:nth-child(2) {
    top: 50%;
    left: 100%;
    box-shadow: 0 0 45vmax 45vmax rgba(196, 87, 106, 0.1);
    animation: auroraPath2 25s linear infinite, auroraPulse2 10s ease-in-out infinite;
}

/* Soft rose accent - moves on diagonal path */
.codeiq-splash .aurora-layer:nth-child(3) {
    top: 100%;
    left: 50%;
    box-shadow: 0 0 40vmax 40vmax rgba(196, 87, 106, 0.08);
    animation: auroraPath3 18s linear infinite, auroraPulse3 12s ease-in-out infinite;
}

@keyframes auroraPath1 {
    0% {
        top: 0vh;
        left: 50vw;
    }
    25% {
        top: 50vh;
        left: 100vw;
    }
    50% {
        top: 100vh;
        left: 50vw;
    }
    75% {
        top: 50vh;
        left: 0vw;
    }
    100% {
        top: 0vh;
        left: 50vw;
    }
}

@keyframes auroraPath2 {
    0% {
        top: 50vh;
        left: 100vw;
    }
    25% {
        top: 100vh;
        left: 50vw;
    }
    50% {
        top: 50vh;
        left: 0vw;
    }
    75% {
        top: 0vh;
        left: 50vw;
    }
    100% {
        top: 50vh;
        left: 100vw;
    }
}

@keyframes auroraPath3 {
    0% {
        top: 100vh;
        left: 25vw;
    }
    25% {
        top: 25vh;
        left: 0vw;
    }
    50% {
        top: 0vh;
        left: 75vw;
    }
    75% {
        top: 75vh;
        left: 100vw;
    }
    100% {
        top: 100vh;
        left: 25vw;
    }
}

/* Subtle intensity pulses - no color shifting */
@keyframes auroraPulse1 {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes auroraPulse2 {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.4;
    }
}

@keyframes auroraPulse3 {
    0%, 100% {
        opacity: 0.55;
    }
    50% {
        opacity: 0.7;
    }
}

/* ============================================
   Content Container - Centered
   ============================================ */

.splash-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    padding: 40px;
    gap: 60px;
}

/* ============================================
   PHASE 1: Logomark Neon Thrumming (0-1.5s)
   ============================================ */

.splash-logomark {
    position: absolute;
    width: 120px;
    height: 120px;
    opacity: 0;
    animation: logomarkSequence 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes logomarkSequence {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    20% {
        opacity: 1;
        transform: scale(1);
    }
    80% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.1);
    }
}

.logomark-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* On light bg, show logo in natural brand colors */
}

/* Neon glow effect */
.logomark-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(
        circle at center,
        var(--splash-glow-pink),
        var(--splash-glow-purple),
        transparent 70%
    );
    filter: blur(30px);
    animation: neonThrob 0.8s ease-in-out infinite;
}

@keyframes neonThrob {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ============================================
   PHASE 2: Full Logo White Impact (1.5-3s)
   ============================================ */

.splash-logo-full {
    opacity: 0;
    transform: scale(0.85);
    animation: logoImpact 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s forwards;
}

@keyframes logoImpact {
    0% {
        opacity: 0;
        transform: scale(0.85);
        filter: brightness(3) blur(10px);
    }
    30% {
        opacity: 1;
        transform: scale(1.05);
        filter: brightness(3) blur(0px);
    }
    50% {
        filter: brightness(2.5);
    }
    70% {
        transform: scale(1);
        filter: brightness(1.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }
}

.logo-img {
    height: 160px;
    width: auto;
    max-width: 700px;
    object-fit: contain;
    /* Logo cleaned at source - no white artifacts! */
    background: transparent;
}

/* ============================================
   MICRO DEMO: Rapid-Fire Transaction Coding (3s+)
   ============================================ */

.splash-microdemo {
    width: min(520px, 92vw);
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(196, 87, 106, 0.03);
    border: 1px solid rgba(196, 87, 106, 0.1);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    animation:
        ciqMicrodemoIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 2.9s forwards,
        ciqMicrodemoOut 0.6s ease 6.6s forwards;
    pointer-events: none;
}

@keyframes ciqMicrodemoIn {
    to {
        opacity: 0.95;
        transform: translateY(0) scale(1);
        box-shadow: 0 16px 48px rgba(154, 64, 84, 0.12);
    }
}

@keyframes ciqMicrodemoOut {
    to {
        opacity: 0.25;
        filter: blur(2px);
    }
}

/* Individual transaction row */
.splash-microdemo .micro-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 11px;
    opacity: 0;
    transform: translateX(-20px);
    background: transparent;
    transition: background 0.2s ease;
}

/* Staggered row animations - rapid fire! */
.splash-microdemo .micro-row[data-row="1"] { animation: ciqRowSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) 3.0s forwards; }
.splash-microdemo .micro-row[data-row="2"] { animation: ciqRowSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) 3.25s forwards; }
.splash-microdemo .micro-row[data-row="3"] { animation: ciqRowSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) 3.5s forwards; }
.splash-microdemo .micro-row[data-row="4"] { animation: ciqRowSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) 3.75s forwards; }
.splash-microdemo .micro-row[data-row="5"] { animation: ciqRowSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) 4.0s forwards; }
.splash-microdemo .micro-row[data-row="6"] { animation: ciqRowSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) 4.25s forwards; }

@keyframes ciqRowSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
        background: transparent;
    }
    50% {
        opacity: 1;
        transform: translateX(0);
        background: rgba(196, 87, 106, 0.12);
    }
    100% {
        opacity: 0.85;
        transform: translateX(0);
        background: rgba(196, 87, 106, 0.02);
    }
}

.splash-microdemo .micro-desc {
    font-weight: 600;
    color: rgba(26, 26, 26, 0.7);
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.splash-microdemo .micro-arrow {
    color: rgba(26, 26, 26, 0.35);
    font-weight: 700;
    font-size: 10px;
}

.splash-microdemo .micro-account {
    font-weight: 700;
    color: rgba(26, 26, 26, 0.85);
    letter-spacing: 0.01em;
    text-align: right;
}

.splash-microdemo .micro-check {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: rgba(16, 185, 129, 0.95);
    background: rgba(16, 185, 129, 0.15);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.5);
}

/* Staggered checkmark animations */
.splash-microdemo .micro-row[data-row="1"] .micro-check { animation: ciqCheckPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) 3.15s forwards; }
.splash-microdemo .micro-row[data-row="2"] .micro-check { animation: ciqCheckPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) 3.4s forwards; }
.splash-microdemo .micro-row[data-row="3"] .micro-check { animation: ciqCheckPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) 3.65s forwards; }
.splash-microdemo .micro-row[data-row="4"] .micro-check { animation: ciqCheckPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) 3.9s forwards; }
.splash-microdemo .micro-row[data-row="5"] .micro-check { animation: ciqCheckPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) 4.15s forwards; }
.splash-microdemo .micro-row[data-row="6"] .micro-check { animation: ciqCheckPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) 4.4s forwards; }

@keyframes ciqCheckPop {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Summary badge at bottom */
.splash-microdemo .micro-summary {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(196, 87, 106, 0.06);
    opacity: 0;
    transform: translateY(8px);
    animation: ciqSummaryIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 4.6s forwards;
}

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

.splash-microdemo .summary-count {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: rgba(196, 87, 106, 0.95);
    letter-spacing: -0.02em;
}

.splash-microdemo .summary-label {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: rgba(26, 26, 26, 0.55);
    letter-spacing: 0.02em;
}

/* ============================================
   PHASE 3: Workflow Reveal (3-5.5s)
   ============================================ */

.splash-workflow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-top: 22px;
    opacity: 0;
    animation: workflowFadeIn 0.8s ease 3s forwards;
}

@keyframes workflowFadeIn {
    to {
        opacity: 1;
    }
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
}

.workflow-step[data-step="1"] {
    animation: stepEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 3.2s forwards;
}

.workflow-step[data-step="2"] {
    animation: stepEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 3.5s forwards;
}

.workflow-step[data-step="3"] {
    animation: stepEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 3.8s forwards;
}

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

.step-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(196, 87, 106, 0.04);
    border: 1px solid rgba(196, 87, 106, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.workflow-step[data-step="1"] .step-icon {
    animation: iconGlow 0.5s ease 4.2s forwards;
}

.workflow-step[data-step="2"] .step-icon {
    animation: iconGlow 0.5s ease 4.5s forwards;
}

.workflow-step[data-step="3"] .step-icon {
    animation: iconGlow 0.5s ease 4.8s forwards;
}

@keyframes iconGlow {
    to {
        background: rgba(196, 87, 106, 0.15);
        border-color: var(--codeiq-pink-brand);
        box-shadow:
            0 0 20px var(--splash-glow-pink),
            inset 0 0 15px rgba(196, 87, 106, 0.1);
    }
}

.step-icon svg {
    width: 28px;
    height: 28px;
    color: rgba(26, 26, 26, 0.4);
    transition: color 0.4s ease;
}

.workflow-step[data-step="1"] .step-icon svg {
    animation: iconColorize 0.5s ease 4.2s forwards;
}

.workflow-step[data-step="2"] .step-icon svg {
    animation: iconColorize 0.5s ease 4.5s forwards;
}

.workflow-step[data-step="3"] .step-icon svg {
    animation: iconColorize 0.5s ease 4.8s forwards;
}

@keyframes iconColorize {
    to {
        color: var(--codeiq-pink-bright);
        filter: drop-shadow(0 0 6px var(--splash-glow-pink));
    }
}

.step-label {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(26, 26, 26, 0.45);
    transition: color 0.4s ease;
}

.workflow-step[data-step="1"] .step-label {
    animation: labelActivate 0.5s ease 4.2s forwards;
}

.workflow-step[data-step="2"] .step-label {
    animation: labelActivate 0.5s ease 4.5s forwards;
}

.workflow-step[data-step="3"] .step-label {
    animation: labelActivate 0.5s ease 4.8s forwards;
}

@keyframes labelActivate {
    to {
        color: var(--codeiq-pink-bright);
    }
}

/* Workflow connectors */
.workflow-connector {
    width: 60px;
    height: 2px;
    background: rgba(196, 87, 106, 0.08);
    position: relative;
    opacity: 0;
    animation: connectorFade 0.4s ease 4s forwards;
}

@keyframes connectorFade {
    to {
        opacity: 1;
    }
}

/* ============================================
   PHASE 4: Tagline (5.5-6.5s) + Hold (6.5-8s)
   ============================================ */

.splash-tagline {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--splash-text-subtle);
    text-align: center;
    opacity: 0;
    animation: taglineFade 0.6s ease 5.5s forwards;
    margin: 0;
}

/* Hold state for readability: 6.5s-8s = 1.5 second pause */

@keyframes taglineFade {
    to {
        opacity: 1;
    }
}

/* ============================================
   Click to Skip Hint
   ============================================ */

.codeiq-splash .splash-skip-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: rgba(26, 26, 26, 0.3);
    letter-spacing: 0.05em;
    opacity: 0;
    animation:
        skipHintFade 0.5s ease 2s forwards,
        skipHintOut 0.4s ease 6.6s forwards;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.codeiq-splash .splash-skip-hint:hover {
    color: rgba(26, 26, 26, 0.55);
}

@keyframes skipHintFade {
    to {
        opacity: 1;
    }
}

@keyframes skipHintOut {
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(6px);
    }
}

.codeiq-splash .splash-enter-cta {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.65);
    opacity: 0;
    animation:
        ciqEnterCtaIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 6.6s forwards,
        ciqEnterCtaPulse 1.4s ease-in-out 7.2s infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes ciqEnterCtaIn {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes ciqEnterCtaPulse {
    0%, 100% {
        color: rgba(26, 26, 26, 0.6);
        text-shadow: 0 0 0 rgba(196, 87, 106, 0);
    }
    50% {
        color: #c4576a;
        text-shadow: 0 0 16px rgba(196, 87, 106, 0.25);
    }
}

/* Make entire splash clickable */
.codeiq-splash {
    cursor: pointer;
}

/* ============================================
   Fade Out (6s) - Standard fade
   ============================================ */

.codeiq-splash.fade-out {
    animation: splashFadeOut 0.8s ease forwards;
}

@keyframes splashFadeOut {
    to {
        opacity: 0;
    }
}

/* ============================================
   Diffuse Effect - Click to Skip
   Elegant blur + fade + scale for manual skip
   ============================================ */

.codeiq-splash.diffuse {
    animation: splashDiffuse 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.codeiq-splash.diffuse .splash-content {
    animation: contentDiffuse 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.codeiq-splash.diffuse .aurora-container {
    animation: auroraDiffuse 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.codeiq-splash.diffuse .splash-skip-hint {
    animation: hintDiffuse 0.3s ease forwards;
}

@keyframes splashDiffuse {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes contentDiffuse {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0px);
    }
    100% {
        opacity: 0;
        transform: scale(1.05);
        filter: blur(20px);
    }
}

@keyframes auroraDiffuse {
    0% {
        opacity: 0.6;
        filter: blur(0px);
    }
    100% {
        opacity: 0;
        filter: blur(40px);
    }
}

@keyframes hintDiffuse {
    to {
        opacity: 0;
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    /*
     * Mobile browsers typically IGNORE zoom on html, so the global 85% zoom doesn't apply.
     * Therefore, we MUST NOT counter-scale on mobile - it would make content too large.
     */
    .codeiq-splash {
        zoom: 1 !important;
        /* Reset all transform properties */
        transform: none !important;
        /* Ensure full viewport coverage on mobile */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        width: 100dvw !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: -webkit-fill-available;
        overflow: hidden !important;
    }

    /* Ensure content container is properly sized and visible */
    .codeiq-splash .splash-content {
        position: relative !important;
        z-index: 10 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100vw !important;
        height: auto !important;
        gap: 30px;
        padding: 20px;
        box-sizing: border-box;
    }

    /* Ensure ::before gradient doesn't cover content */
    .codeiq-splash::before {
        z-index: 0 !important;
        pointer-events: none !important;
    }

    /* Logo mark - ensure it's visible and centered */
    .codeiq-splash .splash-logomark {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 80px;
        height: 80px;
        z-index: 5 !important;
    }

    /* Override animation to include translate for mobile */
    .codeiq-splash .splash-logomark {
        animation: ciqLogomarkSequenceMobile 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }

    /* Full logo - ensure visible */
    .codeiq-splash .splash-logo-full {
        position: relative !important;
        z-index: 10 !important;
        display: block !important;
    }

    .codeiq-splash .logo-img {
        height: 100px;
        max-width: 85vw;
        display: block !important;
    }

    /* Workflow - stack vertically on mobile */
    .codeiq-splash .splash-workflow {
        flex-direction: column;
        gap: 20px;
        margin-top: 20px;
        position: relative !important;
        z-index: 10 !important;
        display: flex !important;
    }

    .codeiq-splash .workflow-step {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        position: relative !important;
        z-index: 10 !important;
    }

    .codeiq-splash .workflow-connector {
        width: 2px;
        height: 30px;
        display: block !important;
    }

    .codeiq-splash .step-icon {
        width: 52px;
        height: 52px;
        display: flex !important;
    }

    .codeiq-splash .step-icon svg {
        width: 22px;
        height: 22px;
        display: block !important;
    }

    .codeiq-splash .step-label {
        font-size: 11px;
        display: block !important;
    }

    .codeiq-splash .splash-tagline {
        font-size: 13px;
        padding: 0 16px;
        position: relative !important;
        z-index: 10 !important;
        display: block !important;
    }

    .codeiq-splash .splash-microdemo {
        display: none !important;
    }

    /* Glow effect - ensure it's behind content */
    .codeiq-splash .logomark-glow {
        z-index: 1 !important;
    }
}

/* Mobile-specific animation that maintains centering */
@keyframes ciqLogomarkSequenceMobile {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@media (max-width: 480px) {
    .codeiq-splash .logo-img {
        height: 80px;
        max-width: 80vw;
    }

    .codeiq-splash .splash-logomark {
        width: 70px;
        height: 70px;
    }

    .codeiq-splash .splash-content {
        gap: 24px;
        padding: 16px;
    }

    .codeiq-splash .step-icon {
        width: 44px;
        height: 44px;
    }

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

    .codeiq-splash .step-label {
        font-size: 10px;
    }

    .codeiq-splash .splash-workflow {
        gap: 16px;
    }

    .codeiq-splash .workflow-connector {
        height: 24px;
    }

    .codeiq-splash .splash-tagline {
        font-size: 12px;
    }
}

/* ============================================
   Accessibility
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .splash-logomark,
    .logomark-glow,
    .splash-logo-full,
    .splash-microdemo,
    .micro-bar-fill,
    .micro-badge,
    .splash-workflow,
    .workflow-step,
    .step-icon,
    .step-icon svg,
    .step-label,
    .workflow-connector,
    .splash-tagline,
    .codeiq-splash .splash-enter-cta,
    .codeiq-splash.fade-out {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
    }
}

/* Performance optimization */
.codeiq-splash * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   BLEED-IN ANIMATION SYSTEM
   UI elements animate in after splash fades out
   ============================================ */

/* Elements marked for bleed-in start hidden */
.bleed-in {
    opacity: 0;
    transform: translateY(15px);
}

/* When body has .bleed-active, animate elements in with stagger */
body.bleed-active .bleed-in {
    animation: bleedInReveal 0.5s ease-out forwards;
    animation-delay: var(--bleed-delay, 0ms);
}

/* The reveal animation with subtle neon glow pulse */
@keyframes bleedInReveal {
    0% {
        opacity: 0;
        transform: translateY(15px);
        filter: drop-shadow(0 0 0px var(--bleed-glow-color, rgba(196, 87, 106, 0)));
    }
    60% {
        opacity: 1;
        transform: translateY(0);
        filter: drop-shadow(0 0 15px var(--bleed-glow-color, rgba(196, 87, 106, 0.5)));
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: drop-shadow(0 0 0px var(--bleed-glow-color, rgba(196, 87, 106, 0)));
    }
}

/* CodeIQ specific glow color */
.codeiq-dashboard .bleed-in {
    --bleed-glow-color: rgba(196, 87, 106, 0.5);
}

/* Stagger delays - smooth cascade */
.codeiq-dashboard .cc-header.bleed-in { --bleed-delay: 0ms; }
.codeiq-dashboard .cc-metrics-panel.bleed-in { --bleed-delay: 100ms; }
.codeiq-dashboard .cc-metric-card.bleed-in:nth-child(1) { --bleed-delay: 150ms; }
.codeiq-dashboard .cc-metric-card.bleed-in:nth-child(2) { --bleed-delay: 200ms; }
.codeiq-dashboard .cc-metric-card.bleed-in:nth-child(3) { --bleed-delay: 250ms; }
.codeiq-dashboard .cc-metric-card.bleed-in:nth-child(4) { --bleed-delay: 300ms; }
.codeiq-dashboard .cc-command-section.bleed-in { --bleed-delay: 350ms; }
.codeiq-dashboard .cc-command-btn.bleed-in:nth-child(1) { --bleed-delay: 400ms; }
.codeiq-dashboard .cc-command-btn.bleed-in:nth-child(2) { --bleed-delay: 450ms; }
.codeiq-dashboard .cc-command-btn.bleed-in:nth-child(3) { --bleed-delay: 500ms; }
.codeiq-dashboard .cc-command-btn.bleed-in:nth-child(4) { --bleed-delay: 550ms; }
.codeiq-dashboard .cc-activity-section.bleed-in { --bleed-delay: 400ms; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .bleed-in {
        opacity: 1;
        transform: none;
    }
    body.bleed-active .bleed-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
