/* Cloudung: motion graphic of the "Ansatz" section (inc/mo-ansatz.php, generated by tools/motion_ansatz.py).
   The plain styles describe the finished picture. Start states live only in the keyframes,
   which run once from .mo-in. Timing comes from the generator as --mo-an-d (delay) and --mo-an-t (duration). */

.mo-an { position: relative; max-width: 955px; }
.mo-an .hx { overflow: visible; }
/* the drawing is made for the full column: one unit is one pixel at 955px (site.css caps figures at 900px) */
.sec-body > figure.mo-an.block .hx { max-width: none; }
/* Two drawings, one per screen size. The unused one is taken out of the flow and hidden, but not with
   display: none: its animations then keep their state when the viewport crosses the breakpoint. */
.mo-an .mo-an-n { position: absolute; left: 0; top: 0; height: 0; visibility: hidden; overflow: hidden; }

/* panel headings and rules inside the drawing, matching the table head below */
.mo-an .mo-an-h { font: 500 10.5px var(--mono); letter-spacing: 0.09em; fill: var(--ink-2); }
.mo-an .mo-an-h-b { fill: var(--accent-ink); }
.mo-an .mo-an-rule { stroke: var(--hair); stroke-width: 1; }
.mo-an .mo-an-key { fill: var(--ink-2); }
.mo-an .mo-an-one { font-weight: 600; }
.mo-an .mo-an-who { font-size: 12.5px; font-weight: 600; fill: var(--ink); }
.mo-an .bal-n { font-size: 10px; }

/* caption row with the quiet replay control */
.mo-an-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); }
.mo-an-cap span { max-width: 44em; }
.mo-an-replay { flex: none; appearance: none; background: none; border: 0; border-radius: 0; margin: -8px 0; padding: 8px 0; font: 500 0.72rem var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--hair); text-decoration-thickness: 1px; text-underline-offset: 0.4em; cursor: pointer; }
.mo-an-replay:hover { color: var(--ink); text-decoration-color: var(--ink); }
html:not(.js) .mo-an-replay, .mo-an.mo-static .mo-an-replay { display: none; }

/* ---------- motion ---------- */
.mo-an .mo-an-pop { transform-box: fill-box; transform-origin: center; }
.js .mo-an:not(.mo-in) .mo-an-a { opacity: 0; }

.mo-an.mo-in .mo-an-rise { animation: mo-an-rise var(--mo-an-t, .45s) cubic-bezier(.2, .7, .2, 1) var(--mo-an-d, 0s) both; }
.mo-an.mo-in .mo-an-fade { animation: mo-an-fade var(--mo-an-t, .35s) ease-out var(--mo-an-d, 0s) both; }
.mo-an.mo-in .mo-an-pop { animation: mo-an-pop var(--mo-an-t, .3s) cubic-bezier(.2, .7, .2, 1) var(--mo-an-d, 0s) both; }
.mo-an.mo-in .mo-an-draw { animation: mo-an-draw var(--mo-an-t, .4s) ease-out var(--mo-an-d, 0s) both; }
.mo-an .mo-an-gone { opacity: 0; }   /* a question that is settled on arrival: not part of the finished picture */
.mo-an.mo-in .mo-an-gone { animation: mo-an-gone var(--mo-an-t, .8s) cubic-bezier(.2, .7, .2, 1) var(--mo-an-d, 0s) both; }
.mo-an.mo-in .mo-an-go { animation: mo-an-go var(--mo-an-t, .42s) cubic-bezier(.2, .7, .2, 1) var(--mo-an-d, 0s) both; }

@keyframes mo-an-rise { from { opacity: 0; transform: translateY(7px); } }
@keyframes mo-an-fade { from { opacity: 0; } }
@keyframes mo-an-pop { from { opacity: 0; transform: scale(.4); } }
@keyframes mo-an-draw {
  0% { opacity: 0; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
  1% { opacity: 1; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
  100% { opacity: 1; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
}
@keyframes mo-an-go {
  0% { opacity: 0; transform: translate(var(--mo-an-x, 0), var(--mo-an-y, 0)); }
  25% { opacity: 1; }
}

@keyframes mo-an-gone {
  0% { opacity: 0; transform: translate(var(--mo-an-x, 0), var(--mo-an-y, 0)); }
  15% { opacity: 1; }
  60% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}

@media (max-width: 819px) {
  .mo-an .mo-an-w { position: absolute; left: 0; top: 0; height: 0; visibility: hidden; overflow: hidden; }
  .mo-an .mo-an-n { position: static; height: auto; visibility: visible; overflow: visible; }
  .sec-body > figure.mo-an.block .mo-an-n { max-width: 420px; }   /* on small tablets the phone drawing must not grow with the column */
  .mo-an .pl, .mo-an .b { stroke-width: 1; }
  .mo-an .path { stroke-width: 2.4; }
  .mo-an .gt { font-size: 10.5px; }
  .mo-an .bal-l { font-size: 10px; }
  .mo-an-cap { margin-top: 10px; }
}
