/* =========================================================
   SoxyPro Cases Page — Hero & Feature Cards
   BEM prefixes: hero-cases-  |  feature-card-
   ========================================================= */

/* ── Variables ────────────────────────────────────────────── */
.hero-cases,
.hero-cases__features {
    --ch-purple:       #7c3aed;
    --ch-purple-mid:   #a855f7;
    --ch-purple-light: #c084fc;
    --ch-teal:         #22d3ee;
    --ch-card-bg:      #161b27;
    --ch-card-bg-alt:  #1a1f2e;
    --ch-card-border:  rgba(255, 255, 255, 0.07);
    --ch-icon-bg:      rgba(124, 58, 237, 0.16);
    --ch-text-muted:   #a0aec0;
}

/* ── Section gap (moved from inline style) ────────────────── */
.cases-section-gap {
    padding-top: 3rem;
}

@media screen and (max-width: 991px) {
    .cases-section-gap {
        padding-top: 2rem;
    }
}

/* ── Hero section ─────────────────────────────────────────── */
.hero-cases {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 7rem 0 3.5rem;
}

.hero-cases__inner {
    width: 100%;
}

/* Two-column row */
.hero-cases__row {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 4rem;
}

.hero-cases__left {
    flex: 0 0 55%;
    max-width: 55%;
}

.hero-cases__right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ── Badge ────────────────────────────────────────────────── */
.hero-cases__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.875rem;
    border: 0.0625rem solid rgba(124, 58, 237, 0.4);
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.hero-cases__badge-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--ch-purple);
    flex-shrink: 0;
}

.hero-cases__badge-text {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(192, 132, 252, 0.85);
}

/* ── Headline ─────────────────────────────────────────────── */
.hero-cases__title {
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    background: linear-gradient(90deg, var(--ch-purple-mid) 0%, var(--ch-purple) 45%, var(--ch-teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: none;
}

/* ── Description ──────────────────────────────────────────── */
.hero-cases__subtitle {
    font-size: 1rem;
    color: var(--ch-text-muted);
    max-width: 30rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* ── CTA Buttons ──────────────────────────────────────────── */
.hero-cases__btns {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.hero-cases__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease,
                box-shadow 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.hero-cases__btn--primary {
    background: var(--ch-purple);
    color: #fff;
    border: 0.0625rem solid var(--ch-purple);
}

.hero-cases__btn--primary:hover {
    background: #6d28d9;
    color: #fff;
    box-shadow: 0 0 0 0.1875rem rgba(124, 58, 237, 0.3);
    transform: translateY(-0.0625rem);
}

.hero-cases__btn--ghost {
    background: transparent;
    color: #fff;
    border: 0.0625rem solid rgba(255, 255, 255, 0.18);
}

.hero-cases__btn--ghost:hover {
    color: #fff;
    border-color: rgba(124, 58, 237, 0.6);
    box-shadow: 0 0 0 0.1875rem rgba(124, 58, 237, 0.12);
    transform: translateY(-0.0625rem);
}

/* ── Right column: stacked card visual ───────────────────── */
.hero-cases__right {
    align-items: center;
}

.hero-card-stack {
    position: relative;
    width: 17.5rem;
    min-height: 18.75rem;
    flex-shrink: 0;
}

.hero-card-back {
    position: absolute;
    top: 1.875rem;
    left: 1.875rem;
    width: 13.75rem;
    height: 13.75rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(17, 10, 46, 0.4);
    backdrop-filter: blur(18px) saturate(135%);
    border-radius: 1.5rem;
    border: 0.09375rem solid transparent;
    transform: rotate(-4deg);
    z-index: 1;
    box-shadow:
        -2px  2px 0 1px rgba(0, 229, 196, 0.4),
         2px -2px 0 1px rgba(124, 58, 237, 0.3),
        0 1rem 2.125rem rgba(4, 1, 16, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.hero-card-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 13.75rem;
    height: 13.75rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(17, 10, 46, 0.4);
    backdrop-filter: blur(18px) saturate(135%);
    border-radius: 1.5rem;
    border: 0.0625rem solid rgba(255, 255, 255, 0.075);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 1rem 2.125rem rgba(4, 1, 16, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.hero-card-shield {
    filter: drop-shadow(0 0 1.125rem rgba(139, 92, 246, 0.6));
}

/* ── Feature cards strip ──────────────────────────────────── */
.hero-cases__features {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.feature-card {
    grid-column: span 2;
}

/* 1 leftover card — center column of 6 */
.feature-card:last-child:nth-child(3n+1) {
    grid-column: 3 / 5;
}

/* 2 leftover cards — shift both to center */
.feature-card:nth-last-child(2):nth-child(3n+1) {
    grid-column: 2 / 4;
}
.feature-card:last-child:nth-child(3n+2) {
    grid-column: 4 / 6;
}

.feature-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(17, 10, 46, 0.4);
    backdrop-filter: blur(18px) saturate(135%);
    border: 0.0625rem solid rgba(255, 255, 255, 0.075);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow:
        0 1rem 2.125rem rgba(4, 1, 16, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.065);
    transition: transform 0.25s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-0.25rem);
    border-color: rgba(77, 217, 192, 0.3);
    box-shadow:
        0 1.25rem 3rem rgba(4, 1, 16, 0.22),
        0 0 0.875rem rgba(77, 217, 192, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Icon + title on same row */
.feature-card__header {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-bottom: 0.6rem;
}

/* Icon badge — 3 cycling accent colours */
.feature-card__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* 1st card — purple */
.feature-card:nth-child(3n+1) .feature-card__icon {
    background: rgba(160, 100, 255, 0.1);
    border: 0.0625rem solid rgba(160, 100, 255, 0.25);
    color: #b07fff;
}

/* 2nd card — nebula (teal/cyan) */
.feature-card:nth-child(3n+2) .feature-card__icon {
    background: rgba(77, 217, 192, 0.1);
    border: 0.0625rem solid rgba(77, 217, 192, 0.25);
    color: #4dd9c0;
}

/* 3rd card — orange */
.feature-card:nth-child(3n+3) .feature-card__icon {
    background: rgba(251, 146, 60, 0.1);
    border: 0.0625rem solid rgba(251, 146, 60, 0.25);
    color: #fb923c;
}

.feature-card__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin: 0;
    /* Reserve exactly 2 lines; truncate overflow with ellipsis */
    height: calc(0.875rem * 1.4 * 2);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.feature-card__desc {
    font-size: 0.8125rem;
    color: var(--ch-text-muted);
    line-height: 1.6;
    margin: 0;
    /* Max 3 lines with ellipsis */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.feature-card__accent {
    height: 0.1875rem;
    width: 2.5rem;
    background: linear-gradient(90deg, var(--ch-purple), var(--ch-teal));
    border-radius: 0.125rem;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-cases {
        min-height: auto;
        padding: 1rem 0 2.5rem;
    }

    .hero-cases__row {
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 2.5rem;
    }

    .hero-cases__left {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .hero-cases__right {
        display: none;
    }

    .hero-card-stack {
        display: none;
    }

    .hero-cases__subtitle {
        max-width: 100%;
    }

    .hero-cases__features {
        grid-template-columns: 1fr;
    }

    .feature-card,
    .feature-card:last-child:nth-child(3n+1),
    .feature-card:nth-last-child(2):nth-child(3n+1),
    .feature-card:last-child:nth-child(3n+2) {
        grid-column: 1 / -1;
    }
}
