/* Page-local styles extracted from landing/product.html */

/* =====================================================================
   PRODUCT PAGE-LOCAL STYLES
     1. Embed framing (warm-paper shell, screenshot shadow, scaler)
     2. Reveal animation (embeds)
     3. Tilt cards (3D hover)
     4. Pipeline / Proposals / Assistant column hover behavior
     5. Reduced-motion + touch overrides
   ===================================================================== */


/* -- 1. Embed framing -------------------------------------------- */
.screenshot-shadow {
    box-shadow:
        0 25px 60px -22px rgba(15, 61, 46, 0.25),
        0 0 0 1px rgba(15, 61, 46, 0.06);
}
.embed-scale-wrapper { overflow: hidden; }
.embed-scale-inner {
    width: 100%;
    max-width: 100%;
    transform-origin: top left;
}
@media (max-width: 767px) {
    .embed-scale-wrapper { width: 100%; }
    .embed-scale-inner   { transform: scale(var(--embed-scale, 1)); }
}
/* Warm paper-tinted shell that frames every embed mock */
.hiw-visual-shell {
    background: linear-gradient(165deg, #F4EFE6 0%, #FBF8F1 50%, #EEE6D6 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 1px 2px rgba(15, 61, 46, 0.04);
    border: 1px solid #E3DBCD;
}


/* -- 2. Reveal animation ----------------------------------------- */
.embed-scroll-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity   0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.embed-scroll-reveal.embed-scroll-reveal--visible {
    opacity: 1;
    transform: translateY(0);
}


/* -- 3. Tilt cards (3D hover) ------------------------------------ */
.tilt-card {
    transform: perspective(1100px) rotateX(0) rotateY(0);
    transform-style: preserve-3d;
    transition:
        transform  0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}
.tilt-card.is-tilting {
    transition:
        transform  0.08s linear,
        box-shadow 0.08s linear;
}


/* -- 4. Pipeline / Proposals / Assistant column hover behavior --- */
/* Embeds: no inner scroll areas; clip overflow (scrollbars hidden if any) */
#product-pipeline      .pipeline-embed-slot,
#product-pipeline      .pipeline-embed-stretch,
#product-pipeline      .pipeline-embed-root,
#product-proposals     .pipeline-embed-slot,
#product-proposals     .pipeline-embed-stretch,
#product-assistant     .pipeline-embed-slot,
#product-assistant     .pipeline-embed-stretch,
#product-data-sources  .pipeline-embed-slot,
#product-data-sources  .pipeline-embed-stretch {
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#product-pipeline      .pipeline-embed-stretch::-webkit-scrollbar,
#product-pipeline      .pipeline-embed-root::-webkit-scrollbar,
#product-proposals     .pipeline-embed-stretch::-webkit-scrollbar,
#product-assistant     .pipeline-embed-stretch::-webkit-scrollbar,
#product-data-sources  .pipeline-embed-stretch::-webkit-scrollbar {
    display: none; width: 0; height: 0;
}

@media (min-width: 640px) {
    .pipeline-embed-row { align-items: stretch; }
    /* When a column is focused, previews size to content (no forced equal-height gap) */
    .pipeline-embed-row:has(.pipeline-embed-col:hover) { align-items: flex-start; }

    .pipeline-embed-row .pipeline-embed-col {
        flex: 1 1 0%;
        min-width: 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    .pipeline-embed-row .pipeline-embed-col .pipeline-embed-slot {
        width: 100%;
        max-width: 56rem;
        margin-left: auto;
        margin-right: auto;
        display: flex;
        flex-direction: column;
        flex: 1 1 0%;
        min-height: 0;
        isolation: isolate;
        transition:
            max-width  0.55s cubic-bezier(0.22, 1, 0.36, 1),
            min-height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
            max-height 0.60s cubic-bezier(0.33, 1, 0.36, 1),
            box-shadow 0.35s ease;
    }
    /* Assistant: single full-width column — keep slot width stable on hover */
    #product-assistant-col .pipeline-embed-slot {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    /* Opportunity mock: fill the slot; min-h on component is overridden so caps apply */
    #product-pipeline .pipeline-embed-root {
        max-height: none !important;
        height: 100%;
        min-height: 0 !important;
    }
}
@media (min-width: 640px) and (hover: hover) {
    /* Shorter at rest; taller when a column is hovered (transition needs numeric heights) */
    .pipeline-embed-row:not(:has(.pipeline-embed-col:hover)) .pipeline-embed-slot {
        max-height: min(19rem, 44vh);
    }
    .pipeline-embed-row:has(.pipeline-embed-col:hover) .pipeline-embed-col:hover .pipeline-embed-slot {
        max-height: min(50rem, 92vh);
    }
    .pipeline-embed-row:has(.pipeline-embed-col:hover) .pipeline-embed-col:not(:hover) .pipeline-embed-slot {
        max-height: min(19rem, 44vh);
    }

    /* Overview: 3 rows at rest; 2 more reveal on hover */
    #pipeline-overview .pipeline-rfp-extra-wrap {
        transition:
            max-height 0.6s cubic-bezier(0.33, 1, 0.36, 1),
            opacity    0.4s ease;
    }
    #pipeline-overview.pipeline-embed-col:not(:hover) .pipeline-rfp-extra-wrap {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
    }
    #pipeline-overview.pipeline-embed-col:hover .pipeline-rfp-extra-wrap {
        max-height: 24rem;
        opacity: 1;
        transition:
            max-height 0.6s cubic-bezier(0.33, 1, 0.36, 1),
            opacity    0.42s ease 0.06s;
    }

    /* Assistant thread: more messages on hover */
    #product-assistant-col .assistant-chat-extra-wrap {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
        transition:
            max-height 0.6s cubic-bezier(0.33, 1, 0.36, 1),
            opacity    0.4s ease;
    }
    #product-assistant-col.pipeline-embed-col:not(:hover) .assistant-chat-extra-wrap {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
    }
    #product-assistant-col.pipeline-embed-col:hover .assistant-chat-extra-wrap {
        max-height: 28rem;
        opacity: 1;
        transition:
            max-height 0.6s cubic-bezier(0.33, 1, 0.36, 1),
            opacity    0.42s ease 0.06s;
    }

    .pipeline-embed-row .pipeline-embed-col {
        transition:
            flex-grow   0.55s cubic-bezier(0.22, 1, 0.36, 1),
            flex-shrink 0.55s cubic-bezier(0.22, 1, 0.36, 1),
            flex-basis  0.55s cubic-bezier(0.22, 1, 0.36, 1),
            box-shadow  0.35s ease,
            z-index     0s linear;
    }

    /* Bottom paper-fade when preview height is capped (at rest); hidden on hover */
    .pipeline-embed-row .pipeline-embed-slot > .pipeline-embed-stretch { position: relative; }
    .pipeline-embed-row .pipeline-embed-col:not(:hover) .pipeline-embed-slot > .pipeline-embed-stretch::after {
        content: '';
        position: absolute;
        left: 0; right: 0; bottom: 0;
        height: 2.75rem;
        pointer-events: none;
        z-index: 2;
        border-bottom-left-radius:  0.75rem;
        border-bottom-right-radius: 0.75rem;
        background: linear-gradient(
            to top,
            rgb(255 255 255)             0%,
            rgb(255 255 255 / 0.92)     28%,
            rgb(255 255 255 / 0)       100%);
        opacity: 1;
        transition: opacity 0.4s ease;
    }
    .pipeline-embed-row .pipeline-embed-col:hover .pipeline-embed-slot > .pipeline-embed-stretch::after { opacity: 0; }

    /* Inactive column: blur the mock inside the shell */
    .pipeline-embed-row .pipeline-embed-stretch {
        transition:
            filter  0.4s ease,
            opacity 0.4s ease;
    }
    .pipeline-embed-row:has(#pipeline-overview:hover) #pipeline-opportunity-detail .pipeline-embed-stretch,
    .pipeline-embed-row:has(#pipeline-opportunity-detail:hover) #pipeline-overview .pipeline-embed-stretch,
    #product-proposals .pipeline-embed-row:has(.pipeline-embed-col:hover) .pipeline-embed-col:not(:hover) .pipeline-embed-stretch {
        filter: blur(6px);
        opacity: 0.5;
        pointer-events: none;
        contain: paint;
    }
    .pipeline-embed-row .pipeline-embed-col:hover .pipeline-embed-stretch {
        filter: none;
        opacity: 1;
        contain: auto;
    }

    .pipeline-embed-row .pipeline-embed-col:hover {
        flex: 1.45 1 0%;
        z-index: 10;
        box-shadow:
            0 4px 6px -1px rgba(15, 61, 46, 0.06),
            0 22px 40px -12px rgba(15, 61, 46, 0.18);
    }
    .pipeline-embed-row .pipeline-embed-col:hover .pipeline-embed-slot {
        max-width: none;
        flex: 1 1 0%;
        min-height: 0;
    }
    #product-assistant-col.pipeline-embed-col:hover .pipeline-embed-slot { max-width: 100%; }

    /* Inner embed fills slot (flex, not % height — parent uses min-height) */
    .pipeline-embed-row .pipeline-embed-col:hover .pipeline-embed-root {
        max-height: none !important;
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        align-self: stretch;
    }
    .pipeline-embed-row .pipeline-embed-col:hover .pipeline-embed-slot > .pipeline-embed-stretch {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        align-self: stretch;
    }
    #pipeline-overview.pipeline-embed-col:hover     .pipeline-embed-slot > .pipeline-embed-stretch,
    #product-assistant-col.pipeline-embed-col:hover .pipeline-embed-slot > .pipeline-embed-stretch {
        flex: 0 1 auto;
    }
}


/* -- 5. Reduced-motion + touch overrides ------------------------- */
@media (prefers-reduced-motion: reduce) {
    .embed-scroll-reveal { opacity: 1; transform: none; transition: none; }
    .tilt-card           { transition: none !important; transform: none !important; }
    .pipeline-embed-row .pipeline-embed-col,
    .pipeline-embed-row .pipeline-embed-col .pipeline-embed-slot,
    .pipeline-embed-row .pipeline-embed-slot > .pipeline-embed-stretch::after {
        transition: none !important;
    }
    #pipeline-overview .pipeline-rfp-extra-wrap,
    #product-assistant-col .assistant-chat-extra-wrap {
        max-height: none !important;
        opacity: 1 !important;
        overflow: visible !important;
        pointer-events: auto !important;
    }
    .pipeline-embed-row:has(#pipeline-overview:hover) #pipeline-opportunity-detail .pipeline-embed-stretch,
    .pipeline-embed-row:has(#pipeline-opportunity-detail:hover) #pipeline-overview .pipeline-embed-stretch,
    #product-proposals .pipeline-embed-row:has(.pipeline-embed-col:hover) .pipeline-embed-col:not(:hover) .pipeline-embed-stretch {
        filter: none !important;
        opacity: 1 !important;
        contain: none !important;
    }
}
/* Touch / no-hover: don't cap height so full previews stay usable; no bottom fade */
@media (min-width: 640px) {
    @media (hover: none), (pointer: coarse) {
        #product-pipeline      .pipeline-embed-row .pipeline-embed-slot,
        #product-proposals     .pipeline-embed-row .pipeline-embed-slot,
        #product-assistant     .pipeline-embed-row .pipeline-embed-slot,
        #product-data-sources  .pipeline-embed-row .pipeline-embed-slot {
            max-height: none !important;
        }
        .pipeline-embed-row .pipeline-embed-slot > .pipeline-embed-stretch::after {
            display: none !important;
        }
        #product-assistant-col .assistant-chat-extra-wrap {
            max-height: none !important;
            opacity: 1 !important;
            overflow: visible !important;
            pointer-events: auto !important;
        }
    }
}
    
