﻿/* Inline loader styles so they show instantly before index.css loads.
   Body font matches the post-load brand font (Public Sans) so the loader
   doesn't visibly re-flow when index.css takes over.

   Splash is intentionally ALWAYS LIGHT now — regardless of the user's
   theme preference. Rationale:
     1. New visitors land on light theme by default, so light splash
        is consistent with the first painted UI.
     2. Returning dark-mode users get a ~200ms light splash before
        React mounts and the UI transitions into dark — the brief
        light flash is actually a good "app is loading, hang on"
        signal and avoids the perceptual flicker of a dark splash
        suddenly snapping to dark UI (which read as a glitch).
     3. The user explicitly flagged dark loader residue as a bug:
        "the loading and all has some 'resedue' from the dark theme."
*/

body {
    margin: 0;
    background: #f8fafc;
    font-family: 'Public Sans', system-ui, sans-serif;
}

#app-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#app-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

#app-loader .logo {
    /* Display font for the splash logo — same Bricolage Grotesque the rest
       of the app uses for headings, so the very first frame already feels
       on-brand instead of generic-Inter. */
    font-family: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -1.5px;
}

#app-loader .logo span {
    color: #f05838;
}

#app-loader .tagline {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

#app-loader .bar {
    width: 100px;
    height: 3px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    margin-top: 4px;
}

#app-loader .bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, #f05838, #fb923c);
    border-radius: 99px;
    animation: ls 1s ease-in-out infinite alternate;
}

@keyframes ls {
    from {
        transform: translateX(-120%);
    }

    to {
        transform: translateX(400%);
    }
}
