/* Motion for the home graphics (Belu, 30 nov 2026), on top of Jaime's layout.
   What we build: the animated isometric stack (packets, scan line, pulse, HUD titles) driven by stack.js.
   The crew: the active role cycles with a caption and a halo, driven by crew.js.
   Layout stays in home.css (.ly-stage); this file only styles the drawing and the motion.
   Rust is used only as small marks. Respects prefers-reduced-motion via the scripts and the rules below. */
:root {
  --orange: #CF7855;
  --orange-text: #A85A3A;
  --orange-glow: rgba(207, 120, 85, .28);
}
/* ==========================================================================
   What we build: the stack as an isometric illustration (source/stack/build_stack_svg.py).
   Top to bottom: AI employees, AI operating system, data layer wired into the ground.
   ========================================================================== */
.st-svg { display: block; width: 100%; height: auto; overflow: visible; }

.st-svg .st-tier { transition: opacity .45s var(--ease); cursor: pointer; }
.st.has-active .st-tier:not(.is-active) { opacity: .28; }

/* plates: paper-thin, warm white, hairline edges */
.pl-top { fill: #FBFBF7; stroke: rgba(26, 26, 26, .42); stroke-width: 1; stroke-linejoin: round; transition: stroke .4s, fill .4s; }
.pl-side { stroke: rgba(26, 26, 26, .42); stroke-width: 1; stroke-linejoin: round; }
.pl-r { fill: #E4E4DD; } .pl-l { fill: #EDEDE7; }
.pl-in { fill: none; stroke: rgba(26, 26, 26, .16); stroke-dasharray: 2 4; }
.st-tier.is-active .pl-top { fill: #F1F7F2; stroke: var(--accent); }
.st-tier.is-active .pl-in { stroke: var(--accent); stroke-opacity: .5; }

.conn { stroke: rgba(26, 26, 26, .3); stroke-dasharray: 2 4; fill: none; }
.pulse { fill: var(--accent); }
.ground { fill: rgba(40, 36, 28, .06); }
.root { stroke: rgba(26, 26, 26, .4); stroke-dasharray: 3 3; fill: none; animation: st-dash 1.4s linear infinite; }
.root-port { fill: #1F2422; }

/* labels */
.st-lbl text { font-family: var(--font); }
.lbl-lead { stroke: rgba(26, 26, 26, .25); fill: none; }
.lbl-n { font-size: 11px; letter-spacing: .14em; fill: var(--accent-text); font-weight: 600; }
.lbl-t { font-family: var(--display) !important; font-size: 19px; fill: var(--ink); }
.lbl-s { font-size: 12.5px; fill: var(--mute); }

/* 03 data */
.flow { fill: none; stroke: var(--accent); stroke-opacity: .55; stroke-width: 1.3; stroke-dasharray: 2 6; stroke-linecap: round; animation: st-dash 1.6s linear infinite; animation-delay: calc(var(--k) * -.3s); }
.src { fill: #FBFBF7; stroke: var(--accent); stroke-width: 1.3; }
.rec-t { fill: #fff; stroke: rgba(26, 26, 26, .35); stroke-width: .8; }
.rec-r { fill: #DCDCD5; stroke: rgba(26, 26, 26, .35); stroke-width: .8; }
.rec-l { fill: #E9E9E2; stroke: rgba(26, 26, 26, .35); stroke-width: .8; }
.rec { animation: st-blink 4.2s ease-in-out infinite; animation-delay: calc(var(--k) * .45s); }
.vault-t { fill: #2B3330; stroke: #1F2422; stroke-width: 1; }
.vault-r { fill: #1F2422; stroke: #1F2422; stroke-width: 1; }
.vault-l { fill: #26302C; stroke: #1F2422; stroke-width: 1; }
.lock path, .lock rect { fill: none; stroke: #9CC9B9; stroke-width: 1.6; stroke-linecap: round; }

/* 02 operating system */
.ring { fill: none; stroke: rgba(67, 117, 105, .35); stroke-width: 1; }
.ring-2 { stroke-dasharray: 3 5; animation: st-dash 3s linear infinite; }
.link { stroke: var(--accent); stroke-opacity: .5; stroke-width: 1.2; stroke-dasharray: 2 5; animation: st-dash 1.8s linear infinite reverse; }
.node-t { fill: #fff; stroke: rgba(26, 26, 26, .45); stroke-width: .9; }
.node-r { fill: #DCDCD5; stroke: rgba(26, 26, 26, .45); stroke-width: .9; }
.node-l { fill: #EAEAE3; stroke: rgba(26, 26, 26, .45); stroke-width: .9; }
.hub-base { fill: rgba(67, 117, 105, .15); }
.hub-side { fill: #365F55; }
.hub-top { fill: var(--accent); stroke: #365F55; stroke-width: 1; }
.hub-core { fill: #9CC9B9; animation: st-glow 2.4s ease-in-out infinite; }
.pane-f { fill: rgba(255, 255, 255, .72); stroke: rgba(26, 26, 26, .4); stroke-width: .9; }
.pane-l { stroke: rgba(26, 26, 26, .28); stroke-width: 2; stroke-linecap: round; }
.pane-l.acc { stroke: var(--accent); }
.pane { animation: st-float 5s ease-in-out infinite; animation-delay: calc(var(--k) * -2.4s); }

/* 01 agents and the human who checks their work */
.fig-halo { fill: rgba(67, 117, 105, .14); stroke: var(--accent); stroke-opacity: .55; stroke-width: 1; }
.fig-shadow { fill: rgba(26, 26, 26, .12); }
.agent .fig-b, .agent .fig-h { fill: #fff; stroke: rgba(26, 26, 26, .55); stroke-width: 1.1; }
.agent .fig-h { fill: #F1F7F2; stroke: var(--accent); }
.human .fig-b, .human .fig-h { fill: #1F2422; }
.fig-ok circle { fill: var(--accent); }
.fig-ok path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.agent .fig-body { animation: st-bob 3.2s ease-in-out infinite; animation-delay: calc(var(--k) * -.5s); }

@keyframes st-dash { to { stroke-dashoffset: -16; } }
@keyframes st-blink { 0%, 70%, 100% { opacity: 1; } 80% { opacity: .45; } }
@keyframes st-glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes st-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes st-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

@media (prefers-reduced-motion: reduce) { .st-svg * { animation: none !important; } }
@media (max-width: 899px) {
  .ly { display: block; }
  .st { margin: 24px 0 8px; }
  .ly-list { max-width: none; }
}
@media (max-width: 560px) {
  .st-lbl { display: none; }
  .st-svg { margin: 0 -8%; width: 116%; }
}
/* v2 of the illustration: particles, the private-cloud dome, floating app panes */
.dot { fill: rgba(26, 26, 26, .38); animation: st-blink 4.2s ease-in-out infinite; animation-delay: calc(var(--k, 0) * .45s); }
.dot.in { fill: var(--accent); animation: none; }
.dome-base { fill: rgba(67, 117, 105, .1); stroke: var(--accent); stroke-opacity: .5; stroke-dasharray: 3 4; }
.dome { fill: rgba(156, 201, 185, .22); stroke: var(--accent); stroke-width: 1.2; }
.dome-hi { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; opacity: .8; }
.lock circle { fill: var(--accent); stroke: none; }
.lock path, .lock rect { fill: none; stroke: #fff; stroke-width: 1.5; }
.node-shadow { fill: rgba(26, 26, 26, .08); }
.ground { fill: rgba(40, 36, 28, .045); }
.st.has-active .st-tier:not(.is-active) { opacity: .22; }
@media (min-width: 900px) { .st-svg { max-height: 82vh; width: auto; max-width: 100%; margin: 0 auto; } }
/* v3: clearer. Readable callouts on the right, calmer drawing. */
.lbl-lead { stroke: rgba(26, 26, 26, .35); stroke-dasharray: 2 3; }
.lbl-dot { fill: var(--accent); }
.lbl-n { font-size: 13px; letter-spacing: .16em; }
.lbl-t { font-size: 25px; }
.lbl-s { font-size: 15.5px; }
.st-svg .st-tier.is-active .lbl-t { fill: var(--accent-text); }
.dome { fill: rgba(156, 201, 185, .3); }
@media (max-width: 560px) { .st-lbl { display: inline; } .st-svg { margin: 0; width: 100%; } .lbl-s { display: none; } .lbl-t { font-size: 22px; } .lbl-n { font-size: 14px; } }
/* v4: a little more technical. Blueprint marks, mono specs, packets in motion. */
.pl-grid { fill: url(#isogrid); stroke: none; pointer-events: none; }
.pl-tick { stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; }
.lbl-s { font-family: ui-monospace, 'SF Mono', Menlo, monospace !important; font-size: 11.5px; letter-spacing: .08em; fill: var(--accent-text); }
.pkt { fill: var(--accent); }
.scan line { stroke: var(--accent); stroke-width: 2; stroke-opacity: .7; filter: drop-shadow(0 0 4px rgba(67, 117, 105, .6)); }
.fig-spin { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 4 6; animation: st-dash 1.6s linear infinite; }
.conn { stroke: rgba(67, 117, 105, .45); stroke-dasharray: 1 4; stroke-linecap: round; stroke-width: 1.4; }
.lock circle { filter: drop-shadow(0 0 6px rgba(67, 117, 105, .55)); }
/* v5: the film's readout language. Viewfinder brackets on what matters, tracked labels with one thin underline. */
.hud-brk { fill: none; stroke: var(--hud-bracket-ink); stroke-width: 1.3; transition: stroke .4s; }
.st-tier.is-active .hud-brk { stroke: var(--accent); }
.hud-t { font-family: var(--label); font-weight: 400; font-size: 14px; letter-spacing: .6em; fill: var(--hud-label-ink); text-transform: uppercase; }
.hud-u { stroke: var(--hud-under-ink); stroke-width: 1; }
.st-tier.is-active .hud-u { stroke: var(--accent); }
.hud-lead { stroke: var(--hud-bracket-ink); stroke-width: .8; stroke-opacity: .7; fill: none; }
.hud-dot { fill: var(--hud-bracket-ink); }
.st-tier.is-active .hud-dot { fill: var(--accent); }
.hud-chev { fill: none; stroke: var(--hud-label-ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; animation: st-float 2.4s ease-in-out infinite; }
.hud { animation: st-in .8s var(--ease) both; animation-delay: calc(var(--k) * .15s); }
@keyframes st-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 560px) { .hud-t { font-size: 16px; letter-spacing: .18em; } }
.hud-u { display: none; }

/* Stack still: the film still with the HUD readout on top (no underline). Hidden until the image loads. */
.st-photo { display: none; position: relative; }
.st.has-photo .st-photo { display: block; }
.st.has-photo .st-svg { display: none; }
.st-photo img { display: block; width: 100%; height: auto; }
.st-box {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--w) * 1%); height: calc(var(--h) * 1%);
  transition: opacity .4s var(--ease);
}
.st-box .c { border-color: var(--hud-bracket-ink); transition: border-color .4s; }
.st-box.is-active .c { border-color: var(--accent); }
.st.has-active .st-box:not(.is-active) { opacity: .35; }
.st-hl {
  position: absolute; left: 0; bottom: calc(100% + 10px);
  font-family: var(--label); font-weight: 400; text-transform: uppercase; white-space: nowrap;
  font-size: var(--hud-size-page); letter-spacing: var(--hud-track); line-height: 1; color: var(--hud-label-ink);
}
.st-box.is-active .st-hl { color: var(--accent-text); }
@media (max-width: 560px) { .st-hl { letter-spacing: .3em; } }
@media (min-width: 900px) { .st-photo { max-width: calc(82vh * .8); margin: 0 auto; } }

/* ==========================================================================
   The crew, with colour and life (crew.js). Every role has its own colour; a pulse runs from Strategy
   down one spoke at a time, lights that role, and the centre says what it does. Hover or focus takes over.
   ========================================================================== */
/* One accent for the crew: orange. Roles sit neutral; the live one turns orange. */
.sq-a { --orange: #CF7855; --orange-t: #FBE9E3; }
.sq-a li[data-role] { --c: var(--orange); --t: var(--wall); }
.sq-a li[data-role] .sq-node {
  background: var(--wall); border-color: var(--hair-strong); color: var(--ink);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), background .45s, color .45s, border-color .45s;
}
.sq-a li[data-role].is-on .sq-node {
  transform: scale(1.14); background: var(--c); color: #fff; border-color: var(--c);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--c) 16%, transparent), 0 10px 24px color-mix(in srgb, var(--c) 30%, transparent);
}
.sq-a li[data-role] .sq-name { transition: color .45s; }
.sq-a li[data-role].is-on .sq-name { color: var(--c); }
.sq-a .sq-orbit.is-hover li[data-role]:not(.is-on) .sq-node { opacity: .55; }
.sq-a li[data-role] { cursor: pointer; }

/* spokes: the live one carries a moving dash in its role's colour */
.sq-lines line { transition: stroke .45s, stroke-width .45s; }
.sq-lines line.is-on { stroke: var(--lc, var(--accent)); stroke-width: 2; stroke-dasharray: 3 4; animation: sq-flow .9s linear infinite; }
@keyframes sq-flow { to { stroke-dashoffset: -14; } }
.sq-lines .sq-spin { stroke: var(--accent); stroke-opacity: .55; stroke-width: 1.5; stroke-dasharray: 2 10; animation: sq-flow 2.6s linear infinite; }

/* the centre breathes: three soft rings, like a heartbeat */
.sq-halo { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.sq-halo i {
  position: absolute; left: calc(var(--core) / -2); top: calc(var(--core) / -2); width: var(--core); height: var(--core);
  border-radius: 50%; border: 1px solid var(--accent); opacity: 0; animation: sq-ring 3.6s var(--ease) infinite;
}
.sq-halo i:nth-child(2) { animation-delay: 1.2s; }
.sq-halo i:nth-child(3) { animation-delay: 2.4s; }
@keyframes sq-ring { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.75); opacity: 0; } }
.sq-a .sq-centre .sq-node { background: #F1F7F2; box-shadow: 0 12px 34px rgba(67, 117, 105, .16); }

/* the caption under Strategy: which role is moving, and what it does */
.sq-cap {
  position: absolute; left: 0; top: 46px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--cap-t, #fff); color: var(--cap-c, var(--accent-text)); font-size: 12.5px; font-weight: 500;
  opacity: 0; transition: opacity .35s, background .35s, color .35s;
}
.sq-cap.is-on { opacity: 1; }
.sq-cap i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

@media (prefers-reduced-motion: reduce) {
  .sq-halo i, .sq-lines .sq-spin, .sq-lines line.is-on { animation: none; }
}
@media (max-width: 719px) {
  .sq-halo, .sq-cap { display: none; }
  .sq-a li[data-role].is-on .sq-node { transform: none; }
}
/* the halo and the spinning ring pick up the orange too */
.sq-halo i { border-color: var(--orange); }
.sq-lines .sq-spin { stroke: var(--orange); }
.sq-cap { background: var(--orange-t); color: var(--orange); }

/* Stack: the human in the loop and the pulse between layers are orange. */
.st-svg { --orange: #CF7855; }
.human .fig-b, .human .fig-h { fill: #1F2422; }
.fig-ok circle { fill: var(--orange); filter: drop-shadow(0 0 6px rgba(207, 120, 85, .45)); }
.human .fig-shadow { fill: rgba(207, 120, 85, .22); }
.pulse { fill: var(--orange); }
/* Stack: more orange. The work in motion is orange: agents' status rings, data packets, the scan line, the active bracket. */
.fig-spin { stroke: var(--orange); stroke-opacity: .85; }
.fig-halo { fill: rgba(207, 120, 85, .1); stroke: var(--orange); stroke-opacity: .45; }
.pkt { fill: var(--orange); }
.flow { stroke: var(--orange); stroke-opacity: .5; }
.src { stroke: var(--orange); }
.scan line { stroke: var(--orange); filter: drop-shadow(0 0 4px rgba(207, 120, 85, .55)); }
.pl-tick { stroke: var(--orange); }
.st-svg .st-tier.is-active .hud-brk, .st-svg .st-tier.is-active .hud-dot { stroke: var(--orange); fill: none; }
.st-svg .st-tier.is-active .hud-dot { fill: var(--orange); }

/* Stack titles (v6): orange number, display name, one short line; no leader lines. */
.hud-n { font-family: var(--label); font-size: 13px; font-weight: 600; letter-spacing: .16em; fill: var(--orange-text); }
.hud-t { font-family: var(--display) !important; font-size: 26px; font-weight: 400; letter-spacing: -.01em !important; fill: var(--ink); text-transform: none !important; }
.hud-s { font-family: var(--font); font-size: 14.5px; fill: var(--mute); }
.st-svg .st-tier.is-active .hud-t { fill: var(--orange-text); }
@media (max-width: 560px) { .hud-t { font-size: 24px; letter-spacing: -.01em !important; } .hud-s { display: none; } .hud-n { font-size: 15px; } }


/* Stack list: the open layer's number and marker in rust */
.ly-list li.is-active .n { color: var(--orange-text); }
.ly-list li::before { background: var(--orange); }

