/* ============================================================
   Sign-in trade route (Areas/Identity/Pages/_DistributionScene.cshtml)
   Supplier → conveyor → warehouse → truck → shops; receipts flow back.
   One loop, one stroke weight. Colours come from the host page:
     --dz-ink  lines          --dz-accent  goods / highlights
     --dz-fill building faces  --dz-fill-2  roofs, signs
     --dz-lit  lit shop window --dz-muted   captions   --dz-road street
   Still frame by default; motion only with prefers-reduced-motion: no-preference.
   ============================================================ */
.dz {
    --dz-ink: #1e3a8a; --dz-accent: #0e7490; --dz-accent-2: #0ea5e9;
    --dz-fill: #ffffff; --dz-fill-2: #e8eef6; --dz-lit: #cffafe;
    --dz-muted: #475569; --dz-road: #e4e9e2; --dz-font: inherit;
    margin: 0; width: 100%; max-width: 36rem;
}
.dz svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--dz-font); }

.dz-line, .dz-wall, .dz-roof, .dz-door, .dz-win, .dz-awn, .dz-sign, .dz-mark, .dz-roll circle,
.dz-parcel *, .dz-stock rect, .dz-cargo, .dz-cab, .dz-glass, .dz-wheel, .dz-mark-box, .dz-coin *, .dz-lit {
    stroke: var(--dz-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
}
.dz-line, .dz-roof, .dz-mark { fill: none; }
.dz-wall { fill: var(--dz-fill); }
.dz-door, .dz-win { fill: var(--dz-fill-2); }
.dz-sign { fill: var(--dz-fill-2); }
.dz-mark { stroke: var(--dz-accent); stroke-width: 1.6; }
.dz-awn { fill: var(--dz-accent); stroke: var(--dz-ink); }
.dz-road { fill: var(--dz-road); stroke: none; }
.dz-dash { stroke: var(--dz-ink); stroke-opacity: .28; stroke-width: 1.5; stroke-dasharray: 10 12; stroke-linecap: round; }
.dz-roll circle { fill: var(--dz-fill-2); stroke-width: 1.6; }
.dz-parcel * { fill: var(--dz-fill); stroke: var(--dz-accent); }
.dz-stock rect { fill: var(--dz-fill-2); stroke-width: 1.6; }
.dz-cargo { fill: var(--dz-fill); }
.dz-mark-box { fill: var(--dz-accent); stroke: var(--dz-accent); }
.dz-cab { fill: var(--dz-accent); }
.dz-glass { fill: var(--dz-fill-2); stroke-width: 1.4; }
.dz-wheel { fill: var(--dz-ink); stroke: var(--dz-fill); stroke-width: 2.4; }
.dz-lit { fill: var(--dz-fill-2); }
.dz-smoke circle { fill: var(--dz-fill-2); stroke: var(--dz-ink); stroke-opacity: .35; stroke-width: 1.4; opacity: 0; }
.dz-pay { fill: none; stroke: var(--dz-accent-2); stroke-width: 1.6; stroke-dasharray: 2 7; stroke-linecap: round; }
.dz-coin circle { fill: var(--dz-accent-2); stroke: var(--dz-fill); stroke-width: 1.6; }
.dz-coin path { fill: none; stroke: var(--dz-fill); stroke-width: 1.4; }

.dz-label text { fill: var(--dz-ink); font-size: 13px; font-weight: 700; letter-spacing: .01em; text-anchor: middle; }
.dz-tag, .dz-tag text { fill: var(--dz-muted); font-size: 11px; font-weight: 500; text-anchor: middle; }
.dz-tag textPath { letter-spacing: .12em; }

/* Still frame (reduced motion, or before CSS animations start): goods on the belt, truck at the
   first shop, its window lit — the story reads without motion. */
.dz-parcel { transform: translateX(calc(var(--i, 0) * 28px)); }
.dz-parcel:nth-child(1) { --i: 0; } .dz-parcel:nth-child(2) { --i: 1; } .dz-parcel:nth-child(3) { --i: 2; } .dz-parcel:nth-child(4) { --i: 3; }
.dz-truck { transform: translateX(444px); }
.dz-lit-1 { fill: var(--dz-lit); }

@media (prefers-reduced-motion: no-preference) {
    .dz-parcel { animation: dz-belt 8s linear var(--d, 0s) infinite; }
    .dz-stock rect { animation: dz-stock 8s ease-out var(--d, 0s) infinite; }
    .dz-truck { animation: dz-route 12s infinite; }
    .dz-lit-1 { animation: dz-lit1 12s infinite; }
    .dz-lit-2 { animation: dz-lit2 12s infinite; }
    .dz-lit-3 { animation: dz-lit3 12s infinite; }
    .dz-dash { animation: dz-dash 1.6s linear infinite; }
    .dz-smoke circle { animation: dz-smoke 4s ease-out infinite; }
    .dz-smoke circle + circle { animation-delay: -2s; }
}

@keyframes dz-belt {
    0%   { transform: translateX(0); opacity: 0; }
    8%   { opacity: 1; }
    86%  { opacity: 1; }
    100% { transform: translateX(118px); opacity: 0; }
}
@keyframes dz-stock {
    0%, 6%   { fill: var(--dz-fill-2); }
    12%      { fill: var(--dz-accent-2); }
    40%, 100% { fill: var(--dz-fill-2); }
}
/* Dock → shop 1 → shop 2 → shop 3 → away. Eased between stops like a vehicle, not a slide. */
@keyframes dz-route {
    0%        { transform: translateX(318px); opacity: 0; animation-timing-function: ease-out; }
    5%        { transform: translateX(318px); opacity: 1; }
    10%       { transform: translateX(318px); animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
    27%, 37%  { transform: translateX(444px); animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
    51%, 61%  { transform: translateX(506px); animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
    75%, 85%  { transform: translateX(568px); animation-timing-function: cubic-bezier(.6, 0, .8, .4); }
    96%       { transform: translateX(660px); opacity: 1; }
    100%      { transform: translateX(660px); opacity: 0; }
}
@keyframes dz-lit1 { 0%, 26% { fill: var(--dz-fill-2); } 30%, 92% { fill: var(--dz-lit); } 100% { fill: var(--dz-fill-2); } }
@keyframes dz-lit2 { 0%, 50% { fill: var(--dz-fill-2); } 54%, 92% { fill: var(--dz-lit); } 100% { fill: var(--dz-fill-2); } }
@keyframes dz-lit3 { 0%, 74% { fill: var(--dz-fill-2); } 78%, 92% { fill: var(--dz-lit); } 100% { fill: var(--dz-fill-2); } }
@keyframes dz-dash { to { stroke-dashoffset: -22; } }
@keyframes dz-smoke {
    0%   { transform: translateY(0) scale(.7); opacity: 0; }
    25%  { opacity: .9; }
    100% { transform: translateY(-18px) scale(1.4); opacity: 0; }
}
.dz-smoke circle { transform-box: fill-box; transform-origin: center; }

/* On a dark brand panel (GlobeTrade default sign-in). */
.dz-host-dark .dz {
    --dz-ink: rgba(255, 255, 255, .9); --dz-accent: #a5f3fc; --dz-accent-2: #fde68a;
    --dz-fill: rgba(255, 255, 255, .06); --dz-fill-2: rgba(255, 255, 255, .16); --dz-lit: #fde68a;
    --dz-muted: rgba(226, 232, 255, .78); --dz-road: rgba(255, 255, 255, .07);
}
.dz-host-dark .dz-awn { fill: rgba(165, 243, 252, .28); }
.dz-host-dark .dz-cab { fill: rgba(165, 243, 252, .35); }
.dz-host-dark .dz-coin circle { stroke: rgba(15, 23, 42, .6); }
.dz-host-dark .dz-coin path { stroke: #1e293b; }
.dz-host-dark .dz-wheel { stroke: rgba(15, 23, 42, .5); }
.dz-host-dark .dz-mark-box { fill: #a5f3fc; stroke: #a5f3fc; }
