/* ============================================================
   BuildMetrx — Bob on the home page (pairs with js/bob.js)
   Bob and his props live in .bob-world, a layer the script lays
   over the whole page. Only the hero signs sit inside the page
   (on the dashboard screen). Remove this file's <link> and the
   script's <script> to take him off; nothing else depends on it.
   ============================================================ */

/* ---------- The layer ---------- */

.bob-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  overflow-x: clip;
  overflow-y: visible;
  pointer-events: none;
  z-index: 35;
}

/* Older browsers without overflow: clip must not get a sideways
   scrollbar when Bob walks off the right edge. */
@supports not (overflow: clip) {
  .bob-on body {
    overflow-x: hidden;
  }
}

.bob-world > * {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}

.bob-actor .bob-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* On the hero screen he can be clicked to swing again. */
.bob-actor.is-hero .bob-svg g {
  pointer-events: auto;
  cursor: pointer;
}

/* ---------- Hero: dashboard dock + the four tool signs ---------- */

/* The dashboard is wrapped in .bob-dock by the script; the dock takes
   over the screen's negative top margin so nothing moves. */
.bob-dock {
  position: relative;
  margin-top: -7rem;
}

.bob-dock > .app {
  margin-top: 0 !important;
}

@media (min-width: 768px) {
  .bob-dock {
    margin-top: -9rem;
  }
}

.bob-stage-hero {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 0;
  z-index: 3;
  transform-origin: 50% 100%;
}

/* They sit behind the screen's top edge until Bob's hammer lands,
   then spring up out of it, nearest one first. */
.bob-signs {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 96px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  padding-top: 14px;
  overflow: hidden;
}

.bob-sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  visibility: hidden;
  transform: translateY(110%);
  transition:
    transform 0.55s cubic-bezier(0.3, 1.55, 0.5, 1) calc(var(--i) * 95ms),
    visibility 0s linear calc(var(--i) * 95ms);
  text-decoration: none;
  outline: none;
}

.bob-stage-hero.is-up .bob-sign {
  visibility: visible;
  transform: none;
}

.bob-sign-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 42px;
  height: 38px;
  padding: 0 10px;
  border-radius: 6px;
  background: #FE5D01;
  color: #0f172a;
  box-shadow: 0 8px 18px -8px rgba(2, 6, 23, 0.75), inset 0 -3px 0 rgba(15, 23, 42, 0.18);
  font-family: 'Barlow Condensed', Inter, sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.bob-sign-plate svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.bob-sign-long,
.bob-sign-short {
  display: none;
}

/* Two steel posts driven into the screen edge */
.bob-sign-posts {
  display: block;
  width: 60%;
  max-width: 64px;
  min-width: 22px;
  height: 9px;
  background:
    linear-gradient(90deg, #cbd5e1 0 3px, transparent 3px calc(100% - 3px), #cbd5e1 calc(100% - 3px));
}

.bob-sign:hover .bob-sign-plate,
.bob-sign:focus-visible .bob-sign-plate {
  transform: translateY(-4px);
  background: #ffffff;
}

.bob-sign:focus-visible .bob-sign-plate {
  outline: 2px solid #FE5D01;
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .bob-signs { gap: 10px; right: 120px; }
  .bob-sign-short { display: inline; }
}

@media (min-width: 1024px) {
  .bob-signs { right: 150px; }
}

@media (min-width: 1280px) {
  .bob-signs { gap: 14px; right: 190px; }
  .bob-sign-short { display: none; }
  .bob-sign-long { display: inline; }
  .bob-sign-plate { height: 42px; padding: 0 14px; font-size: 17px; }
}

/* ---------- Room for Bob between sections ---------- */

/* Wide screens: bob.js measures and adds headroom above the cards
   and the who headline. */

/* Narrow screens: he stands on that headline and sits on top of the
   questions. (Room under the last call to action is measured in JS.) */
@media (max-width: 1023px) {
  .bob-on .bob-rule-host {
    margin-top: 44px;
  }

  .bob-on [data-bob="faq"] {
    margin-top: 48px;
  }
}

/* ---------- Rope and anchor ---------- */

.bob-rope {
  height: 3px;
  border-radius: 2px;
  transform-origin: 0 50%;
  background: repeating-linear-gradient(90deg, #FE5D01 0 7px, #ffd2b8 7px 9px);
  margin-top: -1.5px;
}

.bob-anchor svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Scissor lift ---------- */

.bob-lift,
.bob-lift-rail {
  width: 1px;
  height: 1px;
  overflow: visible;
}

/* ---------- Welding ---------- */

.bob-plate {
  border-radius: 3px;
  background-color: #1e293b;
  background-image:
    radial-gradient(circle at 18% 50%, #cbd5e1 0 2.2px, transparent 2.6px),
    radial-gradient(circle at 82% 50%, #cbd5e1 0 2.2px, transparent 2.6px),
    linear-gradient(#334155, #1e293b);
  box-shadow: 0 2px 6px rgba(2, 6, 23, 0.35);
}

.bob-plate.is-hot {
  box-shadow: 0 0 0 1.5px #FE5D01, 0 2px 6px rgba(2, 6, 23, 0.35);
}

.bob-spark {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 1px;
}

.bob-glow {
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 30%, rgba(254, 93, 1, 0.75) 45%, rgba(254, 93, 1, 0) 70%);
}

/* ---------- Folding rule ---------- */

.bob-rule {
  --th: 12px;
  width: 0;
  height: var(--th);
}

.bob-seg {
  position: absolute;
  top: 0;
  left: 100%;
  width: var(--seg);
  height: 100%;
  transform-origin: 0 50%;
  transform: rotate(-180deg);
  border-radius: 1.5px;
  background-color: #ffffff;
  background-image:
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.8) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0 1px, transparent 1px 35px);
  background-size: 100% 32%, 100% 62%;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.45), 0 4px 8px -4px rgba(15, 23, 42, 0.45);
}

.bob-rule > .bob-seg {
  left: 0;
  transform: none;
}

.bob-seg::before {
  content: attr(data-n);
  position: absolute;
  right: 9px;
  bottom: 0;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: calc(var(--th) * 0.62);
  line-height: 1;
  font-weight: 600;
  color: #c24600;
}

.bob-seg::after {
  content: '';
  position: absolute;
  z-index: 1;
  top: 50%;
  right: -3.5px;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: #FE5D01;
  box-shadow: 0 0 0 1.5px #ffffff;
}

.bob-seg-end::after {
  right: -2px;
  width: 4px;
  height: 100%;
  top: 0;
  margin-top: 0;
  border-radius: 0 2px 2px 0;
  box-shadow: none;
}

/* ---------- Concrete slab ---------- */

.bob-slab {
  --fill: 0;
}

/* Orange form boards: two ends and a base board */
.bob-slab-form {
  position: absolute;
  inset: 0;
  border: 4px solid #FE5D01;
  border-top: 0;
  border-radius: 0 0 2px 2px;
}

.bob-slab-fill {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: calc((100% - 6px) * var(--fill));
  border-radius: 2px 2px 0 0;
  background-color: #d5dde7;
  background-image:
    linear-gradient(#f1f5f9, #f1f5f9),
    radial-gradient(circle at 30% 40%, rgba(100, 116, 139, 0.28) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.5px);
  background-size: 100% 3px, 11px 9px, 14px 11px;
  background-repeat: no-repeat, repeat, repeat;
}

.bob-stream {
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #cbd5e1, #e2e8f0 50%, #cbd5e1);
}

/* ---------- Flag + radio ---------- */

.bob-flag,
.bob-barrow,
.bob-waves {
  overflow: visible;
}
