/* ============================================================
   WORKFLOWS, TWO STEPS: "Start with the basics", then "Automate
   anything else". Step 1 is six workflows any business can run with only
   email, WhatsApp and a calendar, so a missing CRM integration never blocks
   a new customer. Step 2 is the deeper, tool-specific workflows, closed by
   a "Your tool not listed yet?" strip (email, webhook, API, or we build
   it). Replaces the old Workflows grid (.wfi) on the home page.
   ============================================================ */

.wfs {
    padding: 96px 0 96px;
    background: var(--cream);
    border-top: 1px solid var(--line);
}
.wfs .sec-eyebrow { color: var(--brand-magenta); }
.wfs .sec-title { margin-bottom: 0; }

/* --- a step: label, title, sub, needs ---------------------------------- */
.wfs-step { margin-top: 64px; }
.wfs-step + .wfs-then + .wfs-step { margin-top: 20px; }
.wfs-step-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.wfs-step-label {
    display: flex; align-items: center; gap: 14px; margin: 0;
    font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 780; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink);
}
.wfs-step-label i {
    display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 999px;
    background: var(--brand-magenta, #D53BD5); color: #fff; font-style: normal; letter-spacing: 0; font-size: 1rem; font-weight: 700;
}
.wfs-step-title { margin: 12px 0 0; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 780; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); }
.wfs-step-sub { margin: 8px 0 0; max-width: 560px; font-size: 1.0625rem; line-height: 1.6; color: var(--body); }

.wfs-needs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: 0.875rem; color: var(--muted); }
.wfs-chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px;
    border: 1px solid var(--line); border-radius: 999px; background: #fff;
    font-size: 0.8125rem; font-weight: 600; color: var(--ink);
}
.wfs-chip img { width: 16px; height: 16px; }

/* --- cards --------------------------------------------------------------- */
.wfs-grid { display: grid; gap: 16px; margin-top: 26px; list-style: none; padding: 0; }
.wfs-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wfs-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.wfs-card {
    display: flex; flex-direction: column; gap: 8px;
    padding: 22px 22px 20px; border: 1px solid #D8D0CD; border-radius: 20px; background: #fff;
    box-shadow: 0 1px 2px rgba(22, 18, 26, 0.04), 0 14px 32px -28px rgba(22, 18, 26, 0.18);
}
.wfs-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wfs-ico {
    display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
    background: #FBFAFE; border: 1px solid #ECE8F3; color: #4C6BEE;
}
.wfs-ico svg { width: 24px; height: 24px; }
.wfs-ico--plus { color: var(--brand-magenta, #D53BD5); }
.wfs-logos { display: inline-flex; gap: 4px; }
.wfs-logos img { width: 22px; height: 22px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
/* department pill, the same look as .pl-ico-tag */
.wfs-tag {
    padding: 5px 9px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--cream);
    font-size: 0.625rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #6B6472;
}
.wfs-card h4 { margin: 6px 0 0; font-size: 1.0625rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.wfs-card p { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--body); }
/* the foot of every card, the old Workflows grid's way: what it gives you
   (step 1) or where it starts (step 2) on the left, an arrow on the right */
.wfs-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
}
.wfs-out { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.wfs-trig { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: 0.875rem; color: var(--muted); }
.wfs-trig img { width: 18px; height: 18px; flex: none; }
.wfs-trig b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.wfs-trig-sep { width: 3px; height: 3px; flex: none; border-radius: 50%; background: #C9C2C7; }
.wfs-trig-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #C9C2C7; }
.wfs-arrow {
    display: grid; place-items: center; flex: none; width: 34px; height: 34px;
    border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink);
    transition: background .2s ease, border-color .2s ease;
}
.wfs-arrow svg { width: 14px; height: 14px; }
.wfs-card[data-process]:hover .wfs-arrow { background: var(--pink-wash, #FFF3FF); border-color: var(--pink-surface, #FFD9FF); }
.wfs-foot--own { border-top-style: dashed; }
.wfs-foot--own .wfs-trig span { font-weight: 600; color: var(--brand-magenta, #D53BD5); }
.wfs-card--own { border-style: dashed; background: #FBF8F7; box-shadow: none; }

/* --- the "then" divider ------------------------------------------------- */
.wfs-then { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin: 44px 0 0; }
.wfs-then::before, .wfs-then::after { content: ""; border-top: 1px dashed #CFC8CC; }
.wfs-then span {
    padding: 7px 16px; border: 1px dashed var(--ink); border-radius: 999px; background: transparent;
    font-size: 0.875rem; font-weight: 700; color: var(--ink);
}

/* --- "your tool not listed yet?" strip ------------------------------------ */
.wfs-connect {
    display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px;
    margin-top: 22px; padding: 18px 20px; border: 1px dashed #CFC8CC; border-radius: 18px; background: #fff;
}
.wfs-connect-q { margin: 0; font-size: 1rem; font-weight: 700; color: var(--ink); }
.wfs-ways { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; list-style: none; margin: 0; padding: 0; }
.wfs-ways li { display: flex; flex-direction: column; min-width: 160px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--cream); }
.wfs-ways b { font-size: 0.875rem; color: var(--ink); }
.wfs-ways span { font-size: 0.8125rem; color: var(--muted); }

.wfs-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 48px; }

@media (max-width: 1023px) {
    .wfs-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .wfs { padding: 64px 0 72px; }
        .wfs-step { margin-top: 44px; }
    .wfs-grid--3, .wfs-grid--4 { grid-template-columns: 1fr; }
    .wfs-connect { grid-template-columns: 1fr; }
    .wfs-ways { justify-content: flex-start; }
    .wfs-ways li { min-width: 0; flex: 1 1 140px; }
}

/* --- a card opens its process page (js/wf-starter.js) ------------------- */
.wfs-card[data-process] { cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.wfs-card[data-process]:hover { transform: translateY(-2px); border-color: var(--pink-surface, #FFD9FF); box-shadow: 0 10px 24px -14px rgba(17, 24, 39, 0.25); }
.wfs-card[data-process]:focus-visible { outline: 2px solid var(--brand-magenta); outline-offset: 3px; }
.wfs.is-open .wfs-step, .wfs.is-open .wfs-then { display: none; }
.wfs-detail { margin-top: 48px; }
.wfs-detail .hiw-panel { display: flex; flex-direction: column; height: min(640px, 78vh); padding: 0; overflow: hidden; }
.wfs-detail .apv-body { overflow-y: auto; padding-bottom: 20px; }
.wfs-detail .apv-body.is-form { background: #fff; }
.wfs-detail .apv-backbtn { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
.wfs-detail .apv-backbtn svg { width: 15px; height: 15px; flex: none; }
.wfs-detail .pl-note { margin-top: 14px; font-size: 0.875rem; color: var(--muted); text-align: center; }

/* Step 2 reuses the old Workflows grid (.wfi .wfi-pick, css/wf-intro.css,
   driven by js/process-picker.js); drop the section chrome it brings. */
.wfs .wfi { padding: 0; background: none; border-top: 0; }
.wfs .wfi .wfi-pick { margin-top: 26px; }

/* the title, then the "Needs only" chips under it */
.wfs-step-head { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 16px; }
