/* ---------- the brand: the mark, the opening (section 25) ----------
   The mark: the logo, CoordXYZ's origin with no tile behind it (Axio, 2026-10-11): a dot on a cross in ink
   (currentColor), Z going in up and to the right in the depth colour, so it turns with day and night. Drawn round
   32, 32 in a 40 box (12 to 52; markPose turns it). The app's icon is the logo on a square tile (web/icons); in the
   app, before the name and in the opening, it stays this mark (Axio, 2026-10-27). */
.mark { display: block; overflow: visible; fill: none; stroke-linecap: round; }
.mark .mk-xy { stroke: currentColor; stroke-opacity: .7; stroke-width: 2.6; }
.mark .mk-z { stroke: var(--z); stroke-width: 5; }
.mark .mk-o { fill: currentColor; }

/* The AI's icon: the mark, small and still, in a 16 box (AI_GLYPH), where a sparkle would be; its lines heavier so
   it holds at 14 to 18px. Its own strokes, whatever the icon's svg says. */
.g-xy { fill: none; stroke: currentColor; stroke-opacity: .7; stroke-width: 1.2px; stroke-linecap: round; }
.g-z { fill: none; stroke: var(--z); stroke-width: 2.1px; stroke-linecap: round; }
.g-o { fill: currentColor; stroke: none; }

/* The mark at work: the states the AI shows it in (markAi, section 25). Each moves only the logo's own parts round
   its origin (the middle of the box): Z, the dot, the cross, and a ring the dot sends out (.mk-p). */
.mark .mk-xy, .mark .mk-z, .mark .mk-o, .mark .mk-p { transform-box: view-box; transform-origin: 32px 32px; }   /* the origin (the box is 12 to 52) */
.mark .mk-p { fill: none; stroke: currentColor; stroke-width: 1; opacity: 0; }
.mark.ai-mk { display: inline-block; width: 1.3em; height: 1.3em; vertical-align: -.28em; color: var(--ink); }
/* Thinking: the origin builds its space, as the opening does. X draws out from the dot, then Y, then Z; they hold,
   and go back in, Z first. In the AI's marks (markAi) X and Y are half-lines from the origin (.mk-x, .mk-y), so a dash
   of .5 draws both halves outward at once. */
.mark.ai-think .mk-x { animation: mk-bx 2.4s cubic-bezier(.6, 0, .25, 1) infinite; }
.mark.ai-think .mk-y { animation: mk-by 2.4s cubic-bezier(.6, 0, .25, 1) infinite; }
.mark.ai-think .mk-z { animation: mk-bz 2.4s cubic-bezier(.5, 0, .2, 1) infinite; }
.mark.ai-think .mk-o { animation: mk-bo 2.4s cubic-bezier(.5, 0, .3, 1) infinite; }
@keyframes mk-bx { 0% { stroke-dasharray: 0 .5; } 16%, 74% { stroke-dasharray: .5 0; } 92%, 100% { stroke-dasharray: 0 .5; } }
@keyframes mk-by { 0%, 8% { stroke-dasharray: 0 .5; } 24%, 70% { stroke-dasharray: .5 0; } 86%, 100% { stroke-dasharray: 0 .5; } }
@keyframes mk-bz { 0%, 18% { stroke-dasharray: 0 1; } 36%, 64% { stroke-dasharray: 1 0; } 80%, 100% { stroke-dasharray: 0 1; } }
@keyframes mk-bo { 0%, 94%, 100% { transform: scale(.72); } 10%, 84% { transform: scale(1); } }
/* Triangulating: Z takes three bearings a third of a turn apart, the dot sounding at each */
.mark.ai-tri .mk-z { animation: mk-tri 2.1s cubic-bezier(.6, 0, .2, 1) infinite; }
.mark.ai-tri .mk-p { animation: mk-ping .7s ease-out infinite; }
@keyframes mk-tri { 0%, 18% { transform: rotate(0); } 33%, 51% { transform: rotate(120deg); } 66%, 84% { transform: rotate(240deg); } 100% { transform: rotate(360deg); } }
@keyframes mk-ping { 0%, 18% { opacity: 0; transform: scale(1); } 28% { opacity: .9; } 100% { opacity: 0; transform: scale(2.7); } }
/* Working: Z runs out along its line and back, the cross brightening as it reaches */
.mark.ai-work .mk-z { stroke-dasharray: 1 1; animation: mk-reach 1.2s cubic-bezier(.6, 0, .4, 1) infinite; }
.mark.ai-work .mk-xy { animation: mk-glow 1.2s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes mk-reach { 0%, 100% { stroke-dashoffset: .62; } 50% { stroke-dashoffset: 0; } }
@keyframes mk-glow { 0%, 100% { stroke-opacity: .4; } 50% { stroke-opacity: .95; } }
/* Writing: the cross is written out, across then down, again and again; Z keeps its place */
.mark.ai-write .mk-xy { stroke-dasharray: 1 1; animation: mk-write 1.5s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes mk-write { 0% { stroke-dashoffset: 1; opacity: 1; } 70%, 84% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
/* Done: Z swings home and settles, the dot takes it, and sends one ring out */
.mark.ai-done .mk-z { animation: mk-home .6s cubic-bezier(.3, 1.5, .5, 1) both; }
.mark.ai-done .mk-o { animation: mk-take .6s cubic-bezier(.3, 1.5, .5, 1) both; }
.mark.ai-done .mk-p { animation: mk-ping .8s ease-out .12s both; }
@keyframes mk-home { from { transform: rotate(-150deg); } }
@keyframes mk-take { from { transform: scale(.6); } }
/* Waiting on you: Z steps back, the dot breathes slowly */
.mark.ai-wait .mk-z { opacity: .45; transition: opacity .3s; }
.mark.ai-wait .mk-o { animation: mk-breathe 2.6s ease-in-out infinite; }
@keyframes mk-breathe { 50% { transform: scale(1.4); } }
/* It didn't work: the mark shakes its head and Z falls flat, its depth lost */
.mark.ai-err { animation: mk-no .46s cubic-bezier(.36, .07, .19, .97) both; }
.mark.ai-err .mk-z { opacity: .6; animation: mk-fall .55s cubic-bezier(.5, 0, .3, 1.5) both; }
@keyframes mk-no { 20%, 60% { transform: translateX(-7%); } 40%, 80% { transform: translateX(7%); } }
@keyframes mk-fall { to { transform: rotate(45deg); } }
@media (prefers-reduced-motion: reduce) {
  .mark.ai-mk, .mark.ai-mk * { animation: none !important; }
  .mark.ai-think .mk-o, .mark.ai-tri .mk-o, .mark.ai-work .mk-o, .mark.ai-write .mk-o, .mark.ai-wait .mk-o { animation: mk-dim 1.6s ease-in-out infinite !important; }
  .mark.ai-err .mk-z { transform: rotate(45deg); }
  @keyframes mk-dim { 50% { opacity: .35; } }
}

/* The opening: over everything from the first paint, the mark alone while the app loads; then the flip (bootRun).
   Should the app never start, it fades by itself. It takes presses only while it waits for the app (.wait);
   once it flips, the canvas under it is live. */
#boot { position: fixed; inset: 0; z-index: 2000; background: var(--canvas); pointer-events: none; }
#boot.wait { pointer-events: auto; touch-action: none; }   /* waiting for the app (brand.js readyNow): presses stop here */
#boot:not(.run) { animation: boot-gone 300ms ease-out 8s forwards; }
@keyframes boot-gone { to { opacity: 0; visibility: hidden; } }
#boot .bt-lat { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
/* Where the opening's origin sits, from the middle (bootRun reads the same two). On a computer left of the middle and
   low, as the levels will rise up and to the right of it. On a phone or tablet (the apps) the logo waits in the very
   middle, and as it opens the whole picture, levels to name, moves to sit in the middle (--bt-fit; Axio, 2026-11-11). */
#boot { --bt-x: -40px; --bt-y: 80px; --bt-fit: 0; }
@media (pointer: coarse) { #boot { --bt-x: 0px; --bt-y: 0px; --bt-fit: 1; } }
#boot .bt-mark { position: absolute; left: calc(50% + var(--bt-x)); top: calc(50% + var(--bt-y)); width: 48px; height: 48px; margin: -24px 0 0 -24px; color: var(--ink); }
#boot .bt-w { position: absolute; left: calc(50% + var(--bt-x)); top: calc(50% + var(--bt-y)); margin: 92px 0 0; transform: translateX(-50%); text-align: center; white-space: nowrap; opacity: 0; }
#boot .bt-w b { display: block; font: 500 30px/1.1 var(--f-display); letter-spacing: -.014em; color: var(--ink); font-optical-sizing: auto; }
#boot .bt-w i { display: block; margin-top: 7px; font: italic 400 16.5px/1.3 var(--f-display); color: var(--ink-2); font-optical-sizing: auto; }
