/* ==========================================================================
   AGENTIC BUILD EFFECT (experimental preview)
   The page "assembles itself": agent cursors swarm in, drop crosshairs,
   drag out wireframe boxes, then each element is typed / painted in.
   Remove build-fx.css + build-fx.js (and their two tags) to undo.
   ========================================================================== */

.bfx-pending {
  opacity: 0 !important;
}

.bfx-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  overflow: visible;
  z-index: 9000;
  pointer-events: none;
}

/* ---------- Agent cursors ---------- */
.bfx-cursor {
  position: absolute;
  left: 0;
  top: 0;
  transition-property: transform, opacity;
  transition-timing-function: cubic-bezier(0.45, 0.05, 0.25, 1);
  will-change: transform;
}

.bfx-cursor svg {
  display: block;
  width: 20px;
  height: 20px;
  filter: drop-shadow(1px 2px 0 rgba(11, 12, 16, 0.35));
}

.bfx-tag {
  position: absolute;
  left: 15px;
  top: 17px;
  padding: 3px 6px;
  font: 700 9px/1 var(--font-mono, monospace);
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--bfx-ink, #fff);
  background: var(--bfx-c, #0038FF);
  border: 1px solid rgba(11, 12, 16, 0.6);
}

/* Near the right edge the name tag sits on the cursor's left instead */
.bfx-flip .bfx-tag {
  left: auto;
  right: 10px;
}

/* ---------- Crosshair markers ---------- */
.bfx-cross {
  position: absolute;
  width: 15px;
  height: 15px;
  margin: -7px 0 0 -7px;
  animation: bfx-pop 260ms var(--ease-spring, ease-out) both;
}

.bfx-cross::before,
.bfx-cross::after {
  content: "";
  position: absolute;
  background: var(--text, #0B0C10);
}

.bfx-cross::before { left: 7px; top: 0; width: 1.5px; height: 15px; }
.bfx-cross::after  { top: 7px; left: 0; height: 1.5px; width: 15px; }

/* ---------- Wireframe selection boxes ---------- */
.bfx-box {
  position: absolute;
  box-sizing: border-box;
  border: 1.5px solid var(--blue, #0038FF);
  background:
    repeating-linear-gradient(135deg, rgba(0, 56, 255, 0.05) 0 6px, transparent 6px 12px),
    rgba(11, 12, 16, 0.06);
  transition-property: width, height, opacity, background-color;
  transition-timing-function: cubic-bezier(0.45, 0.05, 0.25, 1);
}

.bfx-box.bfx-filled {
  background: transparent;
}

.bfx-h {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #fff;
  border: 1.5px solid var(--blue, #0038FF);
}

.bfx-h.tl { left: -4.5px;  top: -4.5px; }
.bfx-h.tr { right: -4.5px; top: -4.5px; }
.bfx-h.bl { left: -4.5px;  bottom: -4.5px; }
.bfx-h.br { right: -4.5px; bottom: -4.5px; }

.bfx-dim {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 7px);
  padding: 3px 6px;
  font: 700 9px/1 var(--font-mono, monospace);
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #fff;
  background: var(--blue, #0038FF);
}

/* ---------- Typing caret ---------- */
.bfx-caret {
  position: absolute;
  width: 2px;
  background: var(--blue, #0038FF);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
  transition-property: left;
}

/* ---------- Skip control ---------- */
.bfx-skip {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9001;
  padding: 9px 13px;
  font: 700 11px/1 var(--font-mono, monospace);
  letter-spacing: 0.08em;
  color: var(--text, #0B0C10);
  background: var(--bg-elevated, #fff);
  border: 2px solid var(--border, #0B0C10);
  box-shadow: var(--shadow-hard-sm, 4px 4px 0 #0B0C10);
  cursor: pointer;
  animation: bfx-pop 260ms ease-out both;
}

.bfx-skip:hover { background: var(--yellow, #FFD600); color: #0B0C10; }

/* ---------- Shared fades ---------- */
.bfx-out {
  opacity: 0 !important;
  transition: opacity 350ms ease !important;
}

/* ---------- Reveal animations on real elements ---------- */
.bfx-typing {
  animation: bfx-type var(--bfx-d, 600ms) steps(var(--bfx-s, 16), end) both;
}

.bfx-painting {
  animation: bfx-paint 560ms ease-out both;
}

@keyframes bfx-type {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes bfx-paint {
  0%   { opacity: 0;   filter: grayscale(1) brightness(1.35); }
  45%  { opacity: 0.75; filter: grayscale(1); }
  100% { opacity: 1;   filter: none; }
}

@keyframes bfx-pop {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}
