/* =============================================================
   ZARAS — /platform — Operating Layer (v2)
   ----------------------------------------------------------
   v2: Migrated 8 information-tier text uses from --ink-faint
   (~1.7:1, failing WCAG AA) to --ink-label (~6.5:1, AAA).
   --ink-faint retained on the 3 decorative-dot backgrounds.
   ----------------------------------------------------------
   Visual enhancement pass. Layers ON TOP of platform.html's
   existing styles without replacing any. Strictly additive.

   Concept:
     A persistent "operating spine" runs down the page on
     desktop, with named checkpoint nodes per workflow section
     and a scroll-progress fill. Section breaks become handoff
     strips that show the system event ("ESTIMATE SIGNED →
     JOB CREATED → DISPATCH READY"). Each section gets a
     restrained atmospheric backdrop, and product surfaces
     get a soft spotlight + active-state hairlines.

   Tokens used (already declared in platform.html):
     --bg, --bg-sub, --bg-raise, --ink, --ink-sub, --ink-mute,
     --rule, --rule-hi, --signal, --signal-ink, --signal-weak,
     --signal-rule, --mono, --sans

   All decorative artifacts are aria-hidden in markup.
   ============================================================= */


/* =========================================================
   1. OPERATING SPINE  (desktop only)
   ---------------------------------------------------------
   Sticky 1px column that lives in the left margin of the
   shell. Fills with --signal as the user scrolls. Each
   workflow section gets a labeled node ("INTAKE", etc).
   ========================================================= */
.op-spine {
  position: fixed;
  top: 0;
  bottom: 0;
  /* Pushed into the outer page gutter — well outside .shell. */
  left: max(20px, calc((100vw - var(--maxw)) / 2 - 56px));
  width: 14px;
  pointer-events: none;
  z-index: 5;
  display: none; /* hidden under 1360px — see media query */
  /* JS sets --op-spine-opacity to fade the rail before the footer. */
  opacity: var(--op-spine-opacity, 1);
  transition: opacity 250ms linear;
}
.op-spine-track {
  position: absolute;
  left: 7px;
  top: 88px;       /* clears the site-nav */
  bottom: 88px;    /* leaves footer alone */
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255,250,240,0.05) 8%,
    rgba(255,250,240,0.05) 92%,
    transparent 100%
  );
}
.op-spine-fill {
  position: absolute;
  /* Sits directly on .op-spine-track (left: 7px, top: 88px, bottom: 88px). */
  left: 7px;
  top: 88px;
  width: 1px;
  /* Height is set explicitly in operating-layer.v1.js based on the visible
     track height — NOT viewport height — so the fill always lines up with
     the track and the nodes. */
  height: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--signal-weak) 12%,
    var(--signal-rule) 50%,
    var(--signal-weak) 88%,
    transparent 100%
  );
  transition: none;
}
/* The leading edge — a small quiet dot that rides the fill */
.op-spine-fill::after {
  content: "";
  position: absolute;
  left: -1.5px;
  bottom: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--signal);
  opacity: 0.7;
  box-shadow: 0 0 4px var(--signal-weak);
}

/* Nodes — positioned via inline style, top in % of track */
.op-spine-nodes {
  position: absolute;
  left: 0;
  top: 88px;
  bottom: 88px;
  width: 100%;
}
.op-spine-node {
  position: absolute;
  left: 7px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.op-spine-node-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--rule-hi);
  flex-shrink: 0;
  transition:
    background 400ms ease,
    border-color 400ms ease,
    box-shadow 400ms ease;
}
/* Labels removed — spine is dots-only instrumentation by design. */
.op-spine-node-label { display: none; }
.op-spine-node[data-active="true"] .op-spine-node-dot {
  background: var(--signal);
  border-color: var(--signal);
  box-shadow:
    0 0 0 2px var(--signal-weak),
    0 0 6px rgba(118,199,178,0.45);
}
.op-spine-node[data-passed="true"]:not([data-active="true"]) .op-spine-node-dot {
  background: var(--signal-rule);
  border-color: var(--signal-rule);
}

/* Pulsing active node — gentler, slower */
@keyframes op-node-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--signal-weak), 0 0 6px rgba(118,199,178,0.45); }
  50%      { box-shadow: 0 0 0 4px rgba(118,199,178,0.04), 0 0 10px rgba(118,199,178,0.55); }
}
.op-spine-node[data-active="true"] .op-spine-node-dot {
  animation: op-node-pulse 4s ease-in-out infinite;
}

/* Show spine on roomy desktops only */
@media (min-width: 1360px) {
  .op-spine { display: block; }
}

/* Anchor-jump clearance for the sticky site-nav (page-scoped). */
html { scroll-padding-top: 120px; }
.workflow { scroll-margin-top: 120px; }


/* =========================================================
   2. HANDOFF STRIPS  (replaces ordinary section borders)
   ---------------------------------------------------------
   Sits BETWEEN workflow sections. Renders a hairline + a
   left-aligned event label + a right-aligned timestamp +
   a small "data packet" that animates across when the
   strip is in view.
   ========================================================= */
.handoff {
  position: relative;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(180deg, transparent, rgba(118,199,178,0.012), transparent);
}
.handoff::before,
.handoff::after {
  /* faint grid lines top/bottom — subtle structure */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent 6px,
    var(--rule) 6px,
    var(--rule) 7px
  );
  opacity: 0.6;
  pointer-events: none;
}
.handoff::before { top: 8px; }
.handoff::after  { bottom: 8px; }

.handoff-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Left: checkpoint label */
.handoff-checkpoint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-mute);
}
.handoff-checkpoint .num {
  color: var(--ink-label);
}
.handoff-checkpoint .sep {
  color: var(--ink-label);
}
.handoff-checkpoint .name {
  color: var(--ink-sub);
  letter-spacing: 0.18em;
}

/* Center: event chain — three labels with arrows + traveling packet */
.handoff-events {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink-mute);
  min-height: 14px;
  flex-wrap: wrap;
}
.handoff-events .ev {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.handoff-events .ev .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex-shrink: 0;
}
.handoff-events .ev:last-child .dot {
  background: var(--signal);
  box-shadow: 0 0 0 2px var(--signal-weak);
}
/* Arrows are siblings of .ev, not children. */
.handoff-events > .arr {
  color: var(--ink-label);
  font-family: var(--mono);
}
/* The "packet" — a tiny pip that travels left→right along the row */
.handoff-events::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 1px;
  background: var(--signal);
  box-shadow: 0 0 6px var(--signal);
  opacity: 0;
  transform: translateY(-50%);
  pointer-events: none;
}
.handoff[data-in-view="true"] .handoff-events::before {
  animation: handoff-packet 2.4s cubic-bezier(.4, 0, .2, 1) 200ms 1 forwards;
}
@keyframes handoff-packet {
  0%   { left: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Right: monospaced timestamp */
.handoff-ts {
  color: var(--ink-label);
  font-variant-numeric: tabular-nums;
}

/* Stack on narrow screens */
@media (max-width: 820px) {
  .handoff { padding: 22px 0; }
  .handoff-row {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: left;
  }
  .handoff-events {
    justify-content: flex-start;
    gap: 8px 10px;
    font-size: 9.5px;
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .handoff-ts { font-size: 9.5px; }
  .handoff::before, .handoff::after { display: none; }
}
/* (Final narrow-screen cleanup lives at the end of this file,
   AFTER the base definitions for .hero-chain, .workflow-chip,
   .modules-index — see "11. NARROW-SCREEN FINAL OVERRIDES".) */

/* Qualifier variant of .handoff — replaces the three-zone event strip
   with a single buyer-facing sentence at the conversion threshold above
   the closing CTA. Inherits the base .handoff wrapper (padding + thin
   hairlines via ::before/::after). */
.handoff--qualifier .handoff-qualifier-text {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.55;
  color: var(--ink-sub);
  letter-spacing: -0.005em;
  text-wrap: balance;
}
@media (max-width: 720px) {
  .handoff--qualifier .handoff-qualifier-text {
    font-size: 13.5px;
    line-height: 1.5;
  }
}

/* Suppress the duplicate borders of the workflow sections that
   sit above/below a handoff — the handoff already provides the
   rule. */
.workflow + .handoff,
.handoff + .workflow {
  /* nothing; rule is provided by .handoff itself */
}
.workflow.has-handoff-above { border-top: 0; }
.workflow.has-handoff-below { border-bottom: 0; }


/* =========================================================
   3. SECTION ATMOSPHERES
   ---------------------------------------------------------
   Each .workflow can opt into one of four backdrops. They
   sit BEHIND content (z-index: 0) and never paint outside
   the section. All extremely low contrast.
   ========================================================= */
.workflow { position: relative; isolation: isolate; overflow: hidden; }
.workflow > .shell { position: relative; z-index: 1; }
.workflow-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1200ms ease;
}
.workflow.is-revealed .workflow-bg { opacity: 1; }

/* §01 — Win the Work : faint contact-card grid */
.workflow-bg.bg-intake {
  background-image:
    /* horizontal hairlines */
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px),
    /* vertical hairlines */
    linear-gradient(to right, var(--rule) 1px, transparent 1px);
  background-size: 240px 120px, 240px 120px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 30% 40%, black 0%, transparent 80%);
          mask-image: radial-gradient(ellipse 60% 50% at 30% 40%, black 0%, transparent 80%);
  opacity: 0;
}
.workflow.is-revealed .workflow-bg.bg-intake { opacity: 0.45; }

/* §02 — Run the Work : route lines (diagonal flow) */
.workflow-bg.bg-dispatch {
  background-image:
    linear-gradient(115deg, transparent 49.5%, var(--rule) 49.5%, var(--rule) 50.5%, transparent 50.5%),
    linear-gradient(115deg, transparent 49.5%, var(--rule) 49.5%, var(--rule) 50.5%, transparent 50.5%);
  background-size: 320px 320px, 200px 200px;
  background-position: 0 0, 60px 40px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 50%, black 0%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 60% at 70% 50%, black 0%, transparent 80%);
  opacity: 0;
}
.workflow.is-revealed .workflow-bg.bg-dispatch { opacity: 0.5; }
/* extra: a thin "live route" arc */
.workflow-bg.bg-dispatch::after {
  content: "";
  position: absolute;
  top: 30%;
  left: -10%;
  width: 70%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--signal-rule), transparent);
  transform: rotate(8deg);
  opacity: 0.6;
}

/* §03 — Get Paid : ledger lines (horizontal, dense) */
.workflow-bg.bg-paid {
  background-image: linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 100% 28px;
  -webkit-mask-image: linear-gradient(to right, transparent, black 30%, black 70%, transparent);
          mask-image: linear-gradient(to right, transparent, black 30%, black 70%, transparent);
  opacity: 0;
}
.workflow.is-revealed .workflow-bg.bg-paid { opacity: 0.35; }

/* §04 — See What's Happening : analytics grid (small, dense) */
.workflow-bg.bg-pulse {
  background-image:
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px),
    linear-gradient(to right, var(--rule) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 60%, black 0%, transparent 90%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 60%, black 0%, transparent 90%);
  opacity: 0;
}
.workflow.is-revealed .workflow-bg.bg-pulse { opacity: 0.4; }


/* =========================================================
   4. SECTION HEAD UPGRADE — side metadata column
   ---------------------------------------------------------
   On desktop, we add a small left rail to the workflow-head:
   OBJECT / STATUS / NEXT. Uses CSS grid; degrades gracefully.
   ========================================================= */
.workflow-meta {
  display: none;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 4px;
}
.workflow-meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.workflow-meta .k { color: var(--ink-label); }
.workflow-meta .v { color: var(--ink-sub); letter-spacing: 0.1em; }
.workflow-meta .v.signal { color: var(--signal-ink); }

@media (min-width: 1100px) {
  .workflow-head.has-meta {
    display: grid;
    grid-template-columns: 160px 1fr;
    column-gap: 48px;
    max-width: none;
  }
  .workflow-head.has-meta .workflow-meta { display: block; }
  .workflow-head.has-meta > .label,
  .workflow-head.has-meta > h2,
  .workflow-head.has-meta > .workflow-intro {
    grid-column: 2;
    max-width: 64ch;
  }
  .workflow-head.has-meta > .label { margin-top: 4px; }
}


/* =========================================================
   5. PRODUCT SURFACE POLISH
   ---------------------------------------------------------
   Soft signal spotlight behind each surface; subtle hairline
   scanning line on the surface header; gentle hover lift.
   ========================================================= */
.workflow-stage { position: relative; }
.workflow-stage::before {
  content: "";
  position: absolute;
  inset: -10% -8% -10% -8%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(118,199,178,0.06) 0%, transparent 60%);
  filter: blur(20px);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 1200ms ease;
}
.workflow.is-revealed .workflow-stage::before { opacity: 1; }
.workflow-stage > .surface { position: relative; z-index: 1; }

/* Subtle hover lift on desktop only */
@media (min-width: 900px) and (hover: hover) {
  .workflow-stage > .surface {
    transition:
      transform 600ms cubic-bezier(.2,.6,.1,1),
      box-shadow 600ms cubic-bezier(.2,.6,.1,1),
      border-color 400ms ease;
  }
  .workflow-stage > .surface:hover {
    transform: translateY(-2px);
    border-color: var(--rule-hi);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.05),
      inset 1px 0 0 rgba(255,255,255,0.02),
      0 1px 0 rgba(0,0,0,0.5),
      0 28px 60px -28px rgba(0,0,0,0.75),
      0 4px 10px -3px rgba(0,0,0,0.5),
      0 0 0 1px rgba(118,199,178,0.04);
  }
}

/* Header scanning hairline — runs slowly L→R, only when section in view.
   Implemented as a ::after on .surface-head; super low opacity. */
.workflow.is-revealed .surface .surface-head {
  position: relative;
  overflow: hidden;
}
.workflow.is-revealed .surface .surface-head::after {
  content: "";
  position: absolute;
  top: 0;
  left: -30%;
  width: 30%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(118,199,178,0.10),
    transparent
  );
  animation: surface-scan 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes surface-scan {
  0%       { left: -30%; }
  60%      { left: 130%; }
  100%     { left: 130%; }
}

/* Customer card — pulse the avatar's "online" dot a touch more deliberately */
.surface.customer .cu-avatar::after {
  animation: cu-online-pulse 3s ease-in-out infinite;
}
@keyframes cu-online-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--bg-sub), 0 0 0 0 rgba(118,199,178,0.6); }
  50%      { box-shadow: 0 0 0 2px var(--bg-sub), 0 0 0 6px rgba(118,199,178,0.0); }
}

/* Dispatch — animate the LIVE dot in the surface-head, and add a moving ETA shimmer to .job.enroute */
.surface.dispatch .surface-head .status .dot {
  animation: dp-live-pulse 2s ease-in-out infinite;
}
@keyframes dp-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(118,199,178,0.6); }
  50%      { box-shadow: 0 0 0 5px rgba(118,199,178,0); }
}
.surface.dispatch .dp-grid .job.live {
  position: relative;
}
.surface.dispatch .dp-grid .job.live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  border: 1px solid var(--signal);
  opacity: 0;
  animation: dp-active-frame 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes dp-active-frame {
  0%, 100% { opacity: 0; }
  50%      { opacity: 0.55; }
}

/* Invoice — settle the "cleared" ledger row in once on reveal */
.workflow.is-revealed .surface.invoice .iv-rows .row.ledger {
  animation: iv-settle 900ms cubic-bezier(.2,.6,.1,1) 600ms 1 both;
}
@keyframes iv-settle {
  0%   { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---- Payment progress row (LINK SENT → VIEWED → PAID) ----
   Sits between .iv-top and .iv-amount in the invoice card. Visual
   language matches .handoff-events but stays self-contained. */
.iv-progress {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.iv-progress .ev {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.iv-progress .ev .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex-shrink: 0;
}
.iv-progress .ev.paid .dot {
  background: var(--signal);
  box-shadow: 0 0 0 2px var(--signal-weak);
}
.iv-progress .ev.paid {
  color: var(--signal-ink);
}
.iv-progress > .arr {
  color: var(--ink-label);
}

/* Reporting — slow pulse on the AI margin alert */
.surface.reporting .rep-flag {
  position: relative;
  overflow: hidden;
}
.surface.reporting .rep-flag::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent,
    rgba(118,199,178,0.10),
    transparent
  );
  transform: translateX(-100%);
  animation: rep-flag-shimmer 5s ease-in-out 2s infinite;
  pointer-events: none;
}
@keyframes rep-flag-shimmer {
  0%, 100% { transform: translateX(-100%); }
  50%      { transform: translateX(100%); }
}


/* =========================================================
   6. HERO — workflow ribbon
   ---------------------------------------------------------
   Adds a small horizontal chain under the hero subcopy:
   CALL → ESTIMATE → DISPATCH → INVOICE → INSIGHT
   Implies the page's whole flow at a glance.
   ========================================================= */
.hero-chain {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  max-width: 700px;
}
.hero-chain-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.hero-chain-step .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex-shrink: 0;
  transition: background 400ms ease, box-shadow 400ms ease;
}
.hero-chain-step:last-child .dot {
  background: var(--signal);
  box-shadow: 0 0 0 2px var(--signal-weak);
}
.hero-chain-arrow {
  margin: 0 14px;
  color: var(--ink-label);
  font-size: 11px;
}
@media (max-width: 720px) {
  .hero-chain { gap: 0; font-size: 9.5px; letter-spacing: 0.14em; }
  .hero-chain-arrow { margin: 0 10px; }
}

/* Hero "system map" backdrop — extremely faint constellation
   of route lines + nodes behind the headline. SVG is in the
   markup; this just sizes/positions/clips it. */
.hero-map {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, black 0%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, black 0%, transparent 80%);
  opacity: 0.55;
}
.hero-map svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1400px;
  max-width: 130vw;
  height: auto;
}
.hero > .shell { position: relative; z-index: 1; }


/* =========================================================
   7. MOBILE STATUS CHIPS
   ---------------------------------------------------------
   When the spine is hidden (mobile/tablet), each workflow
   section gets a small chip at the very top:
     [01] · INTAKE · ACTIVE
   Renders only below 1100px.
   ========================================================= */
.workflow-chip {
  display: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 24px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  width: max-content;
  background: var(--bg-sub);
  align-items: center;
  gap: 10px;
}
.workflow-chip .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 2px var(--signal-weak);
}
.workflow-chip .num { color: var(--ink-label); }
.workflow-chip .name { color: var(--ink-sub); }

@media (max-width: 1099px) {
  .workflow-chip { display: inline-flex; }
}


/* =========================================================
   8. MODULES INDEX UPGRADE — command-line strip
   ---------------------------------------------------------
   Re-skins the modules-index into a terminal-style line:
     > MODULES LOADED · dispatch / scheduling / ...
   Plus a blinking caret. Restrained, not novelty.
   ========================================================= */
.modules-index {
  align-items: center;
}
.modules-index .lbl::before {
  content: "> ";
  color: var(--signal);
}
.modules-index .caret {
  display: inline-block;
  width: 7px;
  height: 12px;
  background: var(--signal);
  vertical-align: middle;
  margin-left: 6px;
  animation: mod-caret 1.1s steps(2, end) infinite;
}
@keyframes mod-caret {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}


/* =========================================================
   9. CLOSING CTA — terminal node
   ---------------------------------------------------------
   The spine visually terminates into the closing CTA. We add
   a small "private beta access" badge above the headline so
   it reads as the final node.
   ========================================================= */
.closing-final {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 14px;
  border: 1px solid var(--signal-rule);
  background: var(--signal-weak);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal-ink);
  margin-bottom: 28px;
}
.closing-final .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(118,199,178,0.18), 0 0 10px var(--signal);
  animation: closing-final-pulse 2.4s ease-in-out infinite;
}
@keyframes closing-final-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(118,199,178,0.18), 0 0 10px var(--signal); }
  50%      { box-shadow: 0 0 0 6px rgba(118,199,178,0.04), 0 0 18px var(--signal); }
}
.closing-status {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.closing-status .ok { color: var(--signal-ink); }


/* =========================================================
   11. NARROW-SCREEN FINAL OVERRIDES
   ---------------------------------------------------------
   Lives at the END of the file, AFTER all base rules for
   .hero-chain, .hero-chain-arrow, .workflow-chip,
   .modules-index, etc. so the cascade is reliable.
   ========================================================= */

/* Hero chain: each step+arrow live in a non-breaking pair so
   an arrow can never wrap onto its own line as an orphan. */
.hero-chain-pair {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .hero-chain { gap: 4px 0; font-size: 9.5px; letter-spacing: 0.14em; }
  .hero-chain-arrow { margin: 0 10px; }
}

@media (max-width: 430px) {
  .hero-chain {
    font-size: 9px;
    letter-spacing: 0.12em;
    row-gap: 6px;
    column-gap: 0;
  }
  .hero-chain-arrow { margin: 0 8px; }
}

/* Below 360px the chain becomes a wrapped column of dot+label
   chips with no arrows at all — arrows are too noisy at that size. */
@media (max-width: 360px) {
  .hero-chain {
    flex-direction: row;
    flex-wrap: wrap;
    row-gap: 6px;
    column-gap: 12px;
  }
  .hero-chain-arrow { display: none; }
  .hero-chain-pair { gap: 0; }
}

/* Handoff strips at 430px and below — compact, no arrows */
@media (max-width: 430px) {
  .handoff { padding: 18px 0; }
  .handoff-events {
    font-size: 9px;
    letter-spacing: 0.12em;
    gap: 6px 12px;
    row-gap: 6px;
  }
  .handoff-events > .arr { display: none; }
  .handoff-checkpoint { font-size: 9.5px; letter-spacing: 0.14em; }
  .handoff-ts { font-size: 9px; letter-spacing: 0.12em; }
}

/* Workflow chip — tighter at 430px */
@media (max-width: 430px) {
  .workflow-chip { font-size: 9.5px; padding: 7px 10px; margin-bottom: 20px; }
}

/* Modules index — keep it on one logical line, no overflow */
@media (max-width: 430px) {
  .modules-index { font-size: 10.5px; gap: 6px 10px; }
  .modules-index .lbl, .modules-index .list { display: inline; }
}

/* Belt-and-braces: prevent any descendant from causing horizontal scroll */
@media (max-width: 430px) {
  body { overflow-x: hidden; }
}


/* =========================================================
   10. REDUCED MOTION
   ---------------------------------------------------------
   Already in platform.html: `* { animation: none !important;
   transition: none !important; }`. We additionally hard-fix
   states that depend on animations resolving:
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .op-spine-fill::after { animation: none; }
  .handoff[data-in-view="true"] .handoff-events::before { animation: none; opacity: 0; }
  .surface.dispatch .dp-grid .job.live::after { opacity: 0.35; }
  .surface.reporting .rep-flag::before { display: none; }
  .modules-index .caret { animation: none; opacity: 1; }
  .closing-final .dot { animation: none; }
  .surface .surface-head::after { display: none; }
  /* Section atmospheres still appear (they're not animated) */
  .workflow .workflow-bg { transition: none; }
  .workflow-stage::before { transition: none; }
}
