/**
 * HomePage.tsx 其余区块：核心产品矩阵 · 交付流程 · 案例 · 新闻 · CTA
 * 动画：scroll reveal（对齐 motion 入场 stagger / fade）
 */

/* 与 demo-home-hero.css / demo-home-biz-mode.css 一致：突破 #kt_app_content_container · container-xxl，背景全屏宽 */
.demo-hp-sec,
.demo-hp-cta,
.demo-hp-links-sec {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}

/* ---- 区块容器（对齐 max-w-7xl px-4 md:px-8 py-24） ---- */
.demo-hp-sec {
    position: relative;
    overflow: hidden;
    padding: 96px 16px;
}

@media (min-width: 768px) {
    .demo-hp-sec {
        padding-left: 32px;
        padding-right: 32px;
    }
}

.demo-hp-sec__inner {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

/* 点阵底纹 */
.demo-hp-sec--dot {
    background-color: #fff;
}

.demo-hp-sec--dot::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.02;
    color: #94a3b8;
    background-image: radial-gradient(circle at 2px 2px, currentColor 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
}

.demo-hp-sec--dot.demo-hp-sec--biz::before {
    opacity: 0.03;
    color: inherit;
}

/* Section header */
.demo-hp-head {
    margin-bottom: 64px;
    max-width: 48rem;
}

.demo-hp-head--center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.demo-hp-head--left {
    text-align: left;
}

.demo-hp-head__title {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.025em;
    margin: 0 0 24px;
    line-height: 1.2;
}

.demo-hp-head__desc {
    margin: 0;
    font-size: 17px;
    line-height: 1.65;
    color: #64748b;
    font-weight: 300;
}

/* ---- Scroll reveal ---- */
.demo-hp-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.6s ease-out,
        transform 0.6s ease-out;
    transition-delay: calc(var(--hp-stagger, 0) * 0.1s);
}

.demo-hp-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .demo-hp-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---- 核心产品矩阵 ---- */
.demo-hp-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .demo-hp-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .demo-hp-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.demo-hp-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid #f3f4f6;
    background: #fff;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.demo-hp-product-card:hover {
    border-color: transparent;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

.demo-hp-product-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.demo-hp-product-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.demo-hp-product-card:hover .demo-hp-product-card__icon {
    transform: scale(1.1);
}

.demo-hp-product-card__icon i {
    font-size: 22px;
}

/* Font Awesome：父级若使用 Inter 等字体，会继承覆盖导致图标成方框，必须拉回 FontAwesome */
.demo-hp-sec .fa,
.demo-hp-cta .fa {
    font-family: FontAwesome !important;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.demo-hp-product-card__icon .fa {
    color: #ffffff !important;
}

.demo-hp-product-card__go {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition:
        border-color 0.3s,
        background 0.3s,
        color 0.3s;
}

.demo-hp-product-card__go:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

.demo-hp-product-card__go i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.demo-hp-product-card__go:hover i {
    transform: translateX(2px);
}

.demo-hp-product-card__title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.demo-hp-product-card__desc {
    flex: 1;
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #6b7280;
    font-weight: 300;
}

/* icon 色板（对齐 HomePage colorSchemes） */
.demo-hp-icon--0 {
    background: #165dff;
}
.demo-hp-icon--1 {
    background: #00b42a;
}
.demo-hp-icon--2 {
    background: #ff7d00;
}
.demo-hp-icon--3 {
    background: #722ed1;
}
.demo-hp-icon--4 {
    background: #f5319d;
}
.demo-hp-icon--5 {
    background: #165dff;
}

/* ---- 交付流程 ---- */
.demo-hp-sec--process {
    background: rgb(248, 250, 252);
}

.demo-hp-process-wrap {
    position: relative;
    margin-top: 80px;
    max-width: 64rem;
    margin-left: auto;
    margin-right: auto;
}

.demo-hp-process-line {
    display: none;
}

@media (min-width: 768px) {
    .demo-hp-process-line {
        display: block;
        position: absolute;
        top: 45px;
        left: 5%;
        right: 5%;
        height: 1px;
        background: linear-gradient(to right, transparent, #bfdbfe, transparent);
        z-index: 0;
    }
}

.demo-hp-process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px 24px;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .demo-hp-process-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .demo-hp-process-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.demo-hp-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.demo-hp-step__box {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition:
        border-color 0.3s,
        box-shadow 0.3s,
        transform 0.3s,
        background 0.3s,
        color 0.3s;
}

.demo-hp-step:hover .demo-hp-step__box {
    border-color: transparent;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-8px);
    color: #fff;
}

.demo-hp-step__badge {
    position: absolute;
    top: -12px;
    right: -12px;
    font-size: 10px;
    font-weight: 900;
    font-family: ui-monospace, monospace;
    color: #6b7280;
    background: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: opacity 0.3s;
}

.demo-hp-step:hover .demo-hp-step__badge {
    opacity: 0;
}

.demo-hp-step__box i {
    font-size: 26px;
    transition: color 0.3s;
}

.demo-hp-step__title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}

.demo-hp-step__desc {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    font-weight: 300;
    line-height: 1.6;
    padding: 0 8px;
}

/* step 色（对齐 stepColors） */
.demo-hp-step--0 .demo-hp-step__box {
    color: #165dff;
}
.demo-hp-step--0:hover .demo-hp-step__box {
    background: #165dff;
}

.demo-hp-step--1 .demo-hp-step__box {
    color: #00b42a;
}
.demo-hp-step--1:hover .demo-hp-step__box {
    background: #00b42a;
}

.demo-hp-step--2 .demo-hp-step__box {
    color: #ff7d00;
}
.demo-hp-step--2:hover .demo-hp-step__box {
    background: #ff7d00;
}

.demo-hp-step--3 .demo-hp-step__box {
    color: #722ed1;
}
.demo-hp-step--3:hover .demo-hp-step__box {
    background: #722ed1;
}

.demo-hp-step--4 .demo-hp-step__box {
    color: #f5319d;
}
.demo-hp-step--4:hover .demo-hp-step__box {
    background: #f5319d;
}

.demo-hp-step--5 .demo-hp-step__box {
    color: #165dff;
}
.demo-hp-step--5:hover .demo-hp-step__box {
    background: #165dff;
}

.demo-hp-step:hover .demo-hp-step__box i {
    color: #fff !important;
}

/* ---- 案例 ---- */
.demo-hp-sec--cases {
    background: #fff;
}

.demo-hp-cases-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

@media (min-width: 768px) {
    .demo-hp-cases-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .demo-hp-cases-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: start;
    }
}

.demo-hp-case {
    text-decoration: none;
    color: inherit;
    display: block;
    min-width: 0;
    max-width: 100%;
}

.demo-hp-case__fig {
    position: relative;
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
    overflow: hidden;
    /* 与 dr_thumb 640×480 一致 4:3，四张卡片封面区域等大 */
    aspect-ratio: 4 / 3;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #f3f4f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition:
        box-shadow 0.5s ease,
        border-color 0.3s;
    contain: layout style;
}

.demo-hp-case:hover .demo-hp-case__fig {
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.1);
}

.demo-hp-case__img,
.demo-hp-case__ph {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.demo-hp-case__img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transition: transform 0.7s ease;
}

.demo-hp-case:hover .demo-hp-case__img {
    transform: scale(1.05);
}

.demo-hp-case__overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.1);
    z-index: 10;
    pointer-events: none;
    transition: background 0.3s;
}

.demo-hp-case:hover .demo-hp-case__overlay {
    background: transparent;
}

.demo-hp-case__tag {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 20;
    pointer-events: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.demo-hp-case__title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-hp-case:hover .demo-hp-case__title {
    color: #2563eb;
}

.demo-hp-case__more {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    transition: color 0.2s;
}

.demo-hp-case:hover .demo-hp-case__more {
    color: #2563eb;
}

.demo-hp-case__ph {
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

/* 无 aspect-ratio 时 4:3 占位 */
@supports not (aspect-ratio: 4 / 3) {
    .demo-hp-case__fig {
        height: 0;
        padding-bottom: 75%;
        aspect-ratio: auto;
    }

    .demo-hp-case__img,
    .demo-hp-case__ph,
    .demo-hp-case__overlay,
    .demo-hp-case__tag {
        position: absolute;
    }

    .demo-hp-case__img,
    .demo-hp-case__ph,
    .demo-hp-case__overlay {
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
    }

    .demo-hp-case__tag {
        left: 16px;
        top: 16px;
    }
}

/* ---- 新闻三栏 ---- */
.demo-hp-sec--news {
    background: rgb(248, 250, 252);
    border-top: 1px solid #f3f4f6;
}

.demo-hp-news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 1024px) {
    .demo-hp-news-grid {
        /* minmax(0,1fr) 防止大图把某一列撑宽，三列宽度一致 */
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 64px;
        align-items: start;
    }
}

/* 单列在栅格内可收缩，避免内部图片按固有尺寸撑开列宽 */
.demo-hp-news-col {
    min-width: 0;
    max-width: 100%;
}

.demo-hp-news-col__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 2px solid #111827;
    margin-bottom: 24px;
}

.demo-hp-news-col__head h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.demo-hp-news-col__more {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.demo-hp-news-col__more:hover {
    color: #2563eb;
}

.demo-hp-news-featured {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    /* 固定封面比例与占位高度，列宽只随栅格变化，不受图片原始像素影响 */
    aspect-ratio: 16 / 10;
    background: #111827;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    contain: layout style;
}

/* 无 aspect-ratio 的旧浏览器兜底（与 16:10 接近） */
@supports not (aspect-ratio: 16 / 10) {
    .demo-hp-news-featured {
        height: 0;
        padding-bottom: 62.5%;
        aspect-ratio: auto;
    }

    .demo-hp-news-featured__img,
    .demo-hp-news-featured__grad,
    .demo-hp-news-featured__body {
        position: absolute;
        left: 0;
        right: 0;
    }

    .demo-hp-news-featured__img {
        top: 0;
        bottom: 0;
    }

    .demo-hp-news-featured__grad {
        inset: 0;
    }

    .demo-hp-news-featured__body {
        bottom: 0;
    }
}

.demo-hp-news-featured__img {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.demo-hp-news-featured__img img {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    opacity: 0.85;
    transition:
        transform 0.7s ease,
        opacity 0.3s;
}

.demo-hp-news-featured:hover .demo-hp-news-featured__img img {
    transform: scale(1.05);
}

.demo-hp-news-featured__grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.4), transparent);
    transition: opacity 0.3s;
}

.demo-hp-news-featured:hover .demo-hp-news-featured__grad {
    opacity: 0.9;
}

.demo-hp-news-featured__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px 24px;
    z-index: 2;
}

.demo-hp-news-featured__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #93c5fd;
    margin-bottom: 12px;
}

.demo-hp-news-featured__meta::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: #3b82f6;
}

.demo-hp-news-featured__meta span {
    font-family: ui-monospace, monospace;
}

.demo-hp-news-featured__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.demo-hp-news-featured:hover .demo-hp-news-featured__title {
    color: #bfdbfe;
}

.demo-hp-news-featured__ph {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #334155, #1e293b);
}

.demo-hp-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.demo-hp-news-list li {
    border-top: 1px solid #f3f4f6;
}

.demo-hp-news-list li:first-child {
    border-top: none;
}

.demo-hp-news-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    text-decoration: none;
    color: inherit;
}

.demo-hp-news-list h5 {
    margin: 0;
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-hp-news-list a:hover h5 {
    color: #2563eb;
}

.demo-hp-news-list time {
    flex-shrink: 0;
    font-size: 14px;
    color: #9ca3af;
    font-family: ui-monospace, monospace;
    transition: color 0.2s;
}

.demo-hp-news-list a:hover time {
    color: #60a5fa;
}

/* ---- CTA ---- */
.demo-hp-cta {
    position: relative;
    padding: 112px 16px;
    overflow: hidden;
    background: linear-gradient(to bottom right, #2563eb, #4f46e5);
}

@media (min-width: 768px) {
    .demo-hp-cta {
        padding-left: 32px;
        padding-right: 32px;
    }
}

.demo-hp-cta__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    mix-blend-mode: overlay;
    opacity: 0.1;
    pointer-events: none;
}

.demo-hp-cta__flare {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

.demo-hp-cta__flare--tr {
    top: 0;
    right: 40px;
    width: 384px;
    height: 384px;
    background: rgba(255, 255, 255, 0.2);
}

.demo-hp-cta__flare--bl {
    bottom: 0;
    left: 40px;
    width: 384px;
    height: 384px;
    background: rgba(34, 211, 238, 0.3);
}

.demo-hp-cta__inner {
    position: relative;
    z-index: 1;
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
}

.demo-hp-cta__icon {
    font-size: 48px;
    color: #bfdbfe;
    margin-bottom: 24px;
    display: block;
}

/* 对齐 HomePage.tsx CTA：text-4xl md:text-5xl font-bold tracking-tight drop-shadow-sm */
.demo-hp-cta__title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 24px;
    letter-spacing: -0.025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    line-height: 1.15;
}

@media (min-width: 768px) {
    .demo-hp-cta__title {
        font-size: 3rem;
    }
}

/* text-xl text-blue-100 mb-10 font-light */
.demo-hp-cta__lead {
    margin: 0 0 40px;
    font-size: 1.25rem;
    line-height: 1.75;
    color: #dbeafe;
    font-weight: 300;
}

.demo-hp-cta__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

@media (min-width: 640px) {
    .demo-hp-cta__actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* rounded-full px-10 py-4 text-lg font-bold */
.demo-hp-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 40px;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.25;
    transition:
        box-shadow 0.3s,
        transform 0.3s,
        background 0.3s,
        border-color 0.3s;
}

@media (min-width: 640px) {
    .demo-hp-cta__btn {
        width: auto;
    }
}

.demo-hp-cta__btn--light {
    background: #fff;
    color: #2563eb;
}

.demo-hp-cta__btn--light:hover {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.4);
    transform: translateY(-4px);
}

/* bg-blue-700/50 border border-blue-400 backdrop-blur */
.demo-hp-cta__btn--ghost {
    background: rgba(29, 78, 216, 0.5);
    color: #fff;
    border: 1px solid #60a5fa;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.demo-hp-cta__btn--ghost:hover {
    background: #1d4ed8;
    border-color: #93c5fd;
}

@media (prefers-reduced-motion: reduce) {
    .demo-hp-cta__btn--light:hover,
    .demo-hp-product-card:hover,
    .demo-hp-case:hover .demo-hp-case__fig img {
        transform: none;
    }
}

/* ---- 友情链接（首页底部轻量条，接 footer.html） ---- */
.demo-hp-links-sec {
    padding: 32px 16px 48px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.demo-hp-links-sec__inner {
    max-width: 1280px;
    margin: 0 auto;
}

.demo-hp-links-sec__label {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 16px;
}

.demo-hp-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
}

.demo-hp-links-grid a {
    font-size: 14px;
    color: #475569;
    text-decoration: none;
    transition: color 0.2s;
}

.demo-hp-links-grid a:hover {
    color: #2563eb;
}

/* 底部链接区等若使用 .fa，同上避免方框 */
.demo-hp-links-sec .fa {
    font-family: FontAwesome !important;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}
