/* "Ask the business": a 3D network of points with the question above it and the answer below.
   Markup: tools/build_om_scene.py. Behaviour: assets/om-scene.js. White and grey on black only.
   Only opacity and transform are animated in CSS; the network itself is drawn in WebGL. */
.om{ --ln:rgba(255,255,255,.18); position:relative; display:grid; grid-template-columns:minmax(0,1fr); gap:1.25rem; margin-top:clamp(2rem, 4vw, 3rem); padding:clamp(1rem, 2.4vw, 2rem); border:1px solid var(--ln); background:#000; color:#fff; }
@media (min-width:1024px){ .om{ --h:min(64vh, 30rem); grid-template-columns:minmax(0,9fr) minmax(0,11fr); gap:clamp(1.5rem, 3vw, 2.75rem); align-items:stretch; } }

/* the network */
.om-stage{ position:relative; height:var(--h, 19rem); min-height:15rem; }
.om-cv, .om-still{ position:absolute; inset:0; width:100%; height:100%; }
.om-still{ object-fit:contain; }
/* the still shows first; the live network fades in over it once its first frame is drawn */
.om-cv{ opacity:0; transition:opacity .7s ease; }
.om-still{ mix-blend-mode:screen; pointer-events:none; transition:opacity .7s ease; }   /* its black surround is see-through, so it never covers what is beside it */
.om-gl .om-cv{ opacity:1; }
.om-gl .om-still{ opacity:0; }

/* the six kinds of record. Without the live network they sit as one quiet row under the still;
   with it, each follows its own cluster as the network turns */
.om-ls{ position:absolute; left:0; right:0; bottom:0; display:flex; flex-wrap:wrap; justify-content:center; gap:.25rem 1.25rem; font-size:.8125rem; font-weight:500; line-height:1.3; pointer-events:none; }
.om-l{ color:#fff; opacity:.4; transition:opacity .4s ease; white-space:nowrap; }
.om-l.on{ opacity:1; }
/* with room beside the live network, each name stands just outside the form's edge, joined to its cluster by a thin leader */
.om-ring .om-ls{ display:block; inset:0; }
.om-ring .om-l{ position:absolute; left:0; top:0; color:#c8c8c8; opacity:1; transition:color .4s ease; }
.om-ring .om-l.on{ color:#fff; }
.om-ld{ display:none; position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.om-ring .om-ld{ display:block; }
.om-ld line{ stroke:#fff; stroke-width:1; }
.om-l{ opacity:.6; }

/* ---------- the chat window ---------- */
.om-chat{ display:flex; flex-direction:column; height:var(--h, 27rem); min-height:0; border:1px solid rgba(255,255,255,.22); border-radius:10px; background:#0b0b0b; overflow:hidden; text-align:left; }
.om-ch{ flex:none; display:flex; align-items:center; gap:.625rem; height:2.875rem; padding:0 1rem; border-bottom:1px solid var(--ln); font-size:.9375rem; font-weight:500; }
.om-ch img{ width:18px; height:18px; }
.om-log{ flex:1; min-height:0; display:flex; flex-direction:column; gap:1.125rem; padding:1.125rem 1rem 1rem; overflow-y:auto; scrollbar-width:none; scroll-behavior:smooth; }
.om-log::-webkit-scrollbar{ display:none; }
.om-m:first-child{ margin-top:auto; }                             /* a short conversation sits at the bottom, above the input */
.om-who{ margin-bottom:.3125rem; font-size:.75rem; font-weight:500; line-height:1.3; color:#929292; }
.om-u{ align-self:flex-end; max-width:86%; text-align:right; }
.om-bub{ display:inline-block; padding:.625rem .9375rem; border-radius:14px 14px 4px 14px; background:#e6e6e6; color:#000; font-size:1rem; line-height:1.45; text-align:left; }
.om-as{ align-self:flex-start; max-width:94%; }
.om-txt{ font-size:1rem; line-height:1.55; }
.om-txt:empty{ display:none; }
.om-st{ display:flex; align-items:center; gap:.3125rem; font-size:.9375rem; line-height:1.55; color:#a8a8a8; }
.om-st i{ width:4px; height:4px; border-radius:50%; background:#fff; opacity:.25; animation:omPulse 1s ease-in-out infinite; }
.om-st i:first-of-type{ margin-left:.25rem; } .om-st i:nth-of-type(2){ animation-delay:.16s; } .om-st i:nth-of-type(3){ animation-delay:.32s; }
@keyframes omPulse{ 40%{ opacity:1; } }
/* a message arrives: a short rise and fade */
.om-live .om-m{ animation:omIn .45s cubic-bezier(.16,1,.3,1) both; }
@keyframes omIn{ from{ opacity:0; transform:translateY(8px); } }
/* before the conversation starts again, the messages fade away */
.om-log{ transition:opacity .6s ease; }
.om-log.om-out{ opacity:0; }
/* the input and its send button are a demonstration, typed by the script: nothing here can be clicked */
.om-in{ flex:none; display:flex; align-items:center; gap:.5rem; height:2.875rem; margin:0 1rem 1rem; padding:0 .375rem 0 .9375rem; border:1px solid rgba(255,255,255,.3); border-radius:12px; background:#000; font-size:1rem; line-height:1.3; }
.om-tw{ flex:1; min-width:0; display:flex; align-items:center; overflow:hidden; white-space:nowrap; }
.om-ph{ color:#7c7c7c; } .om-has .om-ph{ display:none; }
.om-caret{ flex:none; width:1.5px; height:1.25em; margin-left:1px; background:#fff; animation:omBlink 1.05s steps(1) infinite; }
.om-in:not(.om-has) .om-caret{ order:-1; margin:0 1px 0 0; }
@keyframes omBlink{ 50%{ opacity:0; } }
.om-send{ flex:none; display:grid; place-items:center; width:2.125rem; height:2.125rem; border-radius:9px; background:#262626; color:#8a8a8a; transition:opacity .2s ease; }
.om-has .om-send{ background:#fff; color:#000; }

@media (max-width:1023px){ .om-chat{ height:27rem; } }
/* narrow screens: the names sit in a row under the network, which keeps clear of them */
@media (max-width:519px){ .om-stage{ height:20rem; } .om-cv, .om-still{ height:calc(100% - 3.5rem); } }
.om-snap, .om-snap *{ transition:none !important; animation:none !important; }
@media (prefers-reduced-motion: reduce){ .om *, .om *::before, .om *::after{ transition:none !important; animation:none !important; } .om-caret{ display:none; } }
