/* Avolang motion scenes (2026-10-11).
   Decorative product scenes: the homepage service stage and the AI phone
   assistant page. Built by assets/js/motion-scenes.js and aria-hidden; the
   real content stays in the markup. A scene runs in three phases (.p1–.p3)
   that follow the three points next to it. Motion uses transform and
   opacity; with reduced motion every scene shows its final state.

   Phase classes on scene elements:
   .i1–.i3   shown from that phase on (with .ms-a; --d staggers)
   .o1–.o3   hidden again from that phase on (--od staggers)
   .l1–.l3   ambient loops from that phase on, only while the scene is live
   .k2, .k3  one-shot click ripples
   .c2, .c3  the pointer clicks in that phase (--cd) */

@property --from { syntax: '*'; inherits: false; }
@property --to { syntax: '*'; inherits: false; }

/* ─── Window chrome ─────────────────────────────────────────────────────── */
.ms-window {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 39, 68, .09);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 39, 68, .05), 0 30px 70px -20px rgba(15, 39, 68, .28);
}
.ms-bar {
  display: flex; align-items: center; gap: 12px;
  height: 38px; padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.ms-lights { display: inline-flex; gap: 6px; }
.ms-lights i { width: 8px; height: 8px; border-radius: 50%; background: #d9dfe7; }
.ms-title { min-width: 0; overflow: hidden; color: var(--ink-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.ms-tag {
  margin-left: auto; padding: 3px 9px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue);
  font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.ms-body {
  position: relative;
  aspect-ratio: 460 / 280;
  overflow: hidden;
  background-color: #f6f8fb;
  background-image: radial-gradient(rgba(15, 39, 68, .11) 1px, transparent 1.3px);
  background-size: 18px 18px;
}

/* ─── Canvas: a fixed design size, scaled to the window ─────────────────── */
.ms-scene {
  position: absolute; left: 0; top: 0;
  width: 460px; height: 280px;
  transform: scale(var(--k, 1)); transform-origin: 0 0;
  color: var(--ink); font-size: 12px; line-height: 1.35; letter-spacing: -.005em;
  transition: opacity .35s ease;
}
.ms-scene.is-fading { opacity: 0; }
.ms-scene.is-reset, .ms-scene.is-reset * { transition: none !important; animation: none !important; }
.ms-pos { position: absolute; }
.ms-svg { position: absolute; left: 0; top: 0; width: 460px; height: 280px; overflow: visible; pointer-events: none; }
.ms-svg path, .ms-svg line { fill: none; stroke: rgba(26, 78, 140, .4); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ms-svg .is-blue { stroke: var(--blue); stroke-width: 2; }
.ms-svg .is-faint { stroke: rgba(15, 39, 68, .14); stroke-width: 1; stroke-dasharray: 3 4; }

/* ─── Atoms ─────────────────────────────────────────────────────────────── */
.ms-card {
  border: 1px solid rgba(15, 39, 68, .08);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 39, 68, .05), 0 14px 30px -12px rgba(15, 39, 68, .2);
}
.ms-pad { padding: 11px 13px; }
.ms-stack { display: flex; flex-direction: column; gap: 7px; }
.ms-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ms-between { justify-content: space-between; }
.ms-push { margin-left: auto; }
.ms-cap { color: var(--muted); font-size: 9.5px; font-weight: 600; letter-spacing: .1em; line-height: 1.2; text-transform: uppercase; white-space: nowrap; }
.ms-cap--blue { color: var(--blue); }
.ms-cap .ms-ico { width: 11px; height: 11px; }
.ms-b { font-weight: 600; }
.ms-m5 { font-weight: 500; }
.ms-mut { color: var(--muted); }
.ms-sm { font-size: 10.5px; }
.ms-xs { font-size: 9.5px; }
.ms-lg { font-size: 13px; }
.ms-mono { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 10.5px; letter-spacing: 0; }
.ms-ell { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ms-hr { height: 1px; background: var(--line); }
.ms-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 8px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue);
  font-size: 10px; font-weight: 600; white-space: nowrap;
}
.ms-chip .ms-ico { width: 11px; height: 11px; }
.ms-chip--ink { background: var(--ink); color: #fff; }
.ms-chip--blue { background: var(--blue); color: #fff; }
.ms-chip--line { border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 500; }
.ms-skel { height: 6px; border-radius: 4px; background: #e8edf4; }
.ms-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; overflow: hidden; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600;
}
.ms-btn--ghost { border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); }
.ms-btn__done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--blue); }
.ms-btn .ms-ico { width: 12px; height: 12px; }
.ms-ico { width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ms-ico--fill { fill: currentColor; stroke: none; }
.ms-tile {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--blue-soft); color: var(--blue);
}
.ms-tile--ink { background: var(--ink); color: #fff; }
.ms-tile--blue { background: var(--blue); color: #fff; }
.ms-avatar {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue); font-size: 9px; font-weight: 700; letter-spacing: .02em;
}
.ms-num {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 9px; font-weight: 700;
}
.ms-num--soft { background: var(--blue-soft); color: var(--blue); }
.ms-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--line-strong); }
.ms-dot--blue { background: var(--blue); }

/* ─── Phase choreography ────────────────────────────────────────────────────
   .ms-a  appears in its phase and can leave again.
   .ms-m  moves between per-phase positions (--x0…--x3, --y0…, --s0…, --o0…). */
.ms-a {
  opacity: 0;
  transform: var(--from, translate3d(0, 10px, 0));
  transition: opacity .45s ease var(--d, 0s), transform .8s var(--ease-out) var(--d, 0s);
}
.ms-scene.p1 .i1, .ms-scene.p2 .i2, .ms-scene.p3 .i3 { opacity: 1; transform: none; }
.ms-scene.p1 .o1, .ms-scene.p2 .o2, .ms-scene.p3 .o3 {
  opacity: 0; transform: var(--to, translate3d(0, -6px, 0));
  transition: opacity .35s ease var(--od, 0s), transform .6s var(--ease-in-out) var(--od, 0s);
}
.ms-m {
  opacity: var(--o0, 1);
  transform: translate3d(var(--x0, 0px), var(--y0, 0px), 0) scale(var(--s0, 1));
  transition: transform .95s var(--ease-in-out) var(--md, 0s), opacity .5s ease var(--md, 0s);
}
.ms-scene.p1 .ms-m {
  opacity: var(--o1, var(--o0, 1));
  transform: translate3d(var(--x1, var(--x0, 0px)), var(--y1, var(--y0, 0px)), 0) scale(var(--s1, var(--s0, 1)));
  transition-delay: var(--md1, 0s);
}
.ms-scene.p2 .ms-m {
  opacity: var(--o2, var(--o1, var(--o0, 1)));
  transform: translate3d(var(--x2, var(--x1, var(--x0, 0px))), var(--y2, var(--y1, var(--y0, 0px))), 0) scale(var(--s2, var(--s1, var(--s0, 1))));
  transition-delay: var(--md2, 0s);
}
.ms-scene.p3 .ms-m {
  opacity: var(--o3, var(--o2, var(--o1, var(--o0, 1))));
  transform: translate3d(var(--x3, var(--x2, var(--x1, var(--x0, 0px)))), var(--y3, var(--y2, var(--y1, var(--y0, 0px)))), 0) scale(var(--s3, var(--s2, var(--s1, var(--s0, 1)))));
  transition-delay: var(--md3, 0s);
}
.ms-pop { --from: scale(.6); }
.ms-l { --from: translate3d(-12px, 0, 0); }
.ms-r { --from: translate3d(14px, 0, 0); }

/* Lines draw, bars fill, text types and streams. */
.ms-draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset var(--dur, 1s) var(--ease-in-out) var(--d, 0s); }
.ms-scene.p1 .ms-draw.i1, .ms-scene.p2 .ms-draw.i2, .ms-scene.p3 .ms-draw.i3 { stroke-dashoffset: 0; }
.ms-fill { transform: scaleX(0); transform-origin: 0 50%; transition: transform var(--dur, 1s) var(--ease-out) var(--d, 0s); }
.ms-scene.p1 .ms-fill.i1, .ms-scene.p2 .ms-fill.i2, .ms-scene.p3 .ms-fill.i3 { transform: scaleX(var(--v, 1)); }
.ms-type {
  display: inline-block; vertical-align: bottom; white-space: nowrap;
  clip-path: inset(0 100% 0 0);
  transition: clip-path calc(var(--n, 20) * 40ms) steps(var(--n, 20), end) var(--d, 0s);
}
.ms-scene.p1 .ms-type.i1, .ms-scene.p2 .ms-type.i2, .ms-scene.p3 .ms-type.i3 { clip-path: inset(0 0 0 0); }
.ms-caret { display: inline-block; width: 1.5px; height: 14px; margin-left: 2px; vertical-align: -2px; background: var(--blue); opacity: 0; }
.ms-scene.is-live.p1 .ms-caret.l1 { animation: ms-blink 1s steps(1) var(--d, 0s) infinite; }
.ms-w { display: inline; opacity: 0; transition: opacity .28s ease var(--d, 0s); }
.ms-scene.p1 .i1 .ms-w, .ms-scene.p2 .i2 .ms-w, .ms-scene.p3 .i3 .ms-w { opacity: 1; }

/* Animated check badge. */
.ms-check { width: 16px; height: 16px; flex: 0 0 auto; overflow: visible; }
.ms-check circle { fill: var(--blue); transform: scale(0); transform-box: fill-box; transform-origin: center; transition: transform .4s var(--ease-out) var(--d, 0s); }
.ms-check path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .35s ease calc(var(--d, 0s) + .18s); }
.ms-scene.p1 .ms-check.i1 circle, .ms-scene.p2 .ms-check.i2 circle, .ms-scene.p3 .ms-check.i3 circle { transform: scale(1); }
.ms-scene.p1 .ms-check.i1 path, .ms-scene.p2 .ms-check.i2 path, .ms-scene.p3 .ms-check.i3 path { stroke-dashoffset: 0; }
.ms-check--sm { width: 13px; height: 13px; }

/* Pointer that travels to a button and clicks it. */
.ms-cursor { left: 0; top: 0; z-index: 30; width: 16px; height: 20px; filter: drop-shadow(0 2px 3px rgba(15, 39, 68, .3)); }
.ms-cursor svg { display: block; width: 16px; height: 20px; transform-origin: 2px 2px; }
.ms-cursor path { fill: var(--ink); stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; }
.ms-scene.p2 .ms-cursor.c2 svg, .ms-scene.p3 .ms-cursor.c3 svg { animation: ms-click .34s ease var(--cd, 1.2s) both; }
.ms-ripple { z-index: 29; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 2px solid var(--blue); border-radius: 50%; opacity: 0; pointer-events: none; }
.ms-scene.p2 .ms-ripple.k2, .ms-scene.p3 .ms-ripple.k3 { animation: ms-ripple .75s ease-out var(--d, 0s) both; }

/* Packets travelling along a connector (CSS motion path, canvas coordinates). */
.ms-pkt {
  position: absolute; left: 0; top: 0; z-index: 2;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 0 3px rgba(26, 78, 140, .16), 0 0 12px rgba(26, 78, 140, .45);
  offset-rotate: 0deg; offset-distance: 0%; opacity: 0;
}
.ms-scene.is-live.p1 .ms-pkt.l1, .ms-scene.is-live.p2 .ms-pkt.l2, .ms-scene.is-live.p3 .ms-pkt.l3 {
  animation: ms-pkt var(--dur, 1.6s) var(--ease-in-out) var(--d, 0s) infinite both;
}
.ms-pkt--back { animation-direction: reverse !important; }

/* Soft pulsing ring on something that waits for attention, in its phase only. */
.ms-pulse { position: absolute; inset: -5px; border: 1.5px solid var(--blue); border-radius: inherit; opacity: 0; pointer-events: none; }
.ms-scene.is-live.p1:not(.p2) .ms-pulse.l1, .ms-scene.is-live.p2:not(.p3) .ms-pulse.l2, .ms-scene.is-live.p3 .ms-pulse.l3 { animation: ms-pulse 1.6s ease-out var(--d, 0s) var(--pn, infinite); }

@keyframes ms-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes ms-click { 0%, 100% { transform: scale(1); } 45% { transform: scale(.78); } }
@keyframes ms-ripple { 0% { opacity: 0; transform: scale(.3); } 1% { opacity: .55; } 100% { opacity: 0; transform: scale(2.2); } }
@keyframes ms-pkt {
  0% { offset-distance: 0%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
@keyframes ms-pulse { 0% { opacity: .55; transform: scale(.96); } 100% { opacity: 0; transform: scale(1.12); } }
@keyframes ms-scan {
  0% { opacity: 0; transform: translate3d(0, -40px, 0); }
  15%, 80% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(0, 140px, 0); }
}
@keyframes ms-fly {
  0% { opacity: 0; transform: translate3d(var(--sx), var(--sy), 0) rotate(var(--r, 0deg)) scale(.7); }
  18% { opacity: 1; transform: translate3d(var(--sx), var(--sy), 0) rotate(var(--r, 0deg)) scale(1); }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--ex), var(--ey), 0) rotate(0deg) scale(.45); }
}
@keyframes ms-wave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@keyframes ms-ring { 0% { opacity: .5; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes ms-shake { 0%, 100% { transform: rotate(0); } 20%, 60% { transform: rotate(-14deg); } 40%, 80% { transform: rotate(14deg); } }
@keyframes ms-spin { to { transform: rotate(360deg); } }
@keyframes ms-progress { from { transform: scaleX(.05); } to { transform: scaleX(1); } }

/* ─── Scene: quotes ─────────────────────────────────────────────────────── */
.ms-mail { overflow: hidden; }
.ms-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 34px;
  border-bottom: 1.5px solid rgba(26, 78, 140, .55);
  background: linear-gradient(180deg, rgba(26, 78, 140, 0), rgba(26, 78, 140, .13));
  opacity: 0; pointer-events: none;
}
.ms-scene.p1 .ms-scan { animation: ms-scan 1.15s var(--ease-in-out) .55s both; }
.ms-kv { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 24px; border-bottom: 1px solid var(--line); }
.ms-kv > span:first-child { color: var(--muted); font-size: 10.5px; }
.ms-kv > span:last-child { font-weight: 600; }
.ms-line { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 26px; white-space: nowrap; }
.ms-flag { position: absolute; inset: -1px -7px; border: 1.5px dashed var(--blue); border-radius: 7px; background: rgba(26, 78, 140, .05); }
.ms-flagtag { position: absolute; right: -4px; top: -11px; }

/* ─── Scene: knowledge ──────────────────────────────────────────────────── */
.ms-src {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 26px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--ink-2); font-size: 10.5px; font-weight: 500; white-space: nowrap;
}
.ms-src__lit { position: absolute; inset: -1px; border: 1.5px solid var(--blue); border-radius: 8px; box-shadow: 0 0 0 3px rgba(26, 78, 140, .1); }
.ms-src__lock {
  position: absolute; inset: -1px; display: flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid rgba(15, 39, 68, .12); border-radius: 8px;
  background: repeating-linear-gradient(135deg, #f1f3f7 0 5px, #e8ecf2 5px 10px);
  color: var(--muted); font-size: 10.5px; font-weight: 500;
}
.ms-src__lock .ms-ico { width: 11px; height: 11px; }
.ms-cite { display: inline-grid; place-items: center; width: 14px; height: 14px; margin: 0 1px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 8.5px; font-weight: 700; vertical-align: 1px; }
.ms-tip {
  z-index: 5; padding: 7px 10px; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 10px 24px -8px rgba(15, 39, 68, .45);
  transform-origin: calc(100% - 34px) 0;
}
.ms-tip .ms-ico { width: 12px; height: 12px; }
.ms-tip::before { content: ''; position: absolute; right: 30px; top: -4px; width: 8px; height: 8px; background: inherit; transform: rotate(45deg); }

/* ─── Scene: strategy ───────────────────────────────────────────────────── */
.ms-inv { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: center; height: 33px; border-bottom: 1px solid var(--line); }
.ms-inv:last-child { border-bottom: 0; }
.ms-risk { display: inline-flex; gap: 2px; }
.ms-risk i { width: 9px; height: 5px; border-radius: 2px; background: #e3e8ef; overflow: hidden; }
.ms-risk i b { display: block; width: 100%; height: 100%; background: var(--blue); }
.ms-plot { position: absolute; left: 30px; right: 10px; top: 26px; bottom: 24px; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.ms-plot::before { content: ''; position: absolute; left: 0; top: 0; width: 50%; height: 50%; background: rgba(26, 78, 140, .06); }
.ms-plot::after { content: ''; position: absolute; inset: 0; background: linear-gradient(var(--line), var(--line)) 50% 0 / 1px 100% no-repeat, linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat; }
.ms-axis { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.ms-bubble { z-index: 2; width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.ms-bubble .ms-num { width: 18px; height: 18px; font-size: 9.5px; box-shadow: 0 4px 10px -2px rgba(26, 78, 140, .45); }
.ms-bubble .ms-a { transition-duration: .4s, .9s; transition-timing-function: ease, var(--ease-in-out); }

/* ─── Scene: marketing ──────────────────────────────────────────────────── */
.ms-track { position: absolute; left: 44px; right: 44px; top: 21px; height: 2px; border-radius: 2px; background: #e3e8ef; }
.ms-track .ms-fill { height: 100%; border-radius: inherit; background: var(--blue); transition-timing-function: linear; }
.ms-node { width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 2px solid #c9d1dc; border-radius: 50%; background: #fff; }
.ms-node b { position: absolute; inset: -2px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(26, 78, 140, .14); }
.ms-steplabel { width: 84px; margin-left: -42px; color: var(--ink-2); font-size: 10px; font-weight: 500; text-align: center; }
.ms-asset { overflow: hidden; }
.ms-asset__media { position: relative; height: 42px; background: linear-gradient(135deg, #2c64a6, var(--blue-deep)); }
.ms-asset__media--video { background: linear-gradient(135deg, #1b2230, #0b0d12); }
.ms-asset__media--page { height: 42px; padding: 7px 8px; border-bottom: 1px solid var(--line); background: #f6f8fb; }
.ms-asset__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); }
.ms-asset__play .ms-ico { width: 10px; height: 10px; }
.ms-asset__bar { position: absolute; left: 6px; right: 6px; bottom: 5px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.ms-asset__bar i { display: block; height: 100%; background: #fff; transform: scaleX(.12); transform-origin: 0 50%; }
.ms-scene.is-live.p1 .ms-asset__bar i { animation: ms-progress 3.2s linear 1.6s infinite; }
.ms-ev { display: flex; align-items: center; gap: 7px; height: 15px; }
.ms-chart-end { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border: 2px solid #fff; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.ms-chart-end::after { content: ''; position: absolute; inset: -6px; border: 1.5px solid var(--blue); border-radius: 50%; opacity: 0; }
.ms-scene.is-live.p3 .ms-chart-end::after { animation: ms-ring 1.6s ease-out 1.8s infinite; }

/* ─── Scene: Microsoft 365 ──────────────────────────────────────────────── */
.ms-folder { display: flex; align-items: center; gap: 8px; height: 32px; border-bottom: 1px solid var(--line); }
.ms-folder:last-child { border-bottom: 0; }
.ms-folder > .ms-ico { color: var(--blue); }
.ms-file { left: 0; top: 0; width: 22px; height: 28px; opacity: 0; }
.ms-file::before { content: ''; position: absolute; inset: 0; border: 1px solid rgba(15, 39, 68, .14); border-radius: 4px; background: #fff; box-shadow: 0 6px 14px -6px rgba(15, 39, 68, .35); }
.ms-file::after { content: ''; position: absolute; left: 5px; right: 5px; top: 8px; height: 10px; background: linear-gradient(#cfd8e4, #cfd8e4) 0 0 / 100% 2px no-repeat, linear-gradient(#cfd8e4, #cfd8e4) 0 4px / 80% 2px no-repeat, linear-gradient(var(--blue), var(--blue)) 0 8px / 55% 2px no-repeat; }
.ms-scene.p1 .ms-file { animation: ms-fly 1.5s var(--ease-in-out) var(--d, 0s) both; }
.ms-hub {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #3a73b8, var(--blue) 55%, var(--blue-deep));
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-align: center;
  box-shadow: 0 14px 30px -10px rgba(26, 78, 140, .7);
}
.ms-hub, .ms-sat { z-index: 3; }
.ms-hub > span { grid-area: 1 / 1; }
.ms-hub__ring { position: absolute; inset: -9px; border: 1.5px dashed rgba(26, 78, 140, .35); border-radius: 50%; }
.ms-scene.is-live.p2 .ms-hub__ring { animation: ms-spin 14s linear infinite; }
.ms-sat {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  width: 84px; height: 28px; margin: -14px 0 0 -42px;
  border: 1px solid rgba(15, 39, 68, .1); border-radius: 999px; background: #fff;
  color: var(--ink-2); font-size: 10.5px; font-weight: 600;
  box-shadow: 0 8px 18px -10px rgba(15, 39, 68, .35);
}
.ms-sat .ms-ico { width: 12px; height: 12px; color: var(--blue); }
.ms-log { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: center; height: 30px; border-bottom: 1px solid var(--line); }
.ms-log:last-of-type { border-bottom: 0; }

/* ─── Scene: automation ─────────────────────────────────────────────────── */
.ms-flow { padding: 8px 9px; }
.ms-flow .ms-tile { display: grid; width: 22px; height: 22px; margin-bottom: 5px; }
.ms-port { position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border: 1.5px solid var(--line-strong); border-radius: 50%; background: #fff; }
.ms-port--in { left: -4px; }
.ms-port--out { right: -4px; }
.ms-flow__badge { position: absolute; right: -6px; top: -6px; }
.ms-pop-card::before { content: ''; position: absolute; left: 50%; top: -5px; width: 9px; height: 9px; margin-left: -4.5px; border-left: 1px solid rgba(15, 39, 68, .08); border-top: 1px solid rgba(15, 39, 68, .08); background: #fff; transform: rotate(45deg); }

/* ─── Scene: phone call ─────────────────────────────────────────────────── */
.ms-phone { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ms-phone__icon { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: #fff; }
.ms-phone__icon .ms-ico { width: 20px; height: 20px; }
.ms-phone__icon::before, .ms-phone__icon::after { content: ''; position: absolute; inset: 0; border: 1.5px solid var(--blue); border-radius: 50%; opacity: 0; }
.ms-scene.p1 .ms-phone__icon::before { animation: ms-ring .8s ease-out 0s 2; }
.ms-scene.p1 .ms-phone__icon::after { animation: ms-ring .8s ease-out .4s 1; }
.ms-scene.p1 .ms-phone__icon .ms-ico { animation: ms-shake .45s ease-in-out .05s 2; }
.ms-wave { display: flex; align-items: center; justify-content: center; gap: 2px; height: 26px; }
.ms-wave i { width: 3px; height: 100%; border-radius: 2px; background: var(--blue); transform: scaleY(.25); }
.ms-scene.is-live.p1 .ms-wave i { animation: ms-wave var(--w, .9s) ease-in-out var(--d, 0s) infinite; }
.ms-chat { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.ms-bubble-msg { max-width: 188px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; background: #fff; font-size: 10.5px; line-height: 1.4; }
.ms-bubble-msg--ai { align-self: flex-end; border-color: transparent; border-radius: 12px 12px 4px 12px; background: var(--blue-soft); color: var(--blue-deep); }
.ms-tf { padding: 3px 0 4px; border-bottom: 1px solid var(--line); }
.ms-tf:last-child { border-bottom: 0; }
.ms-slot { display: grid; align-items: center; min-height: 16px; }
.ms-slot > * { grid-area: 1 / 1; }
.ms-slot > .ms-skel { width: 70%; }
.ms-tf-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.ms-tf-grid .ms-tf:nth-last-child(-n + 2) { border-bottom: 0; }

/* ─── Homepage service stage: scene + step tracker ───────────────────────── */
.has-scenes .service-panel__visual { display: grid; gap: 18px; min-width: 0; }
.service-stage.is-enhanced.has-scenes .ms-window {
  transform: perspective(1400px) rotateX(9deg) translate3d(0, 28px, 0) scale(.97);
  transform-origin: 50% 100%;
  opacity: 0;
  transition: opacity .5s ease, transform .9s var(--ease-out);
}
.service-stage.is-enhanced.has-scenes .service-panel.is-active .ms-window { opacity: 1; transform: none; transition-delay: .1s; }
.has-scenes .service-panel__points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.has-scenes .service-panel__points li {
  position: relative; display: block;
  padding: 14px 0 0; border-radius: 0;
  background: linear-gradient(rgba(15, 39, 68, .13), rgba(15, 39, 68, .13)) 0 0 / 100% 2px no-repeat;
  box-shadow: none;
  color: var(--muted); font-size: 13.5px; line-height: 1.4;
  transition: color .35s ease;
}
.has-scenes .service-panel__points li::before { display: block; margin-bottom: 5px; color: var(--muted); transition: color .35s ease; }
.has-scenes .service-panel__points li::after {
  content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 2px; border-radius: 2px;
  background: var(--blue); transform: scaleX(var(--fill, 0)); transform-origin: 0 50%;
}
.has-scenes .service-panel__points li.is-done { color: var(--ink-2); }
.has-scenes .service-panel__points li.is-current { color: var(--ink); }
.has-scenes .service-panel__points li.is-current::before, .has-scenes .service-panel__points li.is-done::before { color: var(--blue); }
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  .service-stage.is-pinned.has-scenes .service-stage__track { height: calc(var(--stage-steps, 6) * 68vh + 100vh); }
  .service-stage.is-pinned.has-scenes .service-panel { padding-block: clamp(24px, 4.2vh, 56px); }
  /* Keep the window short enough that the whole stage fits the viewport. */
  .service-stage.is-pinned.has-scenes .ms-window,
  .service-stage.is-pinned.has-scenes .service-panel__points { width: min(100%, calc((100vh - 420px) * 1.64)); justify-self: end; }
}
@media (max-width: 600px) {
  .has-scenes .ms-window { margin-inline: -14px; }
  /* Three columns are too narrow for long German words: stack the steps. */
  .has-scenes .service-panel__points { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .has-scenes .service-panel__points li { display: flex; gap: 12px; align-items: baseline; padding: 11px 0 12px; font-size: 14px; }
  .has-scenes .service-panel__points li::before { margin: 0; }
  .ms-bar { height: 34px; }
  .ms-tag { font-size: 9.5px; }
}

/* ─── Phone page: call scene above the three cards ──────────────────────── */
.call-scene { margin-block: clamp(28px, 4vw, 48px) clamp(20px, 2.5vw, 32px); }
.call-scene .ms-window { max-width: 760px; margin-inline: auto; }
.call-scene .ms-window--narrow { max-width: 420px; }
.js .cards-3.is-scene-steps .card[data-reveal] {
  transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out), border-color .4s ease, box-shadow .4s ease, rotate .5s var(--ease-out);
  transition-delay: calc(var(--reveal-i, 0) * 90ms), calc(var(--reveal-i, 0) * 90ms), 0s, 0s, 0s;
}
.cards-3.is-scene-steps .card::before {
  content: ''; position: absolute; left: 14px; right: 14px; top: -1px; height: 2px; border-radius: 2px;
  background: var(--blue); transform: scaleX(var(--fill, 0)); transform-origin: 0 50%;
}
.cards-3.is-scene-steps .card.is-current { border-color: rgba(26, 78, 140, .35); box-shadow: 0 0 0 3px rgba(26, 78, 140, .08), var(--shadow-1); }

@media (prefers-reduced-motion: reduce) {
  .ms-scene, .ms-scene * { transition: none !important; animation: none !important; }
  .ms-cursor, .ms-ripple, .ms-pkt, .ms-scan, .ms-file, .ms-pulse { display: none !important; }
  .service-stage.is-enhanced.has-scenes .ms-window { opacity: 1; transform: none; transition: none; }
}
