/* Hero "dock" tour. On first view, each layer's live preview takes over the illustration area
   while the stack docks in the corner as a navigator. No card: the preview sits straight on the hero.
   After the tour, the hero goes back to its small hover previews. */

.hero-art{isolation:isolate}
.stage{position:absolute;z-index:4;top:0;left:0;right:min(var(--gutter),40px);bottom:44px;display:flex;flex-direction:column;
  background:var(--paper);visibility:hidden}
.stage.on{visibility:visible}
.stage-media{position:relative;flex:1;min-height:0;overflow:hidden}
.stage-media iframe{position:absolute;left:0;top:0;border:0;transform-origin:0 0;pointer-events:none;background:transparent}
.stage-media video{position:absolute;left:0;top:9%;width:100%;height:82%;object-fit:cover;object-position:28% 50%}

/* Bottom row, open to the page: dock slot (the mini stack lands here), layer tabs, title and link */
.stage-bar{display:grid;grid-template-columns:96px minmax(0,1fr) auto;align-items:center;gap:18px;padding:10px 0 4px}
.dock-slot{width:96px;height:84px}
.tabs{display:flex;flex-direction:column;gap:2px;min-width:0}
.tabs button{all:unset;box-sizing:border-box;position:relative;display:block;cursor:pointer;padding:5px 0 6px;font-size:12.5px;color:var(--muted);transition:color .25s}
.tabs button:hover{color:var(--ink)}
.tabs button.on{color:var(--ink);font-weight:500}
.tabs button:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
.tabs button i{position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--line);overflow:hidden}
.tabs button i::after{content:"";position:absolute;inset:0;background:var(--orange);transform:scaleX(0);transform-origin:left}
.tabs button.done i::after{transform:none}
.tabs button.on i::after{animation:dock-t var(--dwell) linear forwards}
.stage.hold .tabs button.on i::after{animation-play-state:paused}
@keyframes dock-t{to{transform:scaleX(1)}}
.txt{text-align:right}
.txt .tt{font-size:15px;font-weight:500;letter-spacing:-.01em;white-space:nowrap}
.txt a{display:inline-block;margin-top:4px;font-size:12.5px;color:var(--orange-ink)}
.txt a::after{content:" →";color:var(--orange)}
.stage .stage-bar>*{transition:opacity .3s}
.stage:not(.ready) .stage-bar>:not(.dock-slot){opacity:0}

/* The stack flies into the dock slot and stays live above the stage */
.foundation{transform-origin:0 0;transition:transform .95s cubic-bezier(.65,0,.35,1)}
.hero-art.dockz .foundation{position:relative;z-index:5}
.hero-art.staged .labels,.hero-art.staged .routes,.hero-art.staged .nodes,.hero-art.staged .zaps,
.hero-art.staged .grid,.hero-art.staged .shadow{opacity:0;transition:opacity .25s}
.foundation .labels,.foundation .routes,.foundation .nodes,.foundation .grid,.foundation .shadow{transition:opacity .5s .45s}
.hero-art.staged .slab{opacity:.2;filter:saturate(.3)}
.hero-art.staged .slab.dock-on{opacity:1;filter:drop-shadow(0 0 40px rgba(236,88,44,.95)) drop-shadow(0 0 4px rgba(236,88,44,.9))}
.hero-art.staged .slab:hover{opacity:.9}
.hero-art.staged .foundation{cursor:pointer}
.hero-art.staged figcaption span:first-child{visibility:hidden}

@media (max-width:760px){
  .stage{right:0}
  .stage-bar{grid-template-columns:64px minmax(0,1fr);gap:12px}
  .dock-slot{width:64px;height:64px}
  .txt{display:none}
  .tabs button{font-size:11.5px;padding:4px 0 5px}
}
@media (prefers-reduced-motion:reduce){
  .foundation{transition:none}
}

/* Software at full size: the pulsing "Live demo" tag from the short peek, on the video's top-left corner */
.stage-media .live-tag{left:14px;top:calc(9% + 14px);z-index:1;padding:5px 10px 5px 9px;font-size:12px;gap:7px}
.stage-media .live-tag b{width:7px;height:7px}

/* Phones: a tap on the full-size preview shows a button into that layer's section (see hero-dock.js) */
.tap-cta{display:none}
@media (max-width:760px){
  .stage-media{cursor:pointer}
  .tap-cta{position:absolute;left:0;right:0;top:0;bottom:var(--bar-h,78px);z-index:3;display:grid;place-items:center;
    background:rgba(244,243,237,.55);opacity:0;pointer-events:none;transition:opacity .25s}
  .tap-cta .tap-btn{display:inline-flex;align-items:center;gap:12px;padding:15px 20px;background:var(--ink);color:var(--paper);
    font-size:14px;font-weight:500;transform:translateY(6px);transition:transform .3s var(--ease)}
  .tap-cta .tap-btn::after{content:"→";color:#ffb79f}
  .stage.tap-on .tap-cta{opacity:1;pointer-events:auto}
  .stage.tap-on .tap-cta .tap-btn{transform:none}
}

