/* ═══════════════════════════════════════════════════════════
   HOW WE WORK — WORKFLOW BOARD
   A plan splits into work packages that travel Analysis →
   Integration → Go Live. Cards are dragged by the animation,
   so they tilt into the direction of travel and settle with a
   spring. Prefix: .wfb-
═══════════════════════════════════════════════════════════ */

.wfb {
  position: relative;
  max-width: 820px;
  margin: 0 auto 4rem;
  text-align: left;
}

/* ── Columns ──────────────────────────────────────────── */

.wfb-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.wfb-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wfb-col-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.3rem 0.6rem;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(237, 237, 237, 0.46);
  white-space: nowrap;
  overflow: hidden;
}

.wfb-col-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.wfb-col-count {
  margin-left: auto;
  flex: none;
  min-width: 2.1em;
  text-align: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.wfb-col--done .wfb-col-count {
  color: var(--neon-mint);
  border-color: rgba(0, 245, 181, 0.35);
  background: rgba(0, 245, 181, 0.08);
}

.wfb-col-body {
  flex: 1;
  min-height: 214px; /* replaced at runtime by the measured stack height */
  border: 1px dashed rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
}

.wfb-col--done .wfb-col-body {
  border-color: rgba(0, 245, 181, 0.2);
  background: rgba(0, 245, 181, 0.03);
}

/* ── Cards ────────────────────────────────────────────── */

.wfb-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wfb-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 160px; /* replaced at runtime by the measured column width */
  box-sizing: border-box;
  padding: 0.5rem 0.6rem 0.54rem;
  border-radius: 10px;
  backface-visibility: hidden;
  background: linear-gradient(180deg, #151c27, #10151e);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.9);
  will-change: transform;
}

/* The accent bar reads as the card's "type" and turns mint on Go Live */
.wfb-card-bar {
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent, #00e8ff);
  margin-bottom: 0.38rem;
  transition: background 0.35s ease, width 0.35s ease;
}

/* Verb line — only the work package carries one, so the card stays
   empty-free while it is still a finding. */
.wfb-card-kind {
  display: block;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, #00e8ff);
  line-height: 1.2;
}

.wfb-card-kind:empty { display: none; }

.wfb-card.is-done .wfb-card-kind { color: var(--neon-mint); }

.wfb-card-title {
  display: block;
  padding-right: 1.1rem; /* reserved for the check, so finishing a card reflows nothing */
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.25;
  color: rgba(237, 237, 237, 0.92);
}

.wfb-card-check {
  position: absolute;
  top: 0.5rem;
  right: 0.55rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--neon-mint);
  color: #06281f;
  font-size: 0.6rem;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.wfb-card.is-done {
  border-color: rgba(0, 245, 181, 0.3);
}
.wfb-card.is-done .wfb-card-bar { background: var(--neon-mint); width: 46px; }
.wfb-card.is-done .wfb-card-check { opacity: 1; transform: scale(1); }

/* ── The plan that splits into the packages ───────────── */

.wfb-spec {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 236px;
  box-sizing: border-box;
  padding: 0.9rem 1rem 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #19212e, #121820);
  border: 1px solid rgba(0, 232, 255, 0.25);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.95), 0 0 34px -18px rgba(0, 232, 255, 0.5);
  will-change: transform, opacity;
}

.wfb-spec-title {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: #edf5ff;
}

.wfb-spec-sub {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(237, 237, 237, 0.4);
  margin-top: 0.15rem;
  margin-bottom: 0.7rem;
}

.wfb-spec-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.33rem 0;
  font-size: 0.74rem;
  color: rgba(237, 237, 237, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.wfb-spec-row i {
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent, #00e8ff);
  flex: none;
}

/* ── What it all adds up to ───────────────────────────── */

.wfb-outcome {
  margin-top: 1.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.wfb-outcome.is-on {
  opacity: 1;
  transform: none;
}

.wfb-outcome-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(237, 237, 237, 0.36);
  margin-bottom: 0.7rem;
}

.wfb-outcome-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 0.75rem;
}

.wfb-outcome-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 181, 0.26);
  background: rgba(0, 245, 181, 0.06);
  color: rgba(237, 255, 248, 0.9);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.wfb-outcome-item::before {
  content: "↗";
  color: var(--neon-mint);
  font-size: 0.86rem;
  line-height: 1;
}

/* ── Screen-reader description of the animated board ──── */

.wfb-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 760px) {
  .wfb { margin-bottom: 3rem; }
  .wfb-board { gap: 9px; }
  .wfb-col-head { font-size: 0.62rem; letter-spacing: 0.08em; gap: 0.35rem; }
  .wfb-col-count { min-width: 1.9em; padding: 0.1rem 0.3rem; }
  .wfb-col-body { min-height: 190px; border-radius: 11px; }
  .wfb-card { border-radius: 8px; padding: 0.4rem 0.45rem 0.44rem; }
  .wfb-card-title { font-size: 0.62rem; padding-right: 0.95rem; }
  .wfb-card-kind { font-size: 0.5rem; letter-spacing: 0.08em; }
  .wfb-card-bar { width: 20px; margin-bottom: 0.3rem; }
  .wfb-outcome-item { font-size: 0.72rem; padding: 0.34rem 0.7rem; }
  .wfb-spec { width: 200px; }
}

@media (max-width: 460px) {
  .wfb-col-head { font-size: 0.52rem; letter-spacing: 0.03em; gap: 0.25rem; }
  .wfb-col-count { min-width: 1.7em; }
  .wfb-card-title { font-size: 0.56rem; }
  .wfb-card-kind { font-size: 0.46rem; letter-spacing: 0.05em; }
  .wfb-card-bar { width: 16px; }
  .wfb-outcome-item { font-size: 0.66rem; }
  .wfb-spec { width: 178px; }
  .wfb-spec-row { font-size: 0.66rem; }
}
