/* =============================================================================
   🌌 BOOT CINEMATIC — the quantum core ignition
   ---------------------------------------------------------------------------
   A once-per-session veil over the (already-loading, already-functional)
   cockpit underneath: a seed of light, an explosion, and the AION_Special
   crest slowly growing out of the burst before dissolving away. Purely a
   visual overlay — the real page never waits on this to finish loading.
   ============================================================================= */

.boot-cinematic {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
    opacity: 1;
    transition: opacity 900ms ease;
}
.boot-cinematic.dismissed {
    opacity: 0;
    pointer-events: none;
}
.boot-cinematic[hidden] { display: none; }

.boot-cine-void {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, #0d1220 0%, #060912 55%, #030408 100%);
}

/* ── The seed — a single point of light, breathing before it erupts ────── */
.boot-cine-seed {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff8e0, #ffd86b 45%, rgba(255, 216, 107, 0) 75%);
    box-shadow: 0 0 18px 6px rgba(255, 216, 107, 0.55);
    transform: scale(1);
    transition: transform 1500ms cubic-bezier(0.4, 0, 0.2, 1), opacity 400ms ease;
}
.boot-cine-seed.breathe { transform: scale(2.4); }
.boot-cine-seed.consumed { opacity: 0; transform: scale(0.4); }

/* ── The flash — the instant of ignition ─────────────────────────────── */
.boot-cine-flash {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 248, 224, 0.95), rgba(255, 216, 107, 0.35) 35%, rgba(255, 216, 107, 0) 65%);
    opacity: 0;
    transition: opacity 260ms ease;
}
.boot-cine-flash.fire { opacity: 1; transition: opacity 90ms ease; }
.boot-cine-flash.settle { opacity: 0; transition: opacity 650ms ease; }

/* ── Expanding rings ──────────────────────────────────────────────────── */
.boot-cine-rings {
    position: absolute;
    width: min(90vw, 90vh); height: min(90vw, 90vh);
    color: #ffd86b;
    pointer-events: none;
}
.boot-cine-rings .ring {
    fill: none;
    stroke: currentColor;
    stroke-width: 0.4;
    opacity: 0;
    transform-origin: 50px 50px;
}
.boot-cine-rings.fire .ring-1 { animation: bootRingExpand 1700ms cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.boot-cine-rings.fire .ring-2 { animation: bootRingExpand 2000ms cubic-bezier(0.16, 1, 0.3, 1) 140ms forwards; }
.boot-cine-rings.fire .ring-3 { animation: bootRingExpand 2300ms cubic-bezier(0.16, 1, 0.3, 1) 280ms forwards; }
@keyframes bootRingExpand {
    0%   { r: 1;  opacity: 0.9; stroke-width: 1.1; }
    70%  { opacity: 0.35; }
    100% { r: 55; opacity: 0; stroke-width: 0.15; }
}

/* ── Halo — a slow living ring behind the crest during the hold ────────── */
.boot-cine-halo {
    position: absolute;
    width: 46vmin; height: 46vmin;
    border-radius: 50%;
    border: 1px solid rgba(255, 216, 107, 0.28);
    box-shadow: 0 0 60px 10px rgba(255, 180, 90, 0.12) inset, 0 0 40px rgba(255, 200, 120, 0.10);
    opacity: 0;
    transition: opacity 700ms ease;
    animation: bootHaloSpin 18s linear infinite;
}
.boot-cine-halo.show { opacity: 1; }
@keyframes bootHaloSpin { to { transform: rotate(360deg); } }

/* ── The crest itself ────────────────────────────────────────────────── */
.boot-cine-icon {
    position: relative;
    width: min(46vmin, 320px);
    height: auto;
    opacity: 0;
    transform: scale(0.12);
    filter: drop-shadow(0 0 26px rgba(255, 210, 130, 0.55)) drop-shadow(0 0 60px rgba(120, 170, 255, 0.25));
    transition: transform 2800ms cubic-bezier(0.16, 1, 0.3, 1), opacity 1800ms ease;
}
.boot-cine-icon.grow { opacity: 1; transform: scale(1); }
.boot-cine-icon.recede { opacity: 0; transform: scale(1.08); transition: opacity 900ms ease, transform 900ms ease; }

/* ── Particles (JS-injected, WAAPI-driven) ───────────────────────────── */
.boot-cine-particle {
    position: absolute;
    top: 50%; left: 50%;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}
.boot-cine-particle.bp-gold   { background: radial-gradient(circle, #ffe6a0, rgba(255,216,107,0)); }
.boot-cine-particle.bp-azure  { background: radial-gradient(circle, #9fd0ff, rgba(91,179,240,0)); }
.boot-cine-particle.bp-rose   { background: radial-gradient(circle, #ffb3c6, rgba(224,74,107,0)); }
.boot-cine-particle.bp-copper { background: radial-gradient(circle, #e8a86a, rgba(180,110,50,0)); }

/* ── Skip hint ────────────────────────────────────────────────────────── */
.boot-cine-skip {
    position: absolute;
    bottom: 6vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(201, 196, 177, 0.55);
    opacity: 0;
    transition: opacity 600ms ease 1200ms;
}
.boot-cinematic.ready .boot-cine-skip { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .boot-cine-rings.fire .ring,
    .boot-cine-halo { animation: none; }
    .boot-cine-icon { transition: opacity 500ms ease; }
}

@media print { .boot-cinematic { display: none !important; } }
