/* The drawn scenes (scenes.py). Default styles are the composed final frame;
   the motion-only behaviour sits under html.motion, as in engine.css. */

.scene { display: block; width: 100%; height: auto; overflow: visible; }
.scene text { font-family: var(--font-label); }

/* ---------- Shared marks ---------- */
.scene .sc-base, .scene .sc-axis { fill: none; stroke: var(--rule-strong); stroke-width: 1.5; stroke-linecap: round; }
.scene .sc-line { fill: none; stroke: var(--vdb-purple-500); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.scene .sc-line-bold { fill: none; stroke: var(--vdb-purple-500); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.scene .sc-out { fill: none; stroke: var(--vdb-purple-500); stroke-width: 3.5; stroke-linecap: round; }
.scene .sc-label { font-size: 13px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; fill: var(--ink-muted); }
.scene .sc-label--small { font-size: 10px; letter-spacing: 0.08em; }
.scene .sc-pulse { fill: var(--vdb-purple-400); }
.scene .sc-pulse--out { fill: var(--vdb-purple-500); }
.scene .ping { fill: none; stroke: var(--vdb-purple-400); stroke-width: 2; transform-box: fill-box; transform-origin: center; }

/* ---------- Hero ---------- */
.scene .sc-stop-strong { stop-color: var(--vdb-purple-100); stop-opacity: 0.95; }
.scene .sc-stop-clear { stop-color: var(--vdb-purple-50); stop-opacity: 0; }
.scene .sc-strut { fill: none; stroke: var(--vdb-purple-300); stroke-width: 2; stroke-dasharray: 3 5; }
html.motion [data-scene] .sc-strut.draw { stroke-dasharray: 1 1; }
.scene .sc-point { fill: var(--vdb-purple-500); stroke: #fff; stroke-width: 3; }
.scene .sc-point-out { fill: none; stroke: var(--vdb-slate); stroke-opacity: 0.45; stroke-width: 1.5; stroke-dasharray: 3 3; }

/* ---------- Secretariat ---------- */
.scene .sc-thread { fill: none; stroke: var(--vdb-purple-300); stroke-width: 1.6; stroke-linecap: round; }
.scene .sc-entity { fill: #fff; stroke: currentColor; stroke-width: 2.5; }
.scene .sc-entity-core { fill: currentColor; }
.scene .sc-tone-slate { color: var(--vdb-slate); }
.scene .sc-tone-teal { color: var(--vdb-teal); }
.scene .sc-tone-violet { color: var(--vdb-purple-400); }
.scene .sc-tone-soft { color: var(--vdb-purple-300); }
.scene .sc-halo { fill: var(--vdb-purple-100); opacity: 0.7; }
.scene .sc-core { fill: #fff; stroke: var(--vdb-purple-500); stroke-width: 3; }
.scene .sc-paper { fill: none; stroke: var(--vdb-purple-500); stroke-width: 4; stroke-linecap: round; }
.scene .sc-message { fill: var(--vdb-purple-500); }
.scene .sc-message-mark, .scene .sc-funded-mark { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Research ---------- */
.scene .sc-band { fill: var(--vdb-purple-100); opacity: 0.75; }
.scene .sc-evidence { fill: var(--vdb-purple-400); fill-opacity: 0.8; }
.scene .sc-decision { fill: var(--vdb-purple-500); stroke: #fff; stroke-width: 3; stroke-linejoin: round; }

/* ---------- Funding ---------- */
.scene .sc-opening { fill: none; stroke: var(--vdb-purple-300); stroke-opacity: 0.55; stroke-width: 1.5; }
.scene .sc-chosen { fill: var(--vdb-purple-500); }
.scene .sc-link { fill: none; stroke: var(--vdb-purple-300); stroke-width: 1.6; stroke-dasharray: 4 5; }
html.motion [data-scene] .sc-link.draw { stroke-dasharray: 1 1; }
.scene .sc-doc { fill: #fff; stroke: var(--vdb-slate); stroke-opacity: 0.5; stroke-width: 1.6; }
.scene .sc-text-line { stroke: var(--vdb-purple-300); stroke-width: 5; stroke-linecap: round; }
.scene .sc-bar { fill: var(--vdb-purple-400); }
.scene .sc-dot { fill: var(--vdb-teal); }
.scene .sc-climb { fill: none; stroke: var(--vdb-purple-500); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.scene .sc-arrowhead { fill: var(--vdb-purple-500); }
.scene .sc-funded { fill: var(--vdb-teal); }

/* ---------- Design and build ---------- */
.scene .sc-sketch { fill: none; stroke: var(--vdb-slate); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 6 4; }
html.motion [data-scene] .sc-sketch.draw { stroke-dasharray: 1 1; }
.scene .recede { opacity: 0.3; }
.scene .sc-window { fill: #fff; stroke: var(--vdb-purple-300); stroke-width: 1.6; }
.scene .sc-wire { fill: none; stroke: var(--vdb-purple-300); stroke-width: 1.6; }
.scene .sc-card { fill: var(--vdb-purple-50); stroke: var(--vdb-purple-100); stroke-width: 1.5; }
.scene .sc-kpi { fill: var(--vdb-purple-500); }
.scene .sc-kpi-sub, .scene .sc-nav { fill: var(--vdb-purple-100); }
.scene .sc-live { fill: var(--vdb-teal); }

/* ---------- Motion only ---------- */
html:not(.motion) .scene .ping, html:not(.motion) .scene .flash { display: none; }
html.motion [data-scene] .ping { opacity: 0; }
html.motion [data-scene].is-playing .ping { animation: sc-ping 1000ms var(--ease-out) var(--delay, 0s) both; }
@keyframes sc-ping { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }

.scene .flash { opacity: 0; }
html.motion [data-scene].is-playing .flash { animation: sc-flash var(--d, 1.4s) linear var(--delay, 0s) both; }
@keyframes sc-flash { 0% { opacity: 0; } 12% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }

html.motion [data-scene] .converge,
html.motion [data-scene] .assemble { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, 0px)); }
html.motion [data-scene] .assemble { transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(0.35); transform-box: fill-box; transform-origin: center; }
html.motion [data-scene].is-playing .converge,
html.motion [data-scene].is-playing .assemble { animation: sc-arrive var(--d, 1s) var(--ease-out) var(--delay, 0s) forwards; }
@keyframes sc-arrive { to { opacity: 1; transform: none; } }

html.motion [data-scene] .tidy { transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(var(--r, 0deg)); transform-box: fill-box; transform-origin: center; }
html.motion [data-scene].is-playing .tidy { animation: sc-settle var(--d, 0.8s) var(--ease-out) var(--delay, 0s) forwards; }
@keyframes sc-settle { to { transform: none; } }

html.motion [data-scene] .grow { transform: scaleY(0); transform-box: fill-box; transform-origin: 50% 100%; }
html.motion [data-scene].is-playing .grow { animation: kit-grow var(--d, 700ms) var(--ease-out) var(--delay, 0s) forwards; }

html.motion [data-scene] .recede { opacity: 1; }
html.motion [data-scene].is-playing .recede { animation: sc-recede 900ms var(--ease-in-out) var(--delay, 2s) forwards; }
@keyframes sc-recede { to { opacity: 0.3; } }

html.motion [data-scene].is-playing .blink { animation: sc-blink 1.8s var(--ease-in-out) var(--delay, 0s) infinite; }
@keyframes sc-blink { 50% { opacity: 0.25; } }

/* A pulse stays hidden until its own SMIL start (data-delay), so it never sits at the origin. */
html.motion [data-scene].is-playing .moving { transition: opacity 300ms var(--ease-out) var(--delay, 1.6s); }

/* ---------- Together with HLS ---------- */
.scene .sc-loop { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.scene .sc-loop--vdb { stroke: var(--vdb-purple-500); }
.scene .sc-loop--hls { stroke: #7447C8; }
.scene .sc-joint { fill: var(--vdb-purple-700); stroke: #fff; stroke-width: 3; }
.scene .sc-joint-glow { fill: var(--vdb-purple-100); }
