/* =========================================================
   SARI HOW IT WORKS — V5 NAVY + GOLD EDITORIAL
   Paste this at the END of public/css/app.css.
   Scoped only to .sari-works.
   ========================================================= */

.sari-works {
    --works-gold: #c99020;
    --works-gold-soft: #e2b24f;
    --works-navy: #172c49;
    --works-navy-deep: #0d1c30;
    --works-ink: #111418;
    --works-muted: #73716c;
    --works-bg: #f7f3eb;
    --works-card: #fffdf9;
    --works-line: #e4dccf;
    --works-green: #3c9a76;
    --works-blue: #477ba7;

    position: relative;
    overflow: hidden;
    padding: 108px 0 82px;

    background:
        radial-gradient(circle at 12% 20%, rgba(201,144,32,.075), transparent 25%),
        radial-gradient(circle at 86% 78%, rgba(23,44,73,.055), transparent 27%),
        var(--works-bg);
}

.sari-works::before {
    content: "";
    position: absolute;
    width: 680px;
    height: 680px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(23,44,73,.045);
    border-radius: 50%;
    pointer-events: none;
}

.sari-works .sari-container {
    position: relative;
    z-index: 1;
}

/* HEADER */
.sari-works-heading {
    display: grid;
    grid-template-columns: 1.18fr .82fr;
    align-items: end;
    gap: 70px;
    margin-bottom: 50px;
}

.sari-works .sari-eyebrow {
    color: var(--works-gold);
}

.sari-works-title {
    max-width: 820px;
    margin: 13px 0 0;
    color: var(--works-ink);
    font-size: clamp(43px, 5.2vw, 72px);
    line-height: .96;
    letter-spacing: -.06em;
}

.sari-works-title em {
    color: var(--works-gold);
    font-style: normal;
}

.sari-works-intro-wrap {
    padding-bottom: 3px;
}

.sari-works-kicker {
    display: inline-block;
    margin-bottom: 13px;
    color: var(--works-navy);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .2em;
}

.sari-works-intro {
    max-width: 460px;
    margin: 0 0 0 auto;
    color: var(--works-muted);
    font-size: 13px;
    line-height: 1.8;
}

/* FLOW */
.sari-works-flow {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.sari-works-flow::before {
    content: "";
    position: absolute;
    left: 16%;
    right: 16%;
    top: 94px;
    height: 1px;
    z-index: 0;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(201,144,32,.5) 18%,
            rgba(23,44,73,.3) 50%,
            rgba(201,144,32,.5) 82%,
            transparent
        );
}

/* CARD */
.sari-work-card {
    position: relative;
    z-index: 1;
    min-height: 510px;
    padding: 24px;

    overflow: hidden;
    border: 1px solid var(--works-line);
    border-radius: 22px;

    background: var(--works-card);
    box-shadow: 0 17px 44px rgba(31,25,16,.045);

    transition:
        transform .4s cubic-bezier(.2,.7,.2,1),
        border-color .4s ease,
        box-shadow .4s ease;
}

.sari-work-card::before {
    content: "";
    position: absolute;
    width: 230px;
    height: 230px;
    right: -125px;
    top: -125px;
    border-radius: 50%;
    pointer-events: none;
    opacity: .14;
}

.sari-work-buy::before {
    background: var(--works-gold);
}

.sari-work-sell::before {
    background: var(--works-navy);
}

.sari-work-deliver::before {
    background: var(--works-green);
}

.sari-work-card:hover {
    transform: translateY(-8px);
    border-color: rgba(201,144,32,.52);
    box-shadow:
        0 28px 60px rgba(31,25,16,.105),
        0 0 0 4px rgba(201,144,32,.035);
}

/* TOP */
.sari-work-top {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sari-work-number {
    color: var(--works-gold);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .18em;
}

.sari-work-label {
    color: var(--works-muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .22em;
}

/* COMMERCE SCENE */
.sari-commerce-scene {
    position: relative;
    height: 194px;
    margin: 8px -2px 0;
    overflow: hidden;
}

.sari-scene-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 155px;
    height: 155px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(201,144,32,.14),
        rgba(201,144,32,.035) 48%,
        transparent 72%
    );
}

.sari-work-sell .sari-scene-glow {
    background: radial-gradient(
        circle,
        rgba(23,44,73,.12),
        rgba(23,44,73,.025) 50%,
        transparent 72%
    );
}

.sari-work-deliver .sari-scene-glow {
    background: radial-gradient(
        circle,
        rgba(60,154,118,.12),
        rgba(60,154,118,.025) 50%,
        transparent 72%
    );
}

/* Generic window */
.sari-shopping-window,
.sari-dashboard-window,
.sari-delivery-window {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 215px;
    min-height: 130px;
    transform: translate(-50%, -48%);

    border: 1px solid rgba(23,44,73,.13);
    border-radius: 13px;
    background: rgba(255,253,249,.96);
    box-shadow: 0 17px 34px rgba(23,44,73,.11);
    overflow: hidden;

    transition: transform .45s ease, box-shadow .45s ease;
}

.sari-work-card:hover .sari-shopping-window,
.sari-work-card:hover .sari-dashboard-window,
.sari-work-card:hover .sari-delivery-window {
    transform: translate(-50%, -51%) scale(1.025);
    box-shadow: 0 21px 42px rgba(23,44,73,.15);
}

.sari-window-top {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 25px;
    padding: 0 9px;
    border-bottom: 1px solid rgba(23,44,73,.08);
    background: rgba(247,243,235,.7);
}

.sari-window-top > span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cfc9bd;
}

.sari-window-top b {
    margin-left: auto;
    color: var(--works-navy);
    font-size: 6px;
    letter-spacing: .18em;
}

/* BUY WINDOW */
.sari-product-line {
    display: grid;
    grid-template-columns: 42px 1fr 24px;
    align-items: center;
    gap: 8px;
    padding: 14px 12px 10px;
}

.sari-product-image {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 9px;
    background: #f1e7d4;
    color: var(--works-gold);
}

.sari-product-image svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sari-product-info strong,
.sari-product-info small,
.sari-product-info b {
    display: block;
}

.sari-product-info strong {
    color: var(--works-ink);
    font-size: 8px;
}

.sari-product-info small {
    margin-top: 3px;
    color: var(--works-muted);
    font-size: 6px;
}

.sari-product-info b {
    margin-top: 6px;
    color: var(--works-navy);
    font-size: 9px;
}

.sari-cart-button {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 7px;
    background: var(--works-gold);
    color: white;
    font-size: 15px;
    box-shadow: 0 5px 10px rgba(201,144,32,.2);
}

.sari-checkout-row {
    display: flex;
    justify-content: space-between;
    margin: 0 12px 11px;
    padding: 8px 9px;
    border-radius: 7px;
    background: var(--works-navy);
    color: white;
    font-size: 6px;
}

.sari-checkout-row b {
    color: #f0c96f;
}

/* SELL DASHBOARD */
.sari-dashboard-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    padding: 10px 12px 7px;
}

.sari-dashboard-title strong {
    color: var(--works-ink);
    font-size: 9px;
}

.sari-dashboard-title small {
    color: var(--works-muted);
    font-size: 6px;
}

.sari-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 0 11px;
}

.sari-stats-row > div {
    padding: 7px 6px;
    border: 1px solid rgba(23,44,73,.08);
    border-radius: 6px;
}

.sari-stats-row small,
.sari-stats-row strong {
    display: block;
}

.sari-stats-row small {
    color: var(--works-muted);
    font-size: 5px;
    letter-spacing: .08em;
}

.sari-stats-row strong {
    margin-top: 5px;
    color: var(--works-navy);
    font-size: 10px;
}

.sari-stats-row > div:nth-child(2) strong {
    color: var(--works-green);
}

.sari-sales-line {
    display: flex;
    align-items: end;
    gap: 5px;
    height: 48px;
    margin: 7px 12px 9px;
    padding: 6px 5px 0;
    border-bottom: 1px solid rgba(23,44,73,.1);
}

.sari-sales-line span {
    flex: 1;
    height: 20%;
    border-radius: 2px 2px 0 0;
    background: #d8e0e8;
}

.sari-sales-line span:nth-child(2) { height: 34%; }
.sari-sales-line span:nth-child(3) { height: 27%; }
.sari-sales-line span:nth-child(4) { height: 52%; background: #c9d3df; }
.sari-sales-line span:nth-child(5) { height: 67%; background: #aebdcd; }
.sari-sales-line span:nth-child(6) { height: 83%; background: var(--works-gold); }

.sari-sales-line i {
    position: absolute;
    width: 5px;
    height: 5px;
    right: 28px;
    bottom: 25px;
    border-radius: 50%;
    background: var(--works-gold);
    box-shadow: 0 0 0 4px rgba(201,144,32,.13);
}

/* DELIVERY */
.sari-route {
    padding: 12px 16px 8px;
}

.sari-route-step {
    display: flex;
    align-items: center;
    gap: 9px;
}

.sari-route-step > i {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 1px solid #d8d1c5;
    border-radius: 50%;
    color: var(--works-muted);
    font-size: 7px;
    font-style: normal;
}

.sari-route-step.active > i {
    border-color: var(--works-green);
    background: rgba(60,154,118,.10);
    color: var(--works-green);
}

.sari-route-step strong,
.sari-route-step small {
    display: block;
}

.sari-route-step strong {
    color: var(--works-ink);
    font-size: 7px;
}

.sari-route-step small {
    margin-top: 2px;
    color: var(--works-muted);
    font-size: 5px;
}

.sari-route-line {
    width: 1px;
    height: 15px;
    margin: 2px 0 2px 8px;
    background: #ddd6ca;
}

.sari-route-line.active {
    background: var(--works-green);
}

/* BADGES */
.sari-scene-badge {
    position: absolute;
    z-index: 3;
    padding: 6px 9px;
    border: 1px solid var(--works-line);
    border-radius: 999px;
    background: rgba(255,253,249,.95);
    box-shadow: 0 8px 17px rgba(23,44,73,.08);
    color: var(--works-navy);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .02em;
}

.sari-scene-badge i {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 4px;
    border-radius: 50%;
}

.sari-badge-cart {
    left: 5px;
    bottom: 18px;
}

.sari-badge-cart i {
    background: var(--works-gold);
}

.sari-badge-sales {
    right: 5px;
    top: 25px;
}

.sari-badge-sales i {
    background: var(--works-blue);
}

.sari-badge-delivery {
    left: 5px;
    top: 28px;
}

.sari-badge-delivery i {
    background: var(--works-green);
}

/* COPY */
.sari-work-copy {
    position: relative;
    z-index: 4;
    padding-top: 3px;
}

.sari-work-copy h3 {
    margin: 0;
    color: var(--works-ink);
    font-size: clamp(31px, 3vw, 43px);
    line-height: .96;
    letter-spacing: -.055em;
}

.sari-work-copy h3 span {
    color: var(--works-gold);
}

.sari-work-copy p {
    max-width: 350px;
    margin: 16px 0 0;
    color: var(--works-muted);
    font-size: 11.5px;
    line-height: 1.72;
}

.sari-work-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 19px;
    color: var(--works-navy);
    font-size: 10.5px;
    font-weight: 900;
}

.sari-work-link b {
    color: var(--works-gold);
    font-size: 16px;
    transition: transform .25s ease;
}

.sari-work-card:hover .sari-work-link b {
    transform: translate(3px,-3px);
}

/* FOOTER */
.sari-works-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 23px;
    padding: 14px 3px 0;
    color: var(--works-muted);
    font-size: 9px;
}

.sari-connected-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sari-connected-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--works-gold);
    box-shadow: 0 0 0 4px rgba(201,144,32,.10);
}

.sari-journey {
    display: flex;
    align-items: center;
    gap: 7px;
}

.sari-journey b {
    color: var(--works-gold);
}

/* DARK MODE */
html:not(.light-mode) .sari-works {
    --works-ink: #f3f1ec;
    --works-muted: #a8a49c;
    --works-bg: #0b0f15;
    --works-card: #111820;
    --works-line: rgba(243,241,236,.12);
    background:
        radial-gradient(circle at 12% 20%, rgba(201,144,32,.10), transparent 25%),
        radial-gradient(circle at 86% 78%, rgba(23,44,73,.24), transparent 28%),
        #0b0f15;
}

html:not(.light-mode) .sari-works::before {
    border-color: rgba(201,144,32,.055);
}

html:not(.light-mode) .sari-works-kicker,
html:not(.light-mode) .sari-work-link {
    color: #d9e0e8;
}

html:not(.light-mode) .sari-work-card {
    box-shadow: 0 22px 55px rgba(0,0,0,.28);
}

html:not(.light-mode) .sari-work-card:hover {
    background: #151e28;
    border-color: rgba(201,144,32,.48);
    box-shadow: 0 30px 70px rgba(0,0,0,.38);
}

html:not(.light-mode) .sari-shopping-window,
html:not(.light-mode) .sari-dashboard-window,
html:not(.light-mode) .sari-delivery-window {
    border-color: rgba(243,241,236,.11);
    background: rgba(17,24,32,.96);
    box-shadow: 0 17px 34px rgba(0,0,0,.28);
}

html:not(.light-mode) .sari-window-top {
    background: rgba(255,255,255,.025);
    border-bottom-color: rgba(243,241,236,.07);
}

html:not(.light-mode) .sari-window-top b,
html:not(.light-mode) .sari-product-info b,
html:not(.light-mode) .sari-dashboard-title strong,
html:not(.light-mode) .sari-stats-row strong {
    color: #e9edf1;
}

html:not(.light-mode) .sari-product-line > .sari-product-image {
    background: rgba(201,144,32,.10);
}

html:not(.light-mode) .sari-stats-row > div {
    border-color: rgba(243,241,236,.08);
}

html:not(.light-mode) .sari-sales-line {
    border-bottom-color: rgba(243,241,236,.10);
}

html:not(.light-mode) .sari-commerce-scene .sari-scene-badge {
    background: rgba(17,24,32,.94);
    border-color: rgba(243,241,236,.12);
    color: #e9edf1;
}

/* RESPONSIVE */
@media (max-width: 950px) {
    .sari-works {
        padding: 85px 0 70px;
    }

    .sari-works-heading {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .sari-works-intro {
        margin: 0;
        max-width: 650px;
    }

    .sari-works-flow {
        grid-template-columns: 1fr;
    }

    .sari-works-flow::before {
        left: 34px;
        right: auto;
        top: 8%;
        bottom: 8%;
        width: 1px;
        height: auto;
        background: linear-gradient(
            180deg,
            transparent,
            rgba(201,144,32,.62) 15%,
            rgba(23,44,73,.35) 50%,
            rgba(60,154,118,.55) 85%,
            transparent
        );
    }

    .sari-work-card {
        min-height: 370px;
        padding-left: 54px;
    }

    .sari-works-bottom {
        margin-left: 54px;
    }
}

@media (max-width: 560px) {
    .sari-works {
        padding: 68px 0 55px;
    }

    .sari-works-title {
        font-size: 42px;
    }

    .sari-works-flow::before {
        left: 27px;
    }

    .sari-work-card {
        min-height: 390px;
        padding: 21px 18px 23px 46px;
        border-radius: 19px;
    }

    .sari-commerce-scene {
        height: 180px;
    }

    .sari-shopping-window,
    .sari-dashboard-window,
    .sari-delivery-window {
        width: 200px;
    }

    .sari-works-bottom {
        margin-left: 46px;
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }
}


/* =========================================================
   SARI HOW IT WORKS — QUIET MOTION LAYER
   Smooth, formal, restrained. Paste-safe override.
   ========================================================= */

.sari-works.sari-works-motion-ready .sari-reveal {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition:
        opacity .72s cubic-bezier(.22,1,.36,1),
        transform .82s cubic-bezier(.22,1,.36,1);
    will-change: opacity, transform;
}

.sari-works.sari-works-motion-ready .sari-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.sari-works.sari-works-motion-ready .sari-delay-1 {
    transition-delay: .10s;
}

.sari-works.sari-works-motion-ready .sari-delay-2 {
    transition-delay: .20s;
}

/* Heading: slightly calmer than the cards. */
.sari-works.sari-works-motion-ready .sari-works-heading.sari-reveal {
    transform: translate3d(0, 14px, 0);
}

/* Cards stay premium: only a small lift. */
.sari-work-card {
    transition:
        transform .45s cubic-bezier(.22,1,.36,1),
        border-color .35s ease,
        background-color .35s ease,
        box-shadow .45s ease;
}

.sari-work-card:hover {
    transform: translateY(-5px);
}

/* Commerce windows settle smoothly. */
.sari-shopping-window,
.sari-dashboard-window,
.sari-delivery-window {
    transition:
        transform .55s cubic-bezier(.22,1,.36,1),
        box-shadow .45s ease,
        border-color .35s ease,
        background-color .35s ease;
}

.sari-work-card:hover .sari-shopping-window,
.sari-work-card:hover .sari-dashboard-window,
.sari-work-card:hover .sari-delivery-window {
    transform: translate(-50%, -50%) scale(1.018);
}

/* Soft badge float — barely noticeable. */
.sari-scene-badge {
    transition:
        transform .4s cubic-bezier(.22,1,.36,1),
        box-shadow .4s ease,
        background-color .35s ease,
        border-color .35s ease;
}

.sari-work-card:hover .sari-scene-badge {
    transform: translateY(-2px);
}

/* Small glow response on interaction. */
.sari-scene-glow {
    transition:
        transform .7s cubic-bezier(.22,1,.36,1),
        opacity .5s ease;
}

.sari-work-card:hover .sari-scene-glow {
    transform: translate(-50%, -50%) scale(1.06);
    opacity: .9;
}

/* Refined link movement. */
.sari-work-link {
    transition: color .3s ease;
}

.sari-work-link b {
    transition: transform .35s cubic-bezier(.22,1,.36,1);
}

.sari-work-card:hover .sari-work-link b {
    transform: translate(3px, -3px);
}

/* Buy: gentle cart acknowledgement. */
.sari-cart-button {
    transition:
        transform .35s cubic-bezier(.22,1,.36,1),
        box-shadow .35s ease;
}

.sari-work-buy:hover .sari-cart-button {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(201,144,32,.24);
}

/* Seller bars reveal upward once the card enters view. */
.sari-works.sari-works-motion-ready .sari-work-sell:not(.is-visible) .sari-sales-line span {
    transform: scaleY(.25);
    transform-origin: bottom;
}

.sari-sales-line span {
    transform-origin: bottom;
    transition: transform .72s cubic-bezier(.22,1,.36,1);
}

.sari-work-sell.is-visible .sari-sales-line span:nth-child(1) { transition-delay: .08s; }
.sari-work-sell.is-visible .sari-sales-line span:nth-child(2) { transition-delay: .12s; }
.sari-work-sell.is-visible .sari-sales-line span:nth-child(3) { transition-delay: .16s; }
.sari-work-sell.is-visible .sari-sales-line span:nth-child(4) { transition-delay: .20s; }
.sari-work-sell.is-visible .sari-sales-line span:nth-child(5) { transition-delay: .24s; }
.sari-work-sell.is-visible .sari-sales-line span:nth-child(6) { transition-delay: .28s; }

/* Delivery route comes in quietly rather than animating continuously. */
.sari-works.sari-works-motion-ready .sari-work-deliver:not(.is-visible) .sari-route-step,
.sari-works.sari-works-motion-ready .sari-work-deliver:not(.is-visible) .sari-route-line {
    opacity: .25;
    transform: translateY(4px);
}

.sari-route-step,
.sari-route-line {
    transition:
        opacity .55s ease,
        transform .55s cubic-bezier(.22,1,.36,1),
        background-color .35s ease,
        border-color .35s ease,
        color .35s ease;
}

.sari-work-deliver.is-visible .sari-route-step:nth-child(1) { transition-delay: .06s; }
.sari-work-deliver.is-visible .sari-route-line:nth-child(2) { transition-delay: .12s; }
.sari-work-deliver.is-visible .sari-route-step:nth-child(3) { transition-delay: .18s; }
.sari-work-deliver.is-visible .sari-route-line:nth-child(4) { transition-delay: .24s; }
.sari-work-deliver.is-visible .sari-route-step:nth-child(5) { transition-delay: .30s; }

/* Bottom journey fades in as one connected element. */
.sari-works.sari-works-motion-ready .sari-works-bottom {
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity .7s ease,
        transform .75s cubic-bezier(.22,1,.36,1);
}

.sari-works.sari-works-motion-ready .sari-works-bottom.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tiny pulse for status only — slow enough to remain formal. */
.sari-connected-status i {
    animation: sariConnectedPulse 3.8s ease-in-out infinite;
}

@keyframes sariConnectedPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(201,144,32,.10);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(201,144,32,.045);
    }
}

@media (max-width: 950px) {
    .sari-works.sari-works-motion-ready .sari-reveal {
        transform: translate3d(0, 14px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sari-works.sari-works-motion-ready .sari-reveal,
    .sari-works.sari-works-motion-ready .sari-works-bottom,
    .sari-shopping-window,
    .sari-dashboard-window,
    .sari-delivery-window,
    .sari-scene-badge,
    .sari-scene-glow,
    .sari-sales-line span,
    .sari-route-step,
    .sari-route-line,
    .sari-cart-button,
    .sari-work-card,
    .sari-work-link b {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    .sari-connected-status i {
        animation: none !important;
    }
}