/* ProcIndex homepage: cinematic revamp.
   Loaded after /styles.css on the homepage only. New sections use the cx- prefix;
   the legacy capabilities grid is re-skinned through the palette variables below. */

.home-page{
    --ink: #0f0f0f;
    --ink-2: #161616;
    --graphite: #242424;
    --graphite-2: #2b2b2c;
    --paper: #f6f5f4;
    --paper-2: #fdfdfc;
    --beige: #ded8d3;
    --stone: #a3a3a3;
    --slate: #67676a;
    --amber: #d9a441;
    --amber-ink: #a9741a;
    --coral: #e8604f;
    --coral-600: #d64535;
    --teal: #3d9b73;
    --line-dark: rgba(255, 255, 255, 0.10);
    --line-light: rgba(15, 15, 15, 0.12);

    --text: #0f0f0f; --text-2: #67676a; --text-3: #8a8a8d;
    --bg: #f6f5f4; --bg-subtle: #f6f5f4;

    background: var(--ink);
    color: var(--paper);
}
.home-page h1,
.home-page h2,
.home-page h3{ text-wrap: balance; }
.home-page p,
.home-page li{ text-wrap: pretty; }

/* ===== NAV over the dark opening ===== */
.home-page .nav{
    background: transparent;
    border-bottom: 1px solid transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background-color .35s ease, border-color .35s ease;
}
.home-page .nav.scrolled{
    background: rgba(15, 15, 15, 0.78);
    border-bottom-color: var(--line-dark);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
}
.home-page .logo-text{ color: var(--paper); }
.home-page .nav-link{ color: rgba(246, 245, 244, 0.66); }
.home-page .nav-link:hover,
.home-page .nav-link[aria-current="page"]{ color: var(--paper); }
.home-page .nav-cta{
    background: var(--paper);
    color: var(--ink);
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: none;
}
.home-page .nav-cta:hover{ background: #fff; box-shadow: none; transform: none; }
.home-page .mobile-toggle span{ background: var(--paper); }
.home-page a:focus-visible,
.home-page button:focus-visible{ outline-color: var(--paper); }

/* The homepage runs a wider measure than the guides, so the headline and
   the nav logo sit further left and the film has more room. */
.home-page .container{ max-width: 1320px; }

/* ===== HERO ===== */
.cx-hero{
    position: relative;
    display: flex; flex-direction: column;
    min-height: 100svh;
    padding: 140px 0 0;
    overflow: hidden;
    background: var(--ink);
    color: var(--paper);
    isolation: isolate;
}
.cx-hero > .container{
    position: relative; z-index: 1;
    display: flex; flex-direction: column;
    flex: 1 1 auto;
}
/* the caption's positioning parent is the hero grid, so it sits at the picture's foot */
.cx-hero-top{ position: relative; }

/* The film: painted stills of one night at the office, cross-faded with a slow
   camera drift by home-cinematic.js. Without JS the opening still stands. */
.cx-film{
    position: absolute; left: 0; right: 0; top: 0; z-index: 0;
    height: 100svh; min-height: 680px;
    overflow: hidden;
    background:
        radial-gradient(55% 60% at 78% 24%, rgba(120, 126, 140, 0.18), rgba(120, 126, 140, 0) 70%),
        var(--ink);
}
.cx-shot{
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.06);
    transform-origin: 50% 50%;
    will-change: transform, opacity;
    pointer-events: none; user-select: none;
}
.cx-shot:first-child{ opacity: 1; }
.cx-shot-video{ object-fit: cover; background: var(--ink); }
.cx-film-gl{ position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; }
.cx-film.is-gl .cx-shot{ visibility: hidden; }
.cx-film.is-gl .cx-film-grain{ display: none; }
/* Product cards: the real queue, anchored above the painted monitors by the
   player while a clip is on screen. Hidden until the player places them. */
.cx-card{
    position: absolute; left: 0; top: 0; z-index: 5;  /* above the film's shade and grain, so it stays crisp */
    width: 312px;
    padding: 12px 14px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(16, 16, 17, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: var(--paper);
    font-size: 12.5px; line-height: 1.35;
    opacity: 0;
    transform-origin: 0 100%;
    will-change: transform, opacity;
    pointer-events: none;
    font-feature-settings: "tnum" 1;
}
/* A card that grows downward from its anchor (a running log) rather than sitting above it */
.cx-card--top{ transform-origin: 0 0; }
.cx-card-bar{
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding-bottom: 8px; margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11.5px; color: rgba(246, 245, 244, 0.6);
}
.cx-card-mark{ font-weight: 600; color: var(--paper); letter-spacing: -0.01em; }
.cx-card-bar em{ font-style: normal; margin-left: 8px; color: rgba(246, 245, 244, 0.55); font-feature-settings: "tnum" 1; }
.cx-card-rows{ list-style: none; margin: 0; padding: 0; }
.cx-card-rows li{
    display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 2px 10px;
    max-height: 0; padding: 0; overflow: hidden;
    opacity: 0; transform: translateY(6px);
    transition: opacity 0.45s ease, transform 0.45s ease, max-height 0.45s ease, padding 0.45s ease;
}
.cx-card-rows li.is-on{ max-height: 48px; padding: 5px 0; opacity: 1; transform: none; }
.cx-card-rows b{ font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: rgba(246, 245, 244, 0.7); }
.cx-card-rows span{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-card-rows i{ grid-column: 2; font-style: normal; font-size: 11.5px; color: var(--teal); }
.cx-card-rows i.is-wait{ color: var(--amber); }
.cx-card-steps{ list-style: none; margin: 0; padding: 0; }
.cx-card-steps li{
    display: flex; align-items: baseline; gap: 10px;
    max-height: 0; padding: 0; overflow: hidden;
    color: rgba(246, 245, 244, 0.86);
    opacity: 0; transform: translateY(6px);
    transition: opacity 0.45s ease, transform 0.45s ease, max-height 0.45s ease, padding 0.45s ease;
}
.cx-card-steps li.is-on{ max-height: 48px; padding: 5px 0; opacity: 1; transform: none; }
.cx-card-steps i{ flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); position: relative; top: -1px; }
.cx-card-steps i.is-wait{ background: var(--amber); }
.cx-card-big{
    margin: 2px 0 6px; font-size: 22px; font-weight: 300; letter-spacing: -0.02em;
    opacity: 0; transform: translateY(6px); transition: opacity 0.5s ease, transform 0.5s ease;
}
.cx-card-sum{ list-style: none; margin: 0; padding: 0; }
.cx-card-sum li{ padding: 3px 0; color: rgba(246, 245, 244, 0.8); opacity: 0; transform: translateY(6px); transition: opacity 0.45s ease, transform 0.45s ease; }
.cx-card-sum b{ font-weight: 500; color: var(--paper); }
.cx-card-big.is-on,
.cx-card-sum li.is-on{ opacity: 1; transform: none; }
.cx-film-shade{
    position: absolute; inset: 0; z-index: 3;
    background:
        linear-gradient(180deg, rgba(15, 15, 15, 0.62) 0%, rgba(15, 15, 15, 0) 24%, rgba(15, 15, 15, 0) 50%, rgba(15, 15, 15, 0.78) 80%, var(--ink) 100%),
        linear-gradient(90deg, rgba(15, 15, 15, 0.74) 0%, rgba(15, 15, 15, 0.42) 36%, rgba(15, 15, 15, 0) 64%);
}
.cx-film-grain{
    position: absolute; inset: -120px; z-index: 4;
    opacity: 0.075;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 240px 240px;
    animation: cx-grain 0.8s steps(8) infinite;
    pointer-events: none;
}
@keyframes cx-grain{
    0%{ transform: translate(0, 0); }
    12.5%{ transform: translate(-18px, 26px); }
    25%{ transform: translate(30px, -12px); }
    37.5%{ transform: translate(-8px, -30px); }
    50%{ transform: translate(22px, 18px); }
    62.5%{ transform: translate(-28px, 4px); }
    75%{ transform: translate(12px, -22px); }
    87.5%{ transform: translate(-14px, 12px); }
    100%{ transform: translate(0, 0); }
}
/* The subtitle: where the night is and what the agents are doing. On wide
   screens it sits under the picture, level with the buttons. */
.cx-film-cap{
    position: absolute; right: 24px; bottom: 28px;  /* the foot of the picture, whatever the copy does */
    display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
    margin: 0;
    max-width: 50%;  /* stays in the picture's half; every caption fits one line from about 1100px up */
    text-align: right;
    text-wrap: balance;
    font-size: clamp(17px, 1.35vw, 20px); line-height: 1.3; letter-spacing: -0.01em;
    color: rgba(246, 245, 244, 0.96);
    transition: opacity 0.4s ease;
}
.cx-film-cap time{
    font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em;
    color: rgba(246, 245, 244, 0.6);
    font-feature-settings: "tnum" 1;
}
.cx-film-cap.is-cut{ opacity: 0; }

.cx-hero-top{
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 0 56px;
    align-items: end; align-content: center;
    margin-top: auto;
    padding: 0 0 5vh;
    /* fill the first screen, with the copy just above its centre; the queue only peeks above the fold */
    min-height: calc(100svh - 140px - 126px);
}
.cx-kicker{
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 500;
    color: rgba(246, 245, 244, 0.62);
}
.cx-kicker-mark{
    display: inline-grid; place-items: center;
    width: 20px; height: 20px; border-radius: 4px;
    background: #f26522; color: #fff;
    font-size: 12px; font-weight: 700; line-height: 1;
}
.cx-h1{
    margin: 20px 0 0;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(44px, 5.2vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.035em;
    color: var(--paper);
}
.cx-hero-aside{ position: relative; grid-column: 1; margin-top: 18px; padding-bottom: 10px; }
/* A soft pool of dark behind the copy, so it reads over any scene the film is on */
.cx-hero-aside::before{
    content: ""; position: absolute; z-index: -1;
    inset: -56px -80px -44px -72px;
    background: radial-gradient(closest-side, rgba(15, 15, 15, 0.7), rgba(15, 15, 15, 0.45) 50%, rgba(15, 15, 15, 0) 100%);
    pointer-events: none;
}
/* Read by assistive tech and crawlers, never drawn: the hero's description, since the film is decorative */
.cx-sr{
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.cx-lede{
    font-size: 18px; line-height: 1.5;
    color: rgba(246, 245, 244, 0.86);
    max-width: 42ch;
}
.cx-actions{
    display: flex; flex-wrap: wrap; gap: 12px;
    margin-top: 22px;
}
.cx-btn,
.cx-btn-ghost{
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 24px;
    border-radius: 999px;
    font-size: 15px; font-weight: 500; letter-spacing: -0.005em;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.cx-btn{
    background: var(--coral);
    color: #fff;
    border: 1px solid transparent;
}
.cx-btn:hover{ background: var(--coral-600); }
.cx-btn:active{ transform: scale(0.98); }
.cx-btn-ghost{
    color: var(--paper);
    border: 1px solid rgba(246, 245, 244, 0.28);
    background: rgba(246, 245, 244, 0.02);
}
.cx-btn-ghost:hover{ border-color: rgba(246, 245, 244, 0.6); background: rgba(246, 245, 244, 0.06); }
.cx-hero .cx-btn,
.cx-hero .cx-btn-ghost{ border-radius: 999px; }

/* --- Overnight run: the product surface --- */
.cx-queue{
    position: relative;
    margin: 56px 0 0;
    width: 100%; align-self: stretch;  /* the hero container is a flex column; never shrink-wrap to the rows */
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: rgba(18, 18, 18, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 -30px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    font-feature-settings: "tnum" 1;
}
.cx-queue-bar{
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--line-dark);
    font-size: 13px; color: rgba(246, 245, 244, 0.72);
}
.cx-queue-bar strong{ font-weight: 500; color: var(--paper); }
.cx-queue-bar-left{ display: flex; align-items: center; gap: 12px; }
.cx-queue-bar-left span + span::before{
    content: ""; display: inline-block; width: 1px; height: 12px;
    background: rgba(255, 255, 255, 0.18); margin: 0 12px -1px 0; vertical-align: middle;
}
.cx-queue-erp{ display: inline-flex; align-items: center; gap: 8px; }
.cx-queue-note{ margin-right: 14px; color: var(--stone); }
.cx-queue-erp i{
    width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
    box-shadow: 0 0 0 3px rgba(61, 155, 115, 0.18);
}
.cx-queue-head,
.cx-queue-row{
    display: grid;
    grid-template-columns: 74px 96px minmax(0, 1.2fr) 112px minmax(0, 1.75fr) 204px;
    gap: 18px; align-items: center;
    padding: 0 22px;
}
.cx-agent-tag{
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em;
    color: rgba(246, 245, 244, 0.72);
}
.cx-agent-tag::before{
    content: ""; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
    background: var(--paper);
}
.cx-agent-tag.is-vendor::before{ background: var(--amber); }
.cx-agent-tag.is-ar::before{ background: var(--teal); }
.cx-agent-tag.is-recon::before{ background: var(--beige); }
.cx-queue-head{
    height: 36px;
    font-size: 12px; color: var(--stone);
    border-bottom: 1px solid var(--line-dark);
}
/* Fixed height: rows entering and leaving animate inside this box, so the
   page below never moves while the queue runs. 6 rows x 52px. */
.cx-queue-body{ position: relative; height: 312px; overflow: hidden; }
.cx-queue-row{
    height: 52px;
    overflow: hidden;
    font-size: 14px; color: rgba(246, 245, 244, 0.86);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: height .5s cubic-bezier(.2,.8,.2,1), opacity .45s ease, transform .45s ease, border-color .3s ease;
}
.cx-queue-row.is-entering{ height: 0; opacity: 0; transform: translateY(-6px); border-bottom-color: transparent; }
.cx-queue-row.is-leaving{ height: 0; opacity: 0; border-bottom-color: transparent; }
.cx-queue-row .cx-mono{ font-family: var(--font-mono); font-size: 13px; color: rgba(246, 245, 244, 0.9); }
.cx-queue-row .cx-party{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-queue-row .cx-amt{ text-align: right; }
.cx-queue-row .cx-detail{ color: rgba(246, 245, 244, 0.62); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-queue-head .cx-amt{ text-align: right; }
.cx-status{
    position: relative;
    display: block; padding-left: 16px;
    font-size: 13px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
    transition: color .35s ease;
}
.cx-status::before{
    content: ""; position: absolute; left: 0; top: 50%;
    width: 7px; height: 7px; border-radius: 50%;
    transform: translateY(-50%);
    background: currentColor;
    transition: background-color .35s ease, box-shadow .35s ease;
}
.cx-status[data-state="captured"]{ color: var(--stone); }
.cx-status[data-state="matched"],
.cx-status[data-state="sent"]{ color: rgba(246, 245, 244, 0.84); }
.cx-status[data-state="posted"],
.cx-status[data-state="done"]{ color: var(--teal); }
.cx-status[data-state="posted"]::before,
.cx-status[data-state="done"]::before{ box-shadow: 0 0 0 3px rgba(61, 155, 115, 0.18); }
.cx-status[data-state="review"]{ color: var(--amber); }
.cx-queue-foot{
    display: flex; flex-wrap: wrap; gap: 8px 28px;
    padding: 14px 22px 16px;
    font-size: 13px; color: rgba(246, 245, 244, 0.62);
}
.cx-queue-foot b{ font-weight: 500; color: var(--paper); font-variant-numeric: tabular-nums; }

/* ===== PROOF LINE ===== */
.cx-proof{
    background: var(--ink);
    color: var(--paper);
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
}
.cx-proof .container{
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 28px 64px;
    align-items: center;
    padding-top: 40px; padding-bottom: 36px;
}
.cx-proof-stat{ display: flex; align-items: center; gap: 24px; }
.cx-proof-num{
    font-weight: 300; font-size: clamp(44px, 5vw, 72px);
    line-height: 1; letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}
.cx-proof-stat p{ font-size: 15px; line-height: 1.5; color: rgba(246, 245, 244, 0.66); max-width: 30ch; }
.cx-proof-erps{ font-size: 15px; line-height: 1.55; color: rgba(246, 245, 244, 0.66); max-width: 34ch; }
.cx-erp-list{
    grid-column: 1 / -1;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(8, auto);
    justify-content: space-between;
    gap: 12px 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line-dark);
    font-size: 15px; font-weight: 500; color: var(--paper);
    white-space: nowrap;
}

/* ===== SECTION SHELLS ===== */
.cx-section{ padding: 132px 0; }
.cx-section--paper{ background: var(--paper); color: var(--ink); }
.cx-section--ink{ background: var(--ink); color: var(--paper); }
.cx-section--ink + .cx-section--ink{ border-top: 1px solid var(--line-dark); }
.cx-head{
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 24px 64px;
    align-items: end;
}
.cx-h2{
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(36px, 4.6vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.03em;
    max-width: 17ch;
}
.cx-desc{
    font-size: 17px; line-height: 1.6;
    color: var(--slate);
    max-width: 44ch;
}
.cx-section--ink .cx-desc{ color: rgba(246, 245, 244, 0.62); }
.cx-head .cx-desc{ padding-bottom: 6px; }

/* ===== PROBLEM: ruled list of the work ===== */
.cx-split{
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 48px 80px;
    align-items: start;
}
.cx-split .cx-desc{ margin-top: 22px; }
.cx-split > div:first-child{ position: sticky; top: 104px; }
.cx-rules{ list-style: none; border-bottom: 1px solid var(--line-light); }
.cx-rules li{
    display: grid;
    grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
    gap: 8px 28px;
    padding: 18px 0;
    border-top: 1px solid var(--line-light);
}
.cx-rules .cx-rule-name{ font-size: 16px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.cx-rules .cx-rule-desc{ font-size: 15px; line-height: 1.55; color: var(--slate); }

/* ===== AGENT SCENES: a dark stage with the product on it, copy beside it ===== */
.cx-section--ruled{ border-top: 1px solid var(--line-light); }
.cx-agent-kind{
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--slate);
}
.cx-agent-kind i{ width: 8px; height: 8px; border-radius: 50%; background: var(--paper); }
.cx-agent-kind.is-vendor i{ background: var(--amber); }
.cx-agent-kind.is-ar i{ background: var(--teal); }
.cx-agent-kind.is-recon i{ background: var(--beige); }
.cx-section--paper .cx-agent-kind.is-ap i{ background: var(--ink); }
.cx-section--paper .cx-agent-kind.is-recon i{ background: var(--stone); }

.cx-scenes{ display: grid; gap: 112px; margin-top: 72px; }
/* Faint rows after the last real one: the list continues past the frame. */
.cx-ghosts{ display: grid; gap: 16px; padding: 10px 16px 18px; }
.cx-ghosts i{ display: block; height: 10px; border-radius: 5px; background: rgba(15, 15, 15, 0.06); }
.cx-ghosts i:nth-child(1){ width: 72%; }
.cx-ghosts i:nth-child(2){ width: 56%; opacity: .8; }
.cx-ghosts i:nth-child(3){ width: 80%; opacity: .6; }
.cx-ghosts i:nth-child(4){ width: 48%; opacity: .4; }
.cx-ghosts i:nth-child(5){ width: 66%; opacity: .25; }
.cx-scene{
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    border-radius: 14px;
    overflow: hidden;
    background: #eeebe7;
}
.cx-scene:nth-child(even){ grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.cx-scene:nth-child(even) .cx-stage{ order: 2; }

/* The stage is a fixed-height window: the product panel starts below the top
   padding and runs off the bottom edge, the way a real app sits in a demo. */
.cx-stage{
    position: relative;
    height: 600px;
    padding: 48px 48px 0;
    overflow: hidden;
    background:
        radial-gradient(60% 55% at 14% 104%, rgba(120, 126, 140, 0.34), rgba(120, 126, 140, 0) 70%),
        radial-gradient(40% 50% at 10% -10%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 70%),
        var(--ink);
    color: var(--paper);
}
.cx-stage-grid{
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 32px;
    align-items: start;
    height: 100%;
}
.cx-stage-in{ display: grid; gap: 14px; align-content: start; padding-top: 40px; }
.cx-msg{
    padding: 13px 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13.5px; line-height: 1.5;
    color: rgba(246, 245, 244, 0.84);
}
.cx-msg-from{
    display: flex; justify-content: space-between; gap: 12px;
    margin-bottom: 6px;
    font-size: 12px; color: rgba(246, 245, 244, 0.5);
}
.cx-msg-from b{ font-weight: 500; color: var(--paper); }

.cx-app{
    position: relative; z-index: 1;
    min-height: 100%;
    background: var(--paper-2);
    color: var(--ink);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.cx-app-bar{
    display: flex; justify-content: space-between; gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-light);
    font-size: 12.5px; color: var(--slate);
}
.cx-app-bar b{ font-weight: 500; color: var(--ink); }
.cx-log{ list-style: none; padding: 8px 16px 4px; }
.cx-log li{
    display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; align-items: start;
    padding: 6px 0;
    font-size: 13.5px; line-height: 1.45; color: var(--ink);
}
.cx-log li i{
    display: block;
    width: 14px; height: 14px; margin-top: 3px; border-radius: 50%;
    background: var(--teal) no-repeat center / 8px 8px
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.4 6.4l2.5 2.5 4.7-5.3' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.cx-result{
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: center;
    margin: 6px 16px 14px;
    padding: 11px 13px;
    border: 1px solid rgba(15, 15, 15, 0.06); border-radius: 8px;
    background: #f0edea;
    font-size: 13.5px; color: var(--ink);
}
.cx-result .cx-mono{ grid-row: 1; grid-column: 1; font-family: var(--font-mono); font-size: 12.5px; }
.cx-result .cx-status{ grid-row: 1; grid-column: 2; font-size: 12.5px; }
.cx-result > span:nth-child(2){ grid-row: 2; grid-column: 1 / -1; font-size: 13px; color: var(--slate); }
.cx-app .cx-status[data-state="sent"],
.cx-app .cx-status[data-state="matched"]{ color: var(--slate); }
.cx-app .cx-status[data-state="review"]{ color: var(--amber-ink); }
.cx-reply{
    margin: 6px 16px 14px;
    padding: 13px 15px;
    border-left: 2px solid var(--ink);
    border-radius: 0 8px 8px 0;
    background: #f0edea;
    font-size: 13.5px; line-height: 1.5; color: var(--ink);
}
.cx-reply small{ display: block; margin-top: 8px; font-size: 12px; color: var(--slate); }

/* Sequencing: everything is in flow from the start so the stage never jumps;
   items simply fade in on cue, and a live log line pulses copper until it is done. */
.cx-scene [data-seq]{ transition: opacity .5s ease, transform .5s ease; }
.cx-scene.is-animated [data-seq].is-pending{ opacity: 0; transform: translateY(8px); }
.cx-scene.is-animated .cx-log li.is-live:not(.is-done) i{
    background: var(--amber);
    animation: cx-pulse 1.1s ease-in-out infinite;
}
@keyframes cx-pulse{
    0%, 100%{ box-shadow: 0 0 0 0 rgba(217, 164, 65, 0.45); }
    50%{ box-shadow: 0 0 0 5px rgba(217, 164, 65, 0); }
}

.cx-scene-copy{
    display: flex; flex-direction: column; justify-content: center;
    padding: 44px 48px;
}
.cx-scene-copy h3{
    margin-top: 16px;
    font-size: 28px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.15;
    color: var(--ink);
}
.cx-scene-copy p{
    margin-top: 14px;
    font-size: 15.5px; line-height: 1.6;
    color: var(--slate);
}
.cx-checks{
    list-style: none;
    display: grid; gap: 10px;
    margin-top: 26px; padding-top: 22px;
    border-top: 1px solid rgba(15, 15, 15, 0.14);
}
.cx-checks li{
    display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start;
    font-size: 14.5px; line-height: 1.45; color: var(--ink);
}
.cx-checks li::before{
    content: ""; margin-top: 7px; width: 6px; height: 6px; margin-left: 3px;
    border-radius: 50%; background: var(--teal);
}
.cx-agent-link{
    margin-top: 22px;
    font-size: 14px; font-weight: 500;
    color: var(--ink);
    text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(15, 15, 15, 0.3);
}
.cx-agent-link:hover{ text-decoration-color: var(--ink); }

/* ===== JOURNEY: one invoice, two weeks, side by side ===== */
.cx-compare{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 64px;
    border: 1px solid var(--line-dark);
    border-radius: 12px;
    overflow: hidden;
}
.cx-lane{ padding: 28px 32px 32px; background: rgba(255, 255, 255, 0.015); }
.cx-lane + .cx-lane{ border-left: 1px solid var(--line-dark); background: rgba(255, 255, 255, 0.035); }
.cx-lane h3{ font-size: 14px; font-weight: 500; color: var(--stone); }
.cx-lane + .cx-lane h3{ color: var(--paper); }
.cx-lane ol{ list-style: none; margin-top: 18px; }
.cx-lane li{
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 16px; align-items: baseline;
    padding: 14px 0;
    border-top: 1px solid var(--line-dark);
    font-size: 16px; color: rgba(246, 245, 244, 0.88);
}
.cx-lane li i{ font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--stone); }
.cx-lane li small{ font-size: 12.5px; color: rgba(246, 245, 244, 0.5); white-space: nowrap; }
.cx-lane li small.is-ok{ color: var(--teal); }
.cx-lane li small.is-slow{ color: var(--amber); }
.cx-lane-sum{
    margin-top: 18px; padding-top: 16px;
    border-top: 1px solid var(--line-dark);
    font-size: 14px; color: rgba(246, 245, 244, 0.62);
}
.cx-lane + .cx-lane .cx-lane-sum{ color: var(--paper); }
.cx-compare--cash{ margin-top: 16px; }
.cx-compare--cash .cx-lane{ padding-bottom: 28px; }
.cx-lane-line{
    margin-top: 14px; max-width: 46ch;
    font-size: 16px; line-height: 1.55;
    color: rgba(246, 245, 244, 0.8);
}
.cx-lane + .cx-lane .cx-lane-line{ color: var(--paper); }

/* ===== HOW IT WORKS: a real sequence, numbered ===== */
.cx-steps{
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    margin-top: 64px;
    border-top: 1px solid var(--line-light);
}
.cx-step{ padding-top: 24px; }
.cx-step-num{ font-size: 14px; color: var(--slate); }
.cx-step h3{ margin-top: 18px; font-size: 21px; font-weight: 500; letter-spacing: -0.015em; color: var(--ink); }
.cx-step p{ margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--slate); }

/* ===== CONTROL & EVIDENCE: three numbers, one quote ===== */
.cx-metrics{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    margin-top: 64px;
    border-top: 1px solid var(--line-dark);
}
.cx-metric{ padding-top: 28px; }
.cx-metric .metric-num{
    font-family: var(--font-display);
    font-weight: 300; font-size: clamp(52px, 6vw, 88px);
    line-height: 1; letter-spacing: -0.045em;
    color: var(--paper);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cx-metric .metric-label{ margin-top: 12px; font-size: 15px; color: rgba(246, 245, 244, 0.66); }
.cx-evidence-title{ font-weight: 400; font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; color: var(--paper); }
.cx-evidence .metric-label{ line-height: 1.55; max-width: 34ch; }
.cx-basis{ margin-top: 28px; font-size: 13px; color: var(--stone); max-width: 70ch; }
.cx-quote{
    margin-top: 72px; padding-top: 40px;
    border-top: 1px solid var(--line-dark);
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 24px 64px; align-items: end;
}
.cx-quote p{
    font-weight: 300; font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.35; letter-spacing: -0.015em;
    color: var(--paper);
}
.cx-quote footer{ font-size: 14px; color: rgba(246, 245, 244, 0.62); }
.cx-quote cite{ display: block; font-style: normal; font-weight: 500; color: var(--paper); }

/* ===== FAQ: ruled, no cards ===== */
.home-page .cx-faq{ margin-top: 48px; max-width: 820px; border-bottom: 1px solid var(--line-light); }
.home-page .cx-faq .faq-item{
    background: transparent; border: 0; border-top: 1px solid var(--line-light);
    border-radius: 0; box-shadow: none;
}
.home-page .cx-faq .faq-item summary{
    padding: 20px 44px 20px 0;
    font-size: 17px; font-weight: 500; color: var(--ink);
}
.home-page .cx-faq .faq-item summary::after{
    right: 4px; top: 25px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M5 1v8M1 5h8' stroke='%230f0f0f' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
}
.home-page .cx-faq .faq-answer{ padding: 0 0 22px; max-width: 68ch; }
.home-page .cx-faq .faq-answer p{ font-size: 15.5px; line-height: 1.65; color: var(--slate); }

/* ===== CLOSING CTA ===== */
.cx-cta{
    position: relative;
    padding: 160px 0 170px;
    background: var(--ink);
    color: var(--paper);
    border-top: 1px solid var(--line-dark);
}
.cx-cta .cx-h2{ max-width: 16ch; }
.cx-cta .cx-desc{ margin-top: 20px; }
.cx-cta .cx-actions{ margin-top: 36px; }

.home-page .footer{ background: var(--ink); border-top: 1px solid var(--line-dark); }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce){
    .cx-film-grain{ animation: none; }
    .cx-film-cap{ transition: none; }
    .cx-queue-row{ transition: none; }
    .home-page .nav{ transition: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px){
    .cx-hero-top{ grid-template-columns: 1fr; gap: 28px; padding: 0; min-height: 0; }
    .cx-film-cap{ position: static; order: -1; align-items: flex-start; text-align: left; margin: 0; font-size: 17px; max-width: none; }
    .cx-hero-aside{ padding-bottom: 0; }
    .cx-scene,
    .cx-scene:nth-child(even){ grid-template-columns: 1fr; }
    .cx-scene:nth-child(even) .cx-stage{ order: 0; }
    .cx-scenes{ gap: 72px; }
    .cx-stage{ height: 560px; padding: 32px 32px 0; }
    .cx-stage-in{ padding-top: 28px; }
    .cx-scene-copy{ padding: 30px 28px 32px; }
    .cx-steps{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cx-erp-list{ grid-template-columns: repeat(4, auto); }
    .cx-queue-head,
    .cx-queue-row{ grid-template-columns: 70px minmax(0, 1.1fr) 104px minmax(0, 1.5fr) 190px; gap: 14px; }
    .cx-queue-head .cx-id,
    .cx-queue-row .cx-id{ display: none; }
}
@media (max-width: 768px){
    /* Picture on top, copy below: nothing sits over the film on a phone */
    .cx-hero{ padding-top: 0; min-height: 0; }
    .cx-film{ position: relative; height: 58svh; min-height: 340px; max-height: 560px; }
    .cx-film-shade{ background: linear-gradient(180deg, rgba(15, 15, 15, 0.55) 0%, rgba(15, 15, 15, 0) 22%, rgba(15, 15, 15, 0) 70%, var(--ink) 100%); }
    /* The product card docks at the foot of the picture, where every painting
       has desk or floor and no face; the player positions it. */
    .cx-card{ width: calc(100vw - 32px); max-width: 360px; padding: 10px 12px 8px; font-size: 12px; }
    .cx-card-big{ font-size: 22px; }
    .cx-hero > .container{ padding-top: 6px; }
    .cx-film-cap{ font-size: 16px; gap: 4px; }
    .cx-hero-top{ margin-top: 0; gap: 20px; }
    .cx-hero-aside{ margin-top: 18px; }
    .cx-hero-aside::before{ display: none; }
    .cx-queue{ margin-top: 40px; }
    .cx-h1{ margin-top: 14px; font-size: clamp(38px, 10.5vw, 56px); max-width: none; }
    .cx-queue{ margin-top: 48px; }
    .cx-queue-bar{ font-size: 12px; padding: 12px 16px; }
    .cx-queue-bar-left span:not(:first-child){ display: none; }
    .cx-queue-head{ display: none; }
    .cx-queue-body{ height: 384px; }
    .cx-queue-row{
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 3px 10px; align-content: center;
        height: 64px; padding: 0 16px;
    }
    .cx-queue-row .cx-party{ grid-row: 1; grid-column: 1 / 3; font-size: 14.5px; }
    .cx-queue-row .cx-status{ grid-row: 1; grid-column: 3; max-width: 52vw; }
    .cx-queue-row .cx-agent-tag{ grid-row: 2; grid-column: 1; }
    .cx-queue-row .cx-detail{ grid-row: 2; grid-column: 2; font-size: 12px; }
    .cx-queue-row .cx-amt{ display: block; grid-row: 2; grid-column: 3; font-size: 12px; color: rgba(246, 245, 244, 0.7); }
    .cx-queue-row .cx-id{ display: none; }
    .cx-queue-row.is-entering,
    .cx-queue-row.is-leaving{ height: 0; }
    .cx-queue-foot{ padding: 12px 16px 14px; gap: 6px 18px; }
    .cx-proof .container{ grid-template-columns: 1fr; gap: 20px; padding-top: 32px; padding-bottom: 32px; }
    .cx-section{ padding: 88px 0; }
    .cx-head,
    .cx-split,
    .cx-quote{ grid-template-columns: 1fr; gap: 20px; }
    .cx-split > div:first-child{ position: static; }
    .cx-rules li{ grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
    .cx-agents{ margin-top: 44px; }
    .cx-compare{ grid-template-columns: 1fr; margin-top: 44px; }
    .cx-lane{ padding: 22px 20px 26px; }
    .cx-lane + .cx-lane{ border-left: 0; border-top: 1px solid var(--line-dark); }
    .cx-lane li{ font-size: 15px; }
    .cx-steps,
    .cx-metrics{ margin-top: 44px; }
    .home-page .nav-links{ background: var(--ink); border-bottom-color: var(--line-dark); box-shadow: none; }
    .home-page .nav-links .nav-cta{ color: var(--ink); }
    .cx-cta{ padding: 104px 0 112px; }
}
@media (max-width: 640px){
    .cx-erp-list{ grid-template-columns: repeat(2, auto); justify-content: start; gap: 10px 32px; }
    .cx-scenes{ gap: 48px; margin-top: 40px; }
    .cx-stage{ height: auto; padding: 18px; }
    .cx-ghosts{ display: none; }
    .cx-stage-grid{ grid-template-columns: 1fr; gap: 14px; }
    .cx-stage-in{ grid-template-columns: 1fr; padding-top: 0; }
    .cx-app{ min-height: 0; border-radius: 10px; }
    .cx-scene-copy{ padding: 24px 20px 26px; }
    .cx-scene-copy h3{ font-size: 24px; }
    .cx-steps,
    .cx-metrics{ grid-template-columns: 1fr; gap: 0; }
    .cx-step,
    .cx-metric{ padding: 22px 0; border-bottom: 1px solid var(--line-light); }
    .cx-metric{ border-bottom-color: var(--line-dark); }
    .cx-step:last-child,
    .cx-metric:last-child{ border-bottom: 0; }
    .cx-lane li{ grid-template-columns: 24px minmax(0, 1fr); }
    .cx-lane li small{ grid-column: 2; white-space: normal; }
    .cx-actions{ width: 100%; }
    .cx-actions a{ flex: 1 1 auto; }
}
