/* Homepage sections 02-06 (builder home-a; v2 order and spacing by home-v2).
   Figma "Lendware - Website" > Explorations > Home v4 frame 11743:19431:
   02 Transform your pipeline 11743:21108 · 03 Meet Lendware Predict 11743:19475 · 04 Know the moment 11743:19594 ·
   05 Mobile app 11743:21198 · 06 Win top talent 11743:19817.
   v2 swapped the Predict and Transform sections (CHANGES-V2 #1). Values are the exact px from Figma at 1512 unless noted. */

/* Every Figma text style uses -2% tracking. letter-spacing in em is resolved once and then inherited as px,
   so re-declare it per element inside these sections (body's -0.02em resolves to 16px text). */
:is(.home-cowork, .home-pipe, .home-moment, .home-mobile, .home-talent),
:is(.home-cowork, .home-pipe, .home-moment, .home-mobile, .home-talent) * { letter-spacing: -0.02em; }

/* =========================================================================
   03  Meet Lendware Predict  (Figma 11743:19475)
   v2: no longer sits under the hero, so it takes the standard 160px section rhythm, centres the copy
   against the visual like 04-06, and the visual frame uses the system's 16px media radius.
   ========================================================================= */
.home-cowork { padding-block: 160px; }
/* Same 1280px column as Transform above and 04-07 below, so section edges line up down the page */
.home-cowork__inner { display: flex; align-items: center; gap: 48px; max-width: calc(1280px + 2 * var(--gutter)); }   /* .container: 1280 content + gutters */
.home-cowork__visual { flex: 0 1 776px; min-width: 0; padding: 32px; border-radius: 16px; background: var(--black); }
.home-cowork__copy { flex: 1 1 360px; min-width: 0; }
.home-cowork__copy h2 { margin-bottom: 24px; }   /* 24px heading-to-body, as in 04-06 */
.home-cowork__copy .body-lg { margin-bottom: 32px; }

/* Chat card (11743:22396): 712 x 608, glass fill + two radial gradient strokes */
.cowork-chat {
  position: relative; isolation: isolate;
  width: 712px; max-width: 100%; min-height: 608px;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 19px 19px 22px 17px;
  border-radius: 16px;
  background: radial-gradient(660px 930px at 0 0, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0)), #141414;
}
.cowork-chat::before, .cowork-input::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  padding: 1px; border-radius: inherit;
  background:
    radial-gradient(600px 1000px at 0 0, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0)),
    radial-gradient(420px 850px at 100% 100%, rgba(255, 255, 255, .27), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, .08);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.cowork-bubble { padding: 8px 16px; border-radius: 24px; font-size: 14px; line-height: 1.5; }
.cowork-bubble--user { align-self: flex-end; margin-bottom: 11px; background: var(--n600); color: var(--white); }
.cowork-bubble--ai { margin-bottom: 8px; background: var(--black); color: var(--n300); }

/* Lead table (11743:22446): 676 wide, Figma row strokes sit inside the 52px rows */
.cowork-table { width: 676px; max-width: 100%; margin-bottom: 8px; padding: 0 16px; border-radius: 16px; background: var(--black); overflow: hidden; }
.cowork-table__head, .cowork-table__row { display: flex; gap: 10px; }
.cowork-table__head { padding: 12px 0 11px; border-bottom: 1px solid var(--n700); font-size: 11.229px; line-height: 1.5; font-weight: 600; color: var(--n400); }
.cowork-table__head > * { letter-spacing: -0.01em; }
.cowork-table__head .cowork-col-name { flex: none; width: 136px; }
.cowork-table__head .cowork-col-score { flex: none; width: 86px; }
.cowork-table__head .cowork-col-signal { flex: none; width: 167px; }
.cowork-table__head .cowork-col-action { flex: 1 1 0; min-width: 0; }
.cowork-table__row { align-items: center; padding: 14px 0 13px; border-bottom: 1px solid var(--n700); font-size: 13.1px; line-height: 1.5; }
.cowork-table__row:last-child { padding-bottom: 14px; border-bottom: 0; }
.cowork-table__row .cowork-col-name { flex: none; width: 136px; display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--white); white-space: nowrap; }
.cowork-table__row .cowork-col-name img { flex: none; width: 24px; height: 24px; border-radius: 50%; }
.cowork-table__row .cowork-col-score { flex: none; width: 84px; display: flex; }
.cowork-table__row .cowork-col-signal { flex: none; width: 172px; color: var(--n400); letter-spacing: -0.022em; }
.cowork-table__row .cowork-col-action { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lime-200); letter-spacing: -0.022em; }
.cowork-chip { display: inline-flex; align-items: center; height: 20.457px; padding: 0 9.23px; border: .936px solid var(--lime); border-radius: 46.786px; color: var(--lime); font-size: 12.26px; line-height: 1.5; white-space: nowrap; }

.cowork-bubble--ask { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; margin-bottom: 21px; padding: 8px 16px 13px; border-radius: 16px; background: var(--black); color: var(--n300); }
.cowork-cta { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 8px; background: var(--lime); color: var(--black); font-size: 14px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.cowork-cta img { width: 14px; height: 14px; }

/* Message box (11743:22609): 674 x 58 */
.cowork-input { position: relative; isolation: isolate; width: 674px; max-width: 100%; height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 15px 0 11px; border-radius: 16px; }
.cowork-input__left, .cowork-input__right { display: flex; align-items: center; min-width: 0; }
.cowork-input__left { gap: 16px; }
.cowork-input__right { gap: 8px; flex: none; }
.cowork-input__btn { flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.cowork-input__btn img { width: 16px; height: 16px; }
.cowork-input__btn--mic img { width: 18px; height: 18px; }
.cowork-input__btn--plus { border: 1px solid var(--n500); }
.cowork-input__btn--send { border: 1px solid var(--lime); }
.cowork-input__placeholder { font-size: 14px; line-height: 1.5; color: var(--n500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Entrance animation (timings from the Figma motion timeline, played once). home-a.js adds .is-anim, then .is-playing */
.cowork-chat.is-anim [data-anim] {
  opacity: 0; transform: translateY(10px);
  transition: opacity .45s cubic-bezier(.16, 1, .3, 1) var(--d, 0s), transform .6s cubic-bezier(.16, 1, .3, 1) var(--d, 0s);
}
.cowork-chat.is-anim [data-anim="table"] { transform: translateY(12px); }
.cowork-chat.is-anim [data-anim="row"] { transform: translateY(7px); }
.cowork-chat.is-anim [data-anim="fade"] { transform: none; }
.cowork-chat.is-anim [data-anim="cta"] { transform: translateY(5px); }
.cowork-chat.is-anim.is-playing [data-anim] { opacity: 1; transform: none; }

/* =========================================================================
   02  Transform your pipeline  (Figma 11743:21108, h 928)
   ========================================================================= */
.home-pipe { padding-block: 160px 159px; border-bottom: 1px solid var(--n800); }
.home-pipe__title { max-width: 1050px; margin: 0 auto 56px; text-align: center; }
.home-pipe__title .muted { color: var(--n500); }
.home-pipe__carousel { display: flex; justify-content: center; gap: 32px; max-width: 1280px; margin-inline: auto; }
.home-pipe__list { flex: 0 0 392px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.pipe-tab {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%;
  padding: 16px; border: 1px solid var(--white); border-radius: 16px;
  background: transparent; color: var(--white); text-align: left;
  transition: background-color .2s, color .2s;
}
.pipe-tab:hover { background: rgba(255, 255, 255, .06); }
.pipe-tab.is-active, .pipe-tab.is-active:hover { background: var(--white); color: var(--black); }
.pipe-tab__title { font-size: 18px; line-height: 1.6; font-weight: 600; }
.pipe-tab__desc { min-height: 42px; font-size: 14px; line-height: 1.5; }

.home-pipe__panels { flex: 0 1 856px; min-width: 0; }
.pipe-panel { height: 448px; display: flex; justify-content: center; overflow: hidden; border: 1px solid var(--n600); border-radius: 16px; background: var(--n800); }
.pipe-panel[hidden] { display: none; }

/* MCP visual (11743:21128): chat card at y 125.6, AI tool tiles 12px below */
.pipe-mcp { width: 748px; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12.04px; padding-top: 125.59px; }
.pipe-chat { width: 476px; max-width: 100%; display: flex; flex-direction: column; gap: 20.098px; padding: 20.098px; border-radius: 13.399px; background: var(--white); color: var(--black); box-shadow: 0 5.024px 26.797px rgba(0, 0, 0, .1); }
.pipe-chat__q { align-self: flex-end; min-width: 239.5px; padding: 13.399px 16.748px; border-radius: 13.399px; background: var(--lime-200); font-size: 13.399px; line-height: 1.5; text-align: right; }
.pipe-chat__answer { display: flex; flex-direction: column; align-items: flex-start; gap: 10.049px; }
.pipe-chat__status { display: inline-flex; align-items: center; gap: 6.699px; height: 33.497px; padding: 0 13.399px; border-radius: 13.399px; background: var(--n100); color: var(--n700); font-size: 11.724px; line-height: 1.5; white-space: nowrap; }
.pipe-chat__status img { width: 11.724px; height: 11.724px; }
.pipe-chat__a { align-self: stretch; padding: 13.399px 16.748px; border-radius: 13.399px; background: var(--n100); font-size: 13.399px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe-tools { display: flex; gap: 9px; }
.pipe-tools__item {
  display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; border-radius: 16px;
  background: rgba(255, 246, 247, .2);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .28), inset -1px -1px 0 rgba(255, 255, 255, .12); /* Figma GLASS edge */
}
.pipe-tools__item--narrow { width: 74.1px; }
.pipe-tools__item img { width: 48px; height: 48px; }
.pipe-tools__item--narrow img { width: 42.1px; }

/* Other tabs reuse existing mockups */
.pipe-panel--mobile { align-items: flex-end; }
.pipe-mobile__img { width: 566px; max-width: 100%; }
.pipe-panel--referral, .pipe-panel--predict { align-items: center; }
.pipe-referral__img { width: 440px; max-width: 100%; }

/* =========================================================================
   Shared: borrower lead cards (Figma 11743:19600) used in 04 and the 02 Transform "Lendware Predict" tab
   ========================================================================= */
.ha-leads { position: relative; flex: none; width: 516px; height: 351.68px; }
.ha-lead {
  position: absolute; width: 316.863px; height: 160.173px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 13.928px;
  padding: 11.316px 13.057px; overflow: hidden;
  border: .871px solid var(--n200); border-radius: 6.964px;
  background: var(--white); color: var(--black);
}
.ha-lead--1 { left: 0; top: 191.51px; }
.ha-lead--2 { left: 99.57px; top: 95.76px; }
.ha-lead--3 { left: 199.14px; top: 0; background: var(--lime-100); box-shadow: 0 6px 24px rgba(0, 0, 0, .1); }
.ha-lead__head { display: flex; align-items: center; gap: 9.576px; }
.ha-lead__head img { flex: none; width: 41.784px; height: 41.784px; border-radius: 50%; }
.ha-lead__head p { display: flex; flex-direction: column; }
.ha-lead__name { font-size: 13.928px; line-height: 1.5; font-weight: 500; white-space: nowrap; }
.ha-lead__email { font-size: 12.187px; line-height: 1.5; color: var(--n700); white-space: nowrap; }
.ha-lead__signal { position: relative; padding-left: 15.669px; font-size: 13.928px; line-height: 1.5; }
.ha-lead__signal::before { content: ""; position: absolute; left: 0; top: 6.964px; width: 8.705px; height: 8.705px; border-radius: 50%; background: var(--lime-500); }
.ha-lead__signal > span { display: block; color: var(--n700); }
.ha-lead__signal strong { display: block; font-weight: 500; color: var(--black); }
.ha-lead__chip { display: inline-flex; align-items: center; height: 24.374px; padding: 0 17.41px; border: .871px solid var(--lime-500); border-radius: 43.525px; background: var(--lime-100); color: var(--green-600); font-size: 12px; line-height: 1.5; font-weight: 500; white-space: nowrap; }
.ha-lead--3 .ha-lead__chip { background: var(--lime-50); }

/* =========================================================================
   04 / 05 / 06  Copy + visual split (596 | 64 | 620 = 1280, centered)
   ========================================================================= */
.home-moment, .home-mobile, .home-talent { padding-block: 160px; }
.ha-split { display: flex; align-items: center; justify-content: center; gap: 64px; }
.ha-split__copy { flex: 0 1 596px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.ha-split__visual { flex: 0 1 620px; min-width: 0; }

/* 04 Know the moment (lime) */
.home-moment .display-md, .home-talent .display-md { color: var(--black); }
.home-moment .display-md { max-width: 560px; } /* matches the Figma line breaks */
.home-moment__panel { height: 408px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--n600); border-radius: 16px; background: var(--n800); }

/* 05 Mobile app */
.home-mobile__img { width: 100%; border-radius: 16px; }

/* 06 Win top talent (lime) */
.home-talent__review { display: flex; flex-direction: column; gap: 16px; padding: 16px; border: 1px solid var(--n700); border-radius: 16px; }
.home-talent__review blockquote { margin: 0; font-size: 16px; line-height: 1.5; color: var(--black); }
.home-talent__profile { display: flex; align-items: center; gap: 12px; }
.home-talent__profile img { flex: none; width: 48px; height: 48px; border-radius: 50%; }
.home-talent__profile > span { display: flex; flex-direction: column; font-size: 16px; line-height: 1.5; }
.home-talent__name { font-weight: 600; color: var(--black); }
.home-talent__role { color: var(--n600); }
.home-talent__img { width: 100%; border-radius: 16px; }

/* =========================================================================
   Responsive
   ========================================================================= */
/* 03 Predict: keep the chat mockup intact on laptop widths by scaling it (zoom affects layout, unlike transform) */
@media (max-width: 1440px) { .home-cowork__visual { zoom: .9; } }
@media (max-width: 1360px) { .home-cowork__visual { zoom: .85; } }
@media (max-width: 1280px) {
  .home-cowork__visual { zoom: .8; }
  .home-moment .ha-leads { zoom: .9; }
  .ha-split { gap: 48px; }
  .home-pipe__list { flex-basis: 360px; }
  .home-pipe__carousel { gap: 24px; }
}
@media (max-width: 1180px) {
  .home-cowork__inner { flex-direction: column; align-items: flex-start; gap: 40px; }
  .home-cowork__copy { order: -1; flex: none; max-width: 720px; }
  .home-cowork__visual { zoom: 1; flex: none; width: 100%; display: flex; justify-content: center; }
}
@media (max-width: 1100px) {
  .home-moment .ha-leads { zoom: 1; }

  .home-cowork, .home-moment, .home-mobile, .home-talent { padding-block: 96px; }
  .home-pipe { padding-block: 96px 95px; }
  .ha-split { flex-direction: column; align-items: flex-start; gap: 40px; }
  .ha-split__copy, .ha-split__visual { flex: none; width: 100%; max-width: 720px; }
  .ha-split--media-first .ha-split__copy { order: -1; }
}
@media (max-width: 1024px) {
  .home-pipe__carousel { flex-direction: column; gap: 24px; }
  .home-pipe__list { flex: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .home-pipe__panels { flex: none; }
}
@media (max-width: 768px) {
  .home-pipe__title { margin-bottom: 40px; }
  .home-cowork__visual { padding: 16px; }
  .cowork-chat { min-height: 0; padding: 16px 12px 16px; }
  .cowork-bubble--user { max-width: 85%; }
}
@media (max-width: 640px) {
  .home-cowork, .home-moment, .home-mobile, .home-talent { padding-block: 64px; }
  .home-pipe { padding-block: 64px 63px; }

  /* 03 Predict table reflows into stacked rows */
  .cowork-table__head { display: none; }
  .cowork-table__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 0 11px; }
  .cowork-table__row:last-child { padding-bottom: 12px; }
  .cowork-table__row .cowork-col-name, .cowork-table__row .cowork-col-score, .cowork-table__row .cowork-col-signal { width: auto; }
  .cowork-table__row .cowork-col-signal, .cowork-table__row .cowork-col-action { grid-column: 1 / -1; padding-left: 32px; white-space: normal; }
  .cowork-bubble--ask { align-items: flex-start; }

  /* 02 Transform tabs stack, panels size to content */
  .home-pipe__list { grid-template-columns: 1fr; gap: 8px; }
  .pipe-tab__desc { min-height: 0; }
  .pipe-panel { height: auto; min-height: 320px; padding: 24px 16px; }
  .pipe-panel--mobile { min-height: 0; padding-bottom: 0; }
  .pipe-mcp { padding-top: 8px; gap: 16px; }
  .pipe-chat { padding: 16px; gap: 16px; }
  .pipe-chat__q { min-width: 0; }
  .pipe-chat__a { white-space: normal; }
  .pipe-tools__item { width: 64px; height: 64px; padding: 12px; }
  .pipe-tools__item--narrow { width: 60px; }
  .pipe-tools__item img { width: 38px; height: 38px; }
  .pipe-tools__item--narrow img { width: 33px; }

  /* lead cards become a simple list, front card first */
  .home-moment__panel { height: auto; padding: 16px; }
  .ha-leads { width: 100%; height: auto; display: flex; flex-direction: column-reverse; gap: 12px; }
  .ha-lead { position: static; width: 100%; height: auto; }
  .ha-lead__email { white-space: normal; word-break: break-all; }
}
