/*=====================================================*/
/*  BUILD DIGITAL WORKERS — page styles                */
/*  Depends on assets/css/ai/common.css                */
/*=====================================================*/

/*----------------------------*/
/* HERO — TWO CREATION PATHS  */
/* Template → Configure, or   */
/* Builder → Create. Both     */
/* land on the same worker.   */
/*----------------------------*/
.bdw-paths {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ai-line-dark);
  border-radius: 18px;
  box-shadow: 0 4px 0 0 var(--ai-primary), 0 30px 60px rgba(0, 0, 0, 0.35);
}

.bdw-paths__head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--ai-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* On the label itself, not inherited — the live theme styles spans directly
   and a direct declaration always beats an inherited one */
.bdw-paths__head span {
  font-family: var(--ai-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.bdw-paths__head i,
.bdw-paths__head svg {
  width: 15px;
  height: 15px;
  color: var(--ai-primary);
  stroke-width: 2.4;
  flex-shrink: 0;
}

.bdw-path {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ai-line-dark);
  border-radius: 14px;
}

.bdw-path__tag {
  font-family: var(--ai-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ai-primary);
}

.ai-page .bdw-path__chain {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 0 !important;
  padding: 0;
  list-style: none;
}

.bdw-path__chain li {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ai-line-dark);
  border-radius: 10px;
  font-family: var(--ai-heading);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

.bdw-path__chain li i,
.bdw-path__chain li svg {
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, 0.4);
  stroke-width: 2.2;
  flex-shrink: 0;
  transition: color 0.35s ease;
}

/* The connector between two nodes, drawn on the gap */
.bdw-path__chain li+li::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 50%;
  width: 9px;
  height: 2px;
  background: var(--ai-line-dark);
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.bdw-path__chain li.is-on {
  background: rgba(var(--ai-primary-rgb), 0.14);
  border-color: rgba(var(--ai-primary-rgb), 0.55);
  color: #FFF;
}

.bdw-path__chain li.is-on i,
.bdw-path__chain li.is-on svg {
  color: var(--ai-primary);
}

.bdw-path__chain li.is-on::before {
  transform: translateY(-50%) scaleX(1);
  background: var(--ai-primary);
}

/* The finished worker is the point of both paths, so it gets the solid fill */
.bdw-path__chain li.is-goal.is-on {
  background: var(--ai-primary);
  border-color: var(--ai-primary);
  color: #FFF;
}

.bdw-path__chain li.is-goal.is-on i,
.bdw-path__chain li.is-goal.is-on svg {
  color: #FFF;
}

.bdw-paths__or {
  align-self: center;
  padding: 3px 12px;
  border: 1px solid var(--ai-line-dark);
  border-radius: 999px;
  font-family: var(--ai-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.bdw-paths__foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 14px;
  border-top: 1px solid var(--ai-line-dark);
  font-family: var(--ai-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

.bdw-paths__foot i,
.bdw-paths__foot svg {
  width: 14px;
  height: 14px;
  color: var(--ai-primary);
  stroke-width: 2.4;
  flex-shrink: 0;
}

/*----------------------------*/
/* THREE-PART BUILD SEQUENCE  */
/*----------------------------*/
.ai-page .bdw-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0 !important;
  padding: 0;
  list-style: none;
}

.bdw-three__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 30px 28px;
  background: #FFF;
  border: 1px solid var(--ai-line);
  border-radius: 16px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.bdw-three__step:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--ai-primary-rgb), 0.45);
  box-shadow: 0 18px 40px rgba(20, 20, 20, 0.08);
}

/* Chevron bridging one step to the next */
.bdw-three__step+.bdw-three__step::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-top: 2px solid var(--ai-primary);
  border-right: 2px solid var(--ai-primary);
  transform: rotate(45deg);
}

.bdw-three__num {
  font-family: var(--ai-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ai-primary-deep);
}

.bdw-three__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--ai-cream);
  border: 1px solid var(--ai-line);
  border-radius: 13px;
}

.bdw-three__icon i,
.bdw-three__icon svg {
  width: 24px;
  height: 24px;
  color: var(--ai-primary-deep);
  stroke-width: 2;
}

.bdw-three__step h3 {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ai-ink);
}

.bdw-three__step p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6 !important;
  color: var(--ai-muted);
}

.bdw-note {
  max-width: 820px;
  margin: 48px auto 0;
  text-align: center;
}

.bdw-note p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.7 !important;
  color: var(--ai-muted);
}

.bdw-note__pull {
  margin-top: 22px !important;
  padding-top: 22px;
  border-top: 1px dashed var(--ai-line);
  font-family: var(--ai-heading);
  font-size: 18px !important;
  font-weight: 700;
  color: var(--ai-ink) !important;
}

/*----------------------------*/
/* AGENT TEMPLATE CARDS       */
/*----------------------------*/
.bdw-templates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.bdw-template {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 26px 24px;
  background: #FFF;
  border: 1px solid var(--ai-line);
  border-radius: 16px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.bdw-template:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--ai-primary-rgb), 0.5);
  box-shadow: 0 4px 0 0 rgba(var(--ai-primary-rgb), 0.35), 0 20px 42px rgba(20, 20, 20, 0.09);
}

.bdw-template__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--ai-cream);
  border: 1px solid var(--ai-line);
  border-radius: 12px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.bdw-template:hover .bdw-template__icon {
  background: rgba(var(--ai-primary-rgb), 0.1);
  border-color: rgba(var(--ai-primary-rgb), 0.4);
}

.bdw-template__icon i,
.bdw-template__icon svg {
  width: 21px;
  height: 21px;
  color: var(--ai-primary-deep);
  stroke-width: 2;
}

.bdw-template h3 {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ai-ink);
  transition: color 0.2s ease;
}

.bdw-template:hover h3 {
  color: var(--ai-primary-deep);
}

.bdw-template p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6 !important;
  color: var(--ai-muted);
}

.bdw-template__fn {
  margin-top: auto;
  padding: 5px 11px;
  background: var(--ai-cream);
  border: 1px solid var(--ai-line);
  border-radius: 999px;
  font-family: var(--ai-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ai-ink-soft);
}

.bdw-templates__foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 36px;
  max-width: 940px;
  margin: 36px auto 0;
}

.bdw-templates__foot p {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  font-size: 15px;
  line-height: 1.65 !important;
  color: var(--ai-muted);
}

.bdw-templates__foot i,
.bdw-templates__foot svg {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--ai-primary);
  stroke-width: 2.2;
  flex-shrink: 0;
}

.bdw-quoteband {
  margin-top: 64px;
}

/*-----------------------------------*/
/* AGENT BUILDER STEPPER             */
/* The page's centrepiece: seven     */
/* guided steps on a rail that fills */
/* as the reader scrolls through it, */
/* so the build feels like it is     */
/* being assembled on the way down.  */
/*-----------------------------------*/
.ai-page .bdw-builder {
  position: relative;
  display: grid;
  gap: 14px;
  max-width: 800px;
  margin: 0 auto !important;
  padding: 0 0 0 74px;
  list-style: none;
}

.bdw-builder__rail {
  position: absolute;
  top: 26px;
  bottom: 26px;
  left: 25px;
  width: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.bdw-builder__fill {
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(to bottom, rgba(var(--ai-primary-rgb), 0.5), var(--ai-primary));
  border-radius: 999px;
}

.bdw-builder__step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 26px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ai-line-dark);
  border-radius: 16px;
  opacity: 0.45;
  transition: opacity 0.45s ease, background 0.45s ease, border-color 0.45s ease, transform 0.45s ease;
}

.bdw-builder__step.is-on {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(var(--ai-primary-rgb), 0.4);
}

/* Marker sits out on the rail, centred over it */
.bdw-builder__marker {
  position: absolute;
  left: -74px;
  top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--ai-ink);
  border: 1px solid var(--ai-line-dark);
  border-radius: 15px;
  transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

.bdw-builder__step.is-on .bdw-builder__marker {
  /* background: rgba(var(--ai-primary-rgb), 0.16); */
  border-color: rgba(var(--ai-primary-rgb), 0.65);
  box-shadow: 0 0 0 6px rgba(var(--ai-primary-rgb), 0.08);
}

.bdw-builder__marker i,
.bdw-builder__marker svg {
  width: 23px;
  height: 23px;
  color: rgba(255, 255, 255, 0.45);
  stroke-width: 2;
  transition: color 0.45s ease;
}

.bdw-builder__step.is-on .bdw-builder__marker i,
.bdw-builder__step.is-on .bdw-builder__marker svg {
  color: var(--ai-primary);
}

.bdw-builder__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.bdw-builder__num {
  font-family: var(--ai-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42) !important;
  transition: color 0.45s ease;
}

.bdw-builder__step.is-on .bdw-builder__num {
  color: var(--ai-primary) !important;
}

.bdw-builder__body h3 {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #FFF;
}

.bdw-builder__body p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6 !important;
  color: rgba(255, 255, 255, 0.72) !important;
}

/* The configuration question each step answers */
.bdw-builder__cfg {
  margin-top: 6px;
  padding: 8px 13px;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--ai-line-dark);
  border-radius: 9px;
  font-family: var(--ai-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6) !important;
}

/*----------------------------*/
/* NO CODE STATEMENT          */
/*----------------------------*/
.bdw-nocode {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  max-width: 800px;
  margin: 34px auto 0;
  padding: 30px 34px;
  background: rgba(var(--ai-primary-rgb), 0.08);
  border: 1px solid rgba(var(--ai-primary-rgb), 0.35);
  border-left: 4px solid var(--ai-primary);
  border-radius: 18px;
}

.bdw-nocode__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  background: rgba(var(--ai-primary-rgb), 0.16);
  border: 1px solid rgba(var(--ai-primary-rgb), 0.45);
  border-radius: 14px;
}

.bdw-nocode__badge i,
.bdw-nocode__badge svg {
  width: 24px;
  height: 24px;
  color: var(--ai-primary);
  stroke-width: 2;
}

.bdw-nocode strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--ai-heading);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFF;
}

.bdw-nocode p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.7 !important;
  color: rgba(255, 255, 255, 0.75) !important;
}

.bdw-advisor {
  margin-top: 56px;
}

/*----------------------------*/
/* CLOSING                    */
/*----------------------------*/
.bdw-closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
  gap: 18px;
  text-align: center;
}

.bdw-closing h2 {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ai-ink);
}

.bdw-closing p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7 !important;
  color: var(--ai-muted);
}

.bdw-closing__pull {
  margin-top: 8px !important;
  padding: 22px 30px;
  background: var(--ai-cream);
  border: 1px solid var(--ai-line);
  border-radius: 16px;
  box-shadow: 0 4px 0 0 rgba(var(--ai-primary-rgb), 0.3);
  font-family: var(--ai-heading);
  font-size: 19px !important;
  font-weight: 700;
  line-height: 1.5 !important;
  color: var(--ai-ink) !important;
}

/*----------------------------*/
/* RESPONSIVE                 */
/*----------------------------*/
@media (max-width: 1023px) {
  .bdw-templates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-page .bdw-three {
    grid-template-columns: 1fr;
  }

  /* Chevron moves to the top edge once the steps stack */
  .bdw-three__step+.bdw-three__step::before {
    left: 50%;
    top: -14px;
    margin: 0 0 0 -4px;
    transform: rotate(135deg);
  }
}

@media (max-width: 767px) {
  .bdw-templates {
    grid-template-columns: 1fr;
  }

  .bdw-templates__foot {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bdw-quoteband {
    margin-top: 44px;
  }

  /* Rail and markers move inline above the copy — 74px of gutter is too much
     of a narrow screen to give away. */
  .ai-page .bdw-builder {
    padding-left: 0;
  }

  .bdw-builder__rail {
    display: none;
  }

  .bdw-builder__step {
    flex-direction: column;
    gap: 14px;
    padding: 22px 20px;
  }

  .bdw-builder__marker {
    position: static;
    width: 44px;
    height: 44px;
  }

  .bdw-builder__marker i,
  .bdw-builder__marker svg {
    width: 20px;
    height: 20px;
  }

  .bdw-nocode {
    flex-direction: column;
    gap: 16px;
    padding: 26px 22px;
  }

  .bdw-closing__pull {
    padding: 20px 22px;
  }

  .bdw-path__chain {
    flex-direction: column;
  }

  .bdw-path__chain li+li::before {
    left: 50%;
    top: -9px;
    width: 2px;
    height: 9px;
    margin-left: -1px;
    transform: translateY(0) scaleY(0);
    transform-origin: top center;
  }

  .bdw-path__chain li.is-on::before {
    transform: translateY(0) scaleY(1);
  }
}