/* =============================================================
   ZARAS — Operating-shapes card · operating-shapes-card.v1.css

   SHARED card-intrinsic CSS for the operating-shapes artifact (amber
   trade-rhythm lanes converging into one teal operating record).
   Loaded by BOTH home §03 (index.html) and the industries hero
   (industries.html). Extracted verbatim from home-industries.v1.css;
   replaces the duplicate copy that lived in industries-hero-card.v1.css.

   Scoped to the card's own .zi-* classes only — NO .zi section ancestor,
   NO body[data-page]/.hero scope — so each context frames it freely.

   PER-CONTEXT (deliberately NOT here): the card<->stack breakpoint and
   the show/hide strategy. Home swaps card->stack at <=760px (home-
   industries.v2.css); the industries hero hides the whole artifact at
   <=900px (industries.html inline). The stack APPEARANCE is here at
   base (display:none until a context shows it); only the display toggle
   is per-context.

   Namespace: zi-*  (consumes the host page :root tokens).
   ============================================================= */

:root {
  --zi-amber:      200 158 92;     /* trade-lane earth tone */
  --zi-amber-line: rgba(200,158,92,0.55);
  --zi-amber-soft: rgba(200,158,92,0.34);
  --zi-amber-ink:  rgba(214,176,108,0.9);
}

.zi-stage { position: relative; }
.zi-stage-aura {
  position: absolute; inset: -6% -4% -8% -4%; z-index: 0; pointer-events: none;
  background: radial-gradient(46% 64% at 78% 50%, rgba(118,199,178,0.10) 0%, transparent 72%),
              radial-gradient(40% 60% at 14% 36%, rgba(200,158,92,0.07) 0%, transparent 70%);
  filter: blur(12px);
}

/* ---- The card: premium dark glass, lighter than stage glass ---- */
.zi-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr clamp(252px, 30%, 312px);
  border: 1px solid var(--rule-hi);
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.028) 0%, transparent 14%),
    var(--bg-sub);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 1px 0 rgba(0,0,0,0.4),
    0 34px 80px -52px rgba(0,0,0,0.9);
}
/* faint internal grid */
.zi-card::before {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right,  rgba(255,250,240,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,250,240,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 120% at 40% 50%, #000 0%, #000 55%, transparent 92%);
          mask-image: radial-gradient(120% 120% at 40% 50%, #000 0%, #000 55%, transparent 92%);
}

/* ---- Card header band — quotes the record card's top band ---- */
.zi-card-band {
  grid-column: 1 / -1;
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--rule);
  background: rgba(255,250,240,0.012);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
}
.zi-card-band-l { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-sub); }
.zi-card-band-l .tag {
  color: var(--ink-mute);
}
.zi-card-band-r { display: inline-flex; align-items: center; gap: 14px; color: var(--ink-mute); }
.zi-card-band-key { display: inline-flex; align-items: center; gap: 7px; }
.zi-card-band-key .sw { width: 9px; height: 9px; border-radius: 2px; }
.zi-card-band-key .sw.amber { background: var(--zi-amber-line); }
.zi-card-band-key .sw.teal  { background: var(--signal); }

/* =============================================================
   LANES PANEL (left) — the six rhythms, drawn in SVG so the
   cadences + convergence + the single trace scale as one piece.
   ============================================================= */
.zi-lanes {
  position: relative; z-index: 2;
  padding: 22px 4px 22px 22px;
  min-width: 0;
}
.zi-lanes-svg { display: block; width: 100%; height: auto; overflow: visible; }
.zi-lanes-svg text {
  font-family: var(--mono);
  fill: var(--ink-mute);
  letter-spacing: 0.5px;
}
/* lane rails */
.zi-rail { stroke: rgba(255,250,240,0.10); stroke-width: 1; }
/* amber cadence material */
.zi-mark        { fill: rgba(200,158,92,0.62); }
.zi-mark-soft   { fill: rgba(200,158,92,0.42); }
.zi-stroke      { stroke: rgba(200,158,92,0.7); stroke-width: 1.5; fill: none; }
.zi-stroke-soft { stroke: rgba(200,158,92,0.5); stroke-width: 1; fill: none; }
.zi-bar         { fill: rgba(200,158,92,0.46); }
/* convergence curves — amber gathering toward the record */
.zi-converge    { stroke: url(#ziFanFadeDim); stroke-width: 1.25; fill: none; }
.zi-converge-on { stroke: url(#ziFanFade);    stroke-width: 1.4;  fill: none; }
.zi-exit     { fill: rgba(200,158,92,0.5); }
/* LEVER 2 — the gather node: where the six amber rhythms resolve into the teal
   record (the card's thesis, previously its least-emphasized pixel).
   2a: strengthened two-layer glow (wide halo + tight core).
   2c: a pulse phase-locked to @keyframes zi-trace — identical 6s + easing, no
   delay, so they run in lockstep. Peaks at 66% as the trace lands and fades by
   72% ("the trace lands, the node responds"). The 0/52/82/100% keyframes equal
   the 2a static filter, so the resting state — and the reduced-motion fallback —
   shows no jump. */
.zi-gather   {
  fill: var(--signal);
  filter: drop-shadow(0 0 7px rgba(118,199,178,0.75))
          drop-shadow(0 0 2.5px rgba(118,199,178,0.9));
  animation: zi-gather-land 6s cubic-bezier(.55,0,.45,1) infinite;
}
@keyframes zi-gather-land {
  0%, 52%   { filter: drop-shadow(0 0 7px  rgba(118,199,178,0.75)) drop-shadow(0 0 2.5px rgba(118,199,178,0.9)); }
  66%       { filter: drop-shadow(0 0 12px rgba(118,199,178,0.95)) drop-shadow(0 0 3px   rgba(118,199,178,1));   }
  82%, 100% { filter: drop-shadow(0 0 7px  rgba(118,199,178,0.75)) drop-shadow(0 0 2.5px rgba(118,199,178,0.9)); }
}

/* the ONE animated trace: a single travelling dash, lane -> record.
   Stroke is a left(amber) -> right(teal) gradient so the warm input
   visibly resolves into the teal system as it travels. */
.zi-trace-base { stroke: rgba(255,250,240,0.06); stroke-width: 1.4; fill: none; }
.zi-trace {
  stroke: var(--signal);
  stroke-width: 1.8; fill: none; stroke-linecap: round;
  stroke-dasharray: 30 360;
  filter: drop-shadow(0 0 5px rgba(118,199,178,0.55));
  animation: zi-trace 6s cubic-bezier(.55,0,.45,1) infinite;
}
@keyframes zi-trace {
  0%   { stroke-dashoffset: 390; opacity: 0; }
  10%  { opacity: 1; }
  62%  { opacity: 1; }
  72%  { opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

/* =============================================================
   RECORD BLOCK (right) — TEAL. Quotes the operating-record motif:
   top band + live chip + teal check-seal. The destination the
   varied amber inputs resolve into.
   ============================================================= */
.zi-record {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--signal-rule);
  background:
    linear-gradient(180deg, rgba(118,199,178,0.10) 0%, rgba(118,199,178,0.02) 30%, transparent 72%),
    rgba(11,18,16,0.6);
}
/* docking node — where the convergence gather meets the record */
.zi-record::before {
  content: "";
  position: absolute; left: -4px; top: 50%; margin-top: -4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(118,199,178,0.08), 0 0 8px rgba(118,199,178,0.55);
  z-index: 3;
}
/* soft pulse on the whole record */
.zi-record::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(118,199,178,0);
  animation: zi-record-pulse 4.6s ease-in-out infinite;
}
@keyframes zi-record-pulse {
  0%, 100% { box-shadow: inset 0 0 28px -16px rgba(118,199,178,0.25); }
  50%      { box-shadow: inset 0 0 34px -12px rgba(118,199,178,0.5); }
}

.zi-record-band {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--signal-rule);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
}
.zi-record-band-l { display: inline-flex; align-items: center; gap: 8px; color: var(--signal-ink); min-width: 0; }
.zi-record-band-l .d { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px var(--signal); flex: none; }
.zi-record-band-l span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zi-record-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 3px 9px; border: 1px solid var(--signal-rule); border-radius: 999px;
  background: var(--signal-weak); color: var(--signal-ink);
}
.zi-record-chip .pip {
  width: 5px; height: 5px; border-radius: 50%; background: var(--signal);
  animation: zi-pip 2.4s ease-out infinite;
}
@keyframes zi-pip {
  0% { box-shadow: 0 0 0 0 rgba(118,199,178,0.55); }
  70% { box-shadow: 0 0 0 7px rgba(118,199,178,0); }
  100% { box-shadow: 0 0 0 0 rgba(118,199,178,0); }
}

.zi-record-body { flex: 1; padding: 18px 16px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.zi-record-lead {
  font-family: var(--sans); font-size: 17px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink);
}

/* faint vertical chain — abstract + dataless; only "Paid" resolves teal */
.zi-record-chain {
  list-style: none; position: relative;
  display: grid; gap: 13px;
  padding-left: 22px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.zi-record-chain::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px;
  background: var(--rule-hi);
}
.zi-chain-row {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: var(--ink-sub); min-height: 22px;
}
.zi-chain-row::before {
  content: ""; position: absolute; left: -19px; top: 50%; margin-top: -3.5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-faint); border: 1px solid var(--bg-sub);
}
.zi-chain-row.is-paid { color: var(--signal-ink); }
.zi-chain-row.is-paid::before { background: var(--signal); box-shadow: 0 0 8px var(--signal); }

.zi-chain-seal {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--signal-weak); border: 1px solid var(--signal-rule);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px rgba(118,199,178,0.05), 0 0 12px rgba(118,199,178,0.3);
}
.zi-chain-seal svg { width: 12px; height: 12px; }
.zi-chain-seal svg path {
  stroke: var(--signal); stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 22; animation: zi-check 560ms cubic-bezier(.65,0,.35,1) 800ms both;
}
@keyframes zi-check { from { stroke-dashoffset: 22; } }

/* seal primitive — used by the mobile record cap */
.zi-seal {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--signal-weak); border: 1.5px solid var(--signal-rule);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px rgba(118,199,178,0.05), 0 0 18px rgba(118,199,178,0.35);
}
.zi-seal svg { width: 17px; height: 17px; }
.zi-seal svg path {
  stroke: var(--signal); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 22; animation: zi-check 560ms cubic-bezier(.65,0,.35,1) 700ms both;
}

/* =============================================================
   MOBILE stack — a separate shape-stack, hidden until a context shows
   it. Appearance is unconditional (below); position/z-index are folded
   up from home's old <=760 rule so only `display:block` stays per-context.
   ============================================================= */
.zi-stack { display: none; position: relative; z-index: 1; }

.zi-stack-list {
  list-style: none;
  position: relative;
  display: grid;
  gap: 2px;
}
/* the spine: amber at the top (field) -> teal at the bottom (record) */
.zi-stack-list::before {
  content: "";
  position: absolute; left: 19px; top: 16px; bottom: -6px; width: 2px;
  background: linear-gradient(180deg,
    rgba(200,158,92,0.55) 0%,
    rgba(200,158,92,0.4) 55%,
    var(--signal-rule) 100%);
}
.zi-shape {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px 13px 0;
  border-bottom: 1px solid var(--rule);
}
.zi-shape:first-child { padding-top: 4px; }
/* node on the spine */
.zi-shape-num {
  position: relative; z-index: 1;
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--zi-amber-ink);
  background: rgba(200,158,92,0.06);
  border: 1px solid rgba(200,158,92,0.28);
}
.zi-shape-main { min-width: 0; }
.zi-shape-name { font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.zi-shape-kind { margin-top: 2px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); }
/* mini amber cadence glyph */
.zi-glyph { width: 60px; height: 18px; display: block; flex: none; overflow: visible; }
.zi-glyph .m { fill: rgba(200,158,92,0.7); }
.zi-glyph .s { stroke: rgba(200,158,92,0.7); stroke-width: 1.4; fill: none; stroke-linecap: round; }

/* the record cap — teal, sits at the bottom of the spine */
.zi-stack-record {
  position: relative;
  margin-top: 18px;
  margin-left: 8px;
  border: 1px solid var(--signal-rule);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(118,199,178,0.12) 0%, rgba(118,199,178,0.03) 40%, transparent 80%),
    rgba(11,18,16,0.55);
}
/* tie the spine into the record */
.zi-stack-record::before {
  content: "";
  position: absolute; left: 11px; top: -18px; width: 2px; height: 18px;
  background: var(--signal-rule);
}
.zi-stack-record-band {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--signal-rule);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--signal-ink);
}
.zi-stack-record-band .l { display: inline-flex; align-items: center; gap: 8px; }
.zi-stack-record-band .d { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px var(--signal); }
.zi-stack-record-band .live {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border: 1px solid var(--signal-rule); border-radius: 999px; background: var(--signal-weak);
}
.zi-stack-record-band .live .pip { width: 5px; height: 5px; border-radius: 50%; background: var(--signal); animation: zi-pip 2.4s ease-out infinite; }
.zi-stack-record-body { display: flex; align-items: center; gap: 13px; padding: 14px 15px 16px; }
.zi-stack-record-body .zi-seal { width: 36px; height: 36px; }
.zi-stack-record-body .zi-seal svg { width: 18px; height: 18px; }
.zi-stack-record-txt .lead { font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.zi-stack-record-txt .chain { margin-top: 3px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-mute); }
.zi-stack-record-txt .chain .s { color: var(--signal); }

/* Reduced-motion — suppress all card + stack animations. Viewport-
   independent, so unconditional here; the mobile-stack pip is folded in
   from home's old <=760 reduced-motion rule. */
@media (prefers-reduced-motion: reduce) {
  .zi-trace,
  .zi-record::after,
  .zi-record-chip .pip,
  .zi-seal svg path,
  .zi-chain-seal svg path,
  .zi-stack-record-band .live .pip,
  .zi-gather { animation: none; }
  .zi-trace { opacity: 0.85; stroke-dashoffset: 0; stroke-dasharray: none; }
  .zi-seal svg path, .zi-chain-seal svg path { stroke-dashoffset: 0; }
}
