/* ===== hardware GPU page ===== */
body.page-inner {
    background: #FAFCFD;
}

.hardware-hero {
    position: relative;
    width: 100%;
    height: calc(840 * var(--rpx));
    overflow: hidden;
    color: var(--text-primary);
}

.hardware-hero .hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hardware-hero .hero-bg .swiper-slide {
    height: 100%;
}

.hardware-hero .hero-bg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 75% center;
}

.hardware-hero .hero-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: flex-start;
    pointer-events: none;
}

.hardware-hero .hero-content .wrapper {
    pointer-events: auto;
    padding-top: calc(206 * var(--rpx));
    padding-bottom: calc(30 * var(--rpx));
}

.hardware-hero .hero-title {
    margin: 0;
    font-size: calc(58 * var(--fpx-50));
    font-weight: 600;
    line-height: calc(68 / 58);
    text-align: left;
}

.hardware-hero .hero-subtitle {
    margin: calc(24 * var(--rpx)) 0 0;
    max-width: calc(640 * var(--rpx));
    font-size: calc(24 * var(--fpx));
    font-weight: 600;
    line-height: calc(36 / 24);
    text-align: left;
}

.hardware-hero .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    column-gap: calc(60 * var(--rpx));
    row-gap: calc(32 * var(--rpx));
    align-items: start;
    margin-top: calc(40 * var(--rpx));
}

.hardware-hero .hero-stat-sep {
    display: none;
}

.hardware-hero .hero-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: calc(2 * var(--rpx));
    flex-shrink: 0;
    min-width: calc(128 * var(--rpx));
    max-width: calc(288 * var(--rpx));
}

.hardware-hero .hero-stat.is-wide {
    min-width: calc(217 * var(--rpx));
    max-width: calc(288 * var(--rpx));
}

.hardware-hero .hero-stat-label {
    font-size: calc(16 * var(--fpx));
    font-weight: 400;
    line-height: calc(24 / 16);
    white-space: nowrap;
}

.hardware-hero .hero-stat-value-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: calc(2 * var(--rpx));
}

.hardware-hero .hero-stat-value {
    font-size: calc(38 * var(--fpx-50));
    font-weight: 600;
    line-height: 1;
    color: var(--brand-red);
}

.hardware-hero .hero-stat-unit {
    font-size: calc(16 * var(--fpx));
    font-weight: 600;
    line-height: calc(24 / 16);
}

.hardware-hero .hero-actions {
    margin-top: calc(40 * var(--rpx));
}

.hardware-hero .btn-ctn {
    margin: 0;
}

.hardware-hero .btn-more {
    display: inline-flex;
    align-items: center;
    gap: 0.75em;
    width: auto;
    height: auto;
    padding: 1.125em 1.875em;
    border-radius: 18.75em;
    background: var(--brand-red);
    color: #fff;
    font-size: calc(16 * var(--fpx));
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    transition: filter 0.2s;
}

.hardware-hero .btn-more:hover {
    filter: brightness(1.06);
}

.hardware-hero .btn-more .arr {
    flex: 0 0 auto;
    width: 1.1875em;
    height: 0.875em;
    background: url("../images/icons/icon_arr_right.svg") center/contain no-repeat;
}

.hardware-hero .hero-bg .hero-pagination {
    position: absolute;
    left: 50%;
    bottom: calc(16 * var(--rpx));
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(10 * var(--rpx));
    transform: translateX(-50%);
    pointer-events: auto;
}

.hardware-hero .hero-bg .hero-pagination .swiper-pagination-bullet {
    width: calc(20 * var(--rpx));
    height: calc(10 * var(--rpx));
    margin: 0 !important;
    border-radius: calc(300 * var(--rpx));
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.hardware-hero .hero-bg .hero-pagination .swiper-pagination-bullet-active {
    width: calc(60 * var(--rpx));
    background: var(--brand-red);
}

/* ===== feature cards ===== */
.hardware-features {
    padding: calc(60 * var(--rpx)) 0 calc(80 * var(--rpx));
}

.hardware-features .wrapper {
    container-type: inline-size;
    --hw-rpx: calc(100cqw / 1600);
}

.hardware-features .feature-swiper-outer {
    overflow: visible;
}

.hardware-features .feature-swiper.swiper {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.hardware-features .feature-swiper .swiper-wrapper {
    align-items: stretch;
}

.hardware-features .feature-slide {
    height: auto;
    flex-shrink: 0;
}

@media (min-width: 829px) {
    .hardware-features .feature-slide {
        width: auto !important;
    }
}

.hardware-features .feature-grid {
    display: grid;
    gap: 0.625%;
    grid-template-columns: minmax(0, 730fr) minmax(0, 280fr) minmax(0, 280fr) minmax(0, 280fr);
    grid-auto-rows: var(--feature-grid-row-height, calc(260 * var(--hw-rpx)));
    transition: grid-template-columns 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.hardware-features .feature-grid:has(.feature-slide:nth-child(2) .feature-card.is-expanded) {
    grid-template-columns: minmax(0, 280fr) minmax(0, 730fr) minmax(0, 280fr) minmax(0, 280fr);
}

.hardware-features .feature-grid:has(.feature-slide:nth-child(3) .feature-card.is-expanded) {
    grid-template-columns: minmax(0, 280fr) minmax(0, 280fr) minmax(0, 730fr) minmax(0, 280fr);
}

.hardware-features .feature-grid:has(.feature-slide:nth-child(4) .feature-card.is-expanded) {
    grid-template-columns: minmax(0, 280fr) minmax(0, 280fr) minmax(0, 280fr) minmax(0, 730fr);
}

.hardware-features .feature-grid:not(:has(.feature-card.is-expanded)) {
    grid-template-columns: repeat(4, minmax(0, 280fr));
}

.feature-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    padding: calc(30 * var(--hw-rpx));
    border-radius: calc(10 * var(--rpx));
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(calc(12 * var(--hw-rpx)));
    box-shadow: 0 calc(5 * var(--hw-rpx)) calc(15 * var(--hw-rpx)) rgba(0, 12, 36, 0.1);
    color: var(--text-primary);
    overflow: hidden;
    cursor: pointer;
    transition: background-color 0.35s ease, color 0.35s ease;
}

.feature-card.is-expanded {
    background: var(--brand-red);
    color: #fff;
}

html.low-gfx .feature-card {
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.92);
}

html.low-gfx .feature-card.is-expanded {
    background: var(--brand-red);
}

.feature-main {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.feature-title {
    margin: 0;
    flex-shrink: 0;
    font-size: calc(20 * var(--fpx));
    font-weight: 600;
    line-height: calc(30 / 20);
}

.feature-detail {
    position: relative;
    flex-shrink: 0;
    width: calc(480 * var(--hw-rpx));
    max-width: 100%;
    min-height: calc(60 * var(--hw-rpx));
    margin-top: calc(16 * var(--hw-rpx));
    overflow: hidden;
}

.feature-plus {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    width: calc(20 * var(--hw-rpx));
    height: calc(20 * var(--hw-rpx));
    object-fit: contain;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.feature-desc {
    margin: 0;
    font-size: calc(16 * var(--fpx));
    font-weight: 400;
    line-height: calc(30 / 16);
    display: none;
}

.feature-card.is-expanded .feature-plus {
    opacity: 0;
    visibility: hidden;
}

.feature-card.is-expanded .feature-desc {
    display: block;
}

@media (min-width: 829px) {
    .hardware-features.is-syncing-heights .feature-detail {
        height: auto;
        min-height: calc(60 * var(--hw-rpx));
        overflow: visible;
    }

    .hardware-features .feature-detail {
        height: var(--feature-detail-height, calc(60 * var(--hw-rpx)));
        min-height: var(--feature-detail-height, calc(60 * var(--hw-rpx)));
    }

    .hardware-features .feature-card.is-expanded .feature-detail {
        height: var(--feature-detail-height, calc(60 * var(--hw-rpx)));
        overflow: visible;
    }
}

.feature-corner {
    position: absolute;
    right: calc(30 * var(--hw-rpx));
    bottom: calc(30 * var(--hw-rpx));
    z-index: 0;
    width: calc(58 * var(--hw-rpx));
    height: calc(54 * var(--hw-rpx));
    pointer-events: none;
}

.feature-corner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter 0.35s ease;
}

.feature-card.is-expanded .feature-corner img {
    filter: brightness(0) invert(1);
}

/* ===== @828 mobile ===== */
@media (max-width: 828px) {
    .hardware-hero {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .hardware-hero .hero-bg {
        position: relative;
        inset: auto;
        flex-shrink: 0;
        width: 100%;
        height: calc(560 * var(--rpx));
    }

    .hardware-hero .hero-bg img {
        object-position: right center;
    }

    .hardware-hero .hero-content {
        flex: none;
        height: auto;
        display: block;
        pointer-events: auto;
    }

    .hardware-hero .hero-content .wrapper {
        padding-top: calc(40 * var(--rpx));
        padding-bottom: calc(48 * var(--rpx));
    }

    .hardware-hero .hero-title {
        font-size: calc(36 * var(--fpx));
        text-align: left;
    }

    .hardware-hero .hero-subtitle {
        max-width: none;
        font-size: calc(18 * var(--fpx));
        font-weight: 600;
        text-align: left;
    }

    .hardware-hero .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        max-width: none;
        margin-top: calc(40 * var(--rpx));
        padding: 0;
        column-gap: 0;
        row-gap: 0;
        align-items: stretch;
    }

    .hardware-hero .hero-stat-sep {
        display: none;
    }

    .hardware-hero .hero-stat,
    .hardware-hero .hero-stat.is-wide {
        width: auto;
        min-width: 0;
        max-width: none;
        padding: calc(28 * var(--rpx)) calc(24 * var(--rpx));
    }

    .hardware-hero .hero-stat:nth-child(4n + 1) {
        border-right: 1px solid rgba(0, 0, 0, 0.12);
    }

    .hardware-hero .hero-stat:nth-child(1),
    .hardware-hero .hero-stat:nth-child(3) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    }

    .hardware-hero .hero-stat-label {
        white-space: normal;
    }

    .hardware-hero .hero-stat-value {
        font-size: calc(28 * var(--fpx));
    }

    .hardware-hero .hero-actions {
        display: flex;
        justify-content: flex-start;
    }

    .hardware-hero .hero-bg .hero-pagination {
        bottom: calc(12 * var(--rpx));
    }

    .hardware-features .feature-swiper-outer {
        overflow: visible;
    }

    .hardware-features .feature-swiper.swiper,
    .hardware-features .feature-swiper .swiper-wrapper {
        overflow: visible;
    }

    .hardware-features .feature-swiper.swiper {
        touch-action: pan-y pinch-zoom;
    }

    .hardware-features .feature-swiper .swiper-wrapper {
        align-items: stretch;
    }

    .hardware-features .feature-grid,
    .hardware-features .feature-grid:has(.feature-slide:nth-child(2) .feature-card.is-expanded),
    .hardware-features .feature-grid:has(.feature-slide:nth-child(3) .feature-card.is-expanded),
    .hardware-features .feature-grid:has(.feature-slide:nth-child(4) .feature-card.is-expanded),
    .hardware-features .feature-grid:not(:has(.feature-card.is-expanded)) {
        display: flex;
        gap: 0;
    }

    /* feature-grid 与 swiper-wrapper 同元素；须保留 transform 过渡，否则松手瞬间归位 */
    .hardware-features .feature-swiper .swiper-wrapper {
        transition-property: transform;
        transition-timing-function: ease-out;
    }

    .hardware-features .feature-slide {
        display: flex;
        width: 60vw;
        height: auto;
        opacity: var(--feature-progress-opacity, 0.35);
        transition: opacity 0.15s ease;
    }

    .hardware-features .feature-swiper.is-scrolling .feature-slide {
        transition: none;
    }

    .hardware-features .feature-slide.swiper-slide-active {
        opacity: 1;
    }

    .hardware-features .feature-card {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        height: auto;
        min-height: calc(280 * var(--rpx));
        flex: 1;
        padding: calc(36 * var(--rpx));
        border-radius: calc(10 * var(--rpx));
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(calc(12 * var(--rpx)));
        box-shadow: 0 calc(5 * var(--rpx)) calc(15 * var(--rpx)) rgba(0, 12, 36, 0.1);
        cursor: default;
        text-align: center;
        overflow: visible;
    }

    html.low-gfx .hardware-features .feature-card {
        backdrop-filter: none;
        background: rgba(255, 255, 255, 0.92);
    }

    .hardware-features .feature-corner {
        order: -1;
        position: static;
        flex-shrink: 0;
        width: calc(88 * var(--rpx));
        height: calc(82 * var(--rpx));
        margin-bottom: calc(24 * var(--rpx));
    }

    .hardware-features .feature-corner img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .hardware-features .feature-main {
        flex: 0 1 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-height: 0;
        overflow: visible;
    }

    .hardware-features .feature-title {
        margin: 0;
        font-size: calc(22 * var(--fpx));
        line-height: calc(32 / 22);
        text-align: center;
    }

    .hardware-features .feature-detail {
        width: 100%;
        height: auto;
        min-height: 0;
        margin-top: calc(16 * var(--rpx));
        text-align: center;
        overflow: visible;
    }

    .hardware-features .feature-plus {
        display: none;
    }

    .hardware-features .feature-desc {
        display: block;
        margin: 0;
        font-size: calc(16 * var(--fpx));
        line-height: calc(26 / 16);
    }

    .hardware-features .feature-slide.swiper-slide-active .feature-card {
        background: var(--brand-red);
        color: #fff;
    }

    .hardware-features .feature-slide.swiper-slide-active .feature-corner img {
        filter: brightness(0) invert(1);
    }

    html.low-gfx .hardware-features .feature-slide.swiper-slide-active .feature-card {
        background: var(--brand-red);
    }
}
