/* =============================================================
   ZARAS — /platform — Operating Layer (v5)
   ----------------------------------------------------------
   v5: Orphan sweep alongside the §04 mobile rework. Removed
   six dead selector groups left by the §04 redesign — the
   §4 workflow-meta head column, §7 .workflow-chip, §8
   .modules-index, the .surface.reporting .rep-flag shimmer,
   and the .handoff--qualifier variant — plus their narrow-
   screen + reduced-motion overrides and cascade-hint
   comments. Also swept the §03 leftovers: the iv-settle
   ledger-row animation (+ @keyframes) and the .iv-progress
   payment-row block, orphaned when §03 replaced .surface.invoice
   with .gp-doc. Zero HTML/JS consumers (verified). (v3–v4: see
   git log.)
   ----------------------------------------------------------
   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; }
}


/* =========================================================
   1b. MOBILE JOURNEY RAIL  (.op-journey)   [v4]
   ---------------------------------------------------------
   Slim sticky horizontal progress path (Intake → Dispatch →
   Invoice → Pulse) shown ONLY <1360px — exactly the band where
   the desktop .op-spine above is hidden, so there is never a
   width with neither and never one with both. Sits directly
   beneath the sticky site-nav. The active/passed step state is
   written by operating-layer.v2.js from the SAME activeId it
   computes for the spine — there is NO second IntersectionObserver.

   ⚠ DISTINCT from the `operating-rail` module (the tablist /
   tabpanel phase navigator on company.html — js/operating-rail.*,
   css/operating-rail.v1.css). Similar family, different component.
   Do NOT share classes or wire them together.
   ========================================================= */
:root { --op-journey-h: 0px; }   /* rail height; folded into scroll-padding only while shown */

.op-journey { display: none; }   /* desktop: hidden (spine takes over ≥1360px) */

@media (max-width: 1359.98px) {
  :root { --op-journey-h: 44px; }

  /* Anchor jumps must clear BOTH the sticky nav and this rail.
     site-nav.v9.css sets html{scroll-padding-top:96px}; this stylesheet
     loads AFTER it (platform-only) so this equal-specificity rule wins
     while the rail is shown. */
  html { scroll-padding-top: calc(96px + var(--op-journey-h)); }

  .op-journey {
    display: block;
    position: sticky;
    /* Below the 80px nav row + its iOS safe-area inset (site-nav.v9.css). */
    top: calc(80px + env(safe-area-inset-top));
    z-index: 40;            /* under site-nav (z 50), over page content */
    height: var(--op-journey-h);
    background: color-mix(in oklab, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
  }
  .op-journey-track {
    list-style: none;
    margin: 0 auto;
    padding: 0 max(16px, env(safe-area-inset-left));
    height: 100%;
    max-width: var(--maxw);
    display: flex;
    align-items: stretch;
  }
  .op-journey-step { flex: 1 1 0; display: flex; }
  .op-journey-step a {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-mute);
    transition: color 300ms ease;
  }
  /* A node dot leads each label so the row reads as a progress PATH,
     not a nav menu — it fills with --signal as the section passes. */
  .op-journey-step a::before {
    content: "";
    flex: none;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--rule-hi);
    transition: background 300ms ease, box-shadow 300ms ease;
  }
  .op-journey-step[data-passed="true"] a        { color: var(--ink-sub); }
  .op-journey-step[data-passed="true"] a::before { background: var(--signal-rule); }
  .op-journey-step[data-active="true"] a         { color: var(--signal); }
  .op-journey-step[data-active="true"] a::before {
    background: var(--signal);
    box-shadow: 0 0 0 3px var(--signal-weak);
  }
}

@media (prefers-reduced-motion: reduce) {
  .op-journey-step a,
  .op-journey-step a::before { transition: none; }
}

/* Anchor-jump clearance base is owned by site-nav.v9.css
   (html{scroll-padding-top} — applies to every page that loads the nav);
   the rail block above adds a platform-only override while it is shown. */


/* =========================================================
   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 — see
   "11. NARROW-SCREEN FINAL OVERRIDES".) */

/* 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; }


/* =========================================================
   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; }
}

/* =========================================================
   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; }


/* =========================================================
   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, 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; }
}

/* Belt-and-braces: prevent any descendant from causing horizontal scroll.
   v3: clip not hidden — `hidden` computes overflow-y:auto, making <body> a
   scroll container (broke the old window.scrollY nav toggle on ≤430 + sticky
   risk); `clip` doesn't. (Toggle is now scroller-agnostic in site-nav.v4.js.) */
@media (max-width: 430px) {
  body { overflow-x: clip; }
}


/* =========================================================
   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; }
  .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; }
}
