/* spec_lr_frame_1124 — Lantern Road frame and shared primitives.
   Colours, radii and halos come only from tokens (app.css :root); tools/ui_census.py scans this file. */

/* ── the dusk sidebar: foot glow and fireflies ───────────────── */
.sidebar::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 380px;
    background: var(--dusk-foot);
    pointer-events: none;
    z-index: 0;
}
.sidebar > * { position: relative; z-index: 1; }
.sidebar > .lr-flies {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 50%;
    pointer-events: none;
    z-index: 0;
}
.lr-flies i {
    position: absolute;
    width: 4px; height: 4px;
    border-radius: var(--radius-round);
    background: var(--glow);
    box-shadow: var(--shadow-fly);
    opacity: 0;
    animation-name: lr-blink, lr-drift;
    animation-timing-function: ease-in-out, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-direction: normal, alternate;
}
/* positions, sizes and timings chosen here within the guide's 3–5 px and 4.6–8 s cycles */
.lr-flies i:nth-child(1)  { left: 14%; top: 44%; width: 3px; height: 3px; animation-duration: 4.6s, 14s; animation-delay: 0s, 0s; }
.lr-flies i:nth-child(2)  { left: 38%; top: 16%; animation-duration: 6.2s, 16s; animation-delay: 1.2s, 1.2s; }
.lr-flies i:nth-child(3)  { left: 62%; top: 60%; width: 3px; height: 3px; animation-duration: 5.4s, 13s; animation-delay: 2.5s, 2.5s; }
.lr-flies i:nth-child(4)  { left: 82%; top: 28%; width: 5px; height: 5px; animation-duration: 7.6s, 18s; animation-delay: 0.6s, 0.6s; }
.lr-flies i:nth-child(5)  { left: 24%; top: 76%; animation-duration: 8s, 15s; animation-delay: 3.1s, 3.1s; }
.lr-flies i:nth-child(6)  { left: 50%; top: 40%; width: 3px; height: 3px; animation-duration: 5s, 14s; animation-delay: 1.8s, 1.8s; }
.lr-flies i:nth-child(7)  { left: 72%; top: 84%; animation-duration: 6.8s, 17s; animation-delay: 4s, 4s; }
.lr-flies i:nth-child(8)  { left: 90%; top: 56%; width: 3px; height: 3px; animation-duration: 4.9s, 12s; animation-delay: 2.2s, 2.2s; }
.lr-flies i:nth-child(9)  { left: 8%;  top: 20%; width: 5px; height: 5px; animation-duration: 7.2s, 16s; animation-delay: 0.3s, 0.3s; }
.lr-flies i:nth-child(10) { left: 44%; top: 88%; width: 3px; height: 3px; animation-duration: 5.8s, 13s; animation-delay: 3.6s, 3.6s; }
@keyframes lr-blink {
    0%, 70%, 100% { opacity: 0; }
    78% { opacity: 1; }
    86% { opacity: 0; }
}
@keyframes lr-drift {
    from { transform: translate(0, 0); }
    to   { transform: translate(6px, -10px); }
}

/* ── the lockup ──────────────────────────────────────────────── */
.lr-lockup { display: flex; align-items: center; gap: 10px; }
.lr-firefly--lockup { width: 44px; height: 26px; flex: none; }
.lr-wordmark {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1;
    white-space: nowrap;
}
.lr-wordmark__a { color: var(--on-dark); }
.lr-wordmark__b { color: var(--gold); }
.lr-lockup--light .lr-wordmark__a { color: var(--night); }
.lr-lockup--light .lr-wordmark__b { color: var(--slate); }
.lr-version { margin-top: 10px; font-size: 12px; color: var(--on-dark-muted); }

/* ── the firefly mark (inline; spec 2b pulses .is-working) ───── */
.lr-firefly .lr-wing    { fill: var(--slate); }
.lr-firefly .lr-wing.lr-wing--lower { fill: url(#lr-fly-lower); }   /* spec_logofix_1130 — the designer's fading lower wings (index.html) */
.lr-firefly .lr-antenna { fill: none; stroke: var(--gold-text); stroke-width: 7; stroke-linecap: round; }
.lr-firefly .lr-tip     { fill: var(--gold-text); }
.lr-firefly .lr-tail    { fill: var(--gold); filter: drop-shadow(0 0 3px var(--gold)); }
.lr-firefly.is-working .lr-tail { animation: lr-tail-pulse 1.6s ease-in-out infinite; }
@keyframes lr-tail-pulse {
    0%, 100% { opacity: 0.5; filter: drop-shadow(0 0 2px var(--gold)) drop-shadow(0 0 0 var(--glow)); }
    50%      { opacity: 1; filter: drop-shadow(0 0 6px var(--gold)) drop-shadow(0 0 14px var(--glow)); }
}

/* ── eyebrows ────────────────────────────────────────────────── */
.lr-eyebrow {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--slate);
}
.lr-eyebrow--night { color: var(--mist); }

/* ── buttons inside a lit (Night) panel ──────────────────────── */
.btn-on-dark { background: var(--on-dark); color: var(--night); border-color: var(--on-dark); }
.btn-on-dark:hover { background: var(--page); }
.btn-ghost-dark { background: var(--on-dark-hover); color: var(--on-dark); border-color: var(--on-dark-edge); }

/* ── lamps: the status vocabulary (guide, Lamps) ─────────────── */
.lr-lamp {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: var(--radius-round);
    flex: none;
    box-sizing: border-box;
    vertical-align: middle;
}
.lr-lamp--done    { background: var(--gold); box-shadow: var(--shadow-lamp); }
.lr-lamp--running { background: var(--glow); animation: lr-lamp-pulse 1.6s ease-in-out infinite; }
.lr-lamp--idle    { background: transparent; border: 1.5px solid var(--mist); }
.lr-lamp--locked  { background: transparent; border: 1.5px dashed var(--text-muted); }
.lr-lamp--failed  { background: var(--fault); box-shadow: var(--shadow-fault); }
.lr-lamp--gate    { width: 10px; height: 10px; border-radius: 2px; background: var(--mist); transform: rotate(45deg); }
@keyframes lr-lamp-pulse {
    0%, 100% { box-shadow: var(--shadow-lamp-rest); }
    50%      { box-shadow: var(--shadow-lamp); }
}

.sidebar .mf-step-check { color: var(--mist); }

/* ── every animation stops under reduced motion; ambient fireflies stay faintly lit ── */
@media (prefers-reduced-motion: reduce) {
    .lr-flies i { animation: none; opacity: 0.35; }
    .lr-firefly .lr-tail, .lr-lamp--running { animation: none; }
}
