/* THE GRIND ROOM — black / red / grey build lab */

.asp-build-lab {
  position: relative;
  padding: 4rem 0 4.5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(216, 31, 38, 0.09), transparent 55%),
    radial-gradient(ellipse at 18% 85%, rgba(255, 255, 255, 0.03), transparent 40%),
    linear-gradient(180deg, #05070b 0%, #0e1117 50%, #05070b 100%);
  border-top: 1px solid rgba(216, 31, 38, 0.28);
  border-bottom: 1px solid rgba(42, 47, 56, 0.85);
}

.asp-build-lab-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  opacity: 0.55;
}

.asp-build-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.45) 2px,
    rgba(255, 255, 255, 0.45) 3px
  );
}

.asp-build-lab-inner {
  position: relative;
  z-index: 2;
}

.asp-build-tag {
  margin: 0 0 0.65rem;
  font-family: "Barlow Condensed", monospace, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(200, 208, 219, 0.72);
}

.asp-build-blink {
  color: #d81f26;
  animation: asp-blink 1.4s step-end infinite;
}

@keyframes asp-blink {
  50% { opacity: 0.2; }
}

.asp-build-accent {
  color: #ff4747 !important;
  text-shadow: 0 0 22px rgba(216, 31, 38, 0.45);
}

.asp-build-lab-header h2 {
  margin: 0 0 0.65rem;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 0.95;
  color: #f5f7fa;
}

.asp-build-lede {
  max-width: 62ch;
  margin: 0 0 2rem;
  color: #9aa3b0;
  font-size: 1.02rem;
}

.asp-build-lab-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.asp-build-readout {
  padding: 1.35rem;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.asp-build-lab .asp-metal-frame {
  border: 1px solid rgba(90, 98, 110, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(216, 31, 38, 0.1),
    0 14px 34px rgba(0, 0, 0, 0.38);
  background: linear-gradient(180deg, rgba(16, 18, 24, 0.96), rgba(8, 10, 14, 0.98));
}

.asp-build-readout-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.38);
}

.asp-build-readout-head strong {
  color: #ff4747;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.82rem;
  text-shadow: 0 0 12px rgba(216, 31, 38, 0.35);
}

.asp-build-readout h3 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.8rem;
  text-transform: uppercase;
  color: #f5f7fa;
  letter-spacing: 0.04em;
}

.asp-build-specs {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.asp-build-specs div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.asp-build-specs dt {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.38);
}

.asp-build-specs dd {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #c8d0db;
  letter-spacing: 0.03em;
}

.asp-build-stage-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.asp-build-stage-btn {
  border: 1px solid rgba(120, 128, 140, 0.35);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font-family: "Barlow Condensed", monospace, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.asp-build-stage-btn:hover,
.asp-build-stage-btn.is-active {
  border-color: rgba(216, 31, 38, 0.65);
  background: rgba(216, 31, 38, 0.1);
  color: #fff;
  box-shadow: 0 0 18px rgba(216, 31, 38, 0.22);
}

.asp-build-stage-btn.is-active {
  border-color: #ff4747;
  box-shadow: 0 0 20px rgba(216, 31, 38, 0.35);
}

.asp-build-cta {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

.asp-build-viewport {
  position: relative;
  padding: 1rem;
  border-radius: 14px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
}

.asp-build-viewport-chrome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  font-family: "Barlow Condensed", monospace, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 208, 219, 0.55);
}

.asp-build-fps {
  color: #ff4747;
  text-shadow: 0 0 10px rgba(216, 31, 38, 0.35);
}

.asp-build-layers {
  position: relative;
  flex: 1;
  min-height: 280px;
  border-radius: 10px;
  overflow: hidden;
  background: #05070b;
  border: 1px solid rgba(90, 98, 110, 0.4);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55);
}

.asp-build-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  opacity: 0;
  transition: opacity 0.08s linear;
  will-change: opacity;
}

.asp-build-scrubber-wrap {
  margin-top: 1rem;
}

.asp-build-scrubber-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
}

.asp-build-scrubber {
  width: 100%;
  height: 8px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #1a1d24, #5a626e, #d81f26, #ff4747);
  outline: none;
  cursor: ew-resize;
}

.asp-build-scrubber::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #d81f26 55%, #0a0c10);
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 16px rgba(216, 31, 38, 0.55);
}

.asp-build-scrubber::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #d81f26 55%, #0a0c10);
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 16px rgba(216, 31, 38, 0.55);
}

.asp-build-scrubber-ticks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 0.35rem;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.34);
  text-align: center;
}

.asp-build-hint {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 208, 219, 0.48);
}

/* Magnetic weld cursor — only inside Build Lab */
#build-lab.asp-build-cursor-zone,
#build-lab.asp-build-cursor-zone * {
  cursor: none !important;
}

.asp-build-cursor {
  position: fixed !important;
  top: 0;
  left: 0;
  z-index: 99999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: left, top;
}

.asp-build-cursor-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 2px solid rgba(200, 208, 219, 0.75);
  border-radius: 50%;
  background: rgba(8, 10, 14, 0.45);
  box-shadow: 0 0 14px rgba(90, 98, 110, 0.35);
  transition: width 0.15s ease, height 0.15s ease, margin 0.15s ease, border-color 0.15s ease;
}

.asp-build-cursor-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: #ff4747;
  border-radius: 50%;
  box-shadow: 0 0 10px #d81f26;
}

.asp-build-cursor.is-hot .asp-build-cursor-ring {
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-color: rgba(216, 31, 38, 0.9);
  box-shadow: 0 0 22px rgba(216, 31, 38, 0.45);
}

.asp-build-spark-canvas {
  position: fixed !important;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99998;
}

@media (max-width: 960px) {
  .asp-build-lab-grid {
    grid-template-columns: 1fr;
  }
  .asp-build-viewport {
    min-height: 360px;
  }
  #build-lab.asp-build-cursor-zone,
  #build-lab.asp-build-cursor-zone * {
    cursor: auto !important;
  }
  .asp-build-cursor,
  .asp-build-spark-canvas {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .asp-build-blink {
    animation: none;
  }
  .asp-build-lab-canvas {
    display: none;
  }
}