/* ============================================================
   WORKFLOW PACKAGES (home page, rebuilt 2026-10-10, teams added
   2026-10-11). Ready-to-run workflows and their integrations, packaged by
   industry (Estate agencies, IVA firms) and by team (Sales, Support,
   Operations). The tabs show each industry's icon and the logos of its tools;
   the industries sit side by side on a
   track that slides to the one picked, the box taking its height in one
   step. Every workflow lists the integrations it uses ("Uses") and opens
   its PROCESS.md (.wfs-detail, js/wf-starter.js). Industry boxes end with
   a line that slides to Any industry. Driven by js/workflow-packs.js;
   without it the industries simply stack. Light band with a soft colour
   glow and a faint grid fading from the middle; nothing in it animates.
   Markup: tools/build-industries.py.
   ============================================================ */

.wfp { position: relative; isolation: isolate; overflow: hidden; padding: 112px 0 120px; background: #FCF9F7; }
.wfp::before {
    content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(38% 30% at 18% 22%, rgba(245, 128, 56, 0.20), transparent 70%),
        radial-gradient(40% 32% at 82% 18%, rgba(213, 59, 213, 0.20), transparent 70%),
        radial-gradient(45% 35% at 70% 78%, rgba(124, 92, 255, 0.16), transparent 70%),
        radial-gradient(35% 30% at 22% 82%, rgba(76, 107, 238, 0.12), transparent 70%);
}
.wfp::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(22, 18, 26, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 18, 26, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000 30%, transparent 100%);
            mask-image: radial-gradient(70% 60% at 50% 45%, #000 30%, transparent 100%);
}
.wfp .sec-head { text-align: center; }
.wfs.is-open .wfp-tabs, .wfs.is-open .wfp-stage, .wfs.is-open .wfp-more, .wfs.is-open .wfp-note { display: none; }

/* --- the package tabs: the harness tabs' UI (css/how-it-works.css .hx-track and
   .hx-card): one tray that reads as a single chooser (near-white here, to sit
   on this band's glow), quiet segments, the selected one magenta. Industries, teams, then Any custom workflow. ----- */
.wfp-tabs {
    position: relative; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px;
    width: fit-content; max-width: 100%; margin: 40px auto 0; padding: 5px;
    background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(22, 18, 26, 0.07); border-radius: 28px;
    box-shadow: 0 14px 34px -24px rgba(38, 20, 40, 0.35);
}
.wfp-tab {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px;
    border: 1px solid transparent; border-radius: 999px; background: transparent; cursor: pointer;
    font: inherit; color: var(--body, #4E4854);
    transition: color .22s ease, background .22s ease, border-color .22s ease, box-shadow .24s ease, transform .24s ease;
}
.wfp-tab b { font-size: 0.8125rem; font-weight: 650; letter-spacing: -0.005em; white-space: nowrap; }
.wfp-tab:hover { color: var(--pink-deep, #D53BD5); background: #F6F1EF; }
.wfp-tab:focus-visible { outline: 2px solid #4C6BEE; outline-offset: 3px; }
.wfp-tab[aria-selected="true"] {
    color: #F4EDE9; background: var(--pink-deep, #D53BD5); border-color: var(--pink-deep, #D53BD5);
    box-shadow: 0 1px 2px rgba(22, 18, 26, 0.05), 0 12px 26px -16px rgba(213, 59, 213, 0.5);
}
.wfp-tab[aria-selected="true"]:hover { color: #F4EDE9; transform: translateY(-1px); }
.wfp-tab-ico { flex: none; width: 15px; height: 15px; }
.wfp-tab-ico svg { width: 100%; height: 100%; display: block; }

/* --- the box and its sliding track ------------------------------------------- */
.wfp-stage { max-width: 960px; margin: 22px auto 0; }
.wfp-viewport {
    position: relative; border-radius: 24px; background: #fff; border: 1px solid rgba(22, 18, 26, 0.09);
    box-shadow: 0 34px 70px -40px rgba(38, 20, 40, 0.38), 0 2px 6px -2px rgba(17, 24, 39, 0.05);
    contain: paint;
}
.wfp.is-slider .wfp-viewport { overflow: hidden; }
.wfp.is-slider .wfp-track { display: flex; align-items: flex-start; }
.wfp.is-ready .wfp-track { transition: transform .38s cubic-bezier(.2, .8, .2, 1); }
.wfp.is-sliding .wfp-track { will-change: transform; }
.wfp-pack { flex: 0 0 100%; min-width: 0; padding: 12px 30px 20px; transition: opacity .25s ease; }
.wfp.is-slider .wfp-pack:not(.is-on) { opacity: .4; }
.wfp:not(.is-slider) .wfp-pack + .wfp-pack { border-top: 1px solid var(--line); }

/* --- a workflow: what it does, the integrations it uses, Open ---------------- */
.wfp-rows { list-style: none; margin: 0; padding: 0; }
.wfp-row {
    display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 16px;
    padding: 14px 12px; margin: 0 -12px; border-radius: 14px; position: relative;
}
.wfp-row + .wfp-row::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; border-top: 1px solid rgba(22, 18, 26, 0.07); }
.wfp-row-ico {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; align-self: start;
    background: #EEF2FF; color: var(--brand-blue, #4C6BEE); border: 1px solid rgba(76, 107, 238, 0.16);
}
.wfp-row-ico svg { width: 21px; height: 21px; }
.wfp-row.is-own .wfp-row-ico { background: #fff; border: 1px dashed rgba(76, 107, 238, .5); color: var(--brand-blue, #4C6BEE); }
.wfp-row-txt { min-width: 0; }
.wfp-row-txt h4 { margin: 0; font-size: 1.0625rem; font-weight: 650; color: var(--ink); line-height: 1.35; }
.wfp-row-txt p { margin: 3px 0 0; font-size: 0.9375rem; line-height: 1.45; color: #6A6470; }
.wfp-uses { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.wfp-uses-k { margin-right: 2px; font-size: 0.6875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wfp-use {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 14px 3px 9px; border-radius: 999px;
    border: 1px solid var(--line); background: #fff; font-size: 0.8125rem; font-weight: 650; color: var(--ink); white-space: nowrap;
}
.wfp-use-logo { width: 15px; height: 15px; border-radius: 4px; }
.wfp-use-logo--icon { display: inline-grid; place-items: center; color: var(--ink); }
/* the line icons (Any integration, API, Webhook) fill the same box as a brand
   logo, with one line weight, so they read at the same size */
.wfp-use-logo--icon svg { width: 15px; height: 15px; stroke-width: 1.8; }
.wfp-use.is-soon { border-style: dashed; color: var(--muted); }
.wfp-use.is-soon .wfp-use-logo { filter: grayscale(1); opacity: .6; }
.wfp-row-go {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px;
    font-size: 0.8125rem; font-weight: 700; color: var(--ink); text-decoration: none;
    opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s, background-color .2s;
}
.wfp-row-go svg { width: 13px; height: 13px; }

/* workflow rows keep .wfs-card (so js/wf-starter.js opens them) without its card look */
.wfp .wfp-rows .wfp-row.wfs-card {
    display: grid; margin: 0 -12px; padding: 14px 12px; border: 0; border-radius: 14px;
    background: transparent; box-shadow: none; transform: none; cursor: pointer;
    transition: background-color .2s;
}
.wfp .wfp-rows .wfp-row.wfs-card h4 { margin: 0; }
.wfp .wfp-rows .wfp-row.wfs-card p { margin: 3px 0 0; }
.wfp .wfp-rows .wfp-row.wfs-card:hover,
.wfp .wfp-rows .wfp-row.wfs-card:focus-visible { background: #F7F4F2; transform: none; box-shadow: none; outline: none; }
.wfp .wfp-rows .wfp-row.wfs-card:hover .wfp-row-go,
.wfp .wfp-rows .wfp-row.wfs-card:focus-visible .wfp-row-go { opacity: 1; transform: none; background: #fff; }

/* a block that links out (Any custom workflow: Any integration, API, Webhook) */
.wfp-rows .wfp-row--link { display: block; padding: 0; margin: 0; }
.wfp-row-a {
    display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 16px;
    margin: 0 -12px; padding: 14px 12px; border-radius: 14px; color: inherit; text-decoration: none;
    transition: background-color .2s;
}
.wfp-row-a:hover, .wfp-row-a:focus-visible { background: #F7F4F2; outline: none; }
.wfp-row-ico.is-logo { background: #fff; border-color: rgba(22, 18, 26, 0.10); color: var(--ink); }
.wfp-row-logo { width: 24px; height: 24px; }
.wfp-row-logo--icon { display: grid; place-items: center; }
.wfp-row-logo--icon svg { width: 21px; height: 21px; }
.wfp-row-go.is-link { opacity: 1; transform: none; background: var(--soft); }
.wfp-row-a:hover .wfp-row-go.is-link { background: #fff; }

/* after the box */
.wfp-more { margin: 30px 0 0; text-align: center; }
.wfp-note { margin: 14px 0 0; text-align: center; font-size: 0.9375rem; color: var(--body); }

/* --- responsive ------------------------------------------------------------- */
/* below 980px the tray becomes a full-width rail the tabs scroll along, as in the harness */
@media (max-width: 979px) {
    .wfp-tabs {
        flex-wrap: nowrap; justify-content: flex-start; width: auto; overflow-x: auto; scrollbar-width: none;
        /* no max-width here: the 100% cap above stopped the band a gutter
           short of the right edge; .wfp clips the bleed */
        max-width: none;
        margin: 32px calc(50% - 50vw) 0; padding: 5px 16px; border-radius: 0; border-left: 0; border-right: 0;
    }
    .wfp-tabs::-webkit-scrollbar { display: none; }
    .wfp-tab { border-radius: 12px; }
}
@media (max-width: 760px) {
    .wfp { padding: 80px 0 88px; }
    .wfp-pack { padding: 6px 16px 16px; }
    .wfp-row, .wfp .wfp-rows .wfp-row.wfs-card { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
    .wfp-row-ico { width: 40px; height: 40px; }
    .wfp-row-go:not(.is-link) { display: none; }
    .wfp-row-a { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
    .wfp-row-go.is-link { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
    .wfp.is-ready .wfp-track, .wfp-pack, .wfp-row-go, .wfp-tab, .wfp .wfp-rows .wfp-row.wfs-card { transition: none; }
}

/* phones (2026-10-12): the icon sits beside the title, the description and
   the tools it uses take the full width, and the chips are a touch smaller,
   so each row is shorter and the list reads faster */
@media (max-width: 560px) {
    .wfp .wfp-rows .wfp-row.wfs-card, .wfp-row-a {
        grid-template-columns: 34px minmax(0, 1fr); column-gap: 11px; row-gap: 0; align-items: center;
    }
    .wfp-row-ico { width: 34px; height: 34px; border-radius: 10px; align-self: center; }
    .wfp-row-ico svg { width: 17px; height: 17px; }
    .wfp-row-logo { width: 19px; height: 19px; }
    .wfp-row-txt { display: contents; }
    .wfp-row-txt h4, .wfp .wfp-rows .wfp-row.wfs-card h4 { grid-column: 2; font-size: 1rem; }
    .wfp-row-txt p, .wfp .wfp-rows .wfp-row.wfs-card p { grid-column: 1 / -1; margin-top: 7px; font-size: 0.875rem; }
    .wfp-row-txt .wfp-uses { grid-column: 1 / -1; margin-top: 8px; gap: 5px; }
    .wfp-use { padding: 2px 12px 2px 8px; gap: 5px; font-size: 0.75rem; }
    .wfp-use-logo { width: 14px; height: 14px; }
    .wfp-use-logo--icon svg { width: 14px; height: 14px; }
    .wfp-row-go.is-link { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }
}
