.features {

    width: 100%;
    padding: 80px 100px;
    background: #fff;
    min-height: auto;

}

.features-container {

    max-width: 1335px;
    margin: auto;

}

.features__intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    margin-bottom: 40px;
}

.features__grid {
    max-width: 1335px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 24px;
}

.feature-card {
    position: relative;

    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 416px;
    gap: 10px;

    overflow: hidden;
    padding: 24px;
    box-sizing: border-box;
    background: #fff;

    border: 1px solid #E6E6E6;
    border-radius: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    transition: border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s cubic-bezier(.22, 1, .36, 1),
    background 0.35s ease;
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
            circle at 15% 10%,
            rgba(47, 92, 240, 0.10),
            transparent 35%
    ),
    linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.65),
            rgba(255, 255, 255, 0.15)
    );

    transition: opacity 0.4s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    border-color: rgba(47, 92, 240, 0.35);

    background: rgba(255, 255, 255, 0.72);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    box-shadow: 0 0 0 1px rgba(47, 92, 240, 0.06),
    0 0 14px rgba(47, 92, 240, 0.18),
    0 18px 40px rgba(47, 92, 240, 0.12);

    transform: translateY(-4px);
}

.feature-card__title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    line-height: 34px;
    letter-spacing: -4%;

    color: #000;
}


.feature-title {
    margin: 0 auto;
    max-width: 835px;
}

.feature-card__desc {
    margin: 0 0 20px;
    font-size: 18px;
    line-height: 26px;
    font-weight: 400;
    letter-spacing: -4%;
    font-style: normal;
    color: #222;
}

.feature-card__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 20px;
}

.feature-card__list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -4%;
    font-weight: 400;
    color: #222;
}

.feature-card__icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.feature-card__image {
    display: block;
    width: 381px;
    height: 366px;
    object-fit: contain;
    border-radius: 12px;
    margin-top: auto;
}

/* Call-to-action pill button */
.feature-card__cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 4 00;
    color: #fff;
    background: #155DFC;
    border-radius: 999px;
    text-decoration: none;
}

.feature-card__cta:hover {
    background: var(--color-accent-blue-dark);
}

.feature-card__cta svg {
    transition: transform 0.3s ease;
}

.feature-card__cta:hover svg {
    transform: translateX(3px);
}

/* ---------- Wide card modifier: text column + image side by side ---------- */
.feature-card__body {

    flex: 0 0 220px;
}

.feature-card--wide {
    grid-column: span 2;
    display: flex;
    flex-direction: row;
    padding: 24px 8px 24px 24px;
    border-radius: 16px;
    height: 416px;
    box-sizing: border-box;
    gap: 24px;
    overflow: hidden;
}

.feature-card--wide .feature-card__body {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.feature-card--wide .feature-card__image {
    flex: 1;
    width: 460px;

    height: 368px;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    object-position: center;
    margin: 0;
}

/* =========================================================
   FEATURE IMAGE ANIMATIONS
   Ambient float + interaction, layered on top of the existing
   design without changing any sizing/layout rules above.
   Uses the standalone `translate` / `scale` / `rotate` CSS
   properties so they compose with .feature-card's own
   `transform: translateY(-2px)` hover instead of fighting it.
========================================================= */

.feature-card__image {
    translate: 0 0;
    scale: 1;
    rotate: 0deg;

    transition: scale 0.35s ease, filter 0.35s ease;
    will-change: translate;

    animation: featureFloat 4s ease-in-out infinite;
}

@keyframes featureFloat {
    0%, 100% {
        translate: 0 0;
        filter: hue-rotate(0deg);
        rotate: 1.5deg;
    }
    50% {
        translate: 0 -10px;
        rotate: -1.5deg;
        filter: hue-rotate(15deg);
    }
}

/* Stagger each card so the cards don't bob in unison */
.features__grid .feature-card:nth-child(1) .feature-card__image {
    animation-duration: 7s;
    animation-delay: 0s;
}

.features__grid .feature-card:nth-child(2) .feature-card__image {
    animation-name: featureFloatTilt;
    animation-duration: 6s;
    animation-delay: 0.3s;
}

.features__grid .feature-card:nth-child(3) .feature-card__image {
    animation-duration: 6.5s;
    animation-delay: 0.6s;
}

.features__grid .feature-card:nth-child(4) .feature-card__image {
    animation-duration: 5.5s;
    animation-delay: 0.15s;
}

.features__grid .feature-card:nth-child(5) .feature-card__image {
    animation-duration: 6.2s;
    animation-delay: 0.9s;
}

/* Card 2 (phone mockup) gets a slight tilt with the float, like a
   hand gently showing off the screen */
@keyframes featureFloatTilt {
    0%, 100% {
        translate: 0 0;
        rotate: 0deg;
    }
    50% {
        translate: 0 -18px;
        rotate: -1.5deg;
    }
}

/* Hover: pause the ambient float and give the image a confident pop.
   `scale`/`rotate` are independent of `translate`, so this never
   conflicts with the running keyframe animation above. */

.feature-card:hover .feature-card__image {
    scale: 1.02;
}

/* Soft pulsing glow behind the two icon-only cards (Secure &amp;
   Scalable / Advanced Reporting) to draw the eye without any
   extra markup — contained by the card's own overflow:hidden. */
.features__grid .feature-card:nth-child(4)::before,
.features__grid .feature-card:nth-child(5)::before {
    content: "";
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(21, 93, 252, 0.14) 0%, rgba(21, 93, 252, 0) 70%);
    animation: featureGlowPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.features__grid .feature-card:nth-child(4) .feature-card__image,
.features__grid .feature-card:nth-child(5) .feature-card__image {
    position: relative;
    z-index: 1;
}

@keyframes featureGlowPulse {
    0%, 100% {
        opacity: 0.55;
        scale: 1;
    }
    50% {
        opacity: 1;
        scale: 1.12;
    }
}

/* Respect users who've asked for reduced motion */

/* Mobile: single column; wide card stacks text above image */


/* ==========================================
   MOBILE HORIZONTAL SCROLL
   max-width:480px
========================================== */
@media (max-width: 480px) {

    .features {
        padding: 20px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .features-container {
        width: 100%;
        max-width: 100%;
    }

    .features__grid {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 16px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        max-width: 100%;
    }

    .features__grid::-webkit-scrollbar {
        display: none;
    }

    .features__grid {
        scrollbar-width: none;
    }

    .feature-card,
    .feature-card--wide {
        flex: 0 0 88%;
        width: 88%;
        max-width: 88%;
        min-width: 0;
        height: auto;
        max-height: none;
        box-sizing: border-box;
        scroll-snap-align: start;
    }

    .feature-card {
        justify-content: space-between;
        padding: 20px;
    }

    .feature-card__title {
        font-size: 21px;
        line-height: 1.3;
    }

    .feature-card__desc {
        font-size: 15px;
        line-height: 22px;
    }

    .feature-card__list li {
        font-size: 14px;
        line-height: 20px;
    }

    .feature-card--wide {
        display: flex;
        flex-direction: column;
        grid-column: auto;
        padding: 20px;
        gap: 16px;
    }

    .feature-card--wide .feature-card__body {
        width: 100%;
        flex: none;
        min-width: 0;
    }

    .feature-card__image,
    .feature-card--wide .feature-card__image {
        display: block;
        width: 100%;
        max-width: 320px;
        height: 230px;
        object-fit: contain;
        margin: 16px auto 0;
        flex: none;
    }

    /* Keep the mobile carousel calm: no ambient bobbing/glow while
       the user is swiping between snap-scrolled cards */

}

/* ==========================================
   TABLET
========================================== */
/* ==========================================
   MOBILE HORIZONTAL SCROLL
========================================== */
/* ==========================================
   TABLET
   481px–768px
========================================== */
@media (min-width: 481px) and (max-width: 768px) {

    .features {
        padding: 20px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .features-container {
        width: 100%;
        max-width: 100%;
    }

    .features__intro {
        margin-bottom: 36px;
    }

    .features__grid {
        display: grid;
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap: 20px;
        width: 100%;
        max-width: 100%;
    }

    .feature-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
        min-height: 380px;
        box-sizing: border-box;
        padding: 20px;
        gap: 10px;
    }

    .feature-card__title {
        font-size: 22px;
        line-height: 1.3;
    }

    .feature-card__desc {
        font-size: 16px;
        line-height: 26px;
        margin: 0 0 16px;
    }

    .feature-card__list li {
        font-size: 15px;
        line-height: 22px;
    }

    .feature-card__image {
        width: 100%;
        max-width: 100%;
        height: 220px;
        object-fit: contain;
        margin-top: auto;
    }

    /* Wide card spans both tablet columns, stays horizontal since width allows it */
    .feature-card--wide {
        grid-column: span 2;
        flex-direction: row;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 300px;
        padding: 22px;
        gap: 20px;
        box-sizing: border-box;
    }

    .feature-card--wide .feature-card__body {
        flex: 0 0 42%;
        min-width: 0;
        width: auto;
    }

    .feature-card--wide .feature-card__image {
        flex: 1;
        width: auto;
        max-width: 100%;
        height: 260px;
        min-width: 0;
        object-fit: contain;
    }

}