/* Approved hero artwork and motion. */
.hero-motion-layer { position:absolute;inset:0 0 0 47%;z-index:0;pointer-events:none;overflow:hidden;opacity:.96;filter:saturate(.82) contrast(1.08); }
.hero-motion-layer>svg { display:block;width:100%;height:100%; }
body[data-branch="family"] .hero-motion-layer {opacity:1;filter:saturate(1.08) contrast(1.04);}
html[data-hero-motion="true"][data-skin="gridline"] body[data-branch="family"] .hero::before { background-image:linear-gradient(135deg,#e8e7fb,#c7cdfa 62%,#7982ea)!important;background-size:cover!important;background-position:center!important; }
html[data-hero-motion="true"][data-skin="gridline"] body:is([data-branch="insight"],[data-branch="flow"],[data-branch="delivery"]) .hero::before { background-image:none!important; }

@media(max-width:800px) { .hero-motion-layer {inset:auto 0 0;height:350px;} }
@media(max-width:1000px) { html[data-skin="gridline"] .masthead .contact-link {display:none!important;} }
/* hero-signals.css
   Additive motion rules for hero-family and hero-insight local preview.
   Parent handles layout, ID prefixing, data-in-view toggling, reduced-motion
   overrides via data-motion-override=true, and the shared rule:
     .motion-element { animation-play-state: var(--scene-play, paused) !important; }
   These rules never set animation-play-state. */

/* ---------- Shared keyframes ---------- */
@keyframes hero-signal-travel {
  0%   { stroke-dashoffset: 100; opacity: 0; }
  8%   { opacity: var(--signal-opacity, 1); }
  92%  { opacity: var(--signal-opacity, 1); }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

/* ---------- Default (Still / no mode): hide new motion paths ---------- */
.hero-family-transfer,
.hero-evidence-signal {
  opacity: 0;
  animation-name: hero-signal-travel;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: 0ms;
}

/* ================================================================
   hero-family: five travelling purple dots
   Dashoffset 100 -> 0 draws the single 0.001-long dash from path start
   to path end. Incoming curves (phase 0 & 1) are authored start=outer
   edge, end=centre hub, so dot travels inward. Outgoing arrows
   (phase 2,3,4) start at centre hub and end at arrow heads, so dot
   travels outward. Central hub and endpoint nodes remain static.
   ================================================================ */

:root[data-motion="lively"] .hero-family-transfer,
:root[data-motion="subtle"] .hero-family-transfer {
  --signal-opacity: 0.95;
}

/* Lively: 4.8s incoming, 3.6s outgoing */
:root[data-motion="lively"] .hero-family-transfer {
  animation-duration: 4.8s !important;
}
:root[data-motion="lively"] .hero-family-transfer[style*="--phase:2"],
:root[data-motion="lively"] .hero-family-transfer[style*="--phase:3"],
:root[data-motion="lively"] .hero-family-transfer[style*="--phase:4"] {
  animation-duration: 3.6s !important;
}

/* Subtle: 8s incoming, 6s outgoing */
:root[data-motion="subtle"] .hero-family-transfer {
  animation-duration: 8s !important;
}
:root[data-motion="subtle"] .hero-family-transfer[style*="--phase:2"],
:root[data-motion="subtle"] .hero-family-transfer[style*="--phase:3"],
:root[data-motion="subtle"] .hero-family-transfer[style*="--phase:4"] {
  animation-duration: 6s !important;
}

/* Phase offsets so the five signals never align (negative delays
   start them mid-cycle at page load). */
.hero-family-transfer[style*="--phase:0"] { animation-delay: 0s; }
.hero-family-transfer[style*="--phase:1"] { animation-delay: -1.9s; }
.hero-family-transfer[style*="--phase:2"] { animation-delay: -0.6s; }
.hero-family-transfer[style*="--phase:3"] { animation-delay: -1.8s; }
.hero-family-transfer[style*="--phase:4"] { animation-delay: -2.7s; }

/* ================================================================
   hero-insight: nine evidence signals, three per lane, masked by
   the lens occlusion so they vanish behind the metal rim and output
   node. Linear travel, cream/cyan/peach, opacity ~0.8.
   ================================================================ */

:root[data-motion="lively"] .hero-evidence-signal,
:root[data-motion="subtle"] .hero-evidence-signal {
  --signal-opacity: 0.8;
}

:root[data-motion="lively"] .hero-evidence-signal {
  animation-duration: 7.2s !important;
}
:root[data-motion="subtle"] .hero-evidence-signal {
  animation-duration: 11s !important;
}

/* Stagger: three equally spaced phases per lane, lanes offset
   slightly so lanes don't fire in lockstep. Negative delays compute
   against the active duration. */
.hero-evidence-signal[style*="--phase:0"] { animation-delay: 0s; }
.hero-evidence-signal[style*="--phase:1"] { animation-delay: -2.4s; }
.hero-evidence-signal[style*="--phase:2"] { animation-delay: -4.8s; }

.hero-evidence-signal[style*="--lane:1"][style*="--phase:0"] { animation-delay: -0.8s; }
.hero-evidence-signal[style*="--lane:1"][style*="--phase:1"] { animation-delay: -3.2s; }
.hero-evidence-signal[style*="--lane:1"][style*="--phase:2"] { animation-delay: -5.6s; }

.hero-evidence-signal[style*="--lane:2"][style*="--phase:0"] { animation-delay: -1.6s; }
.hero-evidence-signal[style*="--lane:2"][style*="--phase:1"] { animation-delay: -4.0s; }
.hero-evidence-signal[style*="--lane:2"][style*="--phase:2"] { animation-delay: -6.4s; }

/* Motion uses the original cut-out pixels. Only transforms and opacity vary. */
@keyframes hero-card-orange {
  0% { transform:translate(562px,659px) scale(1) rotate(0deg); opacity:0; }
  4% { opacity:1; }
  8% { transform:translate(650px,634px) scale(1) rotate(0deg); }
  16% { transform:translate(722px,580px) scale(.98) rotate(-4deg); }
  24% { transform:translate(852px,515px) scale(.96) rotate(0deg); }
  34% { transform:translate(1004px,483px) scale(.93) rotate(0deg); }
  43% { transform:translate(1129px,415px) scale(.88) rotate(-4deg); }
  52% { transform:translate(1254px,355px) scale(.84) rotate(0deg); }
  61% { transform:translate(1384px,318px) scale(.8) rotate(0deg); }
  70% { transform:translate(1510px,276px) scale(.75) rotate(-5deg); }
  75% { transform:translate(1534px,251px) scale(.71) rotate(-6deg); }
  81% { transform:translate(1488px,218px) scale(.67) rotate(-8deg); }
  86% { transform:translate(1436px,188px) scale(.64) rotate(-8deg); }
  91% { transform:translate(1469px,157px) scale(.6) rotate(-5deg); }
  96% { transform:translate(1548px,131px) scale(.56) rotate(-4deg); opacity:1; }
  100% { transform:translate(1575px,102px) scale(.52) rotate(-4deg); opacity:0; }
}
@keyframes hero-card-blue {
  0% { transform:translate(548px,685px) scale(1); opacity:0; }
  7% { opacity:1; }
  19% { transform:translate(680px,699px) scale(1); }
  38% { transform:translate(813px,648px) scale(.98); }
  60% { transform:translate(981px,576px) scale(.94); }
  83% { transform:translate(1133px,552px) scale(.88); opacity:1; }
  100% { transform:translate(1260px,519px) scale(.8); opacity:0; }
}
@keyframes hero-card-green {
  0% { transform:translate(545px,749px) scale(1.05); opacity:0; }
  7% { opacity:1; }
  22% { transform:translate(674px,767px) scale(1.03); }
  42% { transform:translate(792px,751px) scale(1); }
  62% { transform:translate(910px,738px) scale(.96); }
  81% { transform:translate(1007px,701px) scale(.92); opacity:1; }
  100% { transform:translate(1142px,678px) scale(.85); opacity:0; }
}
.hero-flow-card { transform-box:view-box; transform-origin:0 0; }
:root[data-motion="lively"] .hero-card-orange { animation:hero-card-orange 18s linear infinite; animation-duration:18s!important; animation-delay:calc(var(--phase)*-6s); }
:root[data-motion="lively"] .hero-card-blue { animation:hero-card-blue 14s linear infinite; animation-duration:14s!important; animation-delay:-4s; }
:root[data-motion="lively"] .hero-card-green { animation:hero-card-green 16s linear infinite; animation-duration:16s!important; animation-delay:-9s; }
@keyframes hero-piece-hover { 0%,100% {transform:translateY(0);} 50% {transform:translateY(var(--float));} }
:root[data-motion="lively"] .hero-hover-piece { transform-box:view-box; transform-origin:center; animation:hero-piece-hover 6.2s ease-in-out infinite; animation-duration:6.2s!important; animation-delay:calc(var(--phase)*-1.55s); }
