/* Launch splash — dark, minimal overlay shown for ~1.2s on app boot.
 * Background matches the PWA manifest's color stop so the native splash
 * hands off without a flash. Removed from the DOM by launch-splash.js
 * once `window.load` fires (with a safety timeout).
 */
#launch-splash {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: linear-gradient(180deg, #0B1F35 0%, #05070A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 1;
    transition: opacity 320ms ease;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

#launch-splash.is-hiding {
    opacity: 0;
    pointer-events: none;
}

#launch-splash .logo {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    opacity: 0;
    transform: scale(0.95);
    animation: lsLogoIn 360ms cubic-bezier(0.2, 0.7, 0.25, 1) 80ms forwards;
}

/* Subtle blue glow behind the logo. Sits behind via z-index and grows in
   slightly after the logo so it reads as "the logo lit up the room". */
#launch-splash .logo::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(ellipse at center,
        rgba(74, 144, 217, 0.32) 0%,
        rgba(74, 144, 217, 0.10) 35%,
        rgba(74, 144, 217, 0) 70%);
    filter: blur(8px);
    z-index: -1;
    opacity: 0;
    animation: lsGlowIn 500ms ease-out 200ms forwards;
}

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

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

#launch-splash .monogram {
    width: 112px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 18px rgba(110, 180, 255, 0.45));
}

#launch-splash .wordmark {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.30em;
    color: #fff;
    text-transform: uppercase;
}

#launch-splash .tagline {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

/* Thin "electric line" sweeps across the middle of the screen once. The
   gradient creates a soft head/tail glow; the transform animates the
   pulse left → right. Single play, then fades out. */
#launch-splash .electric-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(111, 177, 240, 0) 30%,
        rgba(111, 177, 240, 0.9) 50%,
        rgba(111, 177, 240, 0) 70%,
        transparent 100%);
    transform: translateX(-100%);
    opacity: 0;
    animation: lsLineSweep 520ms ease-out 450ms forwards;
    box-shadow: 0 0 12px rgba(111, 177, 240, 0.45);
}

@keyframes lsLineSweep {
    0%   { transform: translateX(-100%); opacity: 0; }
    25%  { opacity: 1; }
    75%  { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    #launch-splash .logo,
    #launch-splash .logo::before,
    #launch-splash .electric-line {
        animation: none !important;
    }
    #launch-splash .logo { opacity: 1; transform: none; }
    #launch-splash .logo::before { opacity: 1; }
    #launch-splash .electric-line { display: none; }
}
