/* =========================================================
   ALPHA STRIKE — HERO EXECUTION COMPONENT
   Version: 1.0
   Status: Active (replaces hero-robot on the Automation page, 13 Oct 2026)

   The Automation-page hero visual: the page's own workflow, drawn as
   a calm, precise pipeline. Three data feeds stream into an order
   ticket, the ticket's fields fill line by line, a "CONFIRM" control
   pulses and is ticked, and only then does a single order travel on
   to the exchange. Loops every 8 s.

   Pure inline SVG + CSS animation - same technique family as
   hero-globe / hero-network / hero-chart (no canvas, no JS, no
   dependencies). Colour follows the locked brand accent: ALPHA
   Yellow in dark theme, ALPHA Chrome Steel in light theme.
   ========================================================= */

.as-exec-outer {
    --as-exec-accent-rgb: 245, 184, 0;
    --as-exec-accent: var(--alpha-color-brand-yellow, #F5B800);
    --as-exec-loop: 8s;

    position: relative;
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}

[data-theme="light"] .as-exec-outer {
    --as-exec-accent-rgb: 75, 85, 99;
    --as-exec-accent: var(--alpha-color-brand-chrome-steel, #4B5563);
}

.as-exec-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.as-exec-glow-bg { fill: url(#asExecGlow); }
.as-exec-glow-s0 { stop-color: var(--as-exec-accent); stop-opacity: .14; }
.as-exec-glow-s1 { stop-color: var(--as-exec-accent); stop-opacity: .04; }
.as-exec-glow-s2 { stop-color: var(--as-exec-accent); stop-opacity: 0; }

.as-exec-text {
    fill: rgba(var(--as-exec-accent-rgb), .85);
    font-family: var(--alpha-font-mono, ui-monospace, monospace);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
}

.as-exec-text--muted { fill: rgba(var(--as-exec-accent-rgb), .5); }

/* ---------- data feeds (left) ---------- */

.as-exec-feed {
    fill: rgba(var(--as-exec-accent-rgb), .05);
    stroke: rgba(var(--as-exec-accent-rgb), .55);
    stroke-width: 1;
}

.as-exec-wire {
    stroke: rgba(var(--as-exec-accent-rgb), .22);
    stroke-width: 1;
    fill: none;
}

.as-exec-wire--flow {
    stroke: var(--as-exec-accent);
    stroke-width: 1.4;
    stroke-dasharray: 6 26;
    animation: as-exec-flow 1.6s linear infinite;
}

.as-exec-wire--flow:nth-of-type(2) { animation-delay: -.5s; }
.as-exec-wire--flow:nth-of-type(3) { animation-delay: -1s; }

@keyframes as-exec-flow {
    to { stroke-dashoffset: -32; }
}

/* ---------- order ticket (centre) ---------- */

.as-exec-ticket {
    fill: rgba(var(--as-exec-accent-rgb), .04);
    stroke: var(--as-exec-accent);
    stroke-width: 1.3;
}

.as-exec-ticket__rule {
    stroke: rgba(var(--as-exec-accent-rgb), .3);
    stroke-width: 1;
}

.as-exec-field__track {
    fill: rgba(var(--as-exec-accent-rgb), .08);
}

.as-exec-field__fill {
    fill: rgba(var(--as-exec-accent-rgb), .7);
    transform-box: fill-box;
    transform-origin: left center;
    transform: scaleX(0);
    animation: as-exec-fill var(--as-exec-loop) cubic-bezier(.4, 0, .2, 1) infinite;
}

.as-exec-field__fill--1 { animation-name: as-exec-fill-1; }
.as-exec-field__fill--2 { animation-name: as-exec-fill-2; }
.as-exec-field__fill--3 { animation-name: as-exec-fill-3; }
.as-exec-field__fill--4 { animation-name: as-exec-fill-4; }
.as-exec-field__fill--5 { animation-name: as-exec-fill-5; }

@keyframes as-exec-fill-1 { 0%, 4% { transform: scaleX(0); } 12%, 92% { transform: scaleX(1); } 98%, 100% { transform: scaleX(0); } }
@keyframes as-exec-fill-2 { 0%, 10% { transform: scaleX(0); } 18%, 92% { transform: scaleX(1); } 98%, 100% { transform: scaleX(0); } }
@keyframes as-exec-fill-3 { 0%, 16% { transform: scaleX(0); } 24%, 92% { transform: scaleX(1); } 98%, 100% { transform: scaleX(0); } }
@keyframes as-exec-fill-4 { 0%, 22% { transform: scaleX(0); } 30%, 92% { transform: scaleX(1); } 98%, 100% { transform: scaleX(0); } }
@keyframes as-exec-fill-5 { 0%, 28% { transform: scaleX(0); } 36%, 92% { transform: scaleX(1); } 98%, 100% { transform: scaleX(0); } }

/* ---------- confirm control ---------- */

.as-exec-confirm {
    fill: transparent;
    stroke: var(--as-exec-accent);
    stroke-width: 1.3;
    animation: as-exec-confirm var(--as-exec-loop) ease-in-out infinite;
}

@keyframes as-exec-confirm {
    0%, 38%   { fill: rgba(var(--as-exec-accent-rgb), 0); stroke-opacity: .45; }
    44%       { fill: rgba(var(--as-exec-accent-rgb), .18); stroke-opacity: 1; }
    50%       { fill: rgba(var(--as-exec-accent-rgb), .04); stroke-opacity: .7; }
    56%       { fill: rgba(var(--as-exec-accent-rgb), .22); stroke-opacity: 1; }
    62%, 92%  { fill: var(--as-exec-accent); stroke-opacity: 1; }
    100%      { fill: rgba(var(--as-exec-accent-rgb), 0); stroke-opacity: .45; }
}

.as-exec-confirm__label {
    fill: var(--as-exec-accent);
    font-family: var(--alpha-font-mono, ui-monospace, monospace);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
    animation: as-exec-confirm-label var(--as-exec-loop) ease-in-out infinite;
}

@keyframes as-exec-confirm-label {
    0%, 60%   { fill: var(--as-exec-accent); }
    62%, 92%  { fill: var(--alpha-surface-page, #050505); }
    100%      { fill: var(--as-exec-accent); }
}

.as-exec-tick {
    fill: none;
    stroke: var(--as-exec-accent);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: as-exec-tick var(--as-exec-loop) ease-out infinite;
}

@keyframes as-exec-tick {
    0%, 62%  { stroke-dashoffset: 30; opacity: 1; }
    70%, 92% { stroke-dashoffset: 0; opacity: 1; }
    100%     { stroke-dashoffset: 0; opacity: 0; }
}

/* ---------- route to exchange (right) ---------- */

.as-exec-route {
    stroke: rgba(var(--as-exec-accent-rgb), .25);
    stroke-width: 1;
    stroke-dasharray: 3 4;
    fill: none;
}

.as-exec-packet {
    fill: var(--as-exec-accent);
    animation: as-exec-packet var(--as-exec-loop) cubic-bezier(.5, 0, .3, 1) infinite;
}

@keyframes as-exec-packet {
    0%, 70%  { transform: translateX(0); opacity: 0; }
    72%      { opacity: 1; }
    86%      { transform: translateX(58px); opacity: 1; }
    90%, 100% { transform: translateX(58px); opacity: 0; }
}

.as-exec-exchange {
    fill: rgba(var(--as-exec-accent-rgb), .05);
    stroke: rgba(var(--as-exec-accent-rgb), .6);
    stroke-width: 1.2;
}

.as-exec-exchange__ring {
    fill: none;
    stroke: var(--as-exec-accent);
    stroke-width: 1;
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
    animation: as-exec-ring var(--as-exec-loop) ease-out infinite;
}

@keyframes as-exec-ring {
    0%, 85%  { transform: scale(1); opacity: 0; }
    87%      { opacity: .9; }
    100%     { transform: scale(1.9); opacity: 0; }
}

/* ---------- reduced motion: show the finished, confirmed state ---------- */

@media (prefers-reduced-motion: reduce) {
    .as-exec-wire--flow,
    .as-exec-field__fill,
    .as-exec-confirm,
    .as-exec-confirm__label,
    .as-exec-tick,
    .as-exec-packet,
    .as-exec-exchange__ring {
        animation: none;
    }
    .as-exec-field__fill { transform: scaleX(1); }
    .as-exec-tick { stroke-dashoffset: 0; }
    .as-exec-packet { opacity: 0; }
}
