/* "More products from our family" (resources/views/landing-page/partials/_family.blade.php).
   Every product's text, banner and glow are in the page from the start, stacked; switching
   is an opacity/transform transition only, so scrolling stays smooth on phones. */

.mf {
    background: var(--tt-paper);
    color: var(--tt-ink);
}

.mf__head {
    padding-top: var(--tt-gap);
}

.mf__head .tt-h2 em {
    font-style: normal;
    color: var(--tt-blue);
}

/* One window of scrolling per product (70% of the window), plus the last window. */
.mf__track {
    position: relative;
    height: calc(var(--mf-count) * 70vh + 30vh);
}

.mf__stage {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.mf__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity .5s var(--tt-ease);
}

.mf__glow.is-active {
    opacity: 1;
}

.mf__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: clamp(20px, 3vw, 36px);
    padding-bottom: clamp(20px, 3vw, 36px);
}

/* progress rail */
.mf__rail {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2vw, 24px);
}

.mf__count {
    font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .14em;
    color: var(--tt-ink-3);
    font-variant-numeric: tabular-nums;
}

.mf__count b {
    color: var(--tt-ink);
}

.mf__segments {
    display: flex;
    flex: 1;
    gap: 8px;
}

.mf__segment {
    flex: 1;
    padding: 8px 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}

.mf__bar {
    display: block;
    height: 3px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--tt-rule);
}

.mf__bar span {
    display: block;
    height: 100%;
    border-radius: 99px;
    transform: scaleX(0);
    transform-origin: left;
}

.mf__label {
    display: block;
    margin-top: 8px;
    overflow: hidden;
    font: 500 10.5px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .14em;
    text-transform: uppercase;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--tt-ink-3);
}

/* text + banner */
.mf__body {
    display: grid;
    flex: 1;
    align-content: center;
    align-items: center;
    gap: 20px;
    padding-block: 12px;
}

.mf__texts {
    display: grid;
    order: 2;
}

.mf__text {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity .5s var(--tt-ease), transform .5s var(--tt-ease);
}

.mf__text.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.mf__category {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.landing-refresh .mf__name {
    margin-top: 8px;
}

.mf__desc {
    max-width: 52ch;
    margin: 8px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--tt-ink-3);
}

.mf__points {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}

.mf__points.is-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
}

.mf__points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--tt-ink-2);
}

/* On phones, a fourth plain highlight would push the button off the screen. */
.mf__points:not(.is-grid) li:nth-child(4) {
    display: none;
}

.mf__points svg {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 2px;
}

.mf__points a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--tt-rule);
    text-underline-offset: 4px;
}

.mf__points a:hover {
    color: var(--tt-ink);
    text-decoration-color: currentColor;
}

.mf__cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 8px 8px 8px 24px;
    border-radius: 999px;
    background: var(--tt-ink);
    color: var(--tt-paper);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(18, 20, 29, .18);
    transition: transform .2s var(--tt-ease);
}

.mf__cta:hover {
    color: var(--tt-paper);
    transform: translateY(-2px);
}

.mf__cta > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    transition: transform .2s var(--tt-ease);
}

.mf__cta:hover > span {
    transform: rotate(45deg);
}

.mf__cta svg {
    width: 18px;
    height: 18px;
}

.mf__banners {
    position: relative;
    order: 1;
    aspect-ratio: 16 / 9;
}

.mf__banner {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(14, 33, 66, .18);
    opacity: 0;
    transform: translateY(32px) scale(.97);
    pointer-events: none;
    will-change: transform;
    transition: opacity .5s var(--tt-ease), transform .5s var(--tt-ease);
}

.mf__banner.is-before {
    transform: translateY(-24px) scale(.97);
}

.mf__banner.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.mf__banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 768px) {
    .mf__label {
        display: block;
    }

    .mf__category {
        font-size: 13px;
    }

    .mf__desc {
        margin-top: 16px;
        font-size: 17px;
    }

    .mf__points {
        margin-top: 20px;
        gap: 10px;
    }

    .mf__points li {
        font-size: 16px;
    }

    .mf__points:not(.is-grid) li:nth-child(4) {
        display: flex;
    }

    .mf__cta {
        margin-top: 28px;
        padding: 10px 10px 10px 28px;
        font-size: 16px;
    }
}

@media (max-width: 767.98px) {
    .mf__label {
        display: none;
    }
}

@media (min-width: 992px) {
    .mf__body {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: 56px;
    }

    .mf__texts {
        order: 1;
    }

    .mf__banners {
        order: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mf__glow,
    .mf__text,
    .mf__banner {
        transition: none;
    }
}

/* Dark theme: the banners are light artwork; soften the shadow, keep the frame. */
[data-bs-theme="dark"] .mf__banner,
body.dark .mf__banner {
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
