/* Intelleqt Platform — The Reel player (a0.60.0, R1)
   Free-standing, immersive overlay. No dependency on page chrome. */

.ip-reel-overlay {
    position: fixed; inset: 0; z-index: 100000;
    background: #05060a;
    opacity: 0;
    transition: opacity 240ms ease;
    display: flex; align-items: center; justify-content: center;
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.ip-reel-overlay.is-open { opacity: 1; }

.ip-reel-stage {
    position: relative;
    width: 100%; height: 100%;
    overflow: hidden;
    background: #05060a;
}

/* ── Scene layers (crossfade) ───────────────────────────────────── */
.ip-reel-scene-layer {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 900ms ease;
    transform-origin: center;
    will-change: transform, opacity;
}
.ip-reel-scene-layer.is-active { opacity: 1; }

/* Typographic fallback when a scene has no image. */
.ip-reel-scene-layer.is-typographic {
    background: radial-gradient(circle at 30% 20%, #1e293b 0%, #0b1020 55%, #05060a 100%);
}
.ip-reel-scene-layer.is-typographic::after {
    content: attr(data-cap);
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 12% 14%;
    text-align: center;
    color: rgba(226, 232, 240, 0.92);
    font-size: clamp(20px, 3.4vw, 44px);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

/* Ken Burns — 4 variants chosen by scene index for variety. */
@keyframes ipReelKB0 { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.16) translate(-2%, -2%); } }
@keyframes ipReelKB1 { from { transform: scale(1.16) translate(2%, 2%); }  to { transform: scale(1.02) translate(0, 0); } }
@keyframes ipReelKB2 { from { transform: scale(1.04) translate(2%, -1%); } to { transform: scale(1.18) translate(-2%, 1%); } }
@keyframes ipReelKB3 { from { transform: scale(1.18) translate(-2%, 1%); } to { transform: scale(1.04) translate(1%, -2%); } }
.ip-reel-scene-layer.ip-reel-kb-0 { animation: ipReelKB0 13s ease-out forwards; }
.ip-reel-scene-layer.ip-reel-kb-1 { animation: ipReelKB1 13s ease-out forwards; }
.ip-reel-scene-layer.ip-reel-kb-2 { animation: ipReelKB2 13s ease-out forwards; }
.ip-reel-scene-layer.ip-reel-kb-3 { animation: ipReelKB3 13s ease-out forwards; }

.ip-reel-vignette {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(5,6,10,0.55) 100%),
        linear-gradient(to top, rgba(5,6,10,0.85) 0%, rgba(5,6,10,0.0) 38%);
}

/* ── Caption ────────────────────────────────────────────────────── */
.ip-reel-caption {
    position: absolute; left: 0; right: 0; bottom: 13%;
    margin: 0 auto; max-width: 1000px; padding: 0 8%;
    text-align: center;
    color: #f8fafc;
    font-size: clamp(18px, 2.7vw, 34px);
    font-weight: 600;
    letter-spacing: 0.005em;
    text-shadow: 0 2px 18px rgba(0,0,0,0.6);
    opacity: 0; transform: translateY(14px);
    transition: opacity 600ms ease, transform 600ms ease;
}
.ip-reel-caption.is-shown { opacity: 1; transform: translateY(0); }

/* ── Title + end cards ──────────────────────────────────────────── */
.ip-reel-title-card, .ip-reel-end-card {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px;
    background: radial-gradient(circle at 50% 45%, rgba(15,23,42,0.55) 0%, rgba(5,6,10,0.92) 100%);
    text-align: center; padding: 8%;
}
.ip-reel-title-kicker { color: #94a3b8; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.ip-reel-title-main, .ip-reel-end-main {
    color: #f8fafc; font-size: clamp(26px, 5vw, 60px); font-weight: 800; line-height: 1.12; max-width: 16ch;
}
.ip-reel-bigplay {
    margin-top: 8px;
    width: 84px; height: 84px; border-radius: 50%;
    border: 2px solid rgba(248,250,252,0.5);
    background: rgba(248,250,252,0.08);
    color: #f8fafc; font-size: 30px; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}
.ip-reel-bigplay:hover { transform: scale(1.06); background: rgba(248,250,252,0.16); border-color: rgba(248,250,252,0.8); }

/* ── Progress dots ──────────────────────────────────────────────── */
.ip-reel-progress {
    position: absolute; top: 18px; left: 0; right: 0;
    display: flex; gap: 6px; justify-content: center; padding: 0 16px;
}
.ip-reel-dot { width: 26px; height: 3px; border-radius: 2px; background: rgba(248,250,252,0.22); transition: background 240ms ease; }
.ip-reel-dot.is-on { background: rgba(248,250,252,0.9); }

/* ── Controls ───────────────────────────────────────────────────── */
.ip-reel-controls {
    position: absolute; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; gap: 6px;
    padding: 14px 18px 18px;
    background: linear-gradient(to top, rgba(5,6,10,0.7), transparent);
}
.ip-reel-spacer { flex: 1; }
.ip-reel-btn {
    width: 40px; height: 40px; border-radius: 10px;
    border: 0; background: rgba(248,250,252,0.08); color: #f8fafc;
    font-size: 16px; cursor: pointer; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 140ms ease;
}
.ip-reel-btn:hover { background: rgba(248,250,252,0.18); }

@media (max-width: 640px) {
    .ip-reel-caption { bottom: 16%; font-size: 19px; }
    .ip-reel-btn { width: 44px; height: 44px; }
}
