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

/* ===== hero ===== */
.ip-hero {
    position: relative;
    width: 100%;
    min-height: var(--hero-16-9-min-height);
    overflow: hidden;
    color: var(--text-primary);
}

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

.ip-hero .hero-bg-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: linear-gradient(180deg, #EDF1FB 0%, #FAFCFD 100%);
}

.ip-hero .hero-inner {
    position: relative;
    z-index: 1;
    min-height: var(--hero-16-9-min-height);
    display: flex;
    align-items: center;
    padding: calc(80 * var(--rpx)) 0;
}

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

.ip-hero .hero-accordions-outer {
    width: calc(640 * var(--rpx));
    max-width: 100%;
    margin-top: calc(24 * var(--rpx));
    overflow: visible;
}

.ip-hero .hero-accordions-swiper.swiper {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.ip-hero .hero-accordions-swiper .swiper-wrapper {
    align-items: stretch;
}

.ip-hero .hero-acc-slide {
    height: auto;
    flex-shrink: 0;
}

.ip-hero .hero-accordions {
    width: 100%;
}

.ip-hero .hero-acc-slide .acc-item {
    width: 100%;
}

@media (min-width: 829px) {
    .ip-hero .hero-acc-slide {
        width: auto !important;
    }

    .ip-hero .hero-accordions-swiper .swiper-wrapper {
        display: flex;
        flex-direction: column;
        gap: calc(10 * var(--rpx));
        transform: none !important;
    }
}

.ip-hero .acc-item {
    border-radius: calc(10 * var(--rpx));
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 calc(5 * var(--rpx)) calc(15 * var(--rpx)) rgba(0, 12, 36, 0.1);
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.ip-hero .acc-item.is-open {
    background: var(--brand-red);
    color: #fff;
}

.ip-hero .acc-item.is-open .acc-title {
    color: #fff;
}

.ip-hero .acc-item.is-open .acc-icon,
.ip-hero .acc-item.is-open .acc-toggle {
    filter: brightness(0) invert(1);
}

.ip-hero .acc-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}

.ip-hero .acc-item.is-open .acc-body {
    grid-template-rows: 1fr;
}

.ip-hero .acc-body-inner {
    overflow: hidden;
}

.ip-hero .acc-body-inner p {
    margin: 0;
    padding: 0 calc(30 * var(--rpx)) calc(20 * var(--rpx)) calc(82 * var(--rpx));
    font-size: calc(16 * var(--fpx));
    line-height: calc(30 / 16);
    color: #666666;
}

.ip-hero .acc-item.is-open .acc-body-inner p {
    color: rgba(255, 255, 255, 0.9);
    padding-top: calc(4 * var(--rpx));
}

@media (prefers-reduced-motion: reduce) {
    .ip-hero .acc-body {
        transition: none;
    }
}

.ip-hero .acc-head {
    display: flex;
    align-items: center;
    gap: calc(24 * var(--rpx));
    width: 100%;
    min-height: calc(80 * var(--rpx));
    padding: calc(20 * var(--rpx)) calc(30 * var(--rpx));
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}

.ip-hero .acc-icon {
    flex-shrink: 0;
    display: block;
    width: calc(28 * var(--rpx));
    height: calc(28 * var(--rpx));
    object-fit: contain;
}

.ip-hero .acc-title {
    flex: 1;
    min-width: 0;
    font-size: calc(20 * var(--fpx));
    font-weight: 600;
    line-height: calc(30 / 20);
}

.ip-hero .acc-toggle {
    flex-shrink: 0;
    display: block;
    width: calc(20 * var(--rpx));
    height: calc(20 * var(--rpx));
    object-fit: contain;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ip-hero .acc-item.is-open .acc-toggle {
    visibility: hidden;
    opacity: 0;
}

.ip-hero .acc-item--intro .acc-icon {
    width: calc(30 * var(--rpx));
    height: calc(30 * var(--rpx));
}

/* ===== sec2 ===== */
.ip-sec2 {
    position: relative;
    width: 100%;
    margin-top: calc(-40 * var(--rpx));
    padding: 0;
    background: #FAFCFD;
    overflow: hidden;
}

.ip-sec2 .sec2-fade {
    position: absolute;
    inset: 0 0 auto;
    z-index: 1;
    height: calc(160 * var(--rpx));
    background: linear-gradient(180deg, #E0E7EC 0%, rgba(224, 231, 236, 0) 100%);
    opacity: 0.3;
    pointer-events: none;
}

.ip-sec2 .sec2-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.ip-sec2 .sec2-bg-image {
    position: absolute;
    left: 0;
    bottom: 0;
    display: block;
    width: 100%;
    height: auto;
}

.ip-sec2 .wrapper {
    position: relative;
    z-index: 2;
    padding-bottom: calc(80 * var(--rpx));
    container-type: inline-size;
    /* 与 youchao/ouye specs 一致：grid 随 wrapper 宽度缩放，不用视口 --rpx */
    --ip-rpx: calc(100cqw / 1600);
}

.sec2-header {
    padding-top: calc(90 * var(--rpx));
}

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

.sec2-subtitle {
    margin: calc(16 * var(--rpx)) 0 0;
    font-size: calc(24 * var(--fpx));
    font-weight: 600;
    line-height: calc(34 / 24);
    color: #3B72D6;
}

.sec2-desc {
    margin: calc(16 * var(--rpx)) 0 0;
    font-size: calc(18 * var(--fpx));
    font-weight: 400;
    line-height: calc(30 / 18);
    color: var(--text-primary);
}

.ip-grid-toolbar {
    display: none;
}

body.wfEditorMode .ip-grid-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-top: calc(40 * var(--ip-rpx));
}

body.wfEditorMode .ip-grid-toolbar + .ip-grid {
    margin-top: calc(12 * var(--ip-rpx));
}

.ip-grid-toolbar .editor-link-mockup {
    position: static;
}

.ip-grid {
    position: relative;
    display: block;
    width: 100%;
    /* GPU 2D / DPU：layout max(y+h) = 1060 */
    height: calc(1060 * var(--ip-rpx));
    margin-top: calc(40 * var(--ip-rpx));
}

#ip-vpu-vpp .ip-grid {
    /* synergy: y 860 + h 120 */
    height: calc(980 * var(--ip-rpx));
}

#ip-gpgpu-matrix .ip-grid {
    /* compute row: y 620 + h 240 */
    height: calc(860 * var(--ip-rpx));
}

.ip-grid > .ip-block {
    position: absolute;
    left: calc(var(--grid-x) * var(--ip-rpx));
    top: calc(var(--grid-y) * var(--ip-rpx));
    width: calc(var(--design-w) * var(--ip-rpx));
    min-width: 0;
    height: auto;
}

.ip-grid > .ip-block .ip-block__scale {
    height: calc(var(--design-h) * 1px * var(--scale-ratio));
}

.ip-grid > .ip-block.layout-block-slot-empty {
    height: calc(var(--design-h) * var(--ip-rpx));
    visibility: hidden;
    pointer-events: none;
}

/* legacy flex rows (fallback) */
.ip-grid.ip-grid--flex-rows {
    display: flex;
    flex-direction: column;
    gap: calc(10 * var(--ip-rpx));
    height: auto;
}

.ip-grid.ip-grid--flex-rows > .ip-block {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
}

.ip-row {
    display: flex;
    align-items: flex-start;
    gap: calc(10 * var(--ip-rpx, var(--rpx)));
}

.ip-row--features .ip-block--feature {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
}

.ip-row--main .ip-block--render {
    flex: 480 1 0;
    width: auto;
    min-width: 0;
}

.ip-row--main .ip-block--gpu {
    flex: 620 1 0;
    width: auto;
    min-width: 0;
}

.ip-row--main .ip-block--data2d {
    flex: 480 1 0;
    width: auto;
    min-width: 0;
}

.ip-row--bottom > .ip-block {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
}

@media (min-width: 829px) and (max-width: 1200px) {
    .ip-row--features {
        flex-wrap: wrap;
    }

    .ip-row--features .ip-block--feature {
        flex: 1 1 calc(50% - calc(5 * var(--ip-rpx, var(--rpx))));
    }

    .ip-row--main {
        flex-wrap: wrap;
    }

    .ip-row--main .ip-block--render,
    .ip-row--main .ip-block--data2d {
        flex: 1 1 calc(50% - calc(5 * var(--ip-rpx, var(--rpx))));
    }

    .ip-row--main .ip-block--gpu {
        flex: 1 1 100%;
        order: -1;
    }

    .ip-row--bottom {
        flex-wrap: wrap;
    }

    .ip-row--bottom > .ip-block {
        flex: 1 1 calc(50% - calc(5 * var(--ip-rpx, var(--rpx))));
    }
}

/* ===== @828 mobile — grid 竖排（同 youchao-specs / hardware-features） ===== */
@media (max-width: 828px) {
    .ip-hero {
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: visible;
        padding-top: var(--header-height);
    }

    .ip-hero .hero-bg {
        position: static;
        flex-shrink: 0;
        width: 100%;
        height: calc(600 * var(--rpx));
        margin-top: calc(-1 * var(--header-height));
        z-index: 0;
    }

    .ip-hero .hero-bg-image {
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

    .ip-hero .hero-inner {
        position: relative;
        z-index: 1;
        flex: none;
        min-height: auto;
        margin-top: calc(-240 * var(--rpx));
        padding: 0 0 calc(48 * var(--rpx));
    }

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

    .ip-hero .hero-accordions-outer {
        width: 100%;
        max-width: none;
        margin-top: calc(32 * var(--rpx));
        overflow: visible;
    }

    .ip-hero .hero-accordions-swiper.swiper,
    .ip-hero .hero-accordions-swiper .swiper-wrapper {
        overflow: visible;
    }

    .ip-hero .hero-accordions-swiper.swiper {
        touch-action: pan-y pinch-zoom;
    }

    .ip-hero .hero-accordions-swiper .swiper-wrapper {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0;
        transition-property: transform;
        transition-timing-function: ease-out;
    }

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

    .ip-hero .hero-accordions-swiper.is-scrolling .hero-acc-slide {
        transition: none;
    }

    .ip-hero .hero-acc-slide.swiper-slide-active {
        opacity: 1;
    }

    .ip-hero .acc-item {
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        width: 100%;
        height: 100%;
        flex: 1;
        min-height: calc(220 * var(--rpx));
    }

    .ip-hero .acc-head {
        flex-direction: column;
        align-items: center;
        gap: calc(16 * var(--rpx));
        min-height: 0;
        padding: calc(36 * var(--rpx));
        text-align: center;
        cursor: default;
    }

    .ip-hero .acc-icon {
        width: calc(48 * var(--rpx));
        height: calc(48 * var(--rpx));
    }

    .ip-hero .acc-item--intro .acc-icon {
        width: calc(52 * var(--rpx));
        height: calc(52 * var(--rpx));
    }

    .ip-hero .acc-title {
        font-size: calc(22 * var(--fpx));
        line-height: calc(32 / 22);
        text-align: center;
    }

    .ip-hero .acc-toggle {
        display: none;
    }

    .ip-hero .acc-body {
        display: block;
        grid-template-rows: none;
        flex: 1;
    }

    .ip-hero .acc-body-inner p {
        padding: 0 calc(30 * var(--rpx)) calc(24 * var(--rpx));
        font-size: calc(16 * var(--fpx));
        line-height: calc(26 / 16);
        text-align: center;
        color: #666666;
    }

    .ip-hero .acc-item.is-open .acc-body-inner p {
        padding-top: 0;
        color: rgba(255, 255, 255, 0.9);
    }

    .ip-hero .hero-acc-slide.swiper-slide-active .acc-item {
        background: var(--brand-red);
        color: #fff;
    }

    .ip-hero .hero-acc-slide.swiper-slide-active .acc-title {
        color: #fff;
    }

    .ip-hero .hero-acc-slide.swiper-slide-active .acc-icon {
        filter: brightness(0) invert(1);
    }

    html.low-gfx .ip-hero .hero-acc-slide.swiper-slide-active .acc-item {
        background: var(--brand-red);
    }

    .ip-sec2 {
        margin-top: 0;
    }

    .ip-sec2 .wrapper {
        width: 100%;
        max-width: var(--wrapper-width);
        margin-left: auto;
        margin-right: auto;
    }

    .sec2-header {
        padding-top: calc(48 * var(--rpx));
    }

    .sec2-title {
        font-size: calc(32 * var(--fpx));
    }

    .ip-grid {
        position: relative;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: calc(24 * var(--rpx));
        width: 100%;
        height: auto !important;
        min-height: 0;
        margin-top: calc(32 * var(--rpx));
    }

    .ip-grid > .ip-block {
        position: relative;
        left: auto !important;
        top: auto !important;
        min-width: 0;
        max-width: none;
        height: auto;
        order: calc(var(--grid-y, 0) * 1000 + var(--grid-x, 0));
        box-shadow: 0 calc(6 * var(--rpx)) calc(22 * var(--rpx)) rgba(0, 12, 36, 0.1);
    }

    .ip-grid > .ip-block.layout-block-slot-empty {
        display: none;
    }

    .ip-grid > .ip-block .ip-block__scale {
        /* 字号跟全站 --fpx 走，小屏不会随 --rpx 缩得过小 */
        --type-scale: calc(1.3 * var(--fpx) / 1px);
        height: auto !important;
        min-height: calc(var(--design-h) * 1px * var(--layout-scale));
        overflow: visible;
    }

    .ip-sec2 .ip-block[data-reveal] {
        opacity: 1;
        transform: none !important;
    }

    .ip-row {
        flex-direction: column;
    }

    .ip-row--features .ip-block--feature,
    .ip-row--main .ip-block,
    .ip-row--bottom > .ip-block {
        flex: 1 1 auto;
        width: 100%;
    }

    .ip-row--main .ip-block--gpu {
        order: -1;
    }

    .render-pipeline {
        flex-wrap: wrap;
        justify-content: center;
    }

    .render-pipeline-arrow {
        transform: rotate(90deg);
    }
}

