
/* ════════════════════════════
   precision-factory SECTION
════════════════════════════ */
.precision-factory,
#precision-factorySection {
  width: 100%;
  max-width: none;
  overflow: hidden;
  position: relative;
}

#precision-factorySection.is-precision-factory-active {
  z-index: 30;
  position: relative;
}

.precision-factory-sticky {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
  background: radial-gradient(ellipse at center,  rgba(0,0,0,0) 0%,rgba(0,0,0,0) 1%,rgba(0,0,0,0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Canvas */
#precision-factoryCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  will-change: opacity;
}

/* Particle canvas */
#particleCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}

/* Speed lines canvas */
#speedCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}

/* Text layout */
#precision-factorySection .precisios-wrapper,
.precision-factory .precisios-wrapper {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  box-sizing: border-box;
  pointer-events: none;
}

#precision-factorySection #leftText,
#precision-factorySection .left-precision-factory-text,
.precision-factory #leftText,
.precision-factory .left-precision-factory-text {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

#precision-factorySection #rightText,
#precision-factorySection .right-precision-factory-text,
.precision-factory #rightText,
.precision-factory .right-precision-factory-text {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

/* ─── Headline ─── */
#precision-factorySection .fill-text,
.precision-factory .fill-text {
  font-size: 5.5vw;
  font-weight: 400;
  line-height: 1;
  display: flex;
  flex-direction: column;
  gap: 0.12em;
  position: relative;
  margin: 0;
}

#precision-factorySection #leftText .fill-text,
.precision-factory #leftText .fill-text,
#precision-factorySection .left-precision-factory-text .fill-text,
.precision-factory .left-precision-factory-text .fill-text {
  align-items: flex-start;
}

#precision-factorySection #rightText .fill-text,
.precision-factory #rightText .fill-text,
#precision-factorySection .right-precision-factory-text .fill-text,
.precision-factory .right-precision-factory-text .fill-text {
  align-items: flex-end;
}

#precision-factorySection .word-wrap,
.precision-factory .word-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
}

/* CMS markup: outline + fill share one line wrapper */
#precision-factorySection .word-wrap > .word-outline,
.precision-factory .word-wrap > .word-outline {
  position: relative;
  display: block;
  color: #adadad;
  -webkit-text-stroke: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

#precision-factorySection .word-wrap > .fill-layer,
.precision-factory .word-wrap > .fill-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: block;
  white-space: nowrap;
  background: linear-gradient(93.03deg, #2581C4 17.67%, #009982 87.93%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  clip-path: inset(0 100% 0 0);
  will-change: clip-path;
  z-index: 1;
}

#precision-factorySection #rightText .word-wrap,
.precision-factory #rightText .word-wrap,
#precision-factorySection .right-precision-factory-text .word-wrap,
.precision-factory .right-precision-factory-text .word-wrap {
  margin-left: auto;
}

/* Standalone classes (after normalize) */
#precision-factorySection .word-outline,
.precision-factory .word-outline {
  position: relative;
  display: block;
  color: #adadad;
  -webkit-text-stroke: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

#precision-factorySection .fill-layer,
.precision-factory .fill-layer {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  white-space: nowrap;
  background: linear-gradient(93.03deg, #2581C4 17.67%, #009982 87.93%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  clip-path: inset(0 100% 0 0);
  will-change: clip-path;
  z-index: 1;
}

/* Final end frame */
.precision-factory-final-bike {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0; z-index: 3;
}

.left-precision-factory-text {
  position: absolute;
  top: 5vw;
  left: 2vw;
}
.right-precision-factory-text {
  position: absolute;
  bottom: 5vw;
  right: 2vw;
}

canvas {border:0; outline:none;}

/* ─── Mobile ─── */
@media (max-width: 992px) {
  #precision-factorySection,
  .precision-factory {
    overflow-x: hidden;
    background: #f1f1f1;
  }

  .precision-factory-sticky {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    height: 100dvh;
    min-height: 100svh;
    background: #fff;
  }

  #precision-factoryCanvas,
  #particleCanvas,
  #speedCanvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    min-height: 100%;
  }

  .precision-factory-final-bike {
    object-fit: contain;
    padding: 0 0;
    box-sizing: border-box;
  }

  #precision-factorySection .precisios-wrapper,
  .precision-factory .precisios-wrapper {
    padding: 0 4vw;
    box-sizing: border-box;
  }

  .left-precision-factory-text {
    top: 30vw;
    left: 4vw;
    right: auto;
  }

  .right-precision-factory-text {
    bottom: 25vw;
    right: 4vw;
    left: auto;
  }


}

@media (max-width: 768px) {
  #precision-factorySection .fill-text,
  .precision-factory .fill-text {
    font-size: clamp(2.2rem, 11vw, 5rem);
  }
  .precisios-wrapper { padding: 0 4vw; align-items: flex-end; padding-bottom: 18vh; flex-direction: column; justify-content: center; gap: 4vh; }
  .left-precision-factory-text, .right-precision-factory-text { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  #precision-factorySection .fill-layer,
  .precision-factory .fill-layer {
    clip-path: inset(0 0% 0 0) !important;
  }
  .scanline, #particleCanvas, #speedCanvas { display: none; }
}

@media (min-width: 1200px) and (max-width: 1366px) {
  .fill-text span {
    font-size: 6vw;
    line-height: 6vw;
}
.left-precision-factory-text {top: 3vw;}
.right-precision-factory-text {bottom: 3vw;}
}