/* ROBOT-01 teardown — seccion integrada a la landing */

#robot-teardown {
  position: relative;
  height: 780vh;
  background: #020202;
}

.rt-semantic-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#robot-teardown.is-static {
  height: 100svh;
  min-height: 36rem;
}

#robot-teardown.is-static .rt-sticky {
  position: absolute;
  visibility: visible;
}

#robot-teardown.is-static .rt-still {
  opacity: 1;
}

#robot-teardown.is-static #rt-stage,
#robot-teardown.is-static .rt-scanline {
  display: none;
}

#robot-teardown.is-static .rt-ch-0 {
  opacity: 1;
}

#robot-teardown .rt-sticky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  z-index: 30;
}

/* al terminar el scrub, el frame final queda anclado al fondo de la seccion
   y sale scrolleando con la pagina (nada de fundido a negro) */
#robot-teardown .rt-sticky.rt-done {
  position: absolute;
  inset: auto 0 0 0;
  height: 100lvh;
}

/* capa 1: el hangar de la secuencia SIN el robot (placa limpia).
   Aparece cuando el 3D toma el relevo y queda de fondo todo el teardown. */
.rt-still {
  position: absolute;
  inset: 0;
  background: url('/robot/hangar-plate.jpg') center / cover no-repeat;
  opacity: 0;
  z-index: 2;
}

/* barrido de escaneo */
.rt-scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18vh;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.05) 35%,
    rgba(255, 255, 255, 0.58) 50%,
    rgba(255, 255, 255, 0.05) 65%,
    transparent
  );
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateY(-20vh);
  z-index: 4;
  pointer-events: none;
}

#rt-stage {
  position: absolute;
  inset: 0;
  z-index: 3;
}

#rt-stage canvas { display: block; }

#rt-labels {
  position: absolute !important;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.rt-chapter {
  position: absolute;
  top: 6vh;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  color: #f5f5f5;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

/* scrim: legibilidad del titular sobre los rayos de luz del hangar
   (el gradiente muere al 68% del radio para no dejar bordes de caja) */
.rt-chapter::before {
  content: '';
  position: absolute;
  inset: -18vh -18vw -14vh;
  background: radial-gradient(ellipse 52% 52% at 50% 44%, rgba(4, 4, 4, 0.6), transparent 68%);
  z-index: -1;
}

.rt-chapter h3 {
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

.rt-chapter p {
  margin-top: 0.5rem;
  font-size: clamp(0.68rem, 1.4vw, 0.85rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.65;
}

.rt-ch-0 { color: #f5f5f5; }           /* sobre el fotograma oscuro */
.rt-ch-0 p { opacity: 0.8; }

/* ---------- etiquetas de piezas ---------- */

.part-label {
  display: flex;
  align-items: center;
  width: 190px;
  --ink: #e8e8e8;
  --label-surface: rgba(8, 8, 8, 0.92);
}

.part-label.right { margin-left: 95px; }

.part-label.left {
  margin-left: -95px;
  flex-direction: row-reverse;
}

.part-label .dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}

.part-label .line {
  flex: 1;
  height: 1.5px;
  background: var(--ink);
}

.part-label.right .line { transform-origin: left center; }
.part-label.left  .line { transform-origin: right center; }

.part-label .txt {
  flex: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 3px 7px;
  border: 1px solid rgba(232, 232, 232, 0.4);
  background: var(--label-surface);
  color: #f5f5f5;
  white-space: nowrap;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

.part-label .txt em {
  display: block;
  font-style: normal;
  font-weight: 400;
  font-size: 8px;
  opacity: 0.6;
  letter-spacing: 0.12em;
}
