/* ========================================
   AI客服（AIW）专页
   ======================================== */

html:has(.aiw-body) {
    background-color: var(--color-bg-light);
}

.aiw-body {
    background: var(--color-bg-light);
    min-height: 100dvh;
    min-height: 100svh;
}

.aiw {
    --aiw-cyan: #38bdf8;
    --aiw-ink: #0f172a;
    --aiw-muted: #64748b;
    --aiw-section-y: clamp(4.5rem, 9vw, 7rem);
    padding-top: calc(var(--nav-offset, 72px) + env(safe-area-inset-top, 0px));
    overflow-x: hidden;
    background: var(--color-bg-light);
}

.aiw .container {
    max-width: 1240px;
}

/* 阶梯延迟（时长/位移走 style.css 全局 .fade-in） */
.aiw-hero__content > .fade-in:nth-child(1) { transition-delay: 0.04s; }
.aiw-hero__content > .fade-in:nth-child(2) { transition-delay: 0.12s; }
.aiw-hero__content > .fade-in:nth-child(3) { transition-delay: 0.2s; }
.aiw-hero__content > .fade-in:nth-child(4) { transition-delay: 0.28s; }
.aiw-hero__content > .fade-in:nth-child(5) { transition-delay: 0.36s; }

.aiw-hero__layout > .aiw-mock.fade-in {
    transition-delay: 0.22s;
}

.aiw-pain.fade-in:nth-child(1) { transition-delay: 0s; }
.aiw-pain.fade-in:nth-child(2) { transition-delay: 0.08s; }
.aiw-pain.fade-in:nth-child(3) { transition-delay: 0.16s; }

.aiw-cap.fade-in:nth-child(1) { transition-delay: 0s; }
.aiw-cap.fade-in:nth-child(2) { transition-delay: 0.08s; }
.aiw-cap.fade-in:nth-child(3) { transition-delay: 0.16s; }
.aiw-cap.fade-in:nth-child(4) { transition-delay: 0.24s; }

.aiw-step.fade-in:nth-child(1) { transition-delay: 0s; }
.aiw-step.fade-in:nth-child(2) { transition-delay: 0.07s; }
.aiw-step.fade-in:nth-child(3) { transition-delay: 0.14s; }
.aiw-step.fade-in:nth-child(4) { transition-delay: 0.21s; }

.aiw-deploy__col.fade-in:nth-child(1) { transition-delay: 0s; }
.aiw-deploy__col.fade-in:nth-child(2) { transition-delay: 0.1s; }

.aiw-scene.fade-in:nth-child(1) { transition-delay: 0s; }
.aiw-scene.fade-in:nth-child(2) { transition-delay: 0.08s; }
.aiw-scene.fade-in:nth-child(3) { transition-delay: 0.16s; }

.aiw-split > .fade-in:nth-child(1) { transition-delay: 0s; }
.aiw-split > .fade-in:nth-child(2) { transition-delay: 0.12s; }

.aiw-cta .fade-in:nth-child(1) { transition-delay: 0s; }
.aiw-cta .fade-in:nth-child(2) { transition-delay: 0.08s; }
.aiw-cta .fade-in:nth-child(3) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
    .aiw-hero__mesh {
        animation: none;
    }

    .aiw-mock__fab {
        animation: none;
    }
}

/* —— Hero —— */
.aiw-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: max(
        calc(100svh - var(--nav-offset, 72px) - env(safe-area-inset-top, 0px)),
        560px
    );
    min-height: max(
        calc(100dvh - var(--nav-offset, 72px) - env(safe-area-inset-top, 0px)),
        560px
    );
    padding: clamp(36px, 5vw, 72px) 0;
}

.aiw-hero__aurora {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 70% 50% at 12% 25%, rgba(16, 176, 252, 0.32), transparent 55%),
        radial-gradient(ellipse 55% 45% at 88% 15%, rgba(56, 189, 248, 0.18), transparent 50%),
        radial-gradient(ellipse 60% 50% at 70% 90%, rgba(14, 116, 144, 0.22), transparent 55%),
        linear-gradient(175deg, #04101c 0%, #0a1a2e 42%, #020617 100%);
    pointer-events: none;
}

.aiw-hero__aurora::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(2, 6, 23, 0.72) 100%);
}

.aiw-hero__mesh {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.28;
    background-image:
        linear-gradient(rgba(125, 211, 252, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, 0.08) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 65% at 40% 40%, black 15%, transparent 72%);
    pointer-events: none;
    animation: aiw-mesh-drift 26s linear infinite;
}

@keyframes aiw-mesh-drift {
    to {
        transform: translateY(48px);
    }
}

.aiw-hero__layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.aiw-hero__eyebrow {
    margin: 0 0 14px;
    font-size: var(--font-size-tagline);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7dd3fc;
}

.aiw-hero__title {
    margin: 0 0 12px;
    font-size: clamp(2.4rem, 5.2vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #f8fafc;
}

.aiw-hero__title span {
    background: linear-gradient(105deg, #f0f9ff 10%, #7dd3fc 45%, #38bdf8 75%, #e0f2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.aiw-hero__subtitle {
    margin: 0 0 16px;
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    font-weight: 600;
    color: #bae6fd;
}

.aiw-hero__lead {
    margin: 0 0 28px;
    max-width: 36em;
    font-size: var(--font-size-body);
    line-height: 1.75;
    color: #cbd5e1;
}

.aiw-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.aiw-hero__actions .btn-secondary {
    color: #e0f2fe;
    border-color: rgba(125, 211, 252, 0.45);
    background: rgba(15, 23, 42, 0.35);
}

.aiw-hero__actions .btn-secondary:hover {
    border-color: #7dd3fc;
    background: rgba(14, 165, 233, 0.15);
}

/* Hero mock: FAB + chat panel */
.aiw-mock {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 12px 8px 8px;
}

.aiw-mock__panel {
    width: min(100%, 340px);
    border-radius: 18px 18px 8px 18px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.92), rgba(8, 20, 36, 0.96));
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    overflow: hidden;
    transform-origin: bottom right;
}

.aiw-mock__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(125, 211, 252, 0.15);
    background: rgba(14, 165, 233, 0.08);
}

.aiw-mock__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #e0f2fe, transparent 45%),
        linear-gradient(145deg, #0ea5e9, #0369a1);
    box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.35);
    flex-shrink: 0;
}

.aiw-mock__name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
}

.aiw-mock__status {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: #7dd3fc;
}

.aiw-mock__body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aiw-mock__bubble {
    margin: 0;
    max-width: 92%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.aiw-mock__guides {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.aiw-mock__guide {
    margin: 0;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    color: #bae6fd;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(14, 165, 233, 0.12);
}

.aiw-mock__fab {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg, #38bdf8, #0284c7);
    box-shadow:
        0 10px 28px rgba(14, 165, 233, 0.45),
        0 0 0 4px rgba(14, 165, 233, 0.18);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    animation: aiw-fab-breathe 2.8s ease-in-out infinite;
    z-index: 2;
}

@keyframes aiw-fab-breathe {
    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 10px 28px rgba(14, 165, 233, 0.45),
            0 0 0 4px rgba(14, 165, 233, 0.18);
    }
    50% {
        transform: scale(1.05);
        box-shadow:
            0 14px 34px rgba(14, 165, 233, 0.55),
            0 0 0 7px rgba(14, 165, 233, 0.12);
    }
}

.aiw-mock__panel {
    margin-right: 68px;
    margin-bottom: 12px;
}

/* —— Bands —— */
.aiw-band {
    padding: var(--aiw-section-y) 0;
}

.aiw-band--light {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.aiw-band--soft {
    background:
        radial-gradient(ellipse 70% 40% at 50% 0%, rgba(14, 165, 233, 0.07), transparent 55%),
        #eef2f7;
}

.aiw-band--dark {
    background:
        radial-gradient(ellipse 60% 45% at 20% 0%, rgba(14, 165, 233, 0.16), transparent 50%),
        linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
    color: #e2e8f0;
}

.aiw-band__head {
    max-width: 40rem;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.aiw-band__head--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.aiw-band__kicker {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #0284c7;
}

.aiw-band--dark .aiw-band__kicker {
    color: #7dd3fc;
}

.aiw-band__head h2 {
    margin: 0 0 12px;
    font-size: clamp(1.55rem, 2.8vw, 2.05rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--aiw-ink);
    line-height: 1.25;
}

.aiw-band--dark .aiw-band__head h2 {
    color: #f8fafc;
}

.aiw-band__head p {
    margin: 0;
    font-size: var(--font-size-body);
    line-height: 1.7;
    color: var(--aiw-muted);
}

.aiw-band--dark .aiw-band__head p {
    color: #94a3b8;
}

.aiw-band__close {
    margin: clamp(1.75rem, 3vw, 2.5rem) 0 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0c4a6e;
}

/* Pain */
.aiw-pain-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 36px);
}

.aiw-pain {
    padding: 0;
    border: 0;
    background: none;
}

.aiw-pain__idx {
    display: block;
    margin-bottom: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: #0ea5e9;
}

.aiw-pain h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--aiw-ink);
}

.aiw-pain p {
    margin: 0;
    line-height: 1.65;
    color: var(--aiw-muted);
    font-size: 0.95rem;
}

/* Caps */
.aiw-caps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 2.5vw, 28px);
}

.aiw-cap {
    padding: clamp(22px, 2.5vw, 28px) 0;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.aiw-cap__tag {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0369a1;
}

.aiw-cap h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--aiw-ink);
}

.aiw-cap p {
    margin: 0 0 12px;
    line-height: 1.65;
    color: var(--aiw-muted);
    font-size: 0.95rem;
}

.aiw-cap__meta {
    margin: 0;
    font-size: 0.8rem;
    color: #0284c7;
}

/* Steps */
.aiw-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    counter-reset: aiw-step;
}

.aiw-step {
    position: relative;
    padding-top: 8px;
}

.aiw-step::before {
    counter-increment: aiw-step;
    content: counter(aiw-step, decimal-leading-zero);
    display: block;
    margin-bottom: 14px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #0ea5e9;
}

.aiw-step h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 750;
    color: var(--aiw-ink);
}

.aiw-step p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--aiw-muted);
}

.aiw-code {
    margin-top: clamp(2rem, 4vw, 2.75rem);
    padding: 16px 18px;
    border-left: 3px solid #0ea5e9;
    background: rgba(15, 23, 42, 0.04);
    overflow-x: auto;
}

.aiw-code pre {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #334155;
    white-space: pre;
}

.aiw-note {
    margin: 14px 0 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--aiw-muted);
}

/* Brand split */
.aiw-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 56px);
    align-items: center;
}

.aiw-split__list {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.aiw-split__list li {
    position: relative;
    padding-left: 18px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #334155;
}

.aiw-split__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0ea5e9;
}

.aiw-skins {
    display: grid;
    gap: 14px;
}

.aiw-skin {
    padding: 16px 18px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: #fff;
}

.aiw-skin__label {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
}

.aiw-skin__bar {
    height: 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.aiw-skin--cool .aiw-skin__bar {
    background: linear-gradient(90deg, #0ea5e9, #0369a1);
}

.aiw-skin--warm .aiw-skin__bar {
    background: linear-gradient(90deg, #38bdf8, #155e75);
}

.aiw-skin p {
    margin: 0;
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
}

.aiw-trust {
    margin: 20px 0 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0c4a6e;
}

/* Admin chips */
.aiw-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.aiw-module {
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    border: 1px solid rgba(125, 211, 252, 0.22);
    background: rgba(15, 23, 42, 0.35);
}

.aiw-admin-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.aiw-admin-points li {
    padding-top: 12px;
    border-top: 1px solid rgba(125, 211, 252, 0.2);
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.aiw-admin-points strong {
    display: block;
    margin-bottom: 6px;
    color: #f8fafc;
}

/* Deploy */
.aiw-deploy {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 4vw, 40px);
}

.aiw-deploy__col h3 {
    margin: 0 0 14px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--aiw-ink);
}

.aiw-deploy__col dl {
    margin: 0;
    display: grid;
    gap: 12px;
}

.aiw-deploy__col dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0284c7;
}

.aiw-deploy__col dd {
    margin: 4px 0 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--aiw-muted);
}

/* Scenarios */
.aiw-scenes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 32px);
}

.aiw-scene h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    font-weight: 750;
    color: var(--aiw-ink);
}

.aiw-scene p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--aiw-muted);
}

/* Cases：4 列等宽（1:1 均分）；卡片内装 GIF(168×224 原尺寸)+Title+Brief，不放大 GIF */
.aiw-cases-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 32px) clamp(24px, 3vw, 40px);
    align-items: stretch;
    width: 100%;
}

.aiw-case {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 16px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
}

.aiw-case:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.aiw-case--static:hover {
    transform: none;
    cursor: default;
}

.aiw-case:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 4px;
}

.aiw-case__media {
    margin: 0;
    box-sizing: border-box;
    width: 168px;
    height: 224px;
    flex: none;
    overflow: hidden;
    background: #0f172a;
}

.aiw-case__media img {
    display: block;
    width: 168px;
    height: 224px;
    max-width: 168px;
    object-fit: cover;
    object-position: top center;
}

.aiw-case__body {
    margin-top: 12px;
    width: 100%;
    text-align: center;
}

.aiw-case__title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 750;
    color: var(--aiw-ink);
    line-height: 1.35;
}

.aiw-case__bref {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--aiw-muted);
}

.aiw-cases-more {
    margin-top: clamp(28px, 4vw, 40px);
    text-align: center;
}

.aiw-cases-more[hidden] {
    display: none;
}

/* CTA */
.aiw-cta {
    text-align: center;
    padding: clamp(4rem, 8vw, 6rem) 0;
}

.aiw-cta h2 {
    margin: 0 0 12px;
    font-size: clamp(1.55rem, 2.8vw, 2.1rem);
    font-weight: 800;
    color: #f8fafc;
}

.aiw-cta p {
    margin: 0 auto 28px;
    max-width: 32rem;
    color: #94a3b8;
    line-height: 1.7;
}

.aiw-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.aiw-cta__actions .btn-secondary {
    color: #e0f2fe;
    border-color: rgba(125, 211, 252, 0.4);
    background: transparent;
}

/* Responsive */
@media (max-width: 960px) {
    .aiw-hero__layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .aiw-mock {
        min-height: 360px;
        justify-content: center;
        max-width: 400px;
        margin: 0 auto;
    }

    .aiw-pain-grid,
    .aiw-caps,
    .aiw-split,
    .aiw-deploy,
    .aiw-scenes,
    .aiw-admin-points {
        grid-template-columns: 1fr;
    }

    .aiw-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aiw-cases-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .aiw-cases-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .aiw-steps {
        grid-template-columns: 1fr;
    }

    .aiw-mock__panel {
        margin-right: 60px;
    }

    .aiw-cases-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
