/* ==========================================================================
   Tech Hero — 现代极光科技风 Hero 区（PC + 移动端首页）
   背景：CSS 极光光晕 + 细腻噪点质感（无 Canvas、无粒子、无连线）
   Hero 自身透明，底色由页面统一通铺（见 tech-theme.css）
   依赖：沿用 Bootstrap 3.4.1
   ========================================================================== */

:root {
    --th-bg-0: #05070d;
    --th-bg-1: #0a0f1c;
    --th-bg-2: #101a2e;
    --th-cyan: #22d3ee;
    --th-blue: #3b82f6;
    --th-violet: #8b5cf6;
    --th-line: rgba(34, 211, 238, .16);
    --th-line-strong: rgba(34, 211, 238, .38);
    --th-text: #e8f1ff;
    --th-text-dim: #93a4bf;
    --th-glow: 0 0 24px rgba(34, 211, 238, .35);
    --th-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --th-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ---------- Hero 容器（透明，融入页面底色）---------- */
.th-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 0 0 8px;
    padding: clamp(88px, 10.5vw, 160px) 0 clamp(76px, 9vw, 128px);
    background:
        radial-gradient(ellipse 90% 68% at 50% -16%, rgba(34, 211, 238, .19) 0%, rgba(34, 211, 238, 0) 60%),
        radial-gradient(ellipse 52% 52% at 88% 16%, rgba(139, 92, 246, .17) 0%, rgba(139, 92, 246, 0) 66%),
        radial-gradient(ellipse 48% 48% at 8% 30%, rgba(59, 130, 246, .15) 0%, rgba(59, 130, 246, 0) 68%),
        linear-gradient(180deg, rgba(5, 7, 13, 0) 0%, rgba(6, 10, 20, .45) 50%, rgba(5, 7, 13, 0) 100%);
    color: var(--th-text);
}

/* ---------- 极光背景层 ---------- */
.th-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

/* 边缘压暗，让极光只作为氛围，不抢文字 */
.th-hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 74% 64% at 50% 46%, rgba(5, 7, 13, 0) 0%, rgba(5, 7, 13, .18) 70%, rgba(5, 7, 13, .58) 100%);
}

.th-hero__aurora {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(64px);
    will-change: transform;
    pointer-events: none;
}

.th-hero__aurora--cyan {
    width: 56vw;
    height: 44vw;
    left: 50%;
    top: -24vw;
    background: radial-gradient(ellipse at 50% 50%, rgba(34, 211, 238, .54) 0%, rgba(34, 211, 238, 0) 68%);
    animation: th-aurora-a 26s ease-in-out infinite;
}

.th-hero__aurora--violet {
    width: 44vw;
    height: 38vw;
    right: -12vw;
    top: 4%;
    background: radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, .48) 0%, rgba(139, 92, 246, 0) 68%);
    animation: th-aurora-b 32s ease-in-out infinite;
}

.th-hero__aurora--blue {
    width: 48vw;
    height: 40vw;
    left: -14vw;
    bottom: -26vw;
    background: radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, .44) 0%, rgba(59, 130, 246, 0) 68%);
    animation: th-aurora-c 29s ease-in-out infinite;
}

@keyframes th-aurora-a {
    0%, 100% { transform: translate3d(-50%, 0, 0) scale(1); }
    50%      { transform: translate3d(-46%, 20px, 0) scale(1.08); }
}

@keyframes th-aurora-b {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(-36px, 30px, 0) scale(1.12); }
}

@keyframes th-aurora-c {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(34px, -24px, 0) scale(1.1); }
}

/* ---------- 噪点质感（提升高级感，几乎不可见）---------- */
.th-hero__noise {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: .05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}

/* ---------- 动态光尘（Canvas，无连线）---------- */
.th-hero__dust {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 calc(100% - 56px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 calc(100% - 56px), transparent 100%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

/* ---------- 居中布局 ---------- */
.th-hero__inner {
    position: relative;
    z-index: 3;
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.th-hero__copy { min-width: 0; }

/* ---------- 徽标 ---------- */
.th-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 26px;
    padding: 7px 15px 7px 12px;
    border: 1px solid var(--th-line-strong);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(34, 211, 238, .10), rgba(34, 211, 238, .035));
    color: var(--th-cyan);
    font: 600 11px/1 var(--th-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 28px rgba(34, 211, 238, .12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.th-hero__badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--th-cyan);
    box-shadow: 0 0 0 0 rgba(34, 211, 238, .7);
    animation: th-pulse 2.1s ease-out infinite;
}

@keyframes th-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 211, 238, .65); }
    70%  { box-shadow: 0 0 0 11px rgba(34, 211, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

/* ---------- 主标题 ---------- */
.th-hero__title {
    margin: 0;
    font-family: var(--th-sans);
    font-size: clamp(36px, 5.9vw, 78px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.03em;
    text-wrap: balance;
    perspective: 900px;
}

.th-hero__title-line {
    display: block;
    overflow: hidden;
    padding-bottom: .06em;
}

.th-hero__title-line > span {
    position: relative;
    display: block;
    transform-style: preserve-3d;
}

/* 逐字入场：3D 翻转 + 模糊 */
.th-char {
    display: inline-block;
    opacity: 0;
    transform: translate3d(0, .72em, -70px) rotateX(-85deg) scale(.92);
    transform-origin: 50% 100%;
    filter: blur(10px);
    will-change: transform, opacity, filter;
    animation: th-char-in .9s cubic-bezier(.16, 1, .3, 1) forwards;
    animation-delay: calc(.12s + var(--i) * 58ms);
}

@keyframes th-char-in {
    0% {
        opacity: 0;
        transform: translate3d(0, .72em, -70px) rotateX(-85deg) scale(.92);
        filter: blur(10px);
    }
    55% { opacity: 1; }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) rotateX(0deg) scale(1);
        filter: blur(0);
    }
}

/* 每个字独立渐变（--c1/--c2 由 JS 生成），并持续波浪式呼吸 */
.th-char__i {
    display: inline-block;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: th-char-wave 5.4s ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.42s);
    will-change: transform, filter;
}

.th-hero__title-line:first-child .th-char__i {
    background-image: linear-gradient(180deg, #ffffff 0%, #f4faff 40%, #d3e7ff 74%, #a9c9ff 100%);
    filter: drop-shadow(0 4px 22px rgba(120, 190, 255, .22));
}

.th-hero__grad .th-char__i {
    background-image: linear-gradient(180deg, var(--c1, #7dd3fc) 0%, var(--c2, #3b82f6) 100%);
    filter: drop-shadow(0 6px 24px rgba(34, 211, 238, .22));
}

@keyframes th-char-wave {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: brightness(1) drop-shadow(0 4px 16px rgba(34, 211, 238, .16));
    }
    50% {
        transform: translateY(-3px) scale(1.012);
        filter: brightness(1.26) drop-shadow(0 0 18px rgba(34, 211, 238, .5));
    }
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .th-char__i {
        background: none;
        -webkit-text-fill-color: currentColor;
        color: var(--th-text);
        filter: none;
        animation: none;
    }
    .th-char { animation: none; opacity: 1; filter: none; transform: none; }
}

/* ---------- 副标题 / 品牌主张 ---------- */
.th-hero__desc {
    max-width: 640px;
    margin: 26px auto 0;
    color: #a9bad3;
    font-size: clamp(16px, 1.5vw, 21px);
    font-weight: 500;
    line-height: 1.75;
    letter-spacing: .16em;
    text-indent: .16em;
    opacity: 0;
    animation: th-fade-up .9s cubic-bezier(.16, 1, .3, 1) .44s forwards;
}

@keyframes th-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 操作区（移动端保留单个按钮）---------- */
.th-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 36px;
    opacity: 0;
    animation: th-fade-up .9s cubic-bezier(.16, 1, .3, 1) .58s forwards;
}

.th-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 28px;
    border: 1px solid transparent;
    border-radius: 3px;
    font: 700 13px/1 var(--th-sans);
    letter-spacing: .02em;
    text-decoration: none !important;
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.th-btn i { font-size: 12px; transition: transform .22s ease; }

.th-btn--primary {
    background: linear-gradient(100deg, var(--th-cyan), var(--th-blue));
    color: #04121f !important;
    box-shadow: 0 6px 26px rgba(34, 211, 238, .3);
}

.th-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 36px rgba(34, 211, 238, .48);
}

.th-btn--primary:hover i { transform: translateX(4px); }

.th-btn--primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .5) 50%, transparent 68%);
    transform: translateX(-130%);
}

.th-btn--primary:hover::after { animation: th-sheen .8s ease; }

@keyframes th-sheen {
    to { transform: translateX(130%); }
}

.th-btn--ghost {
    border-color: var(--th-line-strong);
    background: rgba(255, 255, 255, .03);
    color: var(--th-text) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.th-btn--ghost:hover {
    transform: translateY(-2px);
    border-color: var(--th-cyan);
    background: rgba(34, 211, 238, .1);
    box-shadow: var(--th-glow);
}

/* ---------- 指标条（玻璃卡片）---------- */
.th-hero__stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    max-width: 780px;
    margin: 48px auto 0;
    opacity: 0;
    animation: th-fade-up .9s cubic-bezier(.16, 1, .3, 1) .58s forwards;
}

.th-stat {
    position: relative;
    flex: 0 0 auto;
    min-width: 172px;
    padding: 20px 28px 17px;
    border: 1px solid rgba(34, 211, 238, .14);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .055) 0%, rgba(255, 255, 255, .014) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 14px 34px rgba(0, 0, 0, .28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.th-stat {
    transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.th-stat:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, .32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 18px 42px rgba(0, 0, 0, .34), 0 0 0 1px rgba(34, 211, 238, .08);
}

.th-stat::before {
    content: "";
    display: block;
    width: 22px;
    height: 2px;
    margin: 0 auto 13px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--th-cyan), var(--th-violet));
    opacity: .9;
}

.th-stat__num {
    display: block;
    font: 800 clamp(26px, 2.6vw, 34px)/1 var(--th-mono);
    color: var(--th-text);
    letter-spacing: -.02em;
}

.th-stat__num em {
    color: var(--th-cyan);
    font-style: normal;
    font-size: .62em;
}

.th-stat__label {
    display: block;
    margin-top: 9px;
    color: var(--th-text-dim);
    font-size: 11.5px;
    letter-spacing: .1em;
}

/* ---------- 平板 ---------- */
@media (max-width: 991px) {
    .th-hero { padding: 78px 0 90px; }
    .th-hero__aurora--cyan { width: 80vw; height: 64vw; top: -34vw; }
    .th-hero__aurora--violet { width: 56vw; height: 50vw; right: -18vw; }
    .th-hero__aurora--blue { width: 62vw; height: 52vw; left: -20vw; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
    .th-hero { padding: 62px 0 74px; }
    .th-hero__inner { padding: 0 20px; }
    .th-hero__badge { margin-bottom: 20px; font-size: 10px; letter-spacing: .1em; }
    .th-hero__title { font-size: clamp(30px, 8.6vw, 42px); }
    .th-hero__desc { margin-top: 18px; font-size: 15px; letter-spacing: .12em; text-indent: .12em; }
    .th-hero__actions { gap: 10px; margin-top: 30px; }
    .th-btn { flex: 0 0 auto; justify-content: center; padding: 13px 30px; }
    .th-hero__stats { gap: 10px; margin-top: 34px; }
    .th-stat { flex: 1 1 30%; min-width: 0; padding: 15px 10px 13px; border-radius: 13px; }
    .th-stat::before { width: 16px; margin-bottom: 10px; }
    .th-stat__num { font-size: 20px; }
    .th-stat__label { margin-top: 7px; font-size: 10px; letter-spacing: .06em; }
    .th-hero__aurora--cyan { width: 130vw; height: 100vw; top: -48vw; }
    .th-hero__aurora--violet { width: 86vw; height: 76vw; right: -34vw; }
    .th-hero__aurora--blue { width: 100vw; height: 84vw; left: -36vw; bottom: -44vw; }
}

/* ---------- 无障碍：尊重减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
    .th-hero *,
    .th-hero *::before,
    .th-hero *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .th-hero__title-line > span,
    .th-char,
    .th-char__i,
    .th-hero__desc,
    .th-hero__actions,
    .th-hero__stats {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        animation: none !important;
    }
}
