/* ==========================================================================
   SciMynd V1 -- showcase components

   The screenshot carousel (/features) and the chaptered video tour
   (/anatomy-3d-viewer) are the only two media components the design source does
   not cover, so they are built here rather than in site.css: nothing else on the
   site loads them, and site.css is already the largest asset on every page.

   Every value is a site.css token. Nothing here re-declares a colour, radius or
   shadow -- if the palette moves, these move with it.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Screenshot carousel
   -------------------------------------------------------------------------- */
.shots{
  position:relative;
  background:var(--bg-mono);
  border:1px solid var(--line);
  border-radius:var(--r-card);
  box-shadow:var(--sh-card);
  overflow:hidden;
}

/* The clipping element is separate from .shots so the arrows, which sit outside
   the track, are not clipped along with it. */
.shots-view{overflow:hidden;}

.shots-track{
  display:flex;
  transition:transform .55s cubic-bezier(.4,0,.2,1);
}
@media (prefers-reduced-motion:reduce){
  .shots-track{transition:none;}
}

.shots-slide{
  min-width:100%;
  padding:clamp(16px,2.2vw,28px);
  cursor:zoom-in;
}
.shots-slide img{
  width:100%;height:auto;
  border-radius:var(--r-md);
  border:1px solid var(--line-strong);
  background:#fff;
}

.shots-prev,.shots-next{
  position:absolute;top:calc(50% - 34px);
  width:44px;height:44px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:#fff;border:1px solid var(--line-strong);
  color:var(--navy);cursor:pointer;
  box-shadow:0 12px 26px -16px rgba(14,22,56,0.4);
  transition:border-color .2s ease,color .2s ease,transform .2s ease;
}
.shots-prev{left:14px;}
.shots-next{right:14px;}
.shots-prev:hover,.shots-next:hover{border-color:var(--blue);color:var(--blue);}
.shots-prev svg,.shots-next svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}

.shots-foot{
  display:flex;align-items:center;gap:16px;
  padding:14px clamp(16px,2.2vw,24px);
  border-top:1px solid var(--line);
  background:#fff;
}
.shots-caption{
  flex:1;min-width:0;
  font-size:13.5px;font-weight:600;color:var(--text-body);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.shots-dots{display:flex;gap:7px;flex-wrap:wrap;justify-content:center;}
.shots-dot{
  width:8px;height:8px;padding:0;border-radius:50%;
  background:var(--line-strong);border:none;cursor:pointer;
  transition:background .2s ease,width .2s ease;
}
.shots-dot.is-active{width:22px;border-radius:var(--pill);background:var(--blue);}
.shots-expand{
  width:36px;height:36px;border-radius:10px;flex:none;
  display:flex;align-items:center;justify-content:center;
  background:none;border:1px solid var(--line-strong);
  color:var(--text-muted);cursor:pointer;
  transition:border-color .2s ease,color .2s ease;
}
.shots-expand:hover{border-color:var(--blue);color:var(--blue);}
.shots-expand svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}

/* Below the arrows' comfortable reach the footer stacks instead of squeezing the
   caption to nothing. */
@media (max-width:640px){
  .shots-prev,.shots-next{display:none;}
  .shots-foot{flex-wrap:wrap;justify-content:center;}
  .shots-caption{flex:1 0 100%;text-align:center;white-space:normal;}
}

/* --------------------------------------------------------------------------
   Lightbox -- shared by the carousel (images) and the tour (video)
   -------------------------------------------------------------------------- */
.lightbox{
  position:fixed;inset:0;z-index:200;
  display:none;align-items:center;justify-content:center;
  padding:var(--gutter);
  background:rgba(8,16,43,0.72);
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
}
.lightbox[data-open="true"]{display:flex;}
.lightbox-panel{
  position:relative;
  width:min(1100px,100%);max-height:100%;
  display:flex;flex-direction:column;
  background:#fff;border-radius:var(--r-panel);overflow:hidden;
  box-shadow:var(--sh-menu);
}
.lightbox-head{
  display:flex;align-items:center;gap:16px;
  padding:16px 20px;border-bottom:1px solid var(--line);
}
.lightbox-title{
  flex:1;min-width:0;
  font-size:14px;font-weight:700;color:var(--navy);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.lightbox-close{
  width:36px;height:36px;border-radius:10px;flex:none;
  display:flex;align-items:center;justify-content:center;
  background:none;border:1px solid var(--line-strong);
  color:var(--text-muted);font-size:20px;line-height:1;cursor:pointer;
  transition:border-color .2s ease,color .2s ease;
}
.lightbox-close:hover{border-color:var(--blue);color:var(--blue);}
.lightbox-body{overflow:auto;background:var(--bg-mono);}
.lightbox-body img,.lightbox-body video{width:100%;height:auto;display:block;}

/* --------------------------------------------------------------------------
   Chaptered video tour
   -------------------------------------------------------------------------- */

/* Reading-progress rail. Hidden until the first chapter is reached, so it does
   not sit at 0% under the hero looking broken. */
.tour-progress{
  position:fixed;top:var(--header-h);left:0;right:0;z-index:110;
  height:3px;background:transparent;
  opacity:0;transition:opacity .3s ease;
  pointer-events:none;
}
.tour-progress.is-visible{opacity:1;}
.tour-progress span{
  display:block;height:100%;width:0;
  background:linear-gradient(90deg,var(--blue),var(--cyan));
}

/* Act divider: a label with a rule running out to both sides. */
.tour-act{
  display:flex;align-items:center;gap:20px;
  padding:clamp(40px,5vw,64px) 0 clamp(8px,1.5vw,16px);
}
.tour-act::before,.tour-act::after{
  content:'';flex:1;height:1px;background:var(--line);
}
.tour-act span{
  font-size:11.5px;font-weight:800;letter-spacing:.16em;
  text-transform:uppercase;color:var(--blue);
}

.tour-row{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  gap:clamp(28px,4vw,64px);
  align-items:center;
  padding:clamp(28px,3.5vw,48px) 0;
}
/* Alternating sides. Source order stays media-then-copy so that at one column --
   where the columns are stacked and order is reading order -- every chapter
   still leads with its video. */
.tour-row.is-right .tour-media{order:2;}

.tour-media{
  position:relative;
  border-radius:var(--r-card);overflow:hidden;
  border:1px solid var(--line);background:var(--bg-mono);
  box-shadow:var(--sh-card);
  cursor:pointer;
  transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease;
}
.tour-media:hover{
  transform:translateY(-4px);
  box-shadow:var(--sh-card-hover);
  border-color:var(--line-focus);
}
.tour-media video{display:block;width:100%;height:auto;}

/* The play affordance stays visible: these autoplay muted and silent motion
   reads as a GIF, so without it there is nothing saying the tile opens. */
.tour-media-play{
  position:absolute;inset:0;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(180deg,rgba(8,16,43,0) 40%,rgba(8,16,43,0.35));
  opacity:0;transition:opacity .25s ease;
}
.tour-media:hover .tour-media-play{opacity:1;}
.tour-media-play span{
  width:64px;height:64px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,0.94);
  box-shadow:var(--sh-white);
}
.tour-media-play svg{width:24px;height:24px;fill:var(--blue);margin-left:3px;}

.tour-chapter{
  font-size:11.5px;font-weight:800;letter-spacing:.16em;
  text-transform:uppercase;color:var(--text-faint);
  display:block;margin-bottom:10px;
}
.tour-copy h2{font-size:clamp(24px,2.9vw,32px);line-height:1.14;margin-bottom:14px;}
.tour-copy p{font-size:16px;color:var(--text-muted);line-height:1.7;text-wrap:pretty;}
.tour-watch{
  margin-top:22px;
  display:inline-flex;align-items:center;gap:9px;
  height:44px;padding:0 20px;border-radius:var(--pill);
  background:#fff;color:var(--navy);
  border:1.5px solid var(--line-strong);
  font-size:14px;font-weight:700;cursor:pointer;
  transition:border-color .2s ease,color .2s ease;
}
.tour-watch:hover{border-color:var(--blue);color:var(--blue);}
.tour-watch svg{width:15px;height:15px;fill:currentColor;}
