/*
 * Homepage "Your wellbeing journey" feature showcase (index.html), between the
 * hero and the "Explore AI Companions" introduction. Three app screenshots, each
 * resting on its own card. From 769px up the cards sit in a three-column row;
 * at 768px and below the row becomes a swipeable scroll-snap carousel, the same
 * technique as the homepage topic carousels (styles/topicCards.css).
 */
.feature-showcase {
    --fs-ink: #1f1a2e;
    --fs-muted: #5b5670;
    --fs-accent: #8a5cf0;
    --fs-accent-strong: #6d3fd0;
    --fs-tint: #efe8fd;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(56px, 6vw, 84px) 0 clamp(48px, 5vw, 72px);
    /* Fades out at the bottom so the lilac band blends into the page background
       above the Explore AI Companions introduction. */
    background: linear-gradient(180deg, #faf8fe 0%, #f6f1fd 82%, rgba(246, 241, 253, 0) 100%);
    font-family: 'Inter', 'Inter Fallback', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--fs-ink);
    text-align: center;
}

/* The showcase already supplies the space below its CTA. Avoid stacking the
   companion banner's standalone top margin at this homepage transition. */
.feature-showcase + .gradient-banner {
    margin-top: 0;
}

/* Very light abstract circles, kept to the section corners. */
.feature-showcase::before,
.feature-showcase::after {
    content: '';
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(8px);
}

.feature-showcase::before {
    top: -120px;
    left: -140px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(171, 119, 226, 0.14) 0%, rgba(171, 119, 226, 0) 70%);
}

.feature-showcase::after {
    right: -160px;
    bottom: 80px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(138, 92, 240, 0.1) 0%, rgba(138, 92, 240, 0) 70%);
}

.feature-showcase__inner {
    position: relative;
    box-sizing: border-box;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-showcase__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--fs-tint);
    color: var(--fs-accent-strong);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.feature-showcase__eyebrow svg {
    flex: 0 0 12px;
}

.feature-showcase__title {
    max-width: 960px;
    margin: 0 auto;
    color: var(--fs-ink);
    font-size: clamp(1.85rem, 3.6vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.15;
    text-wrap: balance;
}

.feature-showcase__accent {
    color: var(--fs-accent);
}

.feature-showcase__intro {
    max-width: 700px;
    margin: 16px auto 0;
    color: var(--fs-muted);
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.65;
    text-wrap: pretty;
}

.feature-showcase__stage {
    position: relative;
    margin-top: clamp(36px, 4.5vw, 56px);
}

/* Soft curved line running behind the phones (wide screens only). */
.feature-showcase__curve {
    position: absolute;
    top: 14%;
    left: 50%;
    z-index: 0;
    width: 112%;
    height: 46%;
    transform: translateX(-50%);
    color: rgba(138, 92, 240, 0.32);
    pointer-events: none;
}

.feature-showcase__track {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 2.5vw, 32px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-showcase__track:focus-visible {
    outline: 2px solid var(--fs-accent-strong);
    outline-offset: 6px;
    border-radius: 24px;
}

.feature-showcase__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

/* The phone overlaps the top of its card by --fs-overlap. */
.feature-showcase__phone {
    --fs-overlap: 92px;
    position: relative;
    z-index: 1;
    width: min(70%, 262px);
    margin-bottom: calc(var(--fs-overlap) * -1);
    filter: drop-shadow(0 18px 26px rgba(40, 20, 72, 0.18));
}

.feature-showcase__phone picture,
.feature-showcase__phone img {
    display: block;
    width: 100%;
}

/* With height:auto the width/height attributes reserve each screenshot's box
   before it loads, so nothing shifts. */
.feature-showcase__phone img {
    height: auto;
}

.feature-showcase__card {
    box-sizing: border-box;
    display: flex;
    flex: 1 1 auto;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    padding: calc(92px + 24px) 26px 26px;
    border: 1px solid rgba(138, 92, 240, 0.12);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(52, 28, 92, 0.07);
    text-align: left;
}

.feature-showcase__icon {
    display: inline-flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--fs-tint);
    color: var(--fs-accent-strong);
}

.feature-showcase__card-title {
    margin: 2px 0 6px;
    color: var(--fs-ink);
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.feature-showcase__card-text {
    margin: 0;
    color: var(--fs-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

.feature-showcase__hint {
    display: none;
}

.feature-showcase__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    margin-top: clamp(36px, 4vw, 48px);
    padding: 0 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c4ddb 0%, #5b34b5 100%);
    box-shadow: 0 8px 22px rgba(109, 63, 208, 0.3);
    color: #fff;
    font-size: 1.02rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-showcase__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(109, 63, 208, 0.38);
}

.feature-showcase__cta:focus-visible {
    outline: 3px solid var(--fs-accent-strong);
    outline-offset: 3px;
}

.feature-showcase__cta svg {
    transition: transform 0.25s ease;
}

.feature-showcase__cta:hover svg {
    transform: translateX(3px);
}

/* Tablet widths: narrower columns, so the icon sits above the card text. */
@media (max-width: 1024px) and (min-width: 769px) {
    .feature-showcase__phone {
        --fs-overlap: 76px;
        width: min(74%, 230px);
    }

    .feature-showcase__card {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: calc(76px + 20px) 18px 22px;
        text-align: center;
    }

    .feature-showcase__icon {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .feature-showcase__card-title {
        font-size: 1.08rem;
    }

    .feature-showcase__card-text {
        font-size: 0.94rem;
    }
}

/* Phones and small tablets: one main slide at a time with the next peeking in. */
@media (max-width: 768px) {
    .feature-showcase__inner {
        width: 100%;
    }

    .feature-showcase__eyebrow,
    .feature-showcase__title,
    .feature-showcase__intro {
        margin-left: 16px;
        margin-right: 16px;
    }

    .feature-showcase__title {
        font-size: clamp(1.7rem, 7vw, 2.1rem);
    }

    .feature-showcase__intro {
        max-width: 520px;
        font-size: 1rem;
    }

    /* !important: landing.css forces every svg to display:inline-block !important. */
    .feature-showcase__curve {
        display: none !important;
    }

    .feature-showcase__track {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        overflow-y: hidden;
        /* Room for the card shadow inside the scroll clip */
        padding: 4px 16px 20px;
        scroll-padding-inline: 16px;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .feature-showcase__track::-webkit-scrollbar {
        display: none;
    }

    .feature-showcase__track:focus-visible {
        outline-offset: -2px;
    }

    .feature-showcase__item {
        flex: 0 0 min(80%, 340px);
        scroll-snap-align: start;
    }

    .feature-showcase__phone {
        --fs-overlap: 84px;
        width: min(78%, 250px);
    }

    .feature-showcase__card {
        padding: calc(84px + 22px) 20px 22px;
        gap: 14px;
    }

    .feature-showcase__icon {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .feature-showcase__hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin: 10px 16px 0;
        color: var(--fs-muted);
        font-size: 0.88rem;
    }

    .feature-showcase__cta {
        margin-top: 22px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .feature-showcase__track {
        scroll-behavior: smooth;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feature-showcase__cta,
    .feature-showcase__cta svg {
        transition: none;
    }

    .feature-showcase__cta:hover,
    .feature-showcase__cta:hover svg {
        transform: none;
    }
}
