/* Cascade Motion Language for the static welcome pages (/welcome and /beta).
 * The same network the app draws with (decisions/CASCADE_MOTION_LANGUAGE_2026-10-28.md):
 * node, link (dashed at rest), pulse (blue to teal), light, ring. The .cn-* rules are a copy of
 * the block in app/globals.css, which these pages cannot import; keep the two in step.
 * Driven by /welcome/cascade-motion.js. Tokens only, from welcome-tokens.css. */

.cn-svg { display: block; overflow: visible; }
.cn-edge { stroke: var(--glass-medium); stroke-width: 1.1; fill: none; stroke-dasharray: 2 5; transition: opacity var(--dur-mid) var(--ease-out); }
.cn-edge.sub { stroke-opacity: .7; stroke-width: .9; }
.cn-live { fill: none; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset var(--dur-mid) var(--ease-out); }
.cn-live[data-sub] { stroke-width: 1.5; }
.cn-live.on { stroke-dashoffset: 0; transition: stroke-dashoffset var(--t, var(--dur-slow)) var(--ease-cascade); filter: drop-shadow(0 0 4px var(--cascade-pulse)); }
.cn-live.ask { stroke: var(--accent-light); filter: drop-shadow(0 0 4px var(--accent-light)); }
.cn-node { transition: opacity var(--dur-mid) var(--ease-out); }
.cn-node .core { fill: var(--bg-2); stroke: var(--glass-border-hover); stroke-width: 1.4; transition: stroke var(--dur-mid) var(--ease-out), fill var(--dur-mid) var(--ease-out); }
.cn-node .dot { fill: var(--accent-light); transition: fill var(--dur-mid) var(--ease-out); }
.cn-node.lit .core { stroke: var(--cascade-pulse); fill: var(--bg-hover); }
.cn-node.lit .dot { fill: var(--cascade-pulse); }
.cn-node.ask .core { stroke: var(--accent-light); }
.cn-node.hub .core { stroke: var(--accent-light); stroke-width: 2; }
.cn-node.glow .core { filter: drop-shadow(0 0 8px var(--accent-light)); }
.cn-node.bright .core { stroke: var(--cascade-pulse); filter: drop-shadow(0 0 14px var(--cascade-pulse)); }
.cn-node .ring { fill: none; stroke: var(--cascade-pulse); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.cn-node .ring.go { animation: cn-ring calc(var(--dur-slow) * 1.7) var(--ease-out); }
@keyframes cn-ring { 0% { opacity: .85; stroke-width: 2.5; transform: scale(.8); } 100% { opacity: 0; stroke-width: 0; transform: scale(1.9); } }

/* Transient signals: one link drawn between two points on the page, under the top bar. */
.cn-signal { position: fixed; inset: 0; width: 100vw; height: 100dvh; pointer-events: none; z-index: 45; transition: opacity var(--dur-mid) var(--ease-out); }
.cn-signal.leaving { opacity: 0; }

/* Sheets: the leading edge draws as a link, then fades. */
.cn-sheet-edge { position: absolute; pointer-events: none; z-index: 1; opacity: 0; }
.cn-sheet-edge.bottom { top: -1px; left: 16px; right: 16px; height: 2px; transform-origin: center; background: linear-gradient(90deg, var(--cascade-pulse), var(--accent-light) 50%, var(--cascade-pulse)); animation: cn-draw-x calc(var(--dur-mid) + var(--dur-slow)) var(--ease-cascade) both; }
@keyframes cn-draw-x { 0% { opacity: 1; transform: scaleX(0); } 45% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1); } }

/* Press: one teal ring off the control as you let go. */
.cn-pressed { animation: cn-press calc(var(--dur-slow) * 1.2) var(--ease-out); }
@keyframes cn-press { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cascade-pulse) 70%, transparent); } to { box-shadow: 0 0 0 7px transparent; } }

/* The hero backdrop: the entry screens' firing network (components/brand/CascadeBackdrop.jsx),
   dimmed, with a clear zone in the middle so nothing crosses the headline or the board. */
.cm-bd { position: absolute; inset: 0; pointer-events: none; overflow: hidden; opacity: .5;
  -webkit-mask-image: radial-gradient(ellipse min(380px, 52vw) 40% at 50% 50%, transparent 70%, black 100%);
  mask-image: radial-gradient(ellipse min(380px, 52vw) 40% at 50% 50%, transparent 70%, black 100%); }
.cm-bd .cn-svg { width: 100%; height: 100%; overflow: hidden; }
.cm-bd .cn-edge { stroke-dasharray: 2 6; }
.cm-bd .cn-live { stroke-width: 2.2; }
.cm-bd .cn-live[data-sub] { stroke-width: 1.6; }
.cm-bd .cn-node.glow .core { filter: drop-shadow(0 0 10px var(--accent-light)); }
.cm-bd .cn-node.bright .core { filter: drop-shadow(0 0 18px var(--cascade-pulse)); }

@media (prefers-reduced-motion: reduce) {
  .cm-bd *, .cn-sheet-edge { animation: none !important; transition: none !important; }
  .cn-sheet-edge { display: none; }
}
