/* ===================================================
   WEBPOT
   Scroll-Driven Feature Showcase Styles
   File: capabilities.css
 =================================================== */

#capabilities {
    padding: var(--section-padding) 0;
    position: relative;
    background: transparent;
}

/* ==========================================
   TWO-COLUMN SHOWCASE CONTAINER
 ========================================== */

.feature-showcase-container {
    display: grid;
    grid-template-columns: 1fr 1.55fr; /* Expanded right column width to occupy space */
    gap: 48px;
    align-items: start;
    position: relative;
    margin-top: 60px;
}

/* ==========================================
   LEFT COLUMN: VERTICAL FEATURE LIST
 ========================================== */

.feature-showcase-left {
    position: relative;
    z-index: 2;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.feature-item {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.25;
    transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
                transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 32px 0;
    user-select: none;
}

.feature-item.active {
    opacity: 1;
}

.feature-content-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 480px;
}

/* Phase Radial Glow Button */
.feature-phase.phase-rg-button {
    display: inline-flex;
    align-self: flex-start;
    min-width: auto;
    min-height: auto;
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                --rg-pos-x .75s, --rg-pos-y .75s,
                --rg-spread-x .75s, --rg-spread-y .75s,
                --rg-color-1 .75s, --rg-color-2 .75s, --rg-color-3 .75s, --rg-color-4 .75s, --rg-color-5 .75s,
                --rg-border-angle .75s, --rg-border-color-1 .75s, --rg-border-color-2 .75s;
}

.feature-phase.phase-rg-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.35);
    --button-line-opacity: 1;
}

.feature-item.active .feature-phase.phase-rg-button {
    --rg-pos-x: 50%;
    --rg-pos-y: 50%;
    --rg-spread-x: 130%;
    --rg-spread-y: 130%;
    --rg-color-1: #0f172a;
    --rg-color-2: #1e293b;
    --rg-color-3: #38bdf8;
    --rg-color-4: #818cf8;
    --rg-color-5: #0f172a;
    --rg-border-angle: 180deg;
    --rg-border-color-1: rgba(56, 189, 248, 0.9);
    --rg-border-color-2: rgba(168, 85, 247, 0.4);
    --button-line-opacity: 1;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.4), 0 0 50px rgba(168, 85, 247, 0.2);
    transform: scale(1.03);
}

/* Feature Title */
.feature-title {
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--text-light);
    line-height: 1.25;
    letter-spacing: -0.02em;
    transition: color 600ms cubic-bezier(0.4, 0, 0.2, 1),
                font-weight 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item.active .feature-title {
    font-weight: 700;
    color: var(--primary);
}

/* Feature Description */
.feature-desc {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.7;
    transition: color 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item.active .feature-desc {
    color: var(--secondary);
}

/* Highlight Tags */
.feature-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.highlight-tag {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 99px;
    transition: all 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item.active .highlight-tag {
    color: var(--text);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ==========================================
   RIGHT COLUMN: STICKY IMAGE STAGE
 ========================================== */

.feature-showcase-right {
    position: relative;
    height: 100%;
    z-index: 1;
}

.sticky-image-wrapper {
    position: sticky;
    top: 120px;
    width: 100%;
}

.feature-image-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Matches native 16:9 image aspect ratio */
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-medium);
}

.feature-image-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
                transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.feature-image-item.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.feature-image-item img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Complete image fits without any cropping or text cutting */
    display: block;
    border-radius: var(--radius-lg);
}

/* ==========================================
   RESPONSIVE DESIGN
 ========================================== */

@media (max-width: 992px) {
    .feature-showcase-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .sticky-image-wrapper {
        position: sticky;
        top: 80px;
        z-index: 10;
        margin-bottom: 24px;
    }

    .feature-image-stage {
        aspect-ratio: 16 / 9;
    }

    .feature-item {
        min-height: auto;
        padding: 48px 0;
    }

    .feature-title {
        font-size: 1.8rem;
    }
}
