/* Salesforge rebuild: homepage "stack" table, blocks 14 to 17.
   New code. Design values (colours, sizes, timings, breakpoints) follow salesforge.ai.
   Blocks 14 and 16 use the shared .rule .rule--desktop (site.css); block 15 uses the shared .band (home.css).
   Needs site.css and home.css first (tokens, .wrap, .container, .h4, .dark). */

.stack {
  --stack-line: var(--gray-200);        /* #eaecf0 */
  --stack-line-violet: #e9d7fe;
  --stack-tag-violet: #d6bbfb;
  --stack-arrow: #6941c6;
  --stack-pill-shadow: 0 7.5px 15px rgba(0, 0, 0, .06);
  background: var(--white);
}
.stack__frame {
  padding-top: 48px; background: var(--white);
  border-left: 1px solid var(--stack-line); border-right: 1px solid var(--stack-line);
}
.stack__title { margin-bottom: 16px; text-align: center; }
.stack__lead { text-align: center; }

/* the table: five rows of seven equal columns. Rows 2 to 4 are 174px tall; the "With the Forge" row's
   cells may hang 26px lower, under the Agent Frank row, and the CRM panel runs on down beside the last two rows. */
.stack__table {
  margin-top: 48px; overflow: hidden; background: var(--white);
  border-top: 1px solid var(--stack-line);
}
.stack__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }

/* ---- row 1: the seven steps */
.stack-step {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  padding: 16px 8px; background: var(--gray-50); border-bottom: 1px solid var(--stack-line);
}
.stack-step--brand {
  background: var(--violet-50);
  border-bottom-color: var(--stack-line-violet); border-left: 1px solid var(--stack-line-violet);
}
.stack-step__icon {
  display: flex; align-items: center; flex: none; padding: 4px;
  background: var(--white); border: 1px solid var(--stack-line); border-radius: 10px; box-shadow: var(--shadow-xs);
}
.stack-step--brand .stack-step__icon { background: var(--violet-100); border-color: var(--stack-line-violet); }
.stack-step__icon img { width: 24px; height: 24px; object-fit: cover; }
.stack-step__label { margin: 8px 0; font-size: 16px; font-weight: 500; line-height: 24px; color: #000; }
.stack-step--brand .stack-step__label { color: var(--violet); }

/* the small pills that sit on the line between two rows */
.stack-tag {
  position: absolute; z-index: 1; top: -20px; left: 8px;
  display: flex; align-items: center; padding: 9px 17px; white-space: nowrap;
  background: var(--white); border: 1px solid var(--stack-line); border-radius: 999px; box-shadow: var(--stack-pill-shadow);
  font-size: 12px; font-weight: 500; line-height: 18px; color: var(--gray-700);
}
.stack-tag--violet { color: var(--violet); }

/* ---- row 2: "Without the Forge". The first cell is one pixel taller than the row, as on the live page. */
.stack__row--without { height: 174px; align-items: center; }
.stack-todo {
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  height: 174px; padding: 8px;
  border-left: 1px solid var(--stack-line); border-bottom: 1px solid var(--stack-line);
}
.stack-todo--first { position: relative; align-self: stretch; height: auto; justify-content: flex-start; border-left: 0; }
.stack-todo--top { align-self: start; }
.stack-todo__panel {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  flex: 1 1 0; padding-left: 12px; border-radius: 4px;
  background-image: linear-gradient(90deg, var(--gray-50), var(--white));
}
.stack-todo--first .stack-todo__panel { flex: none; height: 158px; }
.stack-todo__list { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; padding: 0; list-style: none; }
.stack-todo__list--tight { gap: 6px; }
.stack-todo__list--clip { overflow: hidden; border-radius: 8px; }
.stack-todo__item { font-size: 12px; font-weight: 500; line-height: 18px; color: var(--gray-700); }
.stack-goal {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  height: 174px; padding: 40px 8px 8px; background: var(--white); border-left: 1px solid var(--stack-line);
}
.stack-goal--last { border-left: 0; }
.stack-goal__label { margin-bottom: 14px; font-size: 14px; font-weight: 600; line-height: 20px; text-align: center; color: var(--violet); }

/* ---- row 3: "With the Forge". The track is 200px inside a 174px row. */
.stack__row--with { height: 174px; grid-template-rows: 200px; align-items: start; }
.stack-forge {
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  height: 174px; padding: 8px;
  border-left: 1px solid var(--stack-line); border-bottom: 1px solid var(--stack-line);
}
.stack-forge--first { position: relative; align-self: stretch; height: auto; justify-content: flex-start; border-left: 0; }
.stack-forge--top { align-self: start; }
.stack-forge--wide { grid-column: span 2; }

/* product tiles: shown, not linked, so no hover */
.stack-tile {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center;
  flex: 1 1 0; min-height: 0; border-radius: 4px;
}
.stack-tile--leads { background-image: linear-gradient(90deg, #eafaf2, var(--white)); }
.stack-tile--prime { background-image: linear-gradient(90deg, #0593d61c, var(--white)); }
.stack-tile--infra { background-image: linear-gradient(90deg, #eff4ff, var(--white)); }
.stack-tile--mail { background-image: linear-gradient(90deg, #f8f8f8, var(--white)); }
.stack-tile--warm { background-image: linear-gradient(90deg, #fffaeb, var(--white)); }
.stack-tile--sales { background-image: linear-gradient(90deg, var(--violet-50), var(--white)); }
.stack-tile__logo { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.stack-tile__logo--clip { overflow: hidden; border-radius: 8px; }
.stack-logo { flex: none; }
.stack-logo--leads { width: 100px; height: 24px; margin: 1px 0; }
.stack-logo--prime { width: 100px; height: 27px; margin: -.5px 0; }
.stack-logo--infra { width: 95px; height: 24px; object-fit: cover; }
.stack-logo--mail { width: 94.5px; height: 24px; object-fit: cover; }
.stack-logo--warm { width: 106px; height: 24px; object-fit: cover; }
.stack-logo--sales { width: 105px; height: 24px; object-fit: cover; }

/* offer pills inside the tiles */
.stack-offer { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 4px 0 4px 8px; border-radius: 999px; }
.stack-offer--leads { color: #067647; background: #e2f8e9; }
.stack-offer--warm { color: var(--ink); background: #feee95; }
.stack-offer--sales { color: var(--ink); background: var(--violet-100); }
.stack-offer--frank { margin-top: 4px; padding-right: 4px; color: var(--ink); background: var(--violet-100); }
.stack-offer__text { font-size: 12px; font-weight: 600; line-height: 16.8px; }
.stack-offer__icons { display: flex; }
.stack-offer__icon { position: relative; flex: none; width: 20px; height: 20px; }
.stack-offer__icon--top { z-index: 1; }
.stack-offer__icon--under { left: -4px; }

/* Agent Frank card hover (Frank's 400ms in, 200ms out): the avatar, name and pill fade out while a purple
   arrow, centred in the card and waiting 2rem lower, rises in */
.stack-fade { transition: opacity .2s var(--out-circ); }
.stack-arrow {
  position: absolute; inset: 0; margin: auto;
  display: flex; justify-content: center; align-items: center;
  width: 32px; height: 32px; overflow: hidden; border-radius: 50%;
  background: var(--stack-arrow); color: var(--white);
  opacity: 0; transform: translate3d(0, 2rem, 0);
  transition: opacity .2s var(--out-circ), transform .2s var(--out-circ);
}
.stack-arrow svg { flex: none; width: 20px; height: 20px; }
.stack__row--frank:hover .stack-fade { opacity: 0; transition-duration: .4s; }
.stack__row--frank:hover .stack-arrow { opacity: 1; transform: translate3d(0, 0, 0); transition-duration: .4s; }

/* CRM panel: a 413px block in a 200px cell, drawn above the two rows below it */
.stack-crm {
  position: relative; grid-column: span 2; align-self: stretch;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 6px; background: var(--white); border-left: 1px solid var(--stack-line);
}
.stack-crm__block { display: flex; flex-direction: column; flex: none; width: 100%; height: 413px; background: var(--white); }
.stack-crm__panel {
  position: relative; z-index: 1; flex: 1 1 0;
  display: grid; grid-template-columns: 1fr 1fr; row-gap: 20px;
  margin: 0 8px 12px; padding: 36px 8px 56px; border-radius: 8px;
  background-color: var(--gray-50); background-image: linear-gradient(135deg, var(--gray-50) 57%, var(--violet-100));
}
.stack-crm__title {
  grid-column: span 2; justify-self: center;
  font-size: 13px; font-weight: 500; line-height: 18.2px; color: var(--body);
}
.stack-crm__logo { display: block; align-self: center; justify-self: center; width: 46%; line-height: 0; }
.stack-crm__logo svg { display: inline; }
.stack-crm__logo--salesforce { width: 38%; }
.stack-crm__logo--breakcold { width: 60%; }
.stack-crm__logo--folk { width: 43%; }
.stack-crm__logo--highlevel { width: 58%; }
.stack-crm__logo--pipedrive { grid-column: span 2; width: 31%; }

/* ---- row 4: Agent Frank */
.stack__row--frank { height: 174px; align-items: center; }
.stack-frank { grid-column: span 5; height: 174px; padding: 8px; }
.stack-frank__card {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center;
  height: 158px; padding: 55px 0; border-radius: 4px;
  background-image: linear-gradient(90deg, #fcfaff, rgba(252, 250, 255, .5) 50%, var(--white));
  font-weight: 500; color: var(--violet);
  will-change: opacity;     /* own layer, as Chrome gives this card on the live page: same greyscale text smoothing */
}
.stack-frank__group { display: flex; align-items: center; gap: 16px; flex: none; }
.stack-frank__avatar { flex: none; width: 64px; height: 64px; }
.stack-frank__text { align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; }
.stack-frank__name { font-size: 20px; font-weight: 600; line-height: 30px; color: var(--ink); }
.stack-frank__tag {
  position: absolute; top: -26px; left: 0;
  display: flex; align-items: center; gap: 8px; padding: 9px 17px; white-space: nowrap;
  background: var(--violet-50); border: 1px solid var(--stack-tag-violet); border-radius: 999px; box-shadow: var(--stack-pill-shadow);
  font-size: 12px; font-weight: 500; line-height: 18px; color: var(--violet);
}
.stack-frank__tag img { flex: none; width: 16px; height: 16px; }
.stack-blank { height: 174px; background: var(--white); border-left: 1px solid var(--stack-line); }

/* ---- row 5: MCP, CLI and API (shown, not linked) */
.stack__row--dev { align-items: center; }
.stack-dev { grid-column: span 5; display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--stack-line); }
.stack-dev__card {
  position: relative; display: flex; justify-content: space-between; align-items: center; flex: 1 1 0;
  height: 48px; padding: 12px 8px 12px 12px; overflow: hidden; border-radius: 8px;
  background-color: var(--gray-50); background-image: linear-gradient(90deg, var(--gray-50), var(--violet-50));
  font-weight: 500; color: var(--body);
}
.stack-dev__label { position: relative; z-index: 1; font-size: 13px; line-height: 18.2px; color: var(--ink); }
.stack-dev__img { position: absolute; top: 0; right: 0; bottom: 0; width: auto; height: 100%; max-width: 100%; object-fit: cover; }
.stack-blank--short { align-self: stretch; height: auto; background: none; }

/* the live page shows this table on desktop only */
@media (max-width: 991px) {
  .stack { display: none; }
}
