/* ============================================================
   NEEDLE STORY — pinned, scroll-scrubbed needle + thread scene
   (products page). Height of .ns controls how long the scene
   stays pinned: 100svh pinned + 240svh of scrolling.
   ============================================================ */
.ns {
  position: relative;
  height: 340vh;
  height: 340svh;
  background: #12040a;
  color: #fff;
}
.ns-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;              /* svh: stays stable when the iPhone address bar slides */
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 55% at 68% 48%, rgba(227, 30, 36, .16), transparent 70%),
    linear-gradient(135deg, #12040a 0%, #2d0a10 100%);
}
.ns-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;         /* vertical scroll stays native on touch; sideways swipe rotates the needle */
}
.ns-pin { cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ns-pin.ns-drag { cursor: grabbing; }
.ns-copy {
  position: absolute;
  z-index: 2;
  left: clamp(20px, 6vw, 96px);
  top: clamp(84px, 16vh, 150px);
  max-width: min(460px, 86vw);
  pointer-events: none;
}
.ns-eyebrow {
  display: inline-block;
  font-size: .75rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #ff6b5e;
  margin-bottom: 14px;
}
.ns-title {
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  font-weight: 700;
  margin: 0 0 18px;
  color: #fff;
}
.ns-title span { color: #ff3b3b; }
.ns-steps { position: relative; min-height: 4.6em; }
.ns-step {
  position: absolute;
  left: 0; top: 0; right: 0;
  margin: 0;
  font-size: clamp(.95rem, 1.5vw, 1.1rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, .78);
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity .5s ease, transform .6s cubic-bezier(.22, 1, .36, 1);
}
.ns-step.on { opacity: 1; transform: none; }
.ns-step b { color: #fff; font-weight: 600; }
.ns-dots { display: flex; gap: 8px; margin-top: 22px; }
.ns-dots i {
  width: 28px; height: 3px; border-radius: 3px;
  background: rgba(255, 255, 255, .22);
  transition: background .4s ease, width .4s ease;
}
.ns-dots i.on { background: #ff3b3b; width: 46px; }
.ns-hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
  transition: opacity .5s ease;
  pointer-events: none;
}
.ns-hint::after {
  content: '';
  display: block;
  width: 1px; height: 26px;
  margin: 8px auto 0;
  background: linear-gradient(#ff6b5e, transparent);
  animation: ns-hint 1.8s ease-in-out infinite;
}
@keyframes ns-hint { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* phones: copy sits at the top, scene in the lower part (JS lays the needle out to match) */
@media (max-width: 700px) {
  .ns { height: 320vh; height: 320svh; }
  .ns-copy { top: clamp(76px, 12vh, 110px); }
  .ns-steps { min-height: 5.6em; }
  
/* a single product filter (?type=…) shows just that product — no scene then */
.pf-filtered .ns { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ns-hint::after { animation: none; }
  .ns-step { transition: none; }
}
