/* SquashScope v0.93 — image-led overview, replayable scenes, calibrated media geometry. */

html { scroll-behavior: smooth; }

/* Full-viewport, product-like pipeline overview. */
.pipeline-overview--showcase {
  min-height: calc(100svh - 64px); height: calc(100svh - 64px); padding: clamp(28px,4vh,46px) clamp(28px,4.7vw,76px) 20px;
  display: grid; grid-template-rows: auto minmax(0,1fr) 50px; gap: clamp(18px,2.5vh,30px); overflow: hidden;
  background: radial-gradient(circle at 78% 8%,rgba(250,229,87,.14),transparent 22%),#f5f6f1;
}
.pipeline-showcase__intro { display:flex; align-items:end; justify-content:space-between; gap:50px; }
.pipeline-showcase__intro h1 { margin:7px 0 0; max-width:850px; font-size:clamp(45px,5.4vw,78px); line-height:.88; letter-spacing:-.067em; }
.pipeline-showcase__intro > p { max-width:410px; margin:0 0 3px; color:#687168; font-size:13px; line-height:1.55; }
.pipeline-showcase { min-height:0; display:flex; border-block:1px solid rgba(35,42,35,.24); overflow:hidden; }
.pipeline-showcase__stage { position:relative; min-width:0; flex:1 1 20%; overflow:hidden; border-right:1px solid rgba(240,243,238,.44); color:#fff; text-decoration:none; isolation:isolate; transition:flex 620ms cubic-bezier(.2,.78,.18,1),filter 420ms ease; }
.pipeline-showcase__stage:last-child { border-right:0; }
.pipeline-showcase:has(.pipeline-showcase__stage:hover) .pipeline-showcase__stage:not(:hover) { flex:.82 1 16%; filter:saturate(.72) brightness(.78); }
.pipeline-showcase__stage:hover { flex:1.55 1 31%; }
.pipeline-showcase__stage > video,.pipeline-showcase__stage > img,.pipeline-showcase__stage > iframe { position:absolute; z-index:-3; inset:0; width:100%; height:100%; border:0; object-fit:cover; pointer-events:none; filter:saturate(.72) contrast(1.02); transform:scale(1.035); transition:transform 900ms cubic-bezier(.2,.8,.2,1),filter 500ms ease; }
.pipeline-showcase__stage:hover > video,.pipeline-showcase__stage:hover > img,.pipeline-showcase__stage:hover > iframe { transform:scale(1); filter:saturate(.92) contrast(1.03); }
.pipeline-showcase__stage:nth-child(3) > iframe { width:135%; left:-17.5%; }
.pipeline-showcase__shade { position:absolute; z-index:-2; inset:0; background:linear-gradient(180deg,rgba(12,17,12,.02) 20%,rgba(12,17,12,.2) 53%,rgba(10,14,10,.9) 100%); }
.pipeline-showcase__stage > b { position:absolute; top:18px; left:18px; width:29px; height:29px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.55); border-radius:50%; background:rgba(15,20,15,.2); backdrop-filter:blur(10px); font:740 8px/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.pipeline-showcase__stage > div { position:absolute; right:18px; bottom:20px; left:18px; display:grid; align-content:end; gap:8px; }
.pipeline-showcase__stage small { color:#fae557; font:750 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.15em; }
.pipeline-showcase__stage h2 { margin:0; max-width:240px; font-size:clamp(15px,1.3vw,21px); line-height:1.02; letter-spacing:-.035em; }
.pipeline-showcase__stage p { max-width:240px; max-height:0; margin:0; overflow:hidden; color:rgba(255,255,255,.7); font-size:9px; line-height:1.45; opacity:0; transform:translateY(8px); transition:max-height 520ms ease,opacity 380ms ease,transform 520ms cubic-bezier(.2,.8,.2,1); }
.pipeline-showcase__stage em { color:#fff; font:normal 720 8px/1 ui-monospace,SFMono-Regular,Menlo,monospace; opacity:.55; }
.pipeline-showcase__stage:hover p { max-height:50px; opacity:1; transform:none; }
.pipeline-showcase__stage:hover em { color:#fae557; opacity:1; }
.pipeline-showcase__trace,.pipeline-showcase__contacts { position:absolute; z-index:-1; inset:0; pointer-events:none; }
.pipeline-showcase__trace i { position:absolute; width:7px; height:7px; border-radius:50%; background:#fae557; box-shadow:0 0 0 4px rgba(250,229,87,.13); }
.pipeline-showcase__trace i:nth-child(1){left:42%;top:43%;opacity:.28}.pipeline-showcase__trace i:nth-child(2){left:48%;top:41%;opacity:.44}.pipeline-showcase__trace i:nth-child(3){left:54%;top:39%;opacity:.62}.pipeline-showcase__trace i:nth-child(4){left:60%;top:37%;opacity:.8}.pipeline-showcase__trace i:nth-child(5){left:66%;top:35%}
.pipeline-showcase__contacts i { position:absolute; width:9px; height:9px; border-radius:50%; background:#39ff14; box-shadow:0 0 0 5px rgba(57,255,20,.12); }.pipeline-showcase__contacts i:nth-child(1){left:31%;top:38%}.pipeline-showcase__contacts i:nth-child(2){left:56%;top:44%}.pipeline-showcase__contacts i:nth-child(3){left:67%;top:31%;background:#ff4646;box-shadow:0 0 0 5px rgba(255,70,70,.13)}.pipeline-showcase__contacts i:nth-child(4){left:42%;top:52%;background:#ff4646;box-shadow:0 0 0 5px rgba(255,70,70,.13)}
.pipeline-showcase__cue { position:static!important; justify-self:center; align-self:center; transform:none!important; }

/* Low-noise scene utilities. */
.scene-tools { position:absolute; z-index:25; inset:0; pointer-events:none; }
.scene-tools > * { pointer-events:auto; }
.scene-tools__back,.scene-tools__replay { position:absolute; min-height:32px; display:inline-flex; align-items:center; gap:7px; padding:5px 10px; border:1px solid rgba(38,45,38,.14); border-radius:999px; background:rgba(247,248,245,.54); color:#687068; text-decoration:none; backdrop-filter:blur(10px); cursor:pointer; opacity:.62; transition:opacity 180ms ease,background 180ms ease,transform 220ms ease; }
.scene-tools__replay { top:5px; right:0; }
.scene-tools__back { top:50%; left:-8px; transform:translateY(-50%); }
.scene-tools__replay:hover { opacity:1; background:#fffbe0; transform:translateY(-1px); }
.scene-tools__back:hover { opacity:1; background:#fffbe0; transform:translate(4px,-50%); }
.scene-tools span { font-size:14px; line-height:1; }.scene-tools b { font:720 8px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.05em; text-transform:uppercase; }
.scene-tools--stage4 { inset:78px clamp(28px,5vw,82px) 38px; }

/* Round guided next control; stage finales become centered downward cues. */
@media (min-width:981px) {
  .stage1-edge-next:not(.stage1-next-stage),.stage2-edge-next:not(.stage2-next-stage),.stage3-edge-next:not(.stage3-next-stage),.stage5-edge-next:not(.stage5-next-stage) {
    top:50%!important; right:calc(-1 * clamp(30px,4.2vw,68px) - 18px)!important; width:58px!important; min-height:58px!important; height:58px; padding:0 15px!important; gap:9px!important; overflow:hidden;
    justify-content:flex-start; border:1px solid rgba(123,108,0,.25)!important; border-radius:999px!important; background:#fae557!important; transform:translateY(-50%)!important; box-shadow:0 13px 34px rgba(101,89,0,.16)!important;
    transition:width 420ms cubic-bezier(.2,.8,.2,1),right 420ms cubic-bezier(.2,.8,.2,1),opacity 180ms ease!important;
  }
  .stage1-edge-next:not(.stage1-next-stage)::before,.stage2-edge-next:not(.stage2-next-stage)::before,.stage3-edge-next:not(.stage3-next-stage)::before,.stage5-edge-next:not(.stage5-next-stage)::before { content:""; position:absolute; inset:5px; width:46px; height:46px; border:1px solid transparent; border-top-color:rgba(42,48,42,.65); border-right-color:rgba(42,48,42,.24); border-radius:50%; animation:scope-orbit 2.6s linear infinite; }
  .stage1-edge-next:not(.stage1-next-stage) svg,.stage2-edge-next:not(.stage2-next-stage) svg,.stage3-edge-next:not(.stage3-next-stage) svg,.stage5-edge-next:not(.stage5-next-stage) svg { position:relative; z-index:2; width:27px!important; flex:0 0 27px!important; }
  .stage1-edge-next:not(.stage1-next-stage) span,.stage2-edge-next:not(.stage2-next-stage) span,.stage3-edge-next:not(.stage3-next-stage) span,.stage5-edge-next:not(.stage5-next-stage) span { order:2; min-width:100px; opacity:0; transform:translateX(12px); transition:opacity 220ms ease,transform 340ms ease; }
  .stage1-edge-next:not(.stage1-next-stage):hover,.stage2-edge-next:not(.stage2-next-stage):hover,.stage3-edge-next:not(.stage3-next-stage):hover,.stage5-edge-next:not(.stage5-next-stage):hover { right:calc(-1 * clamp(30px,4.2vw,68px) - 2px)!important; width:184px!important; }
  .stage1-edge-next:not(.stage1-next-stage):hover span,.stage2-edge-next:not(.stage2-next-stage):hover span,.stage3-edge-next:not(.stage3-next-stage):hover span,.stage5-edge-next:not(.stage5-next-stage):hover span { opacity:1; transform:none; }
  .stage1-edge-next:disabled,.stage2-edge-next:disabled,.stage3-edge-next:disabled,.stage5-edge-next:disabled { background:#eef0eb!important; opacity:.22!important; }
}
@keyframes scope-orbit { to { transform:rotate(1turn); } }

.stage1-next-stage,.stage2-next-stage,.stage3-next-stage,.stage5-next-stage,.stage-finale-cue {
  top:auto!important; right:auto!important; bottom:4px!important; left:50%!important; width:190px!important; min-height:52px!important; display:flex!important; flex-direction:column-reverse; justify-content:center!important; gap:5px!important; padding:7px!important; border:0!important; border-radius:0!important; background:transparent!important; box-shadow:none!important; transform:translateX(-50%)!important; text-align:center;
}
.stage1-next-stage span,.stage2-next-stage span,.stage3-next-stage span,.stage5-next-stage span,.stage-finale-cue span { color:#687068!important; font:760 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace!important; letter-spacing:.13em!important; text-transform:uppercase; }
.stage1-next-stage svg,.stage2-next-stage svg,.stage3-next-stage svg,.stage5-next-stage svg,.stage-finale-cue svg { width:24px!important; transform:rotate(90deg); animation:scope-drop 1.55s ease-in-out infinite; }
.stage-finale-cue { height:52px!important; max-height:52px; overflow:hidden; }
.stage-finale-cue svg { height:22px!important; transform:none; animation:finale-drop 1.55s ease-in-out infinite; }
.stage-finale-cue[aria-disabled="true"] { opacity:.42!important; }
@keyframes finale-drop { 0%,100%{transform:translateY(0)}50%{transform:translateY(5px)} }
@keyframes scope-drop { 0%,100%{transform:rotate(90deg) translateX(0)}50%{transform:rotate(90deg) translateX(5px)} }

/* Stage 02: one video and one concise evidence column. */
.stage2-sidewall-evidence > header strong { font-size:clamp(15px,1.25vw,20px)!important; }
.stage2-sidewall-logic li { grid-template-columns:24px minmax(0,1fr) auto!important; padding:15px 2px!important; }
.stage2-sidewall-evidence .stage2-window-key { justify-content:flex-start!important; gap:22px!important; }

/* Stage 03: preserve the true 16:9 evidence coordinate system. */
@media (min-width:981px) {
  .stage3-rule-layout,.stage3-frontwall-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important; grid-template-rows:auto auto auto!important; width:min(100%,1240px)!important; }
  .stage3-rule-guide,.stage3-video-evidence { width:100%; height:auto!important; min-height:0!important; aspect-ratio:16/9!important; align-self:center; }
  .stage3-rule-guide__video,.stage3-video-evidence > video { width:100%; height:100%; object-fit:contain!important; background:#171c17; }
  .stage3-video-evidence > canvas { position:absolute; inset:0; width:100%; height:100%; }
  .stage3-evidence-strip,.stage3-interval-checks { min-height:84px!important; margin-top:0!important; }
}

/* Stage 04: every layer appears on the same source video. */
.stage4-compose { min-height:calc(100svh - 66px); padding:clamp(78px,8vh,106px) clamp(28px,5vw,82px) 72px!important; }
.stage4-compose__header { margin-bottom:18px!important; }
.stage4-live { max-width:1240px; margin:0 auto; }
.stage4-live__media { position:relative; width:min(100%,1040px); aspect-ratio:16/9; margin:0 auto; overflow:hidden; border:1px solid rgba(31,38,31,.62); border-radius:7px; background:#151a15; box-shadow:0 25px 64px rgba(24,30,24,.14); }
.stage4-live__media video,.stage4-live__media canvas { position:absolute; inset:0; width:100%; height:100%; display:block; object-fit:contain; }
.stage4-live__media canvas { z-index:2; pointer-events:none; }.stage4-live__media figcaption { position:absolute; z-index:4; right:0; bottom:0; left:0; height:42px; padding:0 14px; display:flex; align-items:center; justify-content:space-between; color:rgba(255,255,255,.72); background:rgba(15,20,15,.82); font:740 8px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.07em; }.stage4-live__media figcaption b{color:#fae557}
.stage4-live__play { position:absolute; z-index:6; top:50%; left:50%; min-width:292px; display:grid; grid-template-columns:22px auto; gap:4px 11px; align-items:center; padding:14px 16px; border:1px solid rgba(95,84,0,.38); border-radius:999px; background:rgba(250,229,87,.94); color:#202520; text-align:left; transform:translate(-50%,-50%); box-shadow:0 17px 44px rgba(25,30,25,.2); backdrop-filter:blur(12px); cursor:pointer; transition:transform 220ms ease,opacity 240ms ease; }
.stage4-live__play:hover { transform:translate(-50%,-50%) scale(1.025); }.stage4-live__play strong,.stage4-live__play small{grid-column:2}.stage4-live__play strong{font-size:11px}.stage4-live__play small{color:#635c1c;font-size:7px}.stage4-live__play.is-processing .stage4-process-spinner{animation:stage4Spin .75s linear infinite}.stage4-live[data-stage4-state="complete"] .stage4-live__play{top:16px;left:16px;min-width:238px;opacity:.9;transform:none}.stage4-live[data-stage4-state="complete"] .stage4-live__play:hover{transform:scale(1.02)}
.stage4-live__rail { width:min(100%,1120px); margin:16px auto 0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); border-block:1px solid rgba(36,43,36,.18); }
.stage4-live__rail button { min-width:0; min-height:68px; display:grid; grid-template-columns:25px minmax(0,1fr) 9px; align-items:center; gap:9px; padding:10px 12px; border:0; border-right:1px solid rgba(36,43,36,.13); background:transparent; color:#252b25; text-align:left; cursor:pointer; transition:background 220ms ease,transform 220ms ease; }.stage4-live__rail button:last-child{border-right:0}.stage4-live__rail button:hover{background:rgba(250,229,87,.11)}.stage4-live__rail button.is-active{background:rgba(250,229,87,.2)}
.stage4-live__rail button>b{color:#7c837c;font:750 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.stage4-live__rail button span{min-width:0;display:grid;gap:4px}.stage4-live__rail strong{font-size:10px;white-space:nowrap}.stage4-live__rail small{overflow:hidden;color:#777e77;font:680 6px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;text-overflow:ellipsis;white-space:nowrap}.stage4-live__rail i{width:8px;height:8px;border:1px solid #959c95;border-radius:50%;transition:background 220ms ease,box-shadow 220ms ease}.stage4-live__rail button.is-active i{border-color:#b9a500;background:#fae557;box-shadow:0 0 0 4px rgba(250,229,87,.2)}
.stage4-live .stage4-compose__readout { width:min(100%,1120px); margin:0 auto!important; }
.stage4-compose__verdict { opacity:.96; }.stage4-live[data-stage4-state="idle"] .stage4-compose__verdict { border-left-color:#8e968e; opacity:.72; }
.stage4-compose__next { display:flex!important; }
.stage4-compose__next[aria-disabled="true"] { opacity:.28!important; pointer-events:none; }

/* Stage 05: calibration is visible, and the matrix follows every projection. */
.stage5-anchor-loupe { position:absolute; z-index:6; top:17px; right:17px; width:156px; aspect-ratio:1; overflow:visible; border:5px solid rgba(255,255,255,.92); border-radius:50%; background:#171c17; box-shadow:0 18px 48px rgba(13,17,13,.28),0 0 0 1px rgba(37,44,37,.32); animation:anchor-arrival 1.8s cubic-bezier(.2,.8,.2,1) both; }
.stage5-anchor-loupe::after { content:""; position:absolute; right:100%; bottom:16%; width:245px; height:1px; background:linear-gradient(90deg,rgba(250,229,87,.95),rgba(250,229,87,.3) 72%,#fae557); transform:rotate(-18deg); transform-origin:right; }
.stage5-anchor-loupe canvas { width:100%; height:100%; display:block; border-radius:50%; }.stage5-anchor-loupe span { position:absolute; right:5px; bottom:5px; left:5px; padding:24px 8px 11px; border-radius:0 0 999px 999px; background:linear-gradient(transparent,rgba(10,14,10,.88)); color:#fff; font:740 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.06em; text-align:center; }
@keyframes anchor-arrival { 0%{opacity:0;transform:scale(.2) translate(95px,-70px)}48%{opacity:1;transform:scale(1.08) translate(0)}70%,100%{opacity:1;transform:scale(1)} }
.stage5-matrix-preview { padding:18px 20px!important; background:#eef3ed!important; border-left:3px solid #d8c31b!important; }.stage5-matrix-preview code { color:#253025!important; font-size:clamp(13px,1vw,16px)!important; line-height:1.72!important; letter-spacing:.015em; }
.stage5-calibration-stage { aspect-ratio:16/9; }.stage5-calibration-stage > img{object-fit:contain!important;background:#171c17}
.stage5-calibration-stage .stage5-visual-action { background:#fae557!important;color:#252b25!important;border-color:#b8a400!important;border-radius:999px!important; }.stage5-calibration-stage .stage5-visual-action small{color:rgba(37,43,37,.62)!important}.stage5-calibration-stage .stage5-process-spinner{border-color:rgba(37,43,37,.2);border-top-color:#252b25}
.stage5-matrix-bridge { position:absolute; z-index:2; top:15px; right:9px; left:9px; display:grid; gap:6px; padding:11px 12px; border-left:3px solid #d4bd17; background:rgba(255,255,255,.84); backdrop-filter:blur(10px); }.stage5-matrix-bridge small{color:#747c74;font:720 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em}.stage5-matrix-bridge strong{font-size:11px}
.stage5-reconstruct-action { top:58%!important; min-width:188px!important; border-radius:999px!important; background:#fae557!important; border-color:#b8a400!important; }
.stage5-transform-chain { grid-column:1/-1; grid-row:2; display:grid; grid-template-columns:minmax(120px,1fr) 24px minmax(170px,1.15fr) 24px minmax(140px,1fr) 24px minmax(120px,.8fr); align-items:stretch; gap:9px; }
.stage5-transform-chain>span { display:grid; place-content:center; gap:7px; min-height:54px; padding:10px 13px; border-block:1px solid rgba(37,44,37,.16); }.stage5-transform-chain>span.is-matrix{background:#eef3ed;border-left:3px solid #d8c31b}.stage5-transform-chain small{color:#747c74;font:720 8px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.07em}.stage5-transform-chain strong{font-size:12px}.stage5-transform-chain>i{align-self:center;color:#8b928b;font:normal 16px/1 ui-monospace,SFMono-Regular,Menlo,monospace;text-align:center}.stage5-transform-chain.is-running .is-matrix{animation:matrix-pulse 1.1s ease-in-out 2}
@keyframes matrix-pulse{50%{background:#fff4a3;box-shadow:0 0 0 7px rgba(250,229,87,.16)}}
.stage5-replay-layout { grid-template-rows:auto auto minmax(0,1fr) auto 38px!important; row-gap:8px!important; }.stage5-event-ledger{grid-column:1;grid-row:3}.stage5-replay-stage{grid-column:2!important;grid-row:3!important}.stage5-replay-controls{grid-column:2!important;grid-row:4!important}.stage5-replay-layout .stage5-next-stage{position:static!important;grid-column:1/-1;grid-row:5;justify-self:center;align-self:end;bottom:auto!important;left:auto!important;transform:none!important;min-height:36px!important;height:36px!important;padding:2px!important}

/* Quieter, smoother hand-offs between stages. */
.pipeline-transition { min-height:42svh; display:grid; place-content:center; justify-items:center; text-align:center; background:linear-gradient(180deg,#f7f8f5,#f1f3ee); }
.pipeline-transition h2 { max-width:760px; }.pipeline-transition p { max-width:590px; }.pipeline-transition a { margin-top:22px!important; display:flex!important; flex-direction:column; align-items:center; gap:9px; color:#656d65!important; background:transparent!important; }
.pipeline-transition a span { font-size:21px; animation:transition-drop 1.55s ease-in-out infinite; }
@keyframes transition-drop{50%{transform:translateY(6px)}}

@media(max-width:980px){.pipeline-overview--showcase,.stage4-compose{display:none!important}}
@media(max-height:760px) and (min-width:981px){.pipeline-overview--showcase{padding-top:22px;gap:14px}.pipeline-showcase__intro h1{font-size:49px}.pipeline-showcase__stage>div{bottom:14px}.stage4-compose{padding-top:70px!important;padding-bottom:56px!important}.stage4-live__media{width:min(100%,700px)}.stage4-live__rail{margin-top:9px}.stage4-live__rail button{min-height:50px;padding-block:6px}.stage4-compose__readout{min-height:34px!important}.stage5-anchor-loupe{width:124px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important}.pipeline-showcase__stage,.pipeline-showcase__stage>*{transition:none!important}.stage5-anchor-loupe,.stage1-edge-next::before,.stage2-edge-next::before,.stage3-edge-next::before,.stage5-edge-next::before{animation:none!important}}
