/* aibycode — "live build" intro styles.
   Everything here is scoped to elements the intro creates, or to classes it
   adds while running, so the site renders identically without it. */

/* Canvas used by both the pre-paint cover (body::after, see
   views/partials/build-intro-head.ejs) and the JS overlay, so the hand-off
   between them is invisible. */
.bi-canvas {
  background:
    radial-gradient(rgba(24, 119, 242, 0.11) 1px, transparent 1.3px) 0 0 / 22px 22px,
    radial-gradient(1100px 720px at 50% -8%, #EAF1FB 0%, #F5F8FF 45%, #F3F5F9 100%);
}

/* Elements the intro is animating: no CSS transitions fighting GSAP, and any
   .reveal it owns sits at its final position immediately. */
.bi-owned { transition: none !important; }

/* ── Layers ─────────────────────────────────────────────── */
#bi-overlay {
  position: fixed; inset: 0; z-index: 2147483000;
  overflow: hidden;
}
#bi-overlay .bi-canvas { position: absolute; inset: 0; }

/* Document-coordinate layers: wires/skeletons sit under the overlay,
   cursors and the flying logo sit above it. Width is the viewport minus the
   scrollbar, so nothing can ever add horizontal overflow. */
.bi-layer {
  position: absolute; left: 0; top: 0; width: 100%; height: 0;
  overflow: clip; pointer-events: none; /* height set from JS */
}
#bi-under { z-index: 2147482990; }
#bi-over  { z-index: 2147483010; }

.bi-abs { position: absolute; left: 0; top: 0; will-change: transform, opacity; }

/* ── Cursors ────────────────────────────────────────────── */
.bi-cursor { width: 0; height: 0; }
.bi-arm, .bi-body { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.bi-ptr {
  position: absolute; left: -2px; top: -2px; width: 22px; height: 24px;
  overflow: visible; transform-origin: 2px 2px;
  filter: drop-shadow(0 1px 1.5px rgba(16, 24, 40, 0.28)) drop-shadow(0 4px 8px rgba(16, 24, 40, 0.12));
}
.bi-ptr path { fill: var(--c); stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.bi-tag {
  position: absolute; left: 15px; top: 19px; white-space: nowrap;
  padding: 3px 8px 3px 7px; border-radius: 3px 10px 10px 10px;
  background: var(--c); color: #fff;
  font: 600 11.5px/1.25 Inter, system-ui, -apple-system, sans-serif; letter-spacing: 0.01em;
  box-shadow: 0 2px 6px -1px rgba(16, 24, 40, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.65);
}

/* ── Build primitives ───────────────────────────────────── */
.bi-wire {
  box-sizing: border-box;
  border: 1.5px dashed var(--c);
  background: color-mix(in srgb, var(--c) 7%, transparent);
}
.bi-dim {
  padding: 1px 6px; border-radius: 4px; white-space: nowrap;
  background: var(--c); color: #fff;
  font: 600 10px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.bi-skel {
  box-sizing: border-box;
  border: 1px solid #D3D9E3;
  background: linear-gradient(90deg, #E9EDF3, #F1F4F8);
}
.bi-caret { width: 2px; background: var(--c); border-radius: 1px; }
.bi-ripple {
  border-radius: 50%;
  border: 2px solid var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent);
}
.bi-code {
  padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  background: #fff; color: #1C1E21;
  border: 1px solid #E4E6EB; border-left: 3px solid var(--c);
  font: 500 11.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: 0 10px 24px -10px rgba(16, 24, 40, 0.28), 0 2px 6px -2px rgba(16, 24, 40, 0.12);
}
.bi-code b { color: var(--c); font-weight: 600; }
.bi-spark { width: 2.5px; height: 12px; margin: -6px 0 0 -1.25px; border-radius: 2px; background: var(--c); }

/* ── Skip control ───────────────────────────────────────── */
#bi-skip {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2147483020;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 10px 8px 14px; border-radius: 999px;
  border: 1px solid rgba(28, 30, 33, 0.1); background: rgba(255, 255, 255, 0.92);
  color: #1C1E21; font: 600 13px/1 Inter, system-ui, sans-serif;
  box-shadow: 0 10px 30px -10px rgba(10, 71, 163, 0.25), 0 2px 8px rgba(28, 30, 33, 0.06);
  cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
#bi-skip:hover { border-color: #7BB3F9; }
#bi-skip kbd {
  padding: 2px 6px; border-radius: 6px; background: #F0F2F5; color: #606770;
  font: 600 10.5px/1.3 Inter, system-ui, sans-serif;
}
