/**
 * Sideline Command Referee — splash CSS.
 *
 * Mirrors athlete/css/splash.css (Engineering Playbook #42) but skinned
 * gold for the referee role color. Loaded in <head> of every referee
 * page; pairs with /referee/js/splash.js which injects the DOM + manages
 * the hide lifecycle.
 *
 * Color swap from athlete (green) → gold (#f59e0b):
 *   • icon glow + breathe shadow
 *   • signal-sweep line color
 *   • broadcast eyebrow pulse dot
 *   • field-grid color wash up top
 */

body.sc-splash-active { overflow: hidden; background: #0a0d14; }

#sc-splash {
    position: fixed; inset: 0; z-index: 9999;
    background: #0a0d14;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    opacity: 1;
    transition: opacity 0.45s ease;
    pointer-events: auto;
    overflow: hidden;
    isolation: isolate;
}
#sc-splash.is-hiding { opacity: 0; pointer-events: none; }

/* Color wash — gold up top (referee role), blue + green tucked into the
   corners so the eye still reads "primary gold" while hinting at the
   broader broadcast palette. */
#sc-splash::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 90% 55% at 50% 0%,    rgba(245, 158, 11, 0.22), transparent 62%),
        radial-gradient(ellipse 70% 60% at 100% 100%, rgba(59, 130, 246, 0.10), transparent 60%),
        radial-gradient(ellipse 70% 60% at 0% 100%,   rgba(34, 197, 94, 0.07),  transparent 60%);
    pointer-events: none;
    z-index: 0;
}
/* Field grid — gold lines, masked to fade at edges. */
#sc-splash::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(245, 158, 11, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 158, 11, 0.07) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 25%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 25%, transparent 90%);
    pointer-events: none;
    z-index: 0;
}

#sc-splash .sc-splash-mark {
    position: relative; z-index: 2;
    width: 180px;
    height: 180px;
    max-width: 56vw;
    max-height: 56vw;
    object-fit: contain;
    border-radius: 28%; /* iOS-style rounded square */
    filter: drop-shadow(0 8px 32px rgba(0,0,0,0.45)) drop-shadow(0 0 24px rgba(245, 158, 11, 0.20));
    animation: sc-splash-breathe 2.6s ease-in-out infinite;
}

/* Signal sweep — thin line under the logo with a gold light passing through. */
#sc-splash .sc-splash-bar {
    position: relative; z-index: 2;
    margin-top: 36px;
    width: 96px; height: 1.5px;
    background: rgba(255, 255, 255, 0.10);
    overflow: hidden;
    border-radius: 1px;
}
#sc-splash .sc-splash-bar::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 1), transparent);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.55);
    animation: sc-splash-sweep 1.5s linear infinite;
}

/* Broadcast eyebrow — pulsing gold dot + status label */
#sc-splash .sc-splash-status {
    position: relative; z-index: 2;
    margin-top: 22px;
    display: inline-flex; align-items: center; gap: 10px;
    font-family: 'Saira Condensed', system-ui, sans-serif;
    font-size: 11px; font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
#sc-splash .sc-splash-status::before {
    content: '';
    width: 7px; height: 7px; border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.85);
    animation: sc-splash-pulse 1.4s ease-in-out infinite;
}

@keyframes sc-splash-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.035); }
}
@keyframes sc-splash-sweep {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@keyframes sc-splash-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.65); }
}
@media (prefers-reduced-motion: reduce) {
    #sc-splash .sc-splash-mark { animation: none; }
    #sc-splash .sc-splash-bar::after { animation-duration: 2.4s; }
    #sc-splash .sc-splash-status::before { animation: none; }
}
