/* Motion kit: what the overlay pieces look like. Positions, opacity and progress are set by
   motion.js every frame; nothing here animates on its own clock. Where CSS needs the time (the
   caret, the shimmer) it reads --t, the scene's clock in seconds. */

.motion-layer { position: absolute; inset: 0; z-index: 5; overflow: hidden; pointer-events: none; }

/* The site's three accent colours, for collaborators and the AI. */
:root {
	--mat-green: oklch(0.885 0.105 158);
	--mat-green-deep: oklch(0.7 0.17 158);
	--mat-sky: oklch(0.865 0.09 248);
	--mat-sky-deep: oklch(0.64 0.15 248);
	--mat-lavender: oklch(0.885 0.075 305);
	--mat-lavender-deep: oklch(0.62 0.15 305);
}

/* ---------- Cursor: a pointer with its person attached. --c is the person's colour. ---------- */
.cursor { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform, opacity; backface-visibility: hidden; --soft: color-mix(in oklab, var(--c) 62%, white); }
.cursor-arrow { position: absolute; left: -5px; top: -4px; width: 44px; height: 44px; fill: var(--soft); stroke: var(--soft); stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.14)); }
.cursor-avatar { position: absolute; left: 26px; top: 28px; display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; overflow: hidden; border: 4px solid var(--soft); border-radius: 9999px; background: color-mix(in oklab, var(--c) 22%, white); color: color-mix(in oklab, var(--c) 70%, black); font-size: 22px; font-weight: 600; box-shadow: 0 6px 16px rgb(0 0 0 / 0.14), 0 1px 3px rgb(0 0 0 / 0.1); }
.cursor-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cursor-ripple { position: absolute; left: 0; top: 0; width: 64px; height: 64px; border-radius: 9999px; background: var(--c); opacity: 0; }

/* ---------- Prompt: the request to the AI. Grows from the corner the cursor clicked. ---------- */
.prompt { position: absolute; will-change: transform, opacity; display: flex; align-items: center; gap: 18px; padding: 12px 12px 12px 20px; border: 3px solid color-mix(in oklab, var(--c) 70%, white); border-radius: 14px; background: var(--card, #fff); color: var(--foreground, #111); font-size: 25px; line-height: 36px; white-space: nowrap; transform-origin: 0 0; box-shadow: 0 0 0 6px color-mix(in oklab, var(--c) 16%, transparent), 0 18px 40px -8px color-mix(in oklab, var(--c) 35%, transparent), 0 4px 12px rgb(0 0 0 / 0.08); }
.prompt-text { position: relative; }
.prompt-ghost { visibility: hidden; }
.prompt-typed { position: absolute; left: 0; top: 0; }
/* The caret: solid while letters are landing, blinking when the hand rests. */
.prompt-typed::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -0.18em; background: var(--c); opacity: clamp(0, sin(calc(var(--t, 0) * 7rad)) * 6 + 0.5, 1); }
.prompt.is-typing .prompt-typed::after { opacity: 1; }
.prompt-send { display: flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 9px; background: color-mix(in oklab, var(--c) 60%, white); color: #fff; }
.prompt-send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Ring: a selection outline, with an optional label riding on its top edge. ---------- */
.ring { position: absolute; border: 3px solid color-mix(in oklab, var(--c) 75%, white); box-shadow: 0 0 0 5px color-mix(in oklab, var(--c) 14%, transparent); opacity: 0; }
.ring-label { position: absolute; left: 18px; top: -17px; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 9999px; background: var(--c); color: #fff; font-size: 15px; font-weight: 500; white-space: nowrap; }
.ring-label svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- Shimmer: a placeholder bar the AI has not filled in yet. ---------- */
.shimmer { border-radius: 6px; background: linear-gradient(100deg, var(--muted) 30%, color-mix(in oklab, var(--c, var(--muted-foreground)) 16%, var(--muted)) 50%, var(--muted) 70%) 0 0 / 300px 100%; background-position-x: calc(var(--t, 0) * 260px); }
