/* ==========================================================================
   Antibody 3D hero — scoped widget styles.
   Namespaced under #antibody-hero so it can't collide with Blocksy. The stage
   is position:sticky and the background is transparent (the page shows through).
   ========================================================================== */

#antibody-hero {
  position: relative;
  height: 330vh;          /* default track length; overridden by shortcode length="" */
  /* Break out of the theme's boxed content container to full viewport width */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 0;
  margin-bottom: 130px; /* gap between the scene and the page content below */
  font-family: "Manrope", system-ui, sans-serif;
}

#antibody-hero .sticky-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: transparent; /* no background — only the 3D scene shows */
}

#antibody-hero #antibody-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none; /* page scroll passes through */
}

/* ---- Captions (overlap; each fades in during its phase) ---- */
#antibody-hero .caption {
  position: absolute;
  top: 50%;
  left: clamp(20px, 6vw, 90px);
  transform: translateY(-50%);
  max-width: 680px;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  color: #28292a;
}
#antibody-hero .caption p {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.9rem);
  line-height: 1.28;
  font-weight: 400;
  color: #28292a;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.55);
}
#antibody-hero .caption b { font-weight: 800; color: #28292a; }

#antibody-hero .scroll-hint {
  margin-top: 34px;
  font-size: .82rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #28292a;
  opacity: .75;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
#antibody-hero .scroll-hint span { font-size: 1.2rem; animation: emtbio-bob 1.6s ease-in-out infinite; }
@keyframes emtbio-bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(7px)} }

/* ---- Loader (light veil, inside the stage) ---- */
#antibody-hero .a-loader {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.85);
  transition: opacity .6s ease;
}
#antibody-hero .a-loader.hidden { opacity: 0; pointer-events: none; }
#antibody-hero .a-spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid rgba(40,41,42,.18); border-top-color: #28292a;
  animation: emtbio-spin 1s linear infinite;
}
@keyframes emtbio-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  #antibody-hero .scroll-hint span, #antibody-hero .a-spinner { animation: none; }
}
