/* ==========================================================================
   MegaDatatech 首页高端重设计 (Premium Dark)
   仅首页加载, 全部类名 .hp- 前缀作用域, 不影响其他页面
   品牌色: 黑 #131313 / 亮红 #F02F2C / 深红 #B11A17 / 浅灰 #EEEEEE
   ========================================================================== */

body.hp-home {
    --hp-black: #131313;
    --hp-black-soft: #1b1b1b;
    --hp-red: #F02F2C;
    --hp-red-deep: #B11A17;
    --hp-gray-bg: #F5F5F4;
    --hp-line: #E3E1DE;
    --hp-text: #17181a;
    --hp-text-2: #5c5e62;
    --hp-white: #ffffff;
    --hp-radius: 14px;
    --hp-ease: cubic-bezier(.22, .61, .36, 1);
    background: var(--hp-white);
}

/* 首页沉浸式页头样式已统一迁移至 nav-premium.css(body.hp-home .nav 系列) */

/* ==========================================================================
   1. HERO 全屏英雄区
   ========================================================================== */
.hp-hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--hp-black);
}
.hp-hero-media,
.hp-hero-media video,
.hp-hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hp-hero-media video,
.hp-hero-media img {
    transform: scale(1.04);
    animation: hpKenBurns 18s var(--hp-ease) infinite alternate;
}
@keyframes hpKenBurns {
    from { transform: scale(1.02); }
    to   { transform: scale(1.10); }
}
.hp-hero-media img { animation: hpKenBurns 22s var(--hp-ease) infinite alternate; will-change: transform; }
/* 遮罩: 底部向上的暗色渐变 + 左侧压暗, 保证文字对比度 */
.hp-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(19,19,19,.42) 0%, rgba(19,19,19,.08) 34%, rgba(19,19,19,.46) 66%, rgba(19,19,19,.9) 100%),
        linear-gradient(90deg, rgba(19,19,19,.5) 0%, rgba(19,19,19,0) 56%);
    pointer-events: none;
}
.hp-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 32px 110px;
}
.hp-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font: 500 13px/1 'Roboto', "Noto Sans HK", sans-serif;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .85);
    margin-bottom: 26px;
}
.hp-hero-eyebrow::before {
    content: "";
    width: 44px;
    height: 2px;
    background: var(--hp-red);
}
.hp-hero-title {
    font-family: "Noto Sans HK", 'Roboto', sans-serif;
    font-size: clamp(2.5rem, 5.6vw, 4.6rem);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: .01em;
    color: #fff;
    margin: 0 0 26px;
    text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.hp-hero-title em {
    font-style: normal;
    color: transparent;
    background: linear-gradient(92deg, #ff8a70 0%, #ff5c47 45%, var(--hp-red) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
.hp-hero-sub {
    max-width: 640px;
    font-size: clamp(.98rem, 1.2vw, 1.13rem);
    line-height: 1.9;
    color: rgba(255, 255, 255, .82);
    margin: 0 0 42px;
}
.hp-hero-actions { display: flex; flex-wrap: wrap; gap: 18px; }

/* 高端按钮体系 */
.hp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 34px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .06em;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .35s var(--hp-ease);
}
.hp-btn svg { width: 16px; height: 16px; transition: transform .35s var(--hp-ease); }
.hp-btn:hover svg { transform: translateX(4px); }
.hp-btn--primary {
    background: linear-gradient(96deg, var(--hp-red) 0%, var(--hp-red-deep) 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(240, 47, 44, .32);
}
.hp-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(240, 47, 44, .42); color: #fff; }
.hp-btn--ghost {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .38);
    color: #fff;
    backdrop-filter: blur(6px);
}
.hp-btn--ghost:hover { background: rgba(255, 255, 255, .95); color: var(--hp-black); }
.hp-btn--dark {
    background: var(--hp-black);
    color: #fff;
}
.hp-btn--dark:hover { background: var(--hp-red); color: #fff; transform: translateY(-2px); }

/* 滚动提示 */
.hp-hero-scroll {
    position: absolute;
    right: 44px;
    bottom: 108px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font: 500 11px/1 'Roboto', sans-serif;
    letter-spacing: .3em;
    color: rgba(255, 255, 255, .66);
    writing-mode: vertical-rl;
    text-decoration: none;
}
.hp-hero-scroll::after {
    content: "";
    width: 1px;
    height: 52px;
    background: linear-gradient(180deg, rgba(255,255,255,.66), transparent);
    animation: hpScrollLine 2.2s var(--hp-ease) infinite;
}
@keyframes hpScrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ==========================================================================
   2. 数字统计条
   ========================================================================== */
.hp-stats {
    position: relative;
    z-index: 5;
    background: var(--hp-black);
    border-top: 1px solid rgba(255,255,255,.06);
}
.hp-stats-grid {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.hp-stat {
    padding: 44px 28px;
    border-left: 1px solid rgba(255,255,255,.08);
}
.hp-stat:first-child { border-left: none; padding-left: 0; }
.hp-stat-num {
    font: 700 clamp(2.4rem, 3.4vw, 3.4rem)/1 'Roboto', sans-serif;
    color: #fff;
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.hp-stat-num .hp-suffix { color: var(--hp-red); font-size: .6em; }
.hp-stat-label {
    margin-top: 12px;
    font-size: 14px;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .55);
}

/* ==========================================================================
   通用区块头
   ========================================================================== */
.hp-section { padding: 110px 0; }
.hp-section--gray { background: var(--hp-gray-bg); }
.hp-section--dark { background: var(--hp-black); }
.hp-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 32px;
}
.hp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font: 600 13px/1 'Roboto', "Noto Sans HK", sans-serif;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--hp-red-deep);
    margin-bottom: 18px;
}
.hp-eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--hp-red); }
.hp-section--dark .hp-eyebrow { color: var(--hp-red); }
.hp-h2 {
    font-size: clamp(1.9rem, 3.4vw, 2.9rem);
    font-weight: 700;
    line-height: 1.28;
    color: var(--hp-text);
    margin: 0 0 22px;
}
.hp-section--dark .hp-h2 { color: #fff; }
.hp-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 56px;
}

/* ==========================================================================
   3. 关于我们
   ========================================================================== */
.hp-about-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(48px, 6vw, 96px);
    align-items: center;
}
.hp-about-text p {
    font-size: 16.5px;
    line-height: 2;
    color: var(--hp-text-2);
    margin: 0 0 30px;
}
.hp-about-points { list-style: none; margin: 0 0 40px; padding: 0; }
.hp-about-points li {
    position: relative;
    padding: 15px 0 15px 40px;
    border-bottom: 1px solid var(--hp-line);
    font-size: 16px;
    font-weight: 500;
    color: var(--hp-text);
}
.hp-about-points li::before {
    content: "";
    position: absolute;
    left: 4px; top: 50%;
    transform: translateY(-50%);
    width: 22px; height: 22px;
    border-radius: 50%;
    background: linear-gradient(96deg, var(--hp-red), var(--hp-red-deep));
    box-shadow: 0 6px 14px rgba(240, 47, 44, .3);
}
.hp-about-points li::after {
    content: "";
    position: absolute;
    left: 12.5px; top: 50%;
    transform: translateY(-60%) rotate(37deg);
    width: 5px; height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
}
/* 错位相框 */
.hp-about-figure { position: relative; padding: 0 34px 34px 0; }
.hp-about-figure::before {
    content: "";
    position: absolute;
    top: -26px; right: 0;
    width: 62%; height: 62%;
    border: 2px solid var(--hp-red);
    border-radius: var(--hp-radius);
    opacity: .55;
}
.hp-about-figure::after {
    content: "";
    position: absolute;
    bottom: 8px; left: 8px;
    width: 130px; height: 130px;
    background: radial-gradient(circle at 30% 30%, rgba(240,47,44,.16), rgba(240,47,44,0) 70%);
    border-radius: 50%;
}
.hp-about-figure img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: clamp(380px, 44vw, 560px);
    object-fit: cover;
    border-radius: var(--hp-radius);
    box-shadow: 0 30px 60px rgba(19, 19, 19, .16);
}
.hp-about-badge {
    position: absolute;
    z-index: 2;
    left: -22px;
    bottom: 64px;
    background: var(--hp-black);
    color: #fff;
    border-radius: var(--hp-radius);
    padding: 20px 26px;
    box-shadow: 0 20px 44px rgba(19,19,19,.28);
}
.hp-about-badge b {
    display: block;
    font: 700 30px/1 'Roboto', sans-serif;
    color: var(--hp-red);
    margin-bottom: 6px;
}
.hp-about-badge span { font-size: 12.5px; letter-spacing: .08em; color: rgba(255,255,255,.72); }

/* ==========================================================================
   4. 产品与服务 —— 悬停展开长卡
   ========================================================================== */
.hp-services-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.hp-service {
    position: relative;
    min-height: 420px;
    border-radius: var(--hp-radius);
    overflow: hidden;
    background: var(--hp-black);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px 26px;
    text-decoration: none;
    isolation: isolate;
    transition: transform .45s var(--hp-ease), box-shadow .45s var(--hp-ease);
}
.hp-service-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    transition: transform .7s var(--hp-ease), filter .7s var(--hp-ease);
    filter: saturate(.85) brightness(.62);
}
.hp-service::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(184deg, rgba(19,19,19,.24) 30%, rgba(19,19,19,.88) 88%);
    transition: background .5s;
}
.hp-service:hover .hp-service-bg,
.hp-service.is-active .hp-service-bg {
    transform: scale(1);
    filter: saturate(1) brightness(.5);
}
.hp-service:hover,
.hp-service.is-active {
    transform: translateY(-8px);
    box-shadow: 0 28px 54px rgba(19, 19, 19, .3);
}
.hp-service-no {
    position: absolute;
    top: 22px;
    right: 24px;
    font: 700 15px/1 'Roboto', sans-serif;
    letter-spacing: .12em;
    color: rgba(255, 255, 255, .55);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--hp-red);
    transition: color .4s;
}
.hp-service:hover .hp-service-no,
.hp-service.is-active .hp-service-no { color: #fff; }
.hp-service-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    color: #fff;
    margin: 0 0 12px;
}
.hp-service-desc {
    font-size: 13.5px;
    line-height: 1.85;
    color: rgba(255, 255, 255, .78);
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .55s var(--hp-ease), opacity .45s, margin .45s;
}
.hp-service:hover .hp-service-desc,
.hp-service.is-active .hp-service-desc {
    max-height: 220px;
    opacity: 1;
    margin-top: 4px;
}
.hp-service-arrow {
    position: absolute;
    bottom: 26px;
    right: 24px;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(4px);
    transform: translateY(12px);
    opacity: 0;
    transition: all .45s var(--hp-ease);
}
.hp-service:hover .hp-service-arrow,
.hp-service.is-active .hp-service-arrow {
    transform: translateY(0);
    opacity: 1;
    background: var(--hp-red);
    border-color: var(--hp-red);
}

/* ==========================================================================
   5. 最新动态 —— 图片卡片
   ========================================================================== */
.hp-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}
.hp-news-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--hp-line);
    border-radius: var(--hp-radius);
    overflow: hidden;
    text-decoration: none;
    transition: transform .4s var(--hp-ease), box-shadow .4s var(--hp-ease);
}
.hp-news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 26px 50px rgba(19, 19, 19, .13);
}
.hp-news-thumb {
    position: relative;
    aspect-ratio: 16 / 9.4;
    overflow: hidden;
    background: #d9d9d9;
}
.hp-news-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .7s var(--hp-ease);
}
.hp-news-card:hover .hp-news-thumb img { transform: scale(1.07); }
.hp-news-date {
    position: absolute;
    left: 16px;
    bottom: -16px;
    z-index: 2;
    background: #fff;
    border-radius: 10px;
    padding: 9px 15px;
    font: 700 14px/1.2 'Roboto', sans-serif;
    color: var(--hp-black);
    box-shadow: 0 10px 22px rgba(19,19,19,.14);
}
.hp-news-date::after {
    content: "";
    display: block;
    width: 26px; height: 2px;
    margin-top: 5px;
    background: var(--hp-red);
}
.hp-news-body { padding: 34px 24px 26px; }
.hp-news-title {
    font-size: 17.5px;
    font-weight: 600;
    line-height: 1.65;
    color: var(--hp-text);
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
    transition: color .3s;
}
.hp-news-card:hover .hp-news-title { color: var(--hp-red-deep); }
.hp-news-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--hp-text-2);
    transition: color .3s, gap .3s;
}
.hp-news-card:hover .hp-news-more { color: var(--hp-red); gap: 12px; }

/* ==========================================================================
   6. 项目经验 —— 深色大图轮播(复用 main.js 的 .project-exp-swiper 初始化)
   ========================================================================== */
.hp-exp .hp-exp-swiper { padding-bottom: 8px; }
.hp-exp-card {
    display: block;
    position: relative;
    border-radius: var(--hp-radius);
    overflow: hidden;
    background: var(--hp-black-soft);
    text-decoration: none;
    aspect-ratio: 4 / 3.1;
}
.hp-exp-card img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .8s var(--hp-ease), filter .6s;
    filter: brightness(.78);
}
.hp-exp-card:hover img { transform: scale(1.06); filter: brightness(.62); }
.hp-exp-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(184deg, rgba(19,19,19,.06) 40%, rgba(19,19,19,.86) 100%);
}
.hp-exp-meta {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 24px;
    z-index: 2;
}
.hp-exp-no {
    font: 700 13px/1 'Roboto', sans-serif;
    letter-spacing: .2em;
    color: var(--hp-red);
    margin-bottom: 10px;
}
.hp-exp-title {
    font-size: 18.5px;
    font-weight: 600;
    line-height: 1.6;
    color: #fff;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* 自定义分页 */
.hp-exp .hp-exp-swiper .swiper-pagination { position: static; margin-top: 10px; }
.hp-exp .hp-exp-swiper .swiper-pagination-bullet {
    width: 26px; height: 3px;
    border-radius: 0;
    background: rgba(255,255,255,.3);
    opacity: 1;
    transition: background .3s;
}
.hp-exp .hp-exp-swiper .swiper-pagination-bullet-active { background: var(--hp-red); }

/* ==========================================================================
   7. CTA 横条
   ========================================================================== */
.hp-band { background: var(--hp-black); }
.hp-band-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 74px 0;
    background:
        radial-gradient(680px 300px at 12% 0%, rgba(240, 47, 44, .16), transparent 68%),
        radial-gradient(520px 280px at 92% 110%, rgba(177, 26, 23, .2), transparent 66%);
}
.hp-band-title {
    font-size: clamp(1.5rem, 2.6vw, 2.2rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
}
.hp-band-text { font-size: 15.5px; line-height: 1.9; color: rgba(255, 255, 255, .66); margin: 0; }

/* ==========================================================================
   入场动画
   ========================================================================== */
.hp-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s var(--hp-ease), transform .8s var(--hp-ease);
    transition-delay: var(--hp-delay, 0s);
    will-change: opacity, transform;
}
.hp-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .hp-reveal { opacity: 1; transform: none; transition: none; }
    .hp-hero-media video, .hp-hero-media img { animation: none; }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1180px) {
    .hp-services-list { grid-template-columns: repeat(2, 1fr); }
    .hp-service { min-height: 400px; }
    .hp-hero-scroll { display: none; }
}
@media (max-width: 1024px) {
    .hp-section { padding: 84px 0; }
    .hp-about-grid { grid-template-columns: 1fr; gap: 56px; }
    .hp-about-figure { max-width: 620px; }
    .hp-news-grid { grid-template-columns: repeat(2, 1fr); }
    .hp-stat { padding: 34px 20px; }
}
@media (max-width: 767px) {
    body.hp-home .header { background: rgba(19, 19, 19, .72); }
    .hp-hero { min-height: 92svh; }
    .hp-hero-inner { padding: 0 20px 88px; }
    .hp-hero-title { font-size: clamp(2rem, 9vw, 2.6rem); }
    .hp-hero-sub { font-size: .95rem; margin-bottom: 34px; }
    .hp-hero-actions .hp-btn { padding: 14px 26px; font-size: 14px; }
    .hp-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .hp-stat { padding: 26px 16px; border-top: 1px solid rgba(255,255,255,.08); }
    .hp-stat:nth-child(-n+2) { border-top: none; }
    .hp-stat:nth-child(odd) { border-left: none; padding-left: 0; }
    .hp-section { padding: 64px 0; }
    .hp-container { padding: 0 20px; }
    .hp-head-row { flex-direction: column; align-items: flex-start; margin-bottom: 36px; }
    .hp-services-list { grid-template-columns: 1fr; gap: 14px; }
    .hp-service { min-height: 0; padding: 24px 20px; }
    .hp-service-desc { max-height: none; opacity: 1; } /* 移动端常显 */
    .hp-service-arrow { display: none; }
    .hp-about-figure { padding: 0 20px 24px 0; }
    .hp-about-figure img { height: 62vw; }
    .hp-about-badge { left: -6px; bottom: 30px; padding: 14px 18px; }
    .hp-about-badge b { font-size: 24px; }
    .hp-news-grid { grid-template-columns: 1fr; }
    .hp-band-inner { flex-direction: column; align-items: flex-start; padding: 54px 0; }
}
@media (max-width: 425px) {
    .hp-stat-num { font-size: 1.9rem; }
    .hp-stat-label { font-size: 12.5px; }
}

/* hero 轮播(3 张超宽背景, Swiper autoplay) */
.hp-hero-media .banner-home-swiper { position: absolute; inset: 0; }
.hp-hero-media .swiper-slide { overflow: hidden; }
.hp-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    animation: hpKenBurns 22s var(--hp-ease) infinite alternate;
    will-change: transform;
}
.hp-hero-media .swiper-pagination {
    bottom: 96px;
    z-index: 5;
}
.hp-hero-media .swiper-pagination-bullet {
    width: 30px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .4);
    opacity: 1;
    transition: background .3s, width .3s;
}
.hp-hero-media .swiper-pagination-bullet-active {
    width: 48px;
    background: var(--hp-red);
}
@media (max-width: 767px) {
    .hp-hero-media .swiper-pagination { bottom: 76px; }
    .hp-hero-media .swiper-pagination-bullet { width: 22px; }
    .hp-hero-media .swiper-pagination-bullet-active { width: 34px; }
}
