/* Key Features: PC 1038:7443 / 8181 / 8203 / 8225 / 8246 / 8267.
   Mobile: 1038:7816. Supplied foreground files already contain their crops. */
#key-features.key-features-section {
    --kf-top: 168px;
    /* Keep the collapsed-GNB canvas size; the expanded GNB only shifts it down. */
    --kf-stage-height: max(240px, calc(100vh - var(--banner-top-height, 40px) - 56px));
    --kf-scale: 1;
    position: relative;
    min-height: 0;
    padding: 0;
    overflow: visible;
    overflow-anchor: none;
    scroll-margin-top: var(--kf-top);
    background: #191919;
    color: #fff;
    letter-spacing: 0;
}

#key-features *,
#key-features *::before,
#key-features *::after {
    box-sizing: border-box;
}

#key-features .kf-sr-only,
#key-features #key-features-title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

#key-features .kf-stage {
    position: relative;
    width: 100%;
    height: var(--kf-stage-height);
    overflow: hidden;
    isolation: isolate;
    background: #191919;
}

#key-features[data-kf-pin="active"] .kf-stage {
    position: fixed;
    z-index: 2;
    top: var(--kf-top);
    left: var(--kf-left, 0px);
    width: var(--kf-width, 100%);
}

#key-features[data-kf-pin="after"] .kf-stage {
    position: absolute;
    bottom: 0;
    left: 0;
}

#key-features .kf-background {
    position: absolute;
    z-index: -1;
    inset: 0;
    display: block;
    pointer-events: none;
}

#key-features .kf-background img {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

#key-features .kf-background::after {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    content: "";
}

#key-features button {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    appearance: none;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#key-features button:focus-visible,
#key-features .kf-media:focus-visible {
    outline: 2px solid #0793ea;
    outline-offset: 6px;
}

#key-features .kf-tabs {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    width: 100%;
    height: 72px;
    background: #000;
}

#key-features .kf-tabs button {
    position: relative;
    flex: 0 1 384px;
    height: 40px;
    color: #666;
    font-size: 18px;
    font-weight: 600;
    line-height: 30px;
}

#key-features .kf-tabs button + button::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 40px;
    background: linear-gradient(transparent, #666, transparent);
    content: "";
}

#key-features .kf-tabs button[aria-selected="true"] {
    color: #0793ea;
}

#key-features .kf-content {
    position: absolute;
    /* Keep the reference inset on the fitted 1080px canvas. Split only
       surplus desktop height above and below the entire content group. */
    top: calc(
        72px + 77px * var(--kf-scale)
        + max(0px, (100% - 72px - 1008px * var(--kf-scale)) / 2)
    );
    left: 50%;
    width: 1120px;
    height: 782px;
    transform: translateX(-50%) scale(var(--kf-scale));
    transform-origin: center top;
}

#key-features .kf-panels {
    position: relative;
    height: 720px;
}

#key-features .kf-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 1120px;
    height: 720px;
}

#key-features .kf-panel:not([data-active="true"]) {
    display: none;
}

#key-features .kf-info {
    position: absolute;
    top: 50%;
    left: 680px;
    width: 440px;
    transform: translateY(-50%);
    overflow-wrap: break-word;
}

#key-features .kf-info h3 {
    margin: 0 0 32px;
    padding: 0;
    color: #fff;
    font-size: 32px;
    font-weight: 600;
    line-height: 52px;
}

#key-features .kf-info p {
    margin: 0;
    padding: 0;
    color: #ccc;
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
}

#key-features .kf-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 600px;
    height: 720px;
    overflow: hidden;
    background: #101010;
    touch-action: pan-y pinch-zoom;
}

#key-features .kf-arrow {
    display: none;
}

#key-features .kf-slide {
    position: absolute;
    inset: 0;
    display: block;
}

#key-features .kf-slide[hidden] {
    display: none;
}

#key-features .kf-slide img {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    user-select: none;
}

#key-features .kf-pagination {
    position: absolute;
    top: 50%;
    left: 632px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: translateY(-50%);
}

#key-features .kf-dot {
    position: relative;
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
}

#key-features .kf-dot::before {
    position: absolute;
    inset: -8px;
    content: "";
}

#key-features .kf-dot[aria-current="true"] {
    background: #ff4e3a;
}

#key-features .kf-panel--space .kf-info {
    left: 0;
}

#key-features .kf-panel--space .kf-media {
    left: 520px;
}

#key-features .kf-panel--space .kf-pagination {
    left: 480px;
}

#key-features .kf-panel--performance {
    width: 1260px;
}

#key-features .kf-panel--performance .kf-info {
    width: 580px;
}

#key-features .kf-note {
    position: absolute;
    top: 760px;
    left: 0;
    margin: 0;
    padding: 0;
    color: #999;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

@media (max-width: 1119px) {
    #key-features.key-features-section {
        --kf-top: 140px;
        /* Match the 360px frame, then grow cards without scaling the UI. */
        --kf-card-width: min(87.5%, 560px);
        --kf-item-gap: clamp(20px, 5.5556vw, 32px);
        height: auto;
    }

    #key-features .kf-stage {
        height: auto;
        padding: clamp(64px, 17.7778vw, 96px)
            clamp(20px, 5.5556vw, 56px)
            clamp(56px, 15.5556vw, 80px);
    }

    #key-features .kf-background img {
        /* The mobile Figma frame maps the entire landscape onto the section.
           Cover would crop almost all of its horizontal scenery on tall screens. */
        object-fit: fill;
    }

    #key-features .kf-tabs {
        display: none;
    }

    #key-features .kf-content {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        max-width: 800px;
        height: auto;
        margin: 0 auto;
        transform: none;
    }

    #key-features .kf-panels {
        display: flex;
        flex-direction: column;
        gap: clamp(60px, 16.6667vw, 96px);
        height: auto;
    }

    #key-features .kf-panel,
    #key-features .kf-panel:not([data-active="true"]) {
        position: relative;
        top: auto;
        left: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        height: auto;
    }

    /* Keep Space right-aligned even when the inactive-panel rule applies. */
    #key-features .kf-panel.kf-panel--space,
    #key-features .kf-panel.kf-panel--space:not([data-active="true"]) {
        align-items: flex-end;
    }

    #key-features .kf-info,
    #key-features .kf-panel--space .kf-info,
    #key-features .kf-panel--performance .kf-info {
        position: relative;
        top: auto;
        left: auto;
        width: var(--kf-card-width);
        max-width: 100%;
        transform: none;
    }

    #key-features .kf-panel--design .kf-info {
        width: min(100%, 640px);
    }

    #key-features .kf-info h3 {
        margin-bottom: var(--kf-item-gap);
        color: #e9e9e9;
        font-size: clamp(18px, calc(12px + 1.6667vw), 28px);
        line-height: clamp(30px, calc(24px + 1.6667vw), 40px);
    }

    #key-features .kf-info p {
        min-height: 40px;
        color: #fff;
        font-size: clamp(12px, calc(8.4706px + 0.9804vw), 16px);
        line-height: clamp(20px, calc(14.7059px + 1.4706vw), 26px);
    }

    #key-features .kf-media,
    #key-features .kf-panel--space .kf-media {
        position: relative;
        top: auto;
        left: auto;
        width: var(--kf-card-width);
        max-width: 100%;
        height: auto;
        aspect-ratio: 280 / 340;
        margin-top: var(--kf-item-gap);
        /* The touch handler chooses the axis before native scrolling starts. */
        touch-action: auto;
    }

    #key-features .kf-pagination,
    #key-features .kf-panel--space .kf-pagination {
        position: relative;
        top: auto;
        left: auto;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
        width: var(--kf-card-width);
        max-width: 100%;
        height: 8px;
        margin-top: var(--kf-item-gap);
        transform: none;
    }

    #key-features .kf-arrow {
        position: absolute;
        z-index: 1;
        top: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.7);
        transform: translateY(-50%);
    }

    #key-features .kf-arrow--prev {
        left: 0;
        border-radius: 0 4px 4px 0;
    }

    #key-features .kf-arrow--next {
        right: 0;
        border-radius: 4px 0 0 4px;
    }

    #key-features .kf-arrow::before {
        width: 9px;
        height: 9px;
        border-top: 2px solid #fff;
        border-right: 2px solid #fff;
        content: "";
    }

    #key-features .kf-arrow--prev::before {
        transform: translateX(2px) rotate(-135deg);
    }

    #key-features .kf-arrow--next::before {
        transform: translateX(-2px) rotate(45deg);
    }

    #key-features .kf-arrow[aria-disabled="true"] {
        background: rgba(0, 0, 0, 0.45);
        cursor: default;
    }

    #key-features .kf-arrow:focus-visible {
        outline-offset: -3px;
    }

    #key-features .kf-dot {
        background: #ccc;
    }

    #key-features .kf-note {
        position: relative;
        top: auto;
        left: auto;
        margin-top: clamp(40px, 11.1111vw, 56px);
        font-size: clamp(13px, 1.8229vw, 14px);
        line-height: clamp(20px, 2.8646vw, 22px);
    }
}
