/* ============================================
   SECTION: Services Overview
   Intro (left) + two stacked service cards (right),
   matched to the Figma export: 468px intro / 610px
   cards, content-driven heights, decorative swirls.
   ============================================ */

.services-overview {
    /* cap content at 1240 (gutter sits OUTSIDE the cap), aligning with hero/navbar */
    max-width: calc(var(--container-max) + 2 * var(--section-side-padding));
    margin-inline: auto;
    padding: 100px var(--section-side-padding);
    background: var(--color-white);
    display: flex;
    justify-content: space-between;   /* ~162px gap between intro and cards at full width */
    align-items: flex-start;
}

.services-overview__intro {
    flex: 0 1 468px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Stick the intro in view while the taller cards column scrolls past,
       filling the otherwise-empty left gap. align-self:flex-start keeps the
       intro at its content height (not stretched) so sticky has room to move. */
    position: sticky;
    top: 100px;                /* clears the 76px sticky navbar + breathing room */
    align-self: flex-start;
}

.services-overview__heading {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: var(--font-weight-medium);
    line-height: 50px;
    letter-spacing: -1.26px;
    color: var(--color-text-heading);
    margin: 0;
    max-width: 440px;
}

.services-overview__lede {
    font-size: 16px;
    line-height: 26px;
    color: var(--color-text-body);
    margin: 0;
}

.services-overview__cards {
    flex: 0 1 610px;
    display: flex;
    flex-direction: column;
}

/* The track holds the cards; it only becomes a horizontal scroller on
   phones (see the mobile block at the end of this file). */
.services-overview__track {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Scroll-position bars — phones only */
.services-overview__bars {
    display: none;
    gap: 7px;
}

.services-overview__bar {
    flex: 1 1 0;
    height: 4px;
    border-radius: 100px;
    background: var(--color-primary-light);
    transition: background-color var(--transition-fast);
}

.services-overview__bar.is-active {
    background: var(--color-primary);
}

/* ----- Service card ----- */
.service-card {
    position: relative;
    padding: 32px;
    border-radius: 12px;
    overflow: hidden;            /* clips the decorative swirl */
    display: flex;
    flex-direction: column;
}

.service-card--pink { background-color: var(--color-primary-light); }
.service-card--yellow { background-color: var(--color-accent-yellow-bg); }

/* Decorative swirl (reuses the hero pink swirl at low opacity; tan card is tinted). */
.service-card__swirl {
    position: absolute;
    z-index: 0;
    width: 760px;
    aspect-ratio: 828 / 285;
    background: url("../../../images/decorative/vector-270.f060f4d8b30d.png") no-repeat center / contain;
    opacity: 0.2;
    pointer-events: none;
}
.service-card--pink .service-card__swirl {
    top: -39px;
    left: -37px;
    opacity: 1;
}
.service-card--yellow .service-card__swirl {
    /* dedicated tan asset (610x145), sits across the top of the card */
    width: 100%;
    aspect-ratio: 610 / 145;
    top: 0;
    left: 0;
    /* full opacity — tan-on-cream is low-contrast, so no fade */
    opacity: 1;
    background-image: url("../../../images/decorative/vector-270-tan.af3e16a592bf.png");
}

.service-card__icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--color-white);
    border-radius: 12px;
    color: #4f2a33;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.02);
    flex-shrink: 0;
}

.service-card__content {
    position: relative;
    z-index: 1;
    margin-top: 64px;            /* 32 pad + 52 icon + 64 = content at ~148 (Figma) */
    max-width: 514px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.service-card__text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.service-card__title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: var(--font-weight-medium);
    line-height: 32px;
    letter-spacing: -0.48px;
    color: var(--color-text-heading);
    margin: 0;
}

.service-card__desc {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-card__desc p {
    font-size: 16px;
    line-height: 26px;
    color: var(--color-text-muted);
    margin: 0;
}

/* ----- Feature list (Diagnostic card) ----- */
.service-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.service-card__list-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 8px;
    font-size: 16px;
    line-height: 26px;
    color: var(--color-text-muted);
}

.service-card__list-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: #b7a5a1;
}

.service-card__cta {
    align-self: flex-start;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
    .services-overview {
        flex-direction: column;
        gap: 48px;
    }
    .services-overview__intro,
    .services-overview__cards {
        flex: initial;
        max-width: none;
        width: 100%;
    }
    .services-overview__intro {
        position: static;      /* no sticking once the layout stacks to one column */
    }
    .services-overview__heading {
        font-size: 36px;
        line-height: 42px;
    }
}

@media (max-width: 768px) {
    .services-overview {
        padding: 60px var(--section-side-padding);
    }
    .service-card {
        padding: 24px;
    }
    .service-card__content {
        margin-top: 40px;
    }
}

/* ----- Phones: cards become a horizontal, snapping scroller -----
   Geometry from the 360px frame: 56/64 vertical padding, 48px between the
   intro and the cards, 308px cards with the next one peeking, and two
   position bars underneath. */
@media (max-width: 600px) {
    .services-overview {
        padding: 56px var(--section-side-padding) 64px;
        gap: 48px;
    }

    .services-overview__intro {
        gap: 16px;
    }

    .services-overview__heading {
        font-size: 32px;
        line-height: 34px;
        letter-spacing: -0.96px;
    }

    .services-overview__lede {
        font-size: 16px;
        line-height: 24px;
    }

    .services-overview__cards {
        gap: 32px;
    }

    /* Bleed to the section edges so a card can peek in from the right,
       while the first card still lines up with the intro text. */
    .services-overview__track {
        flex-direction: row;
        gap: 32px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin-inline: calc(-1 * var(--section-side-padding));
        padding-inline: var(--section-side-padding);
        /* keeps the snap point from cancelling the padding above */
        scroll-padding-inline: var(--section-side-padding);
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .services-overview__track::-webkit-scrollbar {
        display: none;
    }

    .services-overview__bars {
        display: flex;
    }

    .service-card {
        flex: 0 0 308px;
        min-height: 466px;
        scroll-snap-align: start;
    }

    /* Icon sits at 24/24, content starts at 120 from the card top. */
    .service-card__content {
        margin-top: 44px;
        flex: 1;
        justify-content: space-between;
    }

    .service-card__title {
        font-family: var(--font-body);
        font-size: 20px;
        line-height: 28px;
        letter-spacing: normal;
    }

    /* The design runs a single short paragraph per card. */
    .service-card__tagline,
    .service-card__list {
        display: none;
    }

    .service-card__cta {
        align-self: stretch;
    }

    /* Both swirls drop to 20% and sweep across the card: the pink one enters
       from the top-left, the tan one is the same stroke turned 180deg. */
    .service-card__swirl {
        width: 1051px;
        aspect-ratio: 1051 / 298;
        opacity: 0.2;
    }

    .service-card--pink .service-card__swirl {
        top: -56px;
        left: -266px;
        opacity: 0.2;
    }

    .service-card--yellow .service-card__swirl {
        width: 1051px;
        aspect-ratio: 1051 / 298;
        top: 192px;
        left: 491px;
        transform: rotate(180deg);
        transform-origin: top left;
    }
}
